ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Aberg <haberg-1@telia.com>
To: Wolfgang Schuster <schuster.wolfgang@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Math alignment
Date: Tue, 7 Jul 2015 18:23:02 +0200	[thread overview]
Message-ID: <4B85E5CE-75DC-44B4-8354-B46F46DBD0D1@telia.com> (raw)
In-Reply-To: <559BE67C.2030609@gmail.com>


> On 7 Jul 2015, at 16:47, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

>> I get errors when using \MC - see example below.
>> 
> The \NR before \stopmathcases is missing in all your examples.

OK. Though I know it, it is hard to get used to, coming from LaTeX.

>> But the spacing is wrong: too much between the two components. These are not cases, but aligned formulas: one might have a number of alignments, not just one. And I just happen to use left braces on them.
>> 
> Take a look at my previous example where I changed the distance between both columns with the distance key.

I missed that. It fixes the spaces within the formula, but adds space between the two sets relative both TeX and AMS-LaTeX (which has about the same as TeX), cf. example below.

In AMS-LaTeX one can have more than one alignment, though when trying it between the “-“ and the “ω” in the second (right-most) set, it adds a lot of space, rather than just trying to align a compactly as possible. In ConTeXt, nothing happens with extra alignments; in TeX, there is an error.

So using \startmathcases is a workaround: trying to force it to do something it wasn’t intended for.

----
\starttext

\def\equlb#1{\left\{\eqalign{#1}\right.} %equation left braced

\startformula
 J^j:\startmathcases[distance=\spaceamount]\NC ω^0 \MC ↦ 0 \NR \NC ω^j \MC ↦ 0 \NR \stopmathcases \quad
  \startmathcases[distance=\spaceamount] \NC ω^k \MC ↦ \MC ω^l \NR \NC ω^l \MC ↦ -\MC ω^k \NR \stopmathcases
\stopformula

\startformula
 J^j:\equlb{ω^0 &↦ 0 \cr ω^j &↦ 0} \quad
 \equlb{ω^k &↦ ω^l \cr ω^l &↦ -ω^k} \stopformula

\stoptext
----


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-07-07 16:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06  9:24 Hans Aberg
2015-07-06 22:08 ` Wolfgang Schuster
2015-07-06 23:46 ` Hans Aberg
2015-07-07  2:46   ` Wolfgang Schuster
2015-07-07  8:30     ` Hans Aberg
2015-07-07 14:47       ` Wolfgang Schuster
2015-07-07 16:23         ` Hans Aberg [this message]
2015-07-07 18:17           ` Wolfgang Schuster
2015-07-07 18:53             ` Hans Aberg
2015-07-07 19:18               ` Wolfgang Schuster
2015-07-07 19:21                 ` Hans Aberg
2015-07-07 19:11             ` Hans Aberg
2015-07-07 19:49               ` Wolfgang Schuster
2015-07-07 20:01                 ` Hans Aberg
2015-07-07 20:56                 ` Hans Aberg

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=4B85E5CE-75DC-44B4-8354-B46F46DBD0D1@telia.com \
    --to=haberg-1@telia.com \
    --cc=ntg-context@ntg.nl \
    --cc=schuster.wolfgang@gmail.com \
    /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).