4

Comment a portion of an equation with a bracket and some text and/or formula

I belive that the image says it all. I have searched on the Internet but apparently I don't use the correct keywords.

2

2 Answers 2

5

The construct that you are searching for is the \underbrace{}_{} command. Compare the following example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
    \[
    \underbrace{\sum_{i=0}^n \binom{n}{i}}_{=2^n}
    + \underbrace{3n^2m^2}_{\text{correction factor}}
    \]
\end{document}

enter image description here

As you can see from the output there is some drawback for cases where the content under the brace is significantly larger than the content above or if there are elements which differ a lot in height.

The former case can be addressed by using the \substack command (as proposed in @Bernard's answer:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
    \[
    \underbrace{\sum_{i=0}^n \binom{n}{i}}_{=2^n}
    + \underbrace{3n^2m^2}_{\substack{\text{correction}\\\text{factor}}}
    \]
\end{document}

enter image description here

0
1
\[
  \underbrace{\sum_{i=0}^n\binom{n}{i}} _ {=2^n}
  +\underbrace{3n^2 m^2} _ {\substack{\text{correction}\\\text{factor}}}
\]

should do the work. If ‘=2^n’ is too small, you may use the ‘\mathlarger’ command (from the relsize package). For the second coment, the ordinary size commands for textmode will be enough. You also should load the mathtools package, as it gives better control on the appearance of the brackets.

1
  • I've formatted your answer a bit better, check the code (by hitting edit) to see how I did it. As well, I think it's preferrable to use \substack (which makes two identical lines) than \stackrel (which serves a completely different purpose).
    – yo'
    Oct 1, 2013 at 13:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .