3

I'm trying to align an equation in two points, my code is the following:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
    \begin{cases}
    \omega_W \geq \omega_{W0} \hspace{2mm} &\Leftrightarrow \hspace{2mm} S_x \rightarrow \infty & \longrightarrow \text{Wheel is spinning} \\
    \omega_W > \omega_{W0} \hspace{2mm} &\Leftrightarrow \hspace{2mm} S_x > 0 & \longrightarrow \text{Tire driving force} (F_x >0) \\
    \omega_W = \omega_{W0} \hspace{2mm} &\Leftrightarrow \hspace{2mm} S_x =0 & \longrightarrow \text{Free-rolling tire} (F_x=0) \\
    \omega_W \leq \omega_{W0} \hspace{2mm} &\Leftrightarrow \hspace{2mm} S_x < 0 & \longrightarrow \text{Tire braking force} (F_x <0) \\
    \omega_W =0 \hspace{2mm} &\Leftrightarrow \hspace{2mm} S_x= -1 & \longrightarrow \text{Wheel lock-up} \\
    \end{cases}
\end{equation}
\end{document}

The thing is that I want an alignment in "Leftrightarrow" and in "longrightarrow". However, the output I'm getting is the following (and of course the error of "extra alignment tab has been changed to \cr"):

enter image description here

Any idea about why it's not working, or how can I fix it? I wrote all the \\ and also I added the & in the points I want to get an alignment.

5

cases only accepts one & per row. You can easily emulate it with array. The r>{{}}l trick is for obtaining the correct spacing around the relation symbols. I removed the long arrows, which I find redundant.

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

\begin{document}

\begin{equation}
\left\{
  \renewcommand{\arraystretch}{1.2}% like cases
  \setlength{\arraycolsep}{0pt}%
  \begin{array}{ r>{{}}l @{\quad} c @{\quad} r>{{}}l @{\quad} l }
  \omega_W &\geq \omega_{W0} &\Leftrightarrow & S_x &\to \infty & \text{Wheel is spinning} \\
  \omega_W &>    \omega_{W0} &\Leftrightarrow & S_x &>   0      & \text{Tire driving force ($F_x>0$)} \\
  \omega_W &=    \omega_{W0} &\Leftrightarrow & S_x &=   0      & \text{Free-rolling tire ($F_x=0$)} \\
  \omega_W &\leq \omega_{W0} &\Leftrightarrow & S_x &<   0      & \text{Tire braking force ($F_x<0$)} \\
  \omega_W &=    0           &\Leftrightarrow & S_x &=  -1      & \text{Wheel lock-up}
  \end{array}
\right.
\end{equation}

\end{document}

enter image description here

3

A simple code with empheq and an alignedat environment:

\documentclass{article}

\usepackage{empheq}

\begin{document}

\begin{empheq}[left =\empheqlbrace\,]{equation}
    \begin{alignedat}{3}
        & \omega_W \geq \omega_{W0} & \: &\Leftrightarrow\: S_x \rightarrow \infty &\: & \longrightarrow \text{Wheel is spinning} \\
        & \omega_W > \omega_{W0} & &\Leftrightarrow \: S_x > 0 & & \longrightarrow \text{Tire driving force} (F_x >0) \\
        & \omega_W = \omega_{W0} & &\Leftrightarrow \: S_x =0 & & \longrightarrow \text{Free-rolling tire} (F_x=0) \\
        & \omega_W \leq \omega_{W0} & &\Leftrightarrow \: S_x < 0 & & \longrightarrow \text{Tire braking force} (F_x <0) \\
        & \omega_W =0 & &\Leftrightarrow \: S_x= -1 & & \longrightarrow \text{Wheel lock-up} \\
    \end{alignedat}
\end{empheq}

\end{document} 

enter image description here

2

You can use only one & per line in the cases environment:

enter image description here

\documentclass{article}

\usepackage{amsmath,eqparbox}

\begin{document}

\begin{equation}
  \begin{cases}
    \omega_W \geq \omega_{W0} &\Leftrightarrow \quad S_x \rightarrow \infty \longrightarrow \text{Wheel is spinning} \\
    \omega_W > \omega_{W0}    &\Leftrightarrow \quad S_x >  0               \longrightarrow \text{Tire driving force ($F_x > 0$)} \\
    \omega_W = \omega_{W0}    &\Leftrightarrow \quad S_x =  0               \longrightarrow \text{Free-rolling tire ($F_x = 0$)} \\
    \omega_W \leq \omega_{W0} &\Leftrightarrow \quad S_x <  0               \longrightarrow \text{Tire braking force ($F_x < 0$)} \\
    \omega_W = 0              &\Leftrightarrow \quad S_x = -1               \longrightarrow \text{Wheel lock-up}
  \end{cases}
\end{equation}

\newcommand{\Scond}[1]{\eqmakebox[Scond][l]{$#1$}}

\begin{equation}
  \begin{cases}
    \omega_W \geq \omega_{W0} &\Leftrightarrow \quad \Scond{S_x \rightarrow \infty} \longrightarrow \text{Wheel is spinning} \\
    \omega_W > \omega_{W0}    &\Leftrightarrow \quad \Scond{S_x >  0}               \longrightarrow \text{Tire driving force ($F_x > 0$)} \\
    \omega_W = \omega_{W0}    &\Leftrightarrow \quad \Scond{S_x =  0}               \longrightarrow \text{Free-rolling tire ($F_x = 0$)} \\
    \omega_W \leq \omega_{W0} &\Leftrightarrow \quad \Scond{S_x <  0}               \longrightarrow \text{Tire braking force ($F_x < 0$)} \\
    \omega_W = 0              &\Leftrightarrow \quad \Scond{S_x = -1}               \longrightarrow \text{Wheel lock-up}
  \end{cases}
\end{equation}

\end{document}

The above provides two options, depending on your alignment requirements.

1

Cases can only handle one &.

cases

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\left\{
    \begin{array}{lll@{}}
    \omega_W \geq \omega_{W0} &\Leftrightarrow S_x \rightarrow \infty &\longrightarrow \text{Wheel is spinning} \\
    \omega_W > \omega_{W0} &\Leftrightarrow S_x > 0  &\longrightarrow \text{Tire driving force} (F_x >0) \\
    \omega_W = \omega_{W0} &\Leftrightarrow S_x =0 &\longrightarrow \text{Free-rolling tire} (F_x=0) \\
    \omega_W \leq \omega_{W0} &\Leftrightarrow S_x < 0 &\longrightarrow \text{Tire braking force} (F_x <0) \\
    \omega_W = 0 &\Leftrightarrow S_x= -1 &\longrightarrow \text{Wheel lock-up} \\
    \end{array}
\right.
\end{equation*}
\end{document}
  • The spacing is wrong between the first two columns – egreg Aug 6 '17 at 16:36
  • I'd remove the first & in each row I think. You could also remove all the \hspaces, and add the space in the column specification, e.g. \begin{array}{@{}ll@{\hspace{3\tabcolsep}}l} – Torbjørn T. Aug 6 '17 at 16:38
  • @TorbjørnT. The @{} idea unfortunately doesn't work out (no space difference). – TeXnician Aug 6 '17 at 16:43
  • No you wouldn't see much when you only remove the \tabcolsep after the last column. Try {@{}lll}. – Torbjørn T. Aug 6 '17 at 16:56

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.