Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The following code snippet will guide you through the issue chronologically.

\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{mathtools}
\begin{document}
\section*{gather+aligned}
\begin{gather}
    \left\{\!
    \begin{aligned}
        x &= \cos t\\
        y &= \sin t
    \end{aligned}\right.\\
    x^2 +y^2 =1
\end{gather}


\section*{gather+split}
\begin{gather}
    \left\{
    \begin{split}
        x &= \cos t\\
        y &= \sin t
    \end{split}\right.\\
    x^2 +y^2 =1
\end{gather}


\section*{align+aligned}
\begin{align}
    &\left\{\!
    \begin{aligned}
        x &= \cos t\\
        y &= \sin t
    \end{aligned}\right.\\
    &x^2 +y^2 =1
\end{align}


\section*{align+split}
It cannot be compiled.
%\begin{align}
    %&\left\{
    %\begin{split}
        %x &= \cos t\\
        %y &= \sin t
    %\end{split}\right.\\
    %&x^2 +y^2 =1
%\end{align}

\section*{align+split+nobrace}
It can be compiled.
\begin{align}
    &
    \begin{split}
        x &= \cos t\\
        y &= \sin t
    \end{split}\\
    &x^2 +y^2 =1
\end{align}

\end{document}

enter image description here

Why can't split with curly-brace \left\{ and \right. be inside align but it can be inside gather?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

From the amsmath user guide:

The split environment is designed to serve as the entire body of an equation, or an entire line of an align or gather environment. There cannot be any printed material before or after it within the same enclosing structure.

In particular, you can't have \left\{ to the left and \right. to the right of the split material.

For more on this subject, see the posting What's the difference between split and aligned?

share|improve this answer
    
You said that "In particular, you can't have \left\{ to the left and \right. to the right of the split material." but apparently it works inside gather as shown in my code given above. –  Oh my ghost Jul 18 at 8:05
    
@Pleasedon'ttouch - Well, under some circumstances -- such as in the gather example you've given -- one can indeed get split to work. However, it might not work in other circumstances. So either the user guide is a bit too strident, or it's actually trying to give helpful advice by steering you away from trouble without covering every single possible contingency and circumstance. The upshot, though, is correct: Don't use split inside gather and align environments. Use aligned instead, unless you want to run into problems from time to time... –  Mico Jul 18 at 8:30
2  
or use it for what it is meant to, aka not for cases constructions –  daleif Jul 18 at 8:34
    
So split is only recommended for equation? –  Oh my ghost Jul 18 at 13:07
    
@Pleasedon'ttouch - No. You can use split whenever its material will be the only material on a given line. –  Mico Jul 18 at 13:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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