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

Taco Hoekwater taco at elvenkind.com
Fri Jan 27 10:34:40 CET 2006



Hans Hagen wrote:
>>+-----------------------------------------------------+
>>|                                                     |
>>|         ,-                                          |
>>|         |   15,  if something                   (1) |
>>|     x = {                                           |
>>|         |   0,  otherwise                       (2) |
>>|         `-                                          |
>>+-----------------------------------------------------+

The basic TeX structure for this would be an full-width \eqalignno,
like so:

   \def\fixeqline{\noalign{\kern-.4\baselineskip}}
   \def\guessedstrut{\vrule height 12pt depth 12pt width0pt}
    $$\eqalignno{
      &  15,  \hbox{ if something}   & (1)\cr \fixeqline
      x=\smash{\left\{\guessedstrut\right .}
      &                              &    \cr \fixeqline
      &  0, \hbox{ otherwise}        & (2)\cr} $$

Not very nice, but TeX (the engine) does not allow a cleaner
solution. I guess it is possible to wrap this up in a nicer
looking macro, but it requires some trial typesetting for the
magical quantities used in the two macros.


Cheers, Taco


More information about the ntg-context mailing list