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.

When I combine adaptive parentheses (\left(, \right)) with \underbrace, the parentheses adapt to span the underbrace. Example:

\left(\underbrace{e_{s,i,j}}_{\mathclap{=:x>0}} + \underbrace{e_{t,i,j}}_{\mathclap{=:y>0}}\right)

Is it possible to restrict the parentheses' height to the formula with*out* the underbraces? Moving the underbrace outside the parentheses is not an option because I may need to underbrace several and partial elements inside. Thanks!

EDIT: I helped myself now by using \bigg( instead of \left(, i.e. manually setting the size of the paranthesis. Solves my current problem but doesn't really answer the general question, does it?

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

I would suggest using a combination of \vphantom{<stuff>} (for correct vertical spacing) and breaking up the expression into three separate components to correct for the extensible brackets. For example, the following shows the difference between your attempt and using the above combination:

\documentclass{article}
% These definitions are taken from Herbert Voss' Mathmode document,
% available online via CTAN from: http://www.ctan.org/pkg/voss-mathmode
\def\mathllap{\mathpalette\mathllapinternal}
\def\mathllapinternal#1#2{%
\llap{$\mathsurround=0pt#1{#2}$}% $
}
\def\clap#1{\hbox to 0pt{\hss#1\hss}}
\def\mathclap{\mathpalette\mathclapinternal}
\def\mathclapinternal#1#2{%
\clap{$\mathsurround=0pt#1{#2}$}%
}
\def\mathrlap{\mathpalette\mathrlapinternal}
\def\mathrlapinternal#1#2{%
\rlap{$\mathsurround=0pt#1{#2}$}% $
}
\begin{document}
Here is some text.
\[
  \left(\underbrace{e_{s,i,j}}_{\mathclap{=:x>0}}+\underbrace{e_{t,i,j}}_{\mathclap{=:y>0}}\right)
\]
Here is some more text.
\[
  \left(\vphantom{e_{s,i,j}e_{t,i,j}}\right.% Left bracket
  \underbrace{e_{s,i,j}}_{\mathclap{=:x>0}}+\underbrace{e_{t,i,j}}_{\mathclap{=:y>0}}%
  \left.\vphantom{e_{s,i,j}e_{t,i,j}}\right)% Right bracket
\]
Here is some more text.
\end{document}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

This is what it looks like:

Mathmode spacing

You may have to fiddle around with the spacing of the brackets to suit your preference, using math spacing or \mathllap and \mathrlap.

share|improve this answer
    
Exactly what I was looking for, thanks! –  Nicolas78 Jul 17 '11 at 21:44
add comment
\documentclass{article}
\usepackage{mathtools}

\begin{document}

\[ \big(\underbrace{e_{s,i,j}}_{\mathclap{=:x>0}} +   
        \underbrace{e_{t,i,j}}_{\mathclap{=:y>0}}\big) \]

\end{document}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

enter image description here

share|improve this answer
    
Thanks. That's what I ended up doing as a first fix, but it doesn't scale (I have several of such spots and I don't want to pick the right size of brackets each time) –  Nicolas78 Jul 17 '11 at 21:43
add comment

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.