Similar to: How to put a big bracket under different parts of a equation so that I could write e.g. a text specific to that part in the equation?

But when I do it, other brackets are effected:

$\left[... + \overbrace{...}^{...}\right]$

The right and left are enlarged to cover the \overbrace which is very ugly and makes the brace look like part of the equation. I do not want the \overbrace to effect layout in any way (the equation itself should look the same - or nearly so).

If I remove the \left and \right, it looks the way I want except I do not have the left and right brackets. With them they are very large and it looks ugly.

  • Welcome to TeX.SX! What is the problem with $[a + \overbrace{b}^{c}]$. Then the brackets are there in normal size.
    – dexteritas
    Nov 30 '19 at 16:19

\left[ and \right] determine the size of the delimiters by looking of the content between them, including the \overbrace. To have them ignore the brace, put it inside a \smash. This is demonstrated by the second line in the example below.

Since you mention that the brace should not effect the layout in any way, you might also want to ignore the width of the annotation added to the brace. You can achieve this by putting the annotation inside a box of zero width, \makebox[0pt]. This is shown by the third line.

The fourth line finally combines the two. Be aware that both \smash and \makebox can lead to undesirable results here, as they disable the automatic adjustment of spaces and positioning. With \smash, you can end up with too small brackets on the sides. With \makebox, the annotation text can easily overlay other math symbols in the equation.

\left[\frac{a}{b}+\overbrace{\phi\times\rho}^{\text{my annotation}}+\int_0^\infty\right] \\[1em]
\left[\frac{a}{b}+\smash{\overbrace{\phi\times\rho}^{\text{my annotation}}}+\int_0^\infty\right] \\[1ex]
\left[\frac{a}{b}+\overbrace{\phi\times\rho}^{\text{\makebox[0pt]{my annotation}}}+\int_0^\infty\right] \\[1em]
\left[\frac{a}{b}+\smash{\overbrace{\phi\times\rho}^{\text{\makebox[0pt]{my annotation}}}}+\int_0^\infty\right]

enter image description here

  • 2
    Depending on the part of the equation being \overbraced, it might be better to use \smash{\overbrace{<math>}^{<stuff>}}\vphantom{<math>}, together with possible overlapping suppression of <stuff>.
    – Werner
    Dec 1 '19 at 18:44

Your Answer

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

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