8

I would like to put an underbrace correctly under the denominator of a expression but what I get is wrong because of the (). Alternatively I create another line in the text

[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\underbrace{~~~~~~~~~~~~~~~~~~~~}_{=(1+3\cos^3\theta)}\]

but I don't think that's the right method and the text $(1+3\cos^3\theta)$ yet appear much larger than it should be. The same problem will occur for sqrt for example.

Than I ask, what is the alternative form to comment expressions like these?

enter image description here

2
  • Even though it may seem superfluous in small cases like this, it really speeds things up (on both the community and your end) if you supply a minimal working example (MWE).
    – Werner
    Nov 19, 2013 at 19:14
  • my fault, but I used the default underbrace option... just selecting the text I want to comment (the denominator in my case, that is inside a \left( \frac{}{denominator} \right) - and than it produces in the .tex \underbrace{denominator}_{'My comment'}
    – Claudia
    Nov 19, 2013 at 19:48

2 Answers 2

6

I wouldn't rely on the automated parentheses sizing here anyways, you can set the size up manually:

\documentclass{article}

\usepackage{lipsum}
\begin{document}

\lipsum[1]

\[\biggl(\frac{4\cos^2\theta}{%
\underbrace{4\cos^2\theta + \sin^2\theta}_{{}=(1+3\cos^2\theta)}}
\biggr)
\]

\lipsum[2]

\[\Biggl(\frac{4\cos^2\theta}{%
\underbrace{4\cos^2\theta + \sin^2\theta}_{{}=(1+3\cos^2\theta)}}
\Biggr)
\]

\lipsum[3]

\end{document}

(Use the variant which you like more. For me, it would be the 1st one, for others, it might be the 2nd one.)

6
  • isn't it 3\cos^ 2 \theta ?
    – percusse
    Nov 19, 2013 at 20:38
  • @percusse You mean from mathematical point of view? Probably yes. But now, I have my TeX/typography hat on ;)
    – yo'
    Nov 19, 2013 at 20:54
  • yeah, in general I use the automated parentesis and they work well but for really big equation or in the example I have shown I think your suggestion is more adequated. Thanks ;)
    – Claudia
    Nov 19, 2013 at 21:30
  • just wondering, what is lipsum?, poetry? what is it talking about? It is in Latin, right?
    – Claudia
    Nov 20, 2013 at 18:44
  • Lorem ipsum is originally a dummy, aperiodic gramatically correct Latin random text generator, which is safe in the sense that it contains nothing naughty or harmful. The lipsum package took just 40 paragraphs of this to provide quick dummy text in LaTeX. For more information see lipsum.com
    – yo'
    Nov 20, 2013 at 18:59
10

Smash it!

EDIT: In the spirit of barbara's suggestion, I added a \, after the = sign in the subscript.

EDIT: In response to tohecz and egreg comments, I added a \rule, for cases where underbrace material interferes with material on next line. The rule depth should correspond to the depth of the underbrace material, in this case, 5.5ex.

\documentclass{article}
\begin{document}
\[\left(\frac{4\cos^2\theta}{%
\smash{\underbrace{4\cos^2\theta + \sin^2\theta}_{=\,(1+3\cos^3\theta)}}}
\right)%
\rule[-5.5ex]{0ex}{5.5ex}% TO ACCOUNT FOR HEIGHT OF UNDERBRACE MATERIAL
\]
\end{document}

enter image description here

Placing a \strut immediately before the \smash will deepen the paren height slightly:

enter image description here

8
  • 2
    spacing around the equals sign would look better if it were preceded by {}. Nov 19, 2013 at 19:27
  • 1
    yes, \, adds a space, but it's not necessarily the "correct" one. placing {} before the = allows tex to do what it is designed to do. Nov 19, 2013 at 19:36
  • 1
    @barbarabeeton I understand your point, but in the \scriptstyle mode of the subscript, adding the {} makes no difference to the spacing around the = sign. Nov 19, 2013 at 19:38
  • 2
    I'm afraid that this solution whould make =(1+3\cos^3\theta) collide with the line below it.
    – yo'
    Nov 19, 2013 at 20:31
  • 3
    Sorry, but this will make the big object overlap the line below it.
    – egreg
    Nov 19, 2013 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .