# Underbraced text under sum is in different size from other

Text in underbrace under sum is bigger than other.

\sum_{{\{a,b,c,d,e,f\}=\{\underbrace{a,b,c,d}_{4\ terms}},e,f\}}


How can I solve this neatly.

-
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  SoundsOfSilence Jul 2 '14 at 18:45
–  egreg Jul 2 '14 at 19:23

You could add the math-mode directive \scriptstyle to the first argument of \underbrace:

\documentclass{article}
\usepackage{amsmath} % provides "\underbrace" and "\text" macros
\begin{document}
$\sum_{{\{a,b,c,d,e,f\}=\{\underbrace{\scriptstyle a,b,c,d}_{\text{4 terms}}},e,f\}}$
\end{document}


Addendum, prompted by a comment by @Werner:

A second issue (besides the one raised in your posting, about getting the font size right for the first argument of \underbrace) arises if the width of the material in the second argument of the \underbrace macro is greater than that of the first argument. In such cases, you can encase the second argument in a \mathclap directive. (\mathclap is a macro provided by the mathtools package.)

\documentclass{article}
\usepackage{mathtools}      % provides "\mathclap" macro,
$\sum_{\{a,b,c,d,e,f\}=\{\underbrace{\scriptstyle a,b,c,d}_{\text{Lots and lots of terms}},e,f\}}$
$\sum_{\{a,b,c,d,e,f\}=\{\underbrace{\scriptstyle a,b,c,d}_{\mathclap{\text{Lots and lots of terms}}},e,f\}}$

If 4 terms is wider than a,b,c,d, you may want to consider using \mathclap{..} from mathtools. –  Werner Jul 2 '14 at 18:50
@Werner - I've provided an addendum to illustrate how \mathclap can fix the problem that arises if the width of the second argument of \underbrace exceeds that of the first argument. –  Mico Jul 2 '14 at 21:28