# [NTG-context] LaTeX array equivalence with multiline \lbrace

Wed Jan 25 17:32:35 CET 2006

On Wed, 25 Jan 2006, Hans Hagen wrote:

>
>> <--- On Jan 24, Renaud AUBIN wrote --->
>>
>>
>>
>>> With LaTeX, I have
>>> $$>>> \left\lbrace >>> \begin{array}{l} >>> \dot{q}_i = 1 \quad\text{ if } i=k \\ >>> \dot{q}_i = 0 \quad\text{ else} >>> \end{array} >>> \right >>>$$
>>>
>>>
>>
>> Well the ConTeXt way (rather the TeX way) of doing this is to use
>> \cases.
>>
>> $$>> \cases{ >> \dot q_i = 1, & \text{ if } i = k \cr >> \dot q_i = 0, & \text{ else } \cr >> } >>$$
>>
>>
> maybe we should add a left|right option to the new align mechanism so
> that one can define such constructs .. does that make sense?

If I understand you correctly, then something like this

\definealign[cases][left={\left\{}, right={\right.}, n=2,
align={left,left}]

will give us \startcases, \stopcases which works like \cases. Such a
feature will be very useful.

Is it possible to define left|right in such a way that
\definealign[important][left={\framed\bgroup},right={\egroup}]
results in a frame around the equations (and does not include the equation
numbers), that is the frame is as broad as the width of the largest
equation that follows. This mechanism can be used to highlight equations.

Also, in another post, I had asked if it is possible to have cases that
are numbered, that is, can I get

{ b , if whatever     (1a)
a ={
{ c,  otherwise       (1b)

This is not important, but will be nice to have.