ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: Hans Aberg <haberg-1@telia.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Math alignment
Date: Tue, 07 Jul 2015 21:49:39 +0200	[thread overview]
Message-ID: <559C2D53.3040907@gmail.com> (raw)
In-Reply-To: <0DEE0051-A811-4357-AAEB-951C43C3FAB8@telia.com>


[-- Attachment #1.1: Type: text/plain, Size: 1997 bytes --]


> Hans Aberg <mailto:haberg-1@telia.com>
> 7. Juli 2015 21:11
>> On 7 Jul 2015, at 20:17, Wolfgang Schuster<schuster.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, align*, and aligned, can have multiple alignments, and gives this example:
> \begin{align*}
>    K&\approx G * H&    i&= j+k&   B&\subset C\\
>    H&\approx A_{0}*B_{0}&   i’&= j’+k’&   C&= D\cap E\\
>    G&\approx \coprod_{\alpha\in A} L_{\alpha}&   i’’&=j’’+k’’&  A&= D \cup E
> \end{align*}
> which is typeset so that 'K&\approx G * H’ is one equation aligned on the ‘&’ with the others below, followed by 'i&= j+k’ 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= j+k \NC B \NA \subset C \NR
>      \NC H \NA \approx A_{0}*B_{0} \NC   i’\NA= j’+k’ \NC   C \NA = D\cap E\NR
>      \NC G \NA \approx \coprod_{\alpha\in A} L_{\alpha}
>        \NC   i’’\NA =j’’+k’’ \NC  A \NA = 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 
for the matrix, cases etc. environments.

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

\starttext

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

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3359 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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 19:49 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
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 [this message]
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=559C2D53.3040907@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=haberg-1@telia.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).