Math & SciencePreventing autosized brackets from including underbraces

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
CaptainProton
Posts: 15
Joined: Fri Dec 18, 2009 10:54 pm

Preventing autosized brackets from including underbraces

Post by CaptainProton »

How can I prevent the autosized brackets from including the underbrace in the following example?

Code: Select all

\documentclass{scrreprt}
\usepackage{amsmath}
\begin{document}
 \begin{align*}
    s \in \left[\underbrace{b - b \sqrt{1 + \frac{1}{\gamma}}}_{< 0}; \quad b + b \sqrt{1 + \frac{1}{\gamma}}\right].
  \end{align*}
\end{document}
\Bigg-brackets are not large enough
Last edited by CaptainProton on Sat Jul 31, 2010 12:49 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Preventing autosized brackets from including underbraces

Post by Stefan Kottwitz »

You could set the hight to zero by smash and insert an invisible \rule to get a certain height:

Code: Select all

\documentclass{scrreprt}
\usepackage{amsmath}
\begin{document}
\begin{align*}
    s \in \left[\rule{0pt}{16pt}\smash{\underbrace{b - b \sqrt{1 + \frac{1}{\gamma}}}_{< 0}; \quad b + b \sqrt{1 + \frac{1}{\gamma}}}\right].
  \end{align*}
\end{document}
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Preventing autosized brackets from including underbraces

Post by localghost »

CaptainProton wrote:[...] \Bigg-brackets are not large enough
Somehow I don't see this problem (see attachment).

Code: Select all

\documentclass{scrreprt}
\usepackage{amsmath}

\begin{document}
  \begin{align*}
    s\in\Biggl[\underbrace{b-b\sqrt{1+\frac{1}{\gamma}}}_{< 0}\; ; \; b+b\sqrt{1+\frac{1}{\gamma}}\Biggr].
  \end{align*}
\end{document}
A variation of Stefan's idea could look like shown below. But I think it's not as satisfying as the example above.

Code: Select all

\documentclass{scrreprt}
\usepackage{amsmath}

\begin{document}
  \begin{align*}
    s\in\left[\smash{\underbrace{b-b\sqrt{1+\frac{1}{\gamma}}}_{< 0}}\; ; \; b+b\sqrt{1+\frac{1}{\gamma}}\right].
  \end{align*}
\end{document}
In opposite to Stefan I only "hide" the size of the part with the brace. So I don't need this invisible strut.


Thorsten
Attachments
The result of the above code.
The result of the above code.
BiggBrackets.png (3.54 KiB) Viewed 4101 times
CaptainProton
Posts: 15
Joined: Fri Dec 18, 2009 10:54 pm

Preventing autosized brackets from including underbraces

Post by CaptainProton »

localghost wrote:Somehow I don't see this problem (see attachment).
Yes, you're right, the \Bigg brackets are okay here. Originally I use the fourier package where they are not large enough. I should have checked that before and included it in the mwe.
localghost wrote:A variation of Stefan's idea could look like shown below. But I think it's not as satisfying as the example above.
That looks okay for me. Thanks to you both.
Post Reply