From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91851 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Math alignment Date: Tue, 07 Jul 2015 21:49:39 +0200 Message-ID: <559C2D53.3040907@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> <559C17CE.5090500@gmail.com> <0DEE0051-A811-4357-AAEB-951C43C3FAB8@telia.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1398343003==" X-Trace: ger.gmane.org 1436298634 23241 80.91.229.3 (7 Jul 2015 19:50:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jul 2015 19:50:34 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Aberg Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 07 21:50:19 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 1ZCYsj-0001F1-HW for gctc-ntg-context-518@m.gmane.org; Tue, 07 Jul 2015 21:50:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8DD081026F for ; Tue, 7 Jul 2015 21:50:16 +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 6y1vtZf4aIoQ for ; Tue, 7 Jul 2015 21:50:15 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D880C10271 for ; Tue, 7 Jul 2015 21:49:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A6A3510224 for ; Tue, 7 Jul 2015 21:49:45 +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 zSSOJMrchUfI for ; Tue, 7 Jul 2015 21:49:44 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id D799510200 for ; Tue, 7 Jul 2015 21:49:44 +0200 (CEST) Original-Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) by filter4-ams.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t67JnfY1015384 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 7 Jul 2015 21:49:42 +0200 Original-Received: by wgbgr6 with SMTP id gr6so23305677wgb.3 for ; Tue, 07 Jul 2015 12:49:41 -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=aPeBr6JIxeHl5ZO7kj9TGSMT0zwgrY/4dpGw+Z498Yk=; b=QsgkiQl6oGfk4/ewrinvQSJbumH9RzjpKKQGd/2wg2flYCWk7sFPT5BFTAhwvMgMs3 0WD/dZ1Lx8V2deUk7V1kp+e7kWcXunONt+SPrZFIXrnQexJ7+bx00SoIIVZ/lXBrke93 YsbdHtv1/bWWWo3UBWVD4C/QyuIEDnvxU4IGyN52ZnDMuDZrURafPHcnIH5d1N5Q6PAk jdJiLTE0gT1bfTKVhdTO7amU1YcfgsU5bPVmpQ0WqgllbJdKva+X6AD6LG0sWIGd5yhh tjAstAghN2jz7iMz0RYaV2rIWKvaclR9xcwrd5qdOesS/ibz3Dzb1YYZPJjuu5y8uxgA olGQ== X-Received: by 10.180.88.201 with SMTP id bi9mr68120963wib.58.1436298581650; Tue, 07 Jul 2015 12:49:41 -0700 (PDT) Original-Received: from keima.localdomain (x2f26f31.dyn.telefonica.de. [2.242.111.49]) by mx.google.com with ESMTPSA id fq7sm54077058wic.5.2015.07.07.12.49.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jul 2015 12:49:41 -0700 (PDT) User-Agent: Postbox 4.0.1 (Macintosh/20150514) In-Reply-To: <0DEE0051-A811-4357-AAEB-951C43C3FAB8@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:c00::22a; 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: 01ONvNF4a - 3e16f7f5e249 - 20150707 (trained as not-spam) Received-SPF: pass (filter4-ams.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c00::22a as permitted sender) receiver=filter4-ams.mf.surf.net; client-ip=2a00:1450:400c:c00::22a; envelope-from=; helo=mail-wg0-x22a.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:91851 Archived-At: This is a multi-part message in MIME format. --===============1398343003== Content-Type: multipart/alternative; boundary="------------020404000002040104000509" This is a multi-part message in MIME format. --------------020404000002040104000509 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Hans Aberg > 7. Juli 2015 21:11 >> On 7 Jul 2015, at 20:17, Wolfgang Schuster wrote: > >> You can set the alignment for each column in a matrix with the align k= ey. > > FYI, the document amshelp.pdf says that AMS-LaTeX environments align, a= lign*, and aligned, can have multiple alignments, and gives this example: > \begin{align*} > K&\approx G * H& i&=3D j+k& B&\subset C\\ > H&\approx A_{0}*B_{0}& i=E2=80=99&=3D j=E2=80=99+k=E2=80=99& C&=3D= D\cap E\\ > G&\approx \coprod_{\alpha\in A} L_{\alpha}& i=E2=80=99=E2=80=99&=3D= j=E2=80=99=E2=80=99+k=E2=80=99=E2=80=99& A&=3D D \cup E > \end{align*} > which is typeset so that 'K&\approx G * H=E2=80=99 is one equation alig= ned on the =E2=80=98&=E2=80=99 with the others below, followed by 'i&=3D = j+k=E2=80=99 in the next column. > > So the ampersands have multiple functions here, it seems: alignment and= separating columns. > > Translating into ConTeXt, one might have (pseudocode): > \startformula > \startalign > \NC K \NA \approx G * H \NC i\NA=3D j+k \NC B \NA \subset C \NR > \NC H \NA \approx A_{0}*B_{0} \NC i=E2=80=99\NA=3D j=E2=80=99+k=E2= =80=99 \NC C \NA =3D D\cap E\NR > \NC G \NA \approx \coprod_{\alpha\in A} L_{\alpha} > \NC i=E2=80=99=E2=80=99\NA =3Dj=E2=80=99=E2=80=99+k=E2=80=99=E2= =80=99 \NC A \NA =3D D \cup E \NR > \stopalign > \stopformula > where I have introduce a symbol \NA for alignment. > You should google for mathalign.pdf which explains and shows examples=20 for the matrix, cases etc. environments. To get the same result as your LaTeX example you can use the m key for=20 \startalign. \starttext \startformula \startalign[m=3D3,distance=3D3em] \NC K \NC \approx G * H \NC i \NC =3D=20 j+k \NC B \NC \subset C \NR \NC H \NC \approx A_{0}*B_{0} \NC i' \NC =3D=20 j'+k' \NC C \NC =3D D\cap E \NR \NC G \NC \approx \coprod_{\alpha\in A} L_{\alpha} \NC i'' \NC =20 =3Dj''+k'' \NC A \NC =3D D \cup E \NR \stopalign \stopformula \stoptext Wolfgang --------------020404000002040104000509 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
= =20 7. Juli 2015=20 21:11
On 7 Jul 2015, at 20:17, Wolfgang Schuster <schuste= r.wolfgang@gmail.com> wrote:

You can set the alignment =
for each column in a matrix with the align key.

FYI, the document amshelp.pdf says that AMS-LaTeX environments align, ali=
gn*, and aligned, can have multiple alignments, and gives this example:
\begin{align*}
  K &\approx G * H&   i&=3D j+k&  B &\subset C\\
  H &\approx A_{0}*B_{0}&  i=E2=80=99&=3D j=E2=80=99+k=E2=80=99=
&  C &=3D D\cap E\\
  G &\approx \coprod_{\alpha\in A} L_{\alpha}&  i=E2=80=99=E2=80=99=
&=3Dj=E2=80=99=E2=80=99+k=E2=80=99=E2=80=99& A &=3D D \cup E
\end{align*}
which is typeset so that 'K &\approx G * H=E2=80=99 is one equation a=
ligned on the =E2=80=98&=E2=80=99 with the others below, followed by =
'i&=3D j+k=E2=80=99 in the next column.

So the ampersands have multiple functions here, it seems: alignment and s=
eparating columns.

Translating into ConTeXt, one might have (pseudocode):
\startformula
  \startalign
    \NC K \NA \approx G * H \NC  i\NA=3D j+k \NC B \NA \subset C \NR
    \NC H \NA \approx A_{0}*B_{0} \NC   i=E2=80=99\NA=3D j=E2=80=99+k=E2=80=
=99 \NC   C \NA =3D D\cap E\NR
    \NC G \NA \approx \coprod_{\alpha\in A} L_{\alpha}
      \NC   i=E2=80=99=E2=80=99\NA =3Dj=E2=80=99=E2=80=99+k=E2=80=99=E2=80=
=99 \NC  A \NA =3D D \cup E \NR
  \stopalign
\stopformula
where I have introduce a symbol \NA for alignment.

You should google for mathalign.pdf which explains and shows examples=20 for the matrix, cases etc. environments.

To get the same result as your LaTeX example you can use the m key for=20 \startalign.

\starttext

\startformula
=C2=A0=C2=A0=C2=A0 \startalign[m=3D3,distance=3D3em]
=C2=A0=C2=A0=C2=A0 \NC K \NC \approx G * H=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \NC=C2=A0 i=C2=A0=C2= =A0 \NC =3D=20 j+k=C2=A0=C2=A0=C2=A0=C2=A0 \NC B \NC \subset C=C2=A0 \NR
=C2=A0=C2=A0=C2=A0 \NC H \NC \approx A_{0}*B_{0}=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 \NC=C2=A0 i'=C2=A0 \NC =3D=20 j'+k'=C2=A0=C2=A0 \NC C \NC =3D D\cap E=C2=A0 \NR
=C2=A0=C2=A0=C2=A0 \NC G \NC \approx \coprod_{\alpha\in A} L_{\alpha} \NC= =C2=A0 i'' \NC=C2=A0=20 =3Dj''+k'' \NC A \NC =3D D \cup E \NR
=C2=A0=C2=A0=C2=A0 \stopalign
\stopformula

\stoptext

Wolfgang
--------------020404000002040104000509-- --===============1398343003== 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= --===============1398343003==--