TransWikia.com

Control the width of an underbrace

TeX - LaTeX Asked by simple jack on May 21, 2021

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}

One Answer

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

Correct answer by Bernard on May 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP