5

enter image description here

\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}
  • Your problem is not very clear. Could you be more explicit? – Bernard Feb 2 at 0:29
  • 4
    Use \scriptstyle: \documentclass{article} \usepackage{amsmath} \begin{document} \[a^9 \cdot a^{99} \cdot a^{999} \cdot a^{9999} \cdots a^{\overbrace{\scriptstyle 999 \cdots 9}^{\text{10 digits}}}=a^x\] \end{document}. And please do not use $$ ... $$ but \[ ... \] as in the above example. – Schrödinger's cat Feb 2 at 0:37
7

I recommend not using \underbrace and \overbrace directly, because they can have bad effects on spacing.

Here's a version that changes sizes when in subscripts or superscripts.

\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}

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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