0

enter image description here

I would like to shorten this underbrace so that it terminates directly underneath the vertical bars without extending past them.

Minimal Working Example:

\documentclass{report}
\newcommand{\Underbrace}[2]{{\underbrace{#2}_{#1}}}

\begin{document} [\Underbrace{a}{|x+y|}] \end{document}

1 Answers1

1

You can try one of these solutions – the second is similar to @Werner's suggestion, with the negative thin spaces compensated with thin spaces befor and after the underbrace:

\documentclass{report}
\newcommand{\Underbrace}[2]{{\underbrace{#2}_{#1}}}

\begin{document}

\[\Underbrace{a}{|x+y|} \neq |\Underbrace{a}{x+y}|\neq\,\Underbrace{a}{\!|x+y|\!}\,\]

\end{document}

enter image description here

Bernard
  • 271,350