# Keep numerator inline with rest of equation

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:

And I would like something like this:

-
Why not put \phi(p) in the numerator, as well? –  Andrew Uzzell Oct 12 '12 at 14:43
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
@AGS Yes, it can be done, of course. But it's contrary to centuries of mathematical typography. –  egreg Oct 12 '12 at 14:52

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}


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}


\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}


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}


-

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

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


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

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

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

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

\def\horriblefrac#1#2{%
\setbox0\hbox{$\displaystyle#1$}%
\setbox2\hbox{$\displaystyle\frac{#1}{#2}$}
\dimen0\ht0