# underbrace in superscript exponentiation [duplicate]

So I have this latex code

\underbrace{
a^{\frac{1}{n}} \cdot a^{\frac{1}{n}} \cdot \ldots \cdot a^{\frac{1}{n}}
}_{n\text{-times}}} =
a^{
\underbrace{
\frac{1}{n} + \frac{1}{n} + \ldots + \frac{1}{n}
}_{n\text{-times}}
} =
a^{1} = a


that renders in this formula: but as you can see the second summation in the exponent is rendered too big.

How to typeset it correctly?

## marked as duplicate by egreg, Przemysław Scherwentke, Werner, Paul Gessler, Gonzalo MedinaMar 3 '15 at 19:28

• I believe something very similar has already appeared: \underbrace{\scriptstyle...}_{n\text{ times}} (no hyphen, in my opinion). – egreg Mar 3 '15 at 18:04
• Does Heiko's solution to tex.stackexchange.com/questions/155043/… satisfy you? – egreg Mar 3 '15 at 18:07
• Yes, thank you very much. It does it perfectly. – implicit_knowledge Mar 3 '15 at 18:17

So adding \scriptstyle does the trick (thanks to @egreg):

\underbrace{
a^{\frac{1}{n}} \cdot a^{\frac{1}{n}} \cdot \ldots \cdot a^{\frac{1}{n}}
}_{n\text{-times}}} =
a^{
\underbrace{\scriptstyle{
\frac{1}{n} + \frac{1}{n} + \ldots + \frac{1}{n}}
}_{n\text{-times}}
} =
a^{1} = a 