16

Consider the following example

\begin{equation}
    \begin{split}
        f = & \left( \frac{a}{b} + \right. \\
                   & \left. c \right) + d 
    \end{split}
\end{equation}

In the result, the left parenthesis on the first line is very large, because of the fraction inside. In the second line, since there is no fraction, the parenthesis is small.

How can I make the one on the second line match the one on the first line in height?

Mateusz Piotrowski
  • 8,029
  • 10
  • 53
  • 79
cheshirekow
  • 4,797
  • 6
  • 43
  • 47
  • I seem to recall something like a "ghost" command, but I cannot find anything on google or in the documentation. – cheshirekow Jan 02 '10 at 06:36

4 Answers4

22

You should use \vphantom, it makes a vertical space equal to its argument and no horizontal space:

\begin{equation}
    \begin{split}
        f = & \left( \frac{a}{b} + \right. \\
                   & \left. \vphantom{\frac{a}{b}} c \right) + d 
    \end{split}
\end{equation}

(I recommend \vphantom over \phantom in this case because \phantom adds horizontal space that you don't need.)

For a lot of great advice on typesetting mathematics, have a look at Math mode by Herbert Voß.

DanielTuzes
  • 2,494
  • 24
  • 40
Alok Singhal
  • 93,253
  • 21
  • 125
  • 158
  • Yeah, I actually saw that when I found phantom on google. But you're right. Bonus points for the awesome reference. Thanks! – cheshirekow Jan 03 '10 at 12:30
  • Thanks. I like that document a lot. Anyway, I would have made my post into a comment, but I felt that there was enough independent information to make it a reply. – Alok Singhal Jan 03 '10 at 12:47
3

Oh. It's the \phantom{} command

\begin{equation}
    \begin{split}
        f = & \left( \frac{a}{b} + \right. \\
                   & \left. \phantom{\frac{a}{b}} c \right) + d 
    \end{split}
\end{equation}
cheshirekow
  • 4,797
  • 6
  • 43
  • 47
3

You can also use \big( \big) to set the size specifically.

The order goes (, \big(, \Big(, \bigg(, \Bigg( for increasing bigness.

forefinger
  • 3,767
  • 1
  • 22
  • 18
  • 1
    yeah, I've used that before, but I don't like having to specify manually... I'm always afraid of having to change the stuff inside and then not notice that the parentheses don't match. – cheshirekow Sep 02 '10 at 17:47
0

I think you want to use the \vphantom{} command

\begin{equation}
\begin{split}
    f = & \left( \frac{a}{b} + \right. \\
               & \left. \phantom{\frac{a}{b}} c \right) + d 
\end{split}
\end{equation}
Mateusz Piotrowski
  • 8,029
  • 10
  • 53
  • 79
KJC2009
  • 59
  • 1
  • 17