How can I set how much vertical spacing is put between my equation and the curly bracket used in underbrace?

As an example, I feel like the following just puts the brace too close to the equation:

\underbrace{c = a + b}_{\text{my equation}}

Many thanks...


You can put a \strut just before c to enlarge the depth of your equation and if you still find the curly bracket too close, you can also define your own "strut":

\newcommand*\mystrut[1]{\vrule width0pt height0pt depth#1\relax}
$\underbrace{c = a + b}_{\text{my equation}}$
$\underbrace{\strut c = a + b}_{\text{my equation}}$
$\underbrace{\mystrut{1.5ex}c = a + b}_{\text{my equation}}$
$\underbrace{\mystrut{2.5ex}c = a + b}_{\text{my equation}}$
| improve this answer | |

The mathtools package has a very useful implementation of \underbracket and \overbracket that take two extra parameters: the gauge of the bracket and its distance from the text. From Sec. 3.3.2 (v. 1.10) of the package documentation:

\underbracket[〈rule thickness〉] [〈bracket height〉]{〈arg〉} 
\overbracket[〈rule thickness〉] [〈bracket height〉]{〈arg〉}

The 〈arg〉 can be of the form {bracketed matter}_{label} (or substituting ^ for _ in the case of \overbracket).

The documentation discusses infelicities of spacing in the traditional \underbrace and \overbrace, and seems to be saying that the package contains a revised from of these, as well. If so the revised versions do not seem to be as finely adjustable as \underbracket and \overbracket, and they are not documented in the documentation.

| improve this answer | |

Your Answer

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