# Underbrace or overbrace, in text mode, for a partial word

Is there any possible to underbrace or overbrace only some letter among word and not the whole word

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}

\begin{document}
$a\underbrace{pp}_{p}el$

\end{document}

• Isn't this doing what you want? By the way, the option is called a4paper, not A4paper. – egreg Nov 18 '17 at 21:10
• – user121799 Nov 18 '17 at 21:13

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}


• @Educ I made an edit that I hope reflects your underlying intent. – Steven B. Segletes Nov 18 '17 at 21:48