Document ClassesVertical spacing in cases environment

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
adhikarig
Posts: 12
Joined: Mon Apr 28, 2008 12:34 am

Vertical spacing in cases environment

Post by adhikarig »

Hi all

I am using two cases environment in single equation. The problem is the vertical spacing between two successive entries.
In the following code, if I use \frac, the heights are same but the elements are almost illegible. If I use \dfrac, then vertical sizes increase but then two equations are not in the same line.

Is there any option, where I can specify a fixed size of individual elements ?

I dont know whether I can explain my problem.

I paste my code.

Code: Select all

\begin{subequations} \begin{gather} \label{eq:chap3_eq132}
C_{\mu,NH} =\begin{cases}
  \mu  \\
  \frac{\mu}{\left(2\mu-1\right)^{\beta}} \\
  \frac{\mu}{\sqrt{2\mu-1}} \\
  \frac{T_c}{T} \\
  1.0
\end{cases} \hspace{0.05\textwidth}
C_{\mu,NH} =\begin{cases}
  \infty                                     &\text{if $T < T_a$} \\
  \frac{R_{\mu}^{1/\beta}}{2R_{\mu}}         &\text{if $T_a \leqslant T < T_b$}   \\
  \frac{R_{\mu}^2+1}{2R_{\mu}}               &\text{if $T_b \leqslant T < T_{c'}$} \\
  \frac{T_c}{T}                              &\text{if $T_{c'} \leqslant T < T_{c}$} \\
  1.0                                        &\text{if $T \geqslant T_{c}$}
\end{cases} \\
\mbox{where, \qquad} 
\beta = \frac{\log\left(T/T_a\right)}{2\log\left(T_b/T_a\right)}
\mbox{\qquad and, \qquad}
T_{c'} = \frac{\sqrt{2\mu-1}}{\mu}T_c
\end{gather} \end{subequations}

Recommended reading 2024:

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

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

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Vertical spacing in cases environment

Post by phi »

Hello,
you can use \vphantom to force a smaller element to have the height of a larger one:

Code: Select all

\begin{subequations} \begin{gather} \label{eq:chap3_eq132}
C_{\mu,NH} =\begin{cases}
  \mu  \\
  \dfrac{\mu}{\left(2\mu-1\right)^{\beta}} \vphantom{\dfrac{R_{\mu}^{1/\beta}}{2R_{\mu}}} \\
  \dfrac{\mu}{\sqrt{2\mu-1}} \vphantom{\dfrac{R_{\mu}^2+1}{2R_{\mu}}} \\
  \dfrac{T_c}{T} \\
  1.0
\end{cases} \hspace{0.05\textwidth}
C_{\mu,NH} =\begin{cases}
  \infty                                     &\text{if $T < T_a$} \\
  \dfrac{R_{\mu}^{1/\beta}}{2R_{\mu}}        &\text{if $T_a \leqslant T < T_b$}   \\
  \dfrac{R_{\mu}^2+1}{2R_{\mu}}              &\text{if $T_b \leqslant T < T_{c'}$} \\
  \dfrac{T_c}{T}                             &\text{if $T_{c'} \leqslant T < T_{c}$} \\
  1.0                                        &\text{if $T \geqslant T_{c}$}
\end{cases} \\
\mbox{where, \qquad}
\beta = \frac{\log\left(T/T_a\right)}{2\log\left(T_b/T_a\right)}
\mbox{\qquad and, \qquad}
T_{c'} = \frac{\sqrt{2\mu-1}}{\mu}T_c
\end{gather} \end{subequations}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Vertical spacing in cases environment

Post by localghost »

You generally could modify the length \jot inside the concerning math environment.


Best regards
Thorsten¹
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Vertical spacing in cases environment

Post by gmedina »

Hi,

yet another option is to use the optional argument for the \\ command to increase the vertical space:

Code: Select all

\documentclass{article}
\usepackage{amsmath,amssymb}

\begin{document}

\begin{subequations} 
  \begin{gather} 
  \label{eq:chap3_eq132}
    C_{\mu,NH} =
    \begin{cases}
      \mu  \\[.5em]
      \frac{\mu}{\left(2\mu-1\right)^{\beta}} \\[.5em]
      \frac{\mu}{\sqrt{2\mu-1}} \\[.5em]
      \frac{T_c}{T} \\[.5em]
      1.0
    \end{cases} \hspace{0.05\textwidth}
    C_{\mu,NH} =
    \begin{cases}
      \infty                              &\text{if $T < T_a$} \\[.5em]
      \frac{R_{\mu}^{1/\beta}}{2R_{\mu}}  &\text{if $T_a \leqslant T < T_b$} \\[.5em]
      \frac{R_{\mu}^2+1}{2R_{\mu}}        &\text{if $T_b \leqslant T < T_{c'}$} \\[.5em]
      \frac{T_c}{T}                       &\text{if $T_{c'} \leqslant T < T_{c}$} \\[.5em]
      1.0                                 &\text{if $T \geqslant T_{c}$}
    \end{cases} \\
    \text{where, \qquad}
    \beta = \frac{\log\left(T/T_a\right)}{2\log\left(T_b/T_a\right)}
    \text{\qquad and, \qquad}
    T_{c'} = \frac{\sqrt{2\mu-1}}{\mu}T_c
  \end{gather} 
\end{subequations}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply