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 20:53:36 +0200 [thread overview]
Message-ID: <8B6A0B9F-850E-400B-B3AA-5369474EBB4E@telia.com> (raw)
In-Reply-To: <559C17CE.5090500@gmail.com>
> 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.
>
> \definemathmatrix
> [aligned]
> [n=2,
> align={right,left},
> distance=\spaceamount]
>
> \starttext
>
> \startformula
> J^j:
> \startaligned[left=\left\{,right=\right.]
> \NC ω^0 \NC ↦ 0 \NR
> \NC ω^j \NC ↦ 0 \NR
> \stopaligned
> \quad
> \startaligned[n=3,align={right,middle,left},left=\left\{,right=\right.]
> \NC ω^k \NC ↦ \NC ω^l \NR
> \NC ω^l \NC ↦ \NC -ω^k \NR
> \stopaligned
> \stopformula
>
> \stoptext
That looks like the right thing. Thanks.
Your example is quite close to TeX, cf. example below.
I have also put in an extra alignment to see what happens, monospace code alignment style. Changing ‘left’ to ‘right did not seem to have any effect here.
----
\definemathmatrix
[aligned]
[n=2,
align={right,left},
distance=\spaceamount]
\starttext
\startformula
J^j:
\startaligned[left=\left\{,right=\right.]
\NC ω^0 \NC ↦ 0 \NR
\NC ω^j \NC ↦ 0 \NR
\stopaligned
\quad
\startaligned[n=3,align={right,middle,left},left=\left\{,right=\right.]
\NC ω^k \NC ↦ \NC \NC ω^l \NR
\NC ω^l \NC ↦ \NC -\NC ω^k \NR
\stopaligned
\stopformula
\def\equlb#1{\left\{\eqalign{#1}\right.} %equation left braced
\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
___________________________________________________________________________________
next prev parent reply other threads:[~2015-07-07 18:53 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 [this message]
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=8B6A0B9F-850E-400B-B3AA-5369474EBB4E@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).