Since the extensible \upbracefill
has a minimum width, this alternate approach just scales a normal \{
(rotated 90 degrees) to the right size (with width limiting). Thus, to use this approach for a very wide argument, there is an optional argument that can be specified, for example as [\Bigg]
.
EDITED for \Toverbrace
, as well.
\documentclass{article}
\usepackage{stackengine, scalerel}
\newcommand\Tunderbrace[3][]{%
\def\tmp{#2}%
\setbox0=\hbox{\tmp}%
\stackunder[1pt]{%
\stackunder[0pt]{\tmp}{\rotatebox{90}{\scaleto[2ex]{#1\{}{\wd0}}}%
}{%
\scriptsize #3%
}%
}
\newcommand\Toverbrace[3][]{%
\def\tmp{#2}%
\setbox0=\hbox{\tmp}%
\stackon[1pt]{%
\stackon[0pt]{\tmp}{\rotatebox{90}{\scaleto[2ex]{#1\}}{\wd0}}}%
}{%
\scriptsize #3%
}%
}
\begin{document}
a\Tunderbrace{pp}{p}le
a\Tunderbrace[\big]{pppppp}{p}le
a\Tunderbrace[\Bigg]{pppppppppppppppp}{p}le
a\Toverbrace{pp}{p}le
a\Toverbrace[\big]{pppppp}{p}le
a\Toverbrace[\Bigg]{pppppppppppppppp}{p}le
\end{document}

a4paper
, notA4paper
.