TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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.

share|improve this answer
+1 for "not unreasonable". – T. Verron Mar 14 '14 at 16:48

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

share|improve this answer
Or you could set the entire expression in display math:-) – David Carlisle Mar 14 '14 at 17:21
Good point..... – David Carlisle Mar 14 '14 at 17:29
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
@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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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