Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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} 
share|improve this question

1 Answer 1

up vote 7 down vote accepted

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

share|improve this answer
1  
Thanks a lot, that is exactly what I needed! –  brian-ammon Nov 25 '11 at 17:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.