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.

Consider this:

\left( x-1 \right) \underbrace{ \left( ? \right) }_{ \text{what is this?} }

The label is longer than the braced portion, which causes unwanted space between the parentheses.

Is there a way around that, so that the parentheses "touch" as they would normally?

Please note that I just started on LaTeX, and I'm using TexMaths inside LibreOffice Writer.

share|improve this question

2 Answers 2

up vote 15 down vote accepted

The mathtools package (which loads and extends the amsmath package) provides the command \mathclap

enter image description here

If you decided to change the justification, you could use \mathllap

enter image description here

or \mathrlap

enter image description here

MWE

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\[
    \left( x-1 \right) \underbrace{ \left( ? \right) }_{ \mathclap{\text{what is this?}} }
\]

\end{document}
share|improve this answer
    
Hi again. Didn't had much time to test it, but I did it now, and it's working! Thanks for the help. Although it does leave some extra space between the parentheses, but it's minimal now –  GuiRitter Mar 7 '12 at 10:53

You can place the content "what is this?" in a box of smaller width in order to remove this spacing problem:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\[
  \left( x-1 \right) \underbrace{ \left( ? \right) }_{\text{\makebox[0pt]{what is this?} }}
\]
\end{document}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

In the above example, "what is this?" is placed in a zero-width box. You can modify this to suit your needs. For example, in this instance, since there's nothing else in the expression, it's fine. However, with other elements it may be required to have some space around "what is this?". Then some negative whitespace (or skipping) might also be useful.

share|improve this answer

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.