[texhax] Tex question - cases environment

Angela Rademeyer angela.rademeyer at opsi.co.za
Mon Mar 9 15:34:40 CET 2009


Thanks you so much - works perfectly!


Angela Rademeyer
OPSI SYSTEMS
082 498 9332
(011) 880 7951 ext. 225
www.opsisystems.com



-----Original Message-----
From: Axel E. Retif [mailto:axel.retif at mac.com]
Sent: 08 March 2009 02:46 PM
To: Angela Rademeyer
Cc: support at tug.org Support
Subject: Re: [texhax] Tex question - cases environment

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