ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: LaTeX array equivalence with multiline \lbrace
Date: Fri, 27 Jan 2006 10:34:40 +0100	[thread overview]
Message-ID: <43D9E930.3070702@elvenkind.com> (raw)
In-Reply-To: <43D9DAC5.6040507@wxs.nl>



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

      reply	other threads:[~2006-01-27  9:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-24 19:23 Renaud AUBIN
2006-01-24 23:37 ` Aditya Mahajan
2006-01-25 12:22   ` Hans Hagen
2006-01-25 13:10     ` Renaud AUBIN
2006-01-25 16:32     ` Aditya Mahajan
2006-01-25 16:41       ` Renaud AUBIN
2006-01-26 21:50         ` Hans Hagen
2006-01-26 22:28           ` Renaud AUBIN
2006-01-27  2:08           ` Aditya Mahajan
2006-01-27  8:33             ` Hans Hagen
2006-01-27  9:34               ` Taco Hoekwater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43D9E930.3070702@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).