
答え1
スペースに悪影響を与える可能性があるため、\underbrace
and を直接使用しないことをお勧めします。\overbrace
下付き文字または上付き文字の場合にサイズが変わるバージョンを次に示します。
\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}