From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91846 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Math alignment Date: Tue, 07 Jul 2015 20:17:50 +0200 Message-ID: <559C17CE.5090500@gmail.com> References: <0427DE7E-9FB7-46EA-930E-95349134A831@telia.com> <559B3D6D.1040607@gmail.com> <559BE67C.2030609@gmail.com> <4B85E5CE-75DC-44B4-8354-B46F46DBD0D1@telia.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1336351847==" X-Trace: ger.gmane.org 1436293122 22037 80.91.229.3 (7 Jul 2015 18:18:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jul 2015 18:18:42 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Aberg Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 07 20:18:29 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZCXRs-00016d-RU for gctc-ntg-context-518@m.gmane.org; Tue, 07 Jul 2015 20:18:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DEBAE10268 for ; Tue, 7 Jul 2015 20:18:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 54q2cSlH_Xpk for ; Tue, 7 Jul 2015 20:18:27 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 061401026C for ; Tue, 7 Jul 2015 20:18:00 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5CD9110224 for ; Tue, 7 Jul 2015 20:17:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hs0FPdO6YASc for ; Tue, 7 Jul 2015 20:17:55 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 2320A10200 for ; Tue, 7 Jul 2015 20:17:55 +0200 (CEST) Original-Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) by filter2-til.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t67IHrIk014773 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 7 Jul 2015 20:17:54 +0200 Original-Received: by wiga1 with SMTP id a1so264314800wig.0 for ; Tue, 07 Jul 2015 11:17:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=8klbvtMY6fNVZdwd01AkMdFiPZWJuwCsrGUiONndmDY=; b=cJt+4K8LYvsoZdYOD9VilrQgKhFWYkkVoGxnXLA1BdaX9cjiaon34FYn+H+TmPqHds J5KeFc/pHdj7yYsFTwgVyVfTzHX/Kn9t2x6IRih6UP254ldzNdyRTj3zUd8D0qbdy2lb mcrLavSpM78xPK+pKxjo4X2KpRdYZeXfZj6gDOVAU7gY3Bx96DriQKZtF77VxIZ5gJAw bIjRFOwulNW+arE2wZZHgmRtPCPBeyIpV9vw+2X/kjmdMUzZxJ666LUi5TIh/hfzj/kV azutvXWIt7R5Cc5Hob+9dvFj3JVWv1V6FH6y7e+n6nL2IOK7h+8sJMvaKWyUJe65ZLkC LFzg== X-Received: by 10.180.100.74 with SMTP id ew10mr107829751wib.12.1436293073611; Tue, 07 Jul 2015 11:17:53 -0700 (PDT) Original-Received: from keima.localdomain (x2f26f31.dyn.telefonica.de. [2.242.111.49]) by mx.google.com with ESMTPSA id c7sm34610107wjb.19.2015.07.07.11.17.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jul 2015 11:17:53 -0700 (PDT) User-Agent: Postbox 4.0.1 (Macintosh/20150514) In-Reply-To: <4B85E5CE-75DC-44B4-8354-B46F46DBD0D1@telia.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::235; country=BE; region=Brussels Capital; city=Brussels; latitude=50.8466; longitude=4.3528; http://maps.google.com/maps?q=50.8466,4.3528&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TONuhRCd - bdd9a9bf5f72 - 20150707 (trained as not-spam) Received-SPF: pass (filter2-til.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::235 as permitted sender) receiver=filter2-til.mf.surf.net; client-ip=2a00:1450:400c:c05::235; envelope-from=; helo=mail-wi0-x235.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:91846 Archived-At: This is a multi-part message in MIME format. --===============1336351847== Content-Type: multipart/alternative; boundary="------------070000050002000403030802" This is a multi-part message in MIME format. --------------070000050002000403030802 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Hans Aberg > 7. Juli 2015 18:23 >> On 7 Jul 2015, at 16:47, Wolfgang Schuster 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 alignment= s, 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 betwee= n both columns with the distance key. > > I missed that. It fixes the spaces within the formula, but adds space b= etween 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 i= t between the =E2=80=9C-=E2=80=9C and the =E2=80=9C=CF=89=E2=80=9D 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 some= thing it wasn=E2=80=99t intended for. You can set the alignment for each column in a matrix with the align key. \definemathmatrix [aligned] [n=3D2, align=3D{right,left}, distance=3D\spaceamount] \starttext \startformula J^j: \startaligned[left=3D\left\{,right=3D\right.] \NC =CF=89^0 \NC =E2=86=A6 0 \NR \NC =CF=89^j \NC =E2=86=A6 0 \NR \stopaligned \quad \startaligned[n=3D3,align=3D{right,middle,left},left=3D\left\{,right= =3D\right.] \NC =CF=89^k \NC =E2=86=A6 \NC =CF=89^l \NR \NC =CF=89^l \NC =E2=86=A6 \NC -=CF=89^k \NR \stopaligned \stopformula \stoptext Wolfgang --------------070000050002000403030802 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= =20 7. Juli 2015=20 18:23
On 7 Jul 2015, at 16:47, Wolfgang Schuster <schuste= r.wolfgang@gmail.com> wrote:

=
I get errors when using \MC - see example below.

The \NR before \stopmathcases is missin=
g 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, n=
ot just one. And I just happen to use left braces on them.

Take a look at my previous example wher=
e I changed the distance between both columns with the distance key.

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

In AMS-LaTeX one can have more than one alignment, though when trying it =
between the =E2=80=9C-=E2=80=9C and the =E2=80=9C=CF=89=E2=80=9D in the s=
econd (right-most) set, it adds a lot of space, rather than just trying t=
o align a compactly as possible. In ConTeXt, nothing happens with extra a=
lignments; in TeX, there is an error.

So using \startmathcases is a workaround: trying to force it to do someth=
ing it wasn=E2=80=99t intended for.
You can set the alignment for each column in a matrix with the align=20 key.

\definemathmatrix
=C2=A0 [aligned]
=C2=A0 [n=3D2,
=C2=A0=C2=A0 align=3D{right,left},
=C2=A0=C2=A0 distance=3D\spaceamount]

\starttext

\startformula
=C2=A0=C2=A0=C2=A0 J^j:
=C2=A0=C2=A0=C2=A0 \startaligned[left=3D\left\{,right=3D\right.]
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \NC =CF=89^0 \NC =E2=86=A6 0 \NR =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \NC =CF=89^j \NC =E2=86=A6 0 \NR =C2=A0=C2=A0=C2=A0 \stopaligned
=C2=A0=C2=A0=C2=A0 \quad
=C2=A0=C2=A0=C2=A0=20 \startaligned[n=3D3,align=3D{right,middle,left},left=3D\left\{,right=3D\r= ight.]
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \NC =CF=89^k \NC =E2=86=A6 \NC=C2=A0= =CF=89^l \NR
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \NC =CF=89^l \NC =E2=86=A6 \NC -=CF= =89^k \NR
=C2=A0=C2=A0=C2=A0 \stopaligned
\stopformula

\stoptext

Wolfgang
--------------070000050002000403030802-- --===============1336351847== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1336351847==--