[Tex/LaTex] Annotating individual math terms with braces

bracesfractionsmath-mode

I am trying to annotate individual terms of a mathematical expression, as depicted below.

The problem I get is that the comment seems to be taken as part of the fraction, which unnecessarily extends the fraction bar. I want the fraction to look just normally and have the comments not do anything to the size of the fraction.

Maybe it is possible to even offset the comment itself, e. g. to have it justified left, so the greater-or-equal sign sits at the center of the curly brace. And is it possible to reduce the weight of the brace? To me it looks odd being so bold.

I have added an example which should produce the output as shown in the picture.
The \textstyle inside the \overbrace is to set the correct font size, because \overbrace resets it to \displaystyle as I see it.

Thank you in advance for any help you are kind enough to provide.

enter image description here

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt]{scrartcl}
\usepackage{amsmath}
\usepackage{polyglossia}
\setdefaultlanguage[spelling=new]{german}
\usepackage{geometry}
\geometry{a4paper} 

\begin{document}

\[\frac{x^n}{x^m}\cdot \frac{1+{\overbrace{\textstyle \frac{1}{x^n}}^{\geq -\frac{1}{2} \text{ for }|x| \text{ large enough}}}}
{1+{\underbrace{\textstyle \frac{1}{x^m}}_{\leq 1 \text{ for }|x| \text{ large enough}}}}\]

\end{document} 

Best Answer

The solution below uses \mathclap from the mathtools package.

This command tells TeX that the content of \mathclap should not take up any horizontal space (from TeX's point of view), which means that TeX will not extend the fraction bar to account for the content of the overbrace and underbrace

screenshot

\documentclass{article}

\usepackage{amsmath}
\usepackage{mathtools}

\begin{document}

\[
\frac{x^n}{x^m}\cdot \frac{1+{\overbrace{\textstyle \frac{1}{x^n}}^{\mathclap{\geq -\frac{1}{2} \text{ for }|x| \text{ large enough}}}}}
                         {1+{\underbrace{\textstyle \frac{1}{x^m}}_{\mathclap{\leq 1 \text{ for }|x| \text{ large enough}}}}}
\]

\end{document}

And if you change the \mathclap to \mathrlap, then you get

screenshot

Related Question