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 don't think the following equation looks good because of the existence of the \underbrace.

\documentclass[preview,border=12pt,varwidth]{standalone}
\usepackage{amsmath}
\begin{document}
\[
12\left(\underbrace{y^2 +2y\left(-\frac{2}{3}\right) +\left(-\frac{2}{3}\right)^2}_{\left[y+\left(-\frac{2}{3}\right)\right]^2} -\left(-\frac{2}{3}\right)^2 +\frac{4}{5}\right) = 0
\]
\end{document}

enter image description here

Is there another style to make an \underbrace in big braces look elegant? I want to pull the underbrace out of the braces.

share|improve this question
1  
You should really just use \big-like delimiters for the outer (all) brackets instead. –  Werner Nov 10 '13 at 7:32
    
Related (i.e. \smash and \vphantom): Changing the size of the braces from the cases environment, ignoring vertical space due to overbraces in cases environment and Underbraces in Matrix Divided in Blocks (ignore the TikZ solutions). Though, in this case using \big… is of course easier. –  Qrrbrbirlbel Nov 10 '13 at 7:40
    
Thanks folks for the suggestions and links. –  I am who I say I am Nov 10 '13 at 7:43
add comment

1 Answer

up vote 5 down vote accepted

Instead of using \left( and \right) to auto-size the outermost set of parentheses, you could use \biggl( and \biggr):

enter image description here

(Aside: See the postings Why the control sequences \bigl, \biggl, \bigr or \biggr, as I can always use \big or \bigg? and Difference between \big[ and \bigl[ for a discussion of the differences between \Bigg( and \Biggl(.)

I would recommend, actually, using \Biggl[ (while adding \, immediately afterwards) and \Biggr] to provide a bit more -- but not too much... -- visual prominence as well as variety to the outer fences:

enter image description here

The default LaTeX/amsmath style for underbraces frankly looks quite boring to me. If you have access to the mtpro2 package, you could use its macro \undercbrace to generate a curly underbrace. Cautions: (i) The font used by this package is Times Roman, which may or may not be to your liking. (ii) The mtpro2 package isn't free of charge; however, its "lite" subset, which is all that's needed to use the \undercbrace macro, can be obtained without (financial) charge.

enter image description here

\documentclass[preview,border=12pt,varwidth]{standalone}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\begin{document}
\[
12\Biggl[\,\undercbrace{y^2 +2y\left(-\frac{2}{3}\right) +\left(-\frac{2}{3}\right)^2}_{\left[y+\left(-\frac{2}{3}\right)\right]^2}{} -\left(-\frac{2}{3}\right)^2 +\frac{4}{5}\Biggr] = 0
\]
\end{document}

Addendum: The immediately preceding example is intended mainly to demonstrate the shape of the "curly" underbrace. Thus, the only changes, relative to the code used in the second example, were in loading the mtpro2 package and using \undercbrace instead of \underbrace.

If you're serious about using the mtpro2 package, I would recommend making a few additional changes to the code. Chief among them are these: (i) load the mleftright package and execute \mleftright in the preamble to eliminate the extra horizontal whitespace that's otherwise inserted by \left and \right; (ii) don't insert a thinspace after \Biggl[; and (iii) insert a negative thinspace (\!) after the undercbrace material.

enter image description here

\documentclass[preview,border=12pt,varwidth]{standalone}
\usepackage{amsmath}
\usepackage{mleftright}\mleftright
\usepackage[lite]{mtpro2}
\begin{document}
\[
12\Biggl[ \undercbrace{y^2 +2y\left(-\frac{2}{3}\right) 
  +\left(-\frac{2}{3}\right)^2}_{
   \left[y+\left(-\frac{2}{3}\right)\right]^2} \! {}
  -\left(-\frac{2}{3}\right)^2 +\frac{4}{5}\Biggr] = 0
\]
\end{document}
share|improve this answer
    
Is it necessary to add \, right before the \Biggr] to preserve the symmetric spaces? I don't like asymmetric properties. –  I am who I say I am Nov 10 '13 at 7:55
    
@Marienplatz - I don't think it's necessary to do so from a purely aesthetic point of view; your sensibilities, though, may differ from mine... The reason why I inserted a thinspace after \Biggl[ was to keep the bottom "hook" of the square bracket from touching the underbrace. –  Mico Nov 10 '13 at 8:00
    
The space between [ and the y seems to be a bit too much. The brace also interferes with the space at the end before the minus sign. I’d rather use the original brace … –  Qrrbrbirlbel Nov 10 '13 at 11:01
    
@Qrrbrbirlbel - The example using \undercbrace was intended to demonstrate the interesting shape of the "curly" underbrace, and left the other settings, relative to the middle example, unchanged. I'll post a fourth example with the layout optimized for the capabilities of the mtpro2 package. –  Mico Nov 10 '13 at 11:12
    
not sure why, but with the mtpro2 brace (and times font) the notation below the brace is noticeably farther below the main expression. the extra space surely isn't needed. –  barbara beeton Nov 10 '13 at 13:18
show 3 more comments

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.