1

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

1 Answer 1

2

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}

enter image description here

1
  • @Educ I made an edit that I hope reflects your underlying intent. Nov 18, 2017 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .