I would like to stay in math mode by using $ delimiters. But when I use this code:


$\big(\sum_{j=1}^n\delta_{j,k}x_k\big)_{1\leq k\leq n}
=\big(\underbrace{\sum_{j=1}^n\delta_{j,k}}_{1_A}x_k\big)_{1\leq k\leq n}$


I get this:

enter image description here

On the right, it looks as if I was in displaymath. Why? Should I use \textstyle whenever I use \underbrace?

  • 1
    why do you want this expression to be inline math rather than display? – David Carlisle Mar 14 '14 at 16:51
  • When you add an underbrace, it increases the depth of the expression so much that there is almost a guarantee of uneven linespacing below it. Because of this, it is a "(not unreasonable) assum[p]tion" (to quote D.Carlisle) for \underbrace to expect it has been used in a display, where that extra vertical space is not a problem. – Dan Mar 14 '14 at 18:44
  • @Dan feel free to edit my typos (I fixed that one thanks:-) – David Carlisle Mar 14 '14 at 20:42

underbrace is defined in the latex format as


There is a (not unreasonable:-) assumption that no one would want textstyle here. So if you really do want that you would have to re-assert it in the argument as you suggest in your question.


So given that David has told you why it is that way, there are several things you can do with that information. You can create your own macro \tunderbrace that is just like \underbrace but in text style, by altering the existing definition.

Or you, just for fun, create your own version, \Tunderbrace, using stacks:

\usepackage{stackengine, scalerel, graphicx}
    \scriptstyle #2%
\parskip 1em
$\tunderbrace{\sum_{j=1}^n \delta_{j,k}}_{1_A}x_k$\par
$\Tunderbrace{\sum_{j=1}^n \delta_{j,k}}{1_A}x_k$

enter image description here

  • Or you could set the entire expression in display math:-) – David Carlisle Mar 14 '14 at 17:21
  • Oh you deleted it just as I was agreeing:-) – David Carlisle Mar 14 '14 at 17:30
  • @DavidCarlisle You are not being "not unreasonable", are you? Or maybe you are, when I work my way through the triple-negation. Oh, my head hurts. – Steven B. Segletes Mar 14 '14 at 17:31
  • 1
    @StevenB.Segletes You don't really need something as powerful as stackengine to define a macro like \newcommand\tunderbrace[1]{\underbrace{\textstyle{#1}}} – Dan Mar 14 '14 at 18:43
  • @Dan Indeed. As I said, it was merely "for fun"...just honing my stacking skills. But readers should take note of your comment. – Steven B. Segletes Mar 14 '14 at 18:46

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.