
Respuesta1
Recomiendo no usar \underbrace
y \overbrace
directamente, porque pueden tener efectos negativos en el espaciado.
Aquí hay una versión que cambia de tamaño cuando está en subíndices o superíndices.
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\oubr@demote}[1]{%
\ifx#1\displaystyle\scriptstyle\else
\ifx#1\textstyle\scriptstyle\else
\scriptscriptstyle\fi\fi
}
\newcommand{\obr}[2]{{\mathpalette\oubr@over{{#1}{#2}}}}
\newcommand{\oubr@over}[2]{\oubr@@over#1#2}
\newcommand{\oubr@@over}[3]{\overbrace{#1#2}^{\oubr@demote#1#3}}
\newcommand{\ubr}[2]{{\mathpalette\oubr@under{{#1}{#2}}}}
\newcommand{\oubr@under}[2]{\oubr@@under#1#2}
\newcommand{\oubr@@under}[3]{\underbrace{#1#2}_{\oubr@demote#1#3}}
\makeatother
\begin{document}
\[
\ubr{a^9 \cdot a^{99} \cdot a^{999} \cdot a^{9999} \cdots
a^{\obr{999 \cdots 9}{\text{10 digits}}}}
{\text{umpteen times}}
\]
\end{document}