# Overbrace/underbrace without extending brackets/parentheses

I'm using \overbrace to explain a part of an equation, like this:

\begin{align}
a\left[\frac{d\cos y}{e} + \overbrace{\frac{b\sin x}{c}}^{\text{second bit}}\right]
\end{align}


But the overbrace increases the height of the brackets unnecessarily:

Really, what I'd like is for the height of the brackets to be unrelated to the overbrace, like this:

Is this possible?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$a\Bigl[\frac{d\cos y}{e} + \overbrace{\frac{b\sin x}{c}}^{\text{second bit}}\Bigr]$$
\end{document}

• See section 6 of the AMS Short Math Guide for more on Bigl and family. – LondonRob Nov 24 '14 at 12:25
• unfortunately, the space before the closing bracket is a bit wider than what would look best. – barbara beeton Nov 24 '14 at 13:34
• @barbarabeeton for you, a \! – David Carlisle Nov 24 '14 at 13:48

You can often literally smash the part which fiddles with your desired height :)

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$a\left[\frac{d\cos y}{e} + \smash{\overbrace{\frac{b\sin x}{c}}^{\text{second bit}}}\right]$$
\end{document}


This comes closer to the posted intended output than David's answer, concerning the size of the brackets. \smash is a macro defined in both plain TeX and the LaTeX kernel. It reduces the height of its arguments to zero.

• This looks interesting. Would you mind adding a bit of explanation, perhaps with a link to something to read about smash? – LondonRob Nov 24 '14 at 13:21
• Added a little explanation. More details can also be found there -> tex.stackexchange.com/questions/171776 – Harald Nov 24 '14 at 13:25
• @LondonRob Note though that this completely hides the brace so it will over-print any text before the equation unless you add a \vspace to make some room. – David Carlisle Nov 24 '14 at 13:47
• @DavidCarlisle a very important consideration! – LondonRob Nov 24 '14 at 13:51