Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have superscript content "overflow" in overbrace in LaTeX

Tags:

overflow

latex

I'm trying to overbrace a short equation (or part thereof) with a long superscript. This expands the overbrace to both fit content and superscript, which takes up a lot of space and looks ugly. There is a way to have the content "overflow" the brace, so it will only expand to fit its contents, but I have been unable to find out how to solve this.

E.g.:

$$ \cdots \overbrace{=}^{\text{Very long description here}} \cdots $$

Any ideas?

Thanks

like image 328
xeen Avatar asked Feb 07 '10 20:02

xeen


3 Answers

Stewart's rlap hint put me in the right direction. With the help of an article about this topic I managed to accomplish what I wanted to do. I use the \mathclap command as defined in the linked article.

Thanks, xeen

like image 115
xeen Avatar answered Oct 02 '22 08:10

xeen


Thanks a lot! Just what I was looking for. To anyone not too sure how to convert Alexey Malistov's solution to a macro, use this:

\newcommand{\longoverbrace}[2]{\overbrace{#1}^{\text{\hbox to 0cm{\hss #2 \hss}}}}  
$$ \cdots \longoverbrace{=}{This is easier to write (and read)}\cdots $$

(Remember to \usepackage{amsmath} in your preamble.)

like image 37
Kristian Sørensen Avatar answered Oct 02 '22 06:10

Kristian Sørensen


$$ \cdots \overbrace{=}^{\text{\hbox to 0cm{\hss Very long description here \hss}}} \cdots $$ 
like image 31
Alexey Malistov Avatar answered Oct 02 '22 06:10

Alexey Malistov