¿Cómo hacer que todos los exponentes tengan el mismo tamaño?

¿Cómo hacer que todos los exponentes tengan el mismo tamaño?

ingrese la descripción de la imagen aquí

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
a^9 \cdot a^{99} \cdot a^{999} \cdot a^{9999} \cdots 
   a^{\overbrace{999 \cdots 9}^{\text{10 digits}}}=a^x
\]
\end{document}

Respuesta1

Recomiendo no usar \underbracey \overbracedirectamente, 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}

ingrese la descripción de la imagen aquí

información relacionada