[texhax] Tex question - cases environment
Philip G. Ratcliffe
philip.ratcliffe at fastwebnet.it
Fri Mar 6 09:58:38 CET 2009
> Thanks for the help. When I run the version below I get this error:
>
> [snip]
>
> \begin{flalign*}
> a_{ig} =
> \begin{cases}
> 1 & \text{if customer $i$ belongs to profile group $g$}\\
> 0 & \text{otherwise} \\[.3cm]
> \end{cases} && %% <------------------ these two && \end{flalign*}
Axel's mailer seems to wrap lines that it shouldn't (mine does too, which
explains the indentation used below) and so, if his script is used as is,
the "\end{flalign*}" in the last line will be ignored (owing to the %%).
Try the version below (which does work), but make sure that it really
appears as here (note also that there must be no blank lines within the
"flalign*" environment):
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{flalign*}
a_{ig} =
\begin{cases}
1 & \text{if customer $i$ belongs to profile group $g$}\\
0 & \text{otherwise} \\[.3cm]
\end{cases} && %% <------------------ these two &&
\end{flalign*}
\end{document}
The output seems a little odd; maybe you don't really want the "\\[.3cm]" in
the second line inside the "cases" environment.
Cheers, Phil
More information about the texhax
mailing list