5

In the following example, I would like to to keep the Q''(p) on the same line as the rest of the equation, and put the vinculum and 2 underneath.

\documentclass[12pt,reqno]{amsart}
\usepackage{amsfonts}
\usepackage{amsmath}

\begin{document}
\begin{align}
  \label{eq:3of3}
  \int_{0}^{1} \phi(p)\frac{Q''(p)}{2} \int_{0}^{1} (\Delta p)^{2}\mathcal{P}(\Delta p)\; \mathrm{d}p'\; \mathrm{d}p
\end{align}
\end{document}

The equation currently looks like this: enter image description here

And I would like something like this: enter image description here

5
  • Why not put \phi(p) in the numerator, as well? Oct 12 '12 at 14:43
  • 2
    Welcome to TeX.SX! What would be the special meaning?
    – egreg
    Oct 12 '12 at 14:44
  • @Andrew Oh, I could, and honestly, I'm not sure I like either of these layouts. Most likely I will just use \frac{1}{2} in front of the Q''. I was just curious how one could do this.
    – AGS
    Oct 12 '12 at 14:44
  • @egreg, Thanks! I am not sure of any special meaning, just curious as to how one could do this. Maybe not for this eq. but perhaps somewhere down the road this would be useful.
    – AGS
    Oct 12 '12 at 14:50
  • 4
    @AGS Yes, it can be done, of course. But it's contrary to centuries of mathematical typography.
    – egreg
    Oct 12 '12 at 14:52
2

This "crazy" variant of a fraction is generated by \underline and an operator subscript:

\documentclass[12pt,reqno]{amsart}
\usepackage{amsfonts}
\usepackage{amsmath}

\begin{document}
\begin{align}
  \label{eq:3of3}
  \int_{0}^{1} \phi(p)\mathop{\underline{Q''(p)}}\limits_{\textstyle2}
  \int_{0}^{1} (\Delta p)^{2}\mathcal{P}(\Delta p)\; \mathrm{d}p'\; \mathrm{d}p
\end{align}
\end{document}

Result

For comparison, other variants from the comments:

\documentclass[12pt,reqno]{amsart}
\usepackage{amsfonts}
\usepackage{amsmath}

\begin{document}
\begin{align}
  \label{eq:3of3}
  \int_{0}^{1} \frac{\phi(p)\, Q''(p)}{2}
  \int_{0}^{1} (\Delta p)^{2}\mathcal{P}(\Delta p)\; \mathrm{d}p'\; \mathrm{d}p
\end{align}
\end{document}

Result

\documentclass[12pt,reqno]{amsart}
\usepackage{amsfonts}
\usepackage{amsmath}

\begin{document}
\begin{align}
  \label{eq:3of3}
  \int_{0}^{1} \frac{1}{2}\,\phi(p)\, Q''(p)
  \int_{0}^{1} (\Delta p)^{2}\mathcal{P}(\Delta p)\; \mathrm{d}p'\; \mathrm{d}p
\end{align}
\end{document}

Result

With smaller digits:

\documentclass[12pt,reqno]{amsart}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{textcomp}

\begin{document}
\begin{align}
  \label{eq:3of3}
  \int_{0}^{1} \tfrac{1}{2}\, \phi(p)\, Q''(p)
  \int_{0}^{1} (\Delta p)^{2}\mathcal{P}(\Delta p)\; \mathrm{d}p'\; \mathrm{d}p
\end{align}
\end{document}

Result

13

With no measurement (available only in display math mode):

\def\crazyfrac#1#2{\raisebox{-\fontdimen8\textfont2}{$\displaystyle\frac{#1}{#2}$}}

enter image description here

It's horrible and, above all, confusing. I decline any responsibility in case of use of this macro in a real document.

2
  • +1 we should get this engraved on your tombstone (not that you need one yet) Oct 12 '12 at 15:37
  • 4
    @DavidCarlisle Inside a 257 side regular polygon constructed with ruler and compass in TikZ.
    – egreg
    Oct 12 '12 at 15:41
8

Don't do this or @egreg will never forgive me.

enter image description here

\documentclass[12pt,reqno]{amsart}
\usepackage{amsfonts}
\usepackage{amsmath}

\def\horriblefrac#1#2{%
  \setbox0\hbox{$\displaystyle#1$}%
  \setbox2\hbox{$\displaystyle\frac{#1}{#2}$}
  \dimen0\ht0
  \advance\dimen0-\ht2
  \raise \dimen0 \box2}
\begin{document}
\begin{align}
  \label{eq:3of3}
  \int_{0}^{1} \phi(p)\horriblefrac{Q''(p)}{2} \int_{0}^{1} (\Delta p)^{2}\mathcal{P}(\Delta p)\; \mathrm{d}p'\; \mathrm{d}p
\end{align}
\end{document}
1
  • You're forgiven, but my macro is better than yours.
    – egreg
    Oct 12 '12 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.