[texhax] Tex question - cases environment
Axel E. Retif
axel.retif at mac.com
Sun Mar 8 13:46:09 CET 2009
On 8 Mar, 2009, at 06:14, Axel E. Retif wrote:
> On 8 Mar, 2009, at 03:59, Angela Rademeyer wrote:
>
>> Thanks, I had made that modification but I realise now that it is
>> failing for me as I am running the code after this command:
>> \begin{longtable}{|p{14cm}|}
>> Is there a way to get it to work inside a table?
>
> I don't know longtable, but the following works, with a ridiculous
> minipage of just 1pc:
What is really ridiculous is that I didn't realize you don't need all
that, but just the plain old $...$; that is,
\documentclass{article}
\usepackage{amsmath}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|p{14cm}|}
\hline
Hi\\ \hline\\[-8pt]
$ a_{ig} =
\begin{cases}
1 & \text{if customer $i$ belongs to profile group $g$}\\
0 & \text{otherwise}
\end{cases}$ \\[12pt] \hline
\end{longtable}
\end{document}
Best,
Axel
More information about the texhax
mailing list