[NTG-context] amsl: startcases/stopcases

Giuseppe Bilotta ntg-context@ntg.nl
Tue, 25 May 2004 15:01:58 +0200


Thursday, May 20, 2004 David Munger wrote:

> Hello Giuseppe,


> I'm having a little trouble with the cases in amsl.

> Compiling this:

> \[
>   f(x) =
>   \startcases
>     0        & \text{if $x < -\epsilon$} \\
>     \frac12  & \text{if $x >  \epsilon$}
>   \stopcases
> \]

> results in an error around the \frac.

Hello David, sorry for the delay.

The problem is caused by \frac being defined in the newmat
module as

%D Better:

\def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}}


If you comment that line, it will compile flawlessly.

Hans, why would you want to allow \frac in text mode?

> Changing it to \dfrac makes the input compile ok, but
> typesets the cases in an ugly manner with really narrow
> spacing.

(Yes.)

> Is there some way of telling startcases/stopcases to behave in display
> mode?

Yup, I just changed a couple of things and now we have a
\startbigcases ... \stopbigcases for this. Will upload new
version soon.

-- 
Giuseppe "Oblomov" Bilotta