6
\begin{equation} \label{eq:pressure3}
\cfrac{P_2}{P_0} = \cfrac{C_2}{C_2 + S^*_2}\cdot\cfrac{C_1}{C_1+S^*_1+\cfrac{C_2 S^*_2}{C_2+S^*_2}}
\end{equation}

How can I bring the first denominator at the same height as the second denominator?

enter image description here

1
  • 7
    You don't want it, trust me. ;-) – egreg Jun 16 '16 at 19:24
10

(see FOLLOW UP below for a more general approach)

Here a \vphantom of the tall term, added to the first term, can help.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation} \label{eq:pressure3}
\cfrac{P_2}{P_0} = \cfrac{C_2}{C_2 + S^*_2\vphantom{\cfrac{S^*_2}{S^*_2}}}
  \cdot\cfrac{C_1}{C_1+S^*_1+\cfrac{C_2 S^*_2}{C_2+S^*_2}}
\end{equation}
\end{document}

enter image description here

FOLLOW UP

In response to David's comment, rather than over-exercising the \vphantom approach above, I introduce \sfrac which uses the values of \topgap and \botgap as baselineskips to the numerator and denominator, regardless of the height of those quantities. It thus avoids the use of \vphantoms.

It would be intended to use on the first level of all terms of the fraction.

\documentclass{article}
\usepackage{amsmath,stackengine}
\def\topgap{7pt}
\def\botgap{\topgap}
\newcommand\sfrac[2]{\def\stacktype{L}\ensurestackMath{%
  \stackunder[\botgap]{\stackon[\topgap]{\dfrac{\phantom{#1}}{\phantom{#2}}}{#1}}{#2}%
}}
\begin{document}
\begin{equation}
\def\botgap{15pt}
\sfrac{P_2}{P_0} = \sfrac{C_2}{C_2 + S^*_2}
  \cdot\sfrac{C_1}{C_1+S^*_1+\cfrac{C_2 S^*_2}{C_2+S^*_2}}
\end{equation}
\end{document}

enter image description here

2
  • 1
    Now P₀ looks funny. This is going nowhere good.... ;) – Dɑvïd Jun 17 '16 at 19:21
  • @David See my follow-up. It is less nowhere-good than the \vphantom approach. – Steven B. Segletes Jun 17 '16 at 23:28

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.