Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to balance underbraces in the equation below, how can I ensure that both underbraces at the same depth?

\begin{equation}
y = \underbrace{ \left [ x^2 + r^2 (a^2+\frac{a^{0.3}}{b}) \right]}_\text{growth rate} \times  \underbrace{ C_0}_\text{initial}
\end{equation} 
share|improve this question
1  
add comment

1 Answer

up vote 13 down vote accepted

One way to solve this is to insert a "vertical phantom" -- an object with a certain height and depth but no width and therefore invisible, hence its name "phantom" -- in the second \underbrace expression.

In the case at hand, an immediately ready argument for such a \vphantom is the tallest "math molecule" from the first \underbrace expression; this turns out to be the term \left(\frac{a^{0.3}}{b}\right).

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
y = \underbrace{ 
        \left [ x^2 + r^2 \left(a^2+\frac{a^{0.3}}{b}\right) \right] 
    }_\text{growth rate} \times  
    \underbrace{ 
        \vphantom{ \left(\frac{a^{0.3}}{b}\right) } C_0
    }_\text{initial}
\end{equation} 
\end{document}
share|improve this answer
1  
For the reader (I know Mico knows this already :-)): You don't need to put the whole exact same expression into the phantom, you could box it the first time, and then \copy the box. Or go with what Werner did in his (now deleted) answer; instead of \left[<sub expression>\right], he used \bigl[ in the formula, so he just used only \bigl[ with the phantom, which is shorter to type. –  morbusg Jan 16 at 14:11
1  
@morbusg - Indeed, if one happens to know the exact height and depth of the required vphantom, it's certainly much more straightforward to enter this piece of information directly rather than to insert some block of code. :-) At any rate, I wouldn't recommend inserting various phantoms until a very late stage, when the document is almost completely finished. If one starts engaging in visual formatting of this type earlier on, there's a serious risk one will have to redo the phantoms every time a formula changes in some significant way. –  Mico Jan 16 at 14:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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