[NTG-context] Math alignment

Wolfgang Schuster schuster.wolfgang at gmail.com
Tue Jul 7 20:17:50 CEST 2015



> Hans Aberg <mailto:haberg-1 at telia.com>
> 7. Juli 2015 18:23
>> On 7 Jul 2015, at 16:47, Wolfgang Schuster<schuster.wolfgang at gmail.com>  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 alignments, 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 between both columns with the distance key.
>
> I missed that. It fixes the spaces within the formula, but adds space between 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 it between the “-“ and the “ω” 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 something it wasn’t intended for.
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

Wolfgang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150707/55f2b2c2/attachment-0001.html>


More information about the ntg-context mailing list