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.

I have an equation using a cases environment, with one case with a long description text:

\begin{eqnarray*}
    \begin{cases}
        1 \text{too long description of the first case,
            not fitting on the page}\\
        0 \text{shorter description}
    \end{cases}
\end{eqnarray*}

The text of the first case is cut of, as it is too long for my page width.

How can I let LaTeX split the line? Using a matrix does not seem like a clean solution to me...

share|improve this question
2  
Better avoid eqnarray. –  Stefan Kottwitz Jan 19 '12 at 13:29

1 Answer 1

up vote 8 down vote accepted

You could use \parbox with top alignment:

\begin{equation*}
    \begin{cases}
        1 & \parbox[t]{.6\textwidth}{too long description of the first case,
            not fitting on the page}\\
        0 & \text{shorter description}
    \end{cases}
\end{equation*}

Further, better avoid the old eqnarray environment. Use align or another multi-line displayed math environment of amsmath. Here, even simply equation* or \[ ... \] would be sufficient, since it's a single line, and also doesn't need alignment. cases within is multi-line, but that doesn't matter for the outer environment.

share|improve this answer
    
thanks, this works well. I changed it to an align environment too (there are more lines in the document, I reduced it for asking here) –  crater2150 Jan 23 '12 at 11:54

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.