[NTG-context] Math alignment
Wolfgang Schuster
schuster.wolfgang at gmail.com
Tue Jul 7 21:49:39 CEST 2015
> Hans Aberg <mailto:haberg-1 at telia.com>
> 7. Juli 2015 21:11
>> On 7 Jul 2015, at 20:17, Wolfgang Schuster<schuster.wolfgang at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150707/fa6daf7c/attachment-0001.html>
More information about the ntg-context
mailing list