10

In the following formula, I would like to change the rendering such that the lower end of the "cases" brace looks as if there were no underbraces. Is that possible? I already tried \smash and negative \vspaces to no avail.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\newcommand\terma{\left( 1\!-\!e^{\frac{-\lambda_2^2}{2\alpha^2\lambda_3^2}}\right)}
\newcommand\termb{e^{\frac{-\lambda_1^2}{2\beta^2|\lambda_2\lambda_3|}}}
\newcommand\termc{\left( 1-e^{\frac{-\sum_i\lambda_i^2}{2c^2}}\right)}

\[
\mathcal V(\sigma)=
 \begin{cases}
     0    & \text{if $\lambda_2>0$ or $\lambda_3>0$,}\\
     \underbrace{\terma}_{A}
     \underbrace{\termb\vphantom{\terma}}_{B}
     \underbrace{\termc\vphantom{\terma}}_{C}
     &\text{else}.
 \end{cases}
\]
\end{document}
7

You can use a combination of \smash and \vphantom to get the desired effect. First we need to use a \smash to "flatten out" the contents. Then we use a \vphantom to get the brace to the correct height fir just the terms and not the underbraces. Finally we need to add an additional \vphantom in order to give the entire expression the correct height, such that following text will not be superimposed on it. In all the code would look like this:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\newcommand\terma{\left( 1\!-\!e^{\frac{-\lambda_2^2}{2\alpha^2\lambda_3^2}}\right)}
\newcommand\termb{e^{\frac{-\lambda_1^2}{2\beta^2|\lambda_2\lambda_3|}}}
\newcommand\termc{\left( 1-e^{\frac{-\sum_i\lambda_i^2}{2c^2}}\right)}
\[
\mathcal V(\sigma)=
 \begin{cases}
     0    & \text{if $\lambda_2>0$ or $\lambda_3>0$,}\\
     \vphantom{\terma}
     \smash{\underbrace{\terma}_{A}}
     \smash{\underbrace{\termb\vphantom{\terma}}_{B}}
     \smash{\underbrace{\termc\vphantom{\terma}}_{C}}
     &\text{else}.
 \end{cases}
 \vphantom{\begin{cases}
     0    & \text{if $\lambda_2>0$ or $\lambda_3>0$,}\\
     \underbrace{\terma}_{A}
     \underbrace{\termb\vphantom{\terma}}_{B}
     \underbrace{\termc\vphantom{\terma}}_{C}
     &\text{else}.
 \end{cases}}
\]
\end{document}

And the result:

case braces

1
  • you could reduce the "empty" space at the bottom a bit by using an explicit pair of "big" parentheses for \terma rather than \left and \right. using \exp notation would also make those expressions more linear, but at the expense of making the line too wide; too bad -- that's some pretty nasty math to try to read without a magnifying glass. – barbara beeton Dec 20 '11 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.