I have found that using an \underbrace
on a term in an equation causes the spacing of the following terms to be changed, in particular, the +
is moved closer to the \dot{m}
. This seems to be distinct from the problem in Oversized \underbrace's label causes unwanted spacing because
- the amount of space is getting smaller
- the label under the brace is not larger than the brace
- trying
\mathclap
as suggested in that question doesn't help
I noticed this problem when putting together a presentation in beamer
, but I'm able to reproduce it in the standard article
class as well. Changing the font doesn't help either (I noticed the problem with TeX Gyre Pagella Math). How can I avoid changing the spacing surrounding an underbrace?
\documentclass{article}
\begin{document}
\[ \dot{W}_{cv} + \dot{m} \]
\[ \underbrace{\dot{W}_{cv}}_{=0} + \dot{m} \]
\[ \underbrace{\dot{W}}_{=0} + \dot{m} \]
\end{document}
Best Answer
The definition of
\underbrace
inlatex.ltx
is essentially borrowed from Plain TeX:This allows the syntax
but has the consequence you can see in your example.
The spacing would be the same as with
Solution: add braces, which make the object into an ordinary atom.
The proper syntax for LaTeX would be
and you can obtain it by saying