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.

This question already has an answer here:

I am aware of the fact all of the following examples are in fact not the right way of doing whatever they do. But, I came across these examples by playing around with the code that WinEdt produces for inserting a cases environment.

Please consider the following MWE:

\documentclass{amsart} 
\begin{document}
\begin{eqnarray} 
\tau_G(g) = \left\{
            \begin{array}{ll}
            a & b \\
            [G & l
            \end{array}
            \right.
\end{eqnarray}
\end{document}

This one fails with the error, "Runaway Argument, missing { inserted".

However, the following does work:

\documentclass{amsart} 
\begin{document}
\begin{eqnarray} 
\tau_G(g) = \left\{
            \begin{array}{ll}
            [a & b \\
            %[G & l
            \end{array}
            \right.
\end{eqnarray}
\end{document}

I am unable to parse this error. When playing with some linear combination of these examples, I got the following error:

ERROR: File ended while scanning use of \@argarraycr.

Can someone shed some light on this, please?

share|improve this question

marked as duplicate by Matthew Leingang, kan, ArTourter, Kurt, David Carlisle May 15 '13 at 13:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

1 Answer 1

up vote 3 down vote accepted

\\ takes an optional argument, so the [ following \\ is taken to be the start of the optional argument. Just put the [ inside braces.

\documentclass{amsart} 
\begin{document}
\begin{eqnarray} 
\tau_G(g) = \left\{
            \begin{array}{ll}
            a & b \\
            {[}G & l
            \end{array}
            \right.
\end{eqnarray}
\end{document}
share|improve this answer
add comment

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