[texhax] long curly braces in an equation
Uwe Lück
uwe.lueck at web.de
Wed Jul 13 13:03:39 CEST 2005
...
At 07:38 12.07.05, Konstantin Karapetyan wrote:
>\documentclass{article}
>\usepackage{amsmath}
>\begin{document}
>\begin{equation}
>S:= \begin{cases}
>i = 0..M,\quad j =0..N & \text{for }M >N \\
>i=0..M,\quad j=0..M & \text{for }N > M
>\end{cases}
>\end{equation}
>\end{document}
>
> > if i have an equation like this:
>
> > S:=(i,j) s.t. {i = 0..M, j =0..N for M >N
> > {i=0..M, j=0..M for N > M
>
> > I wan to write one long curly brace on the left and have both lines in
> > it. any idea?
LaTeX also contains \cases from Plain TeX. So you could type
S:=(i,j) s.t. \cases{i=0..M etc.&for M>N\cr i=0..M etc.&for N\geq M}
I guess it's the \cr why this is kept secret in LaTeX manuals.
Moreover, it doesn't work as soon as amsmath.sty or amstex.sty
is loaded ;-)
And the AMS solution is more flexible. Its definition is just
three lines, without any prerequisites, so I would just copy it
into my file. ("courtesy"?)
Lucky typesetting,
Uwe.
More information about the texhax
mailing list