From Wiki
< Command
Revision as of 02:52, 18 June 2017 by Henri (talk | contribs) (Created page with "{{Reference |name=startmathalignment |attributes= }} == Syntax == <table cellspacing="4" cellpadding="2" class="cmd"> <tr> <td colspan="2" class="cmd">\...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



\startmathalignment[...,...=...,...] ... \stopmathalignment
n number
m number
distance dimension
align left middle right
number auto


Using \startmathalignment one can align mathematical equations similar to what is known from LaTeX's amsmath package. It is used inside formulas. The usage is straightforward:

    \NC ... \NC ... \NR

As in tabular materials \NC is used as column separator and \NR as row separator. Whether the formula is numbered can be controlled by prefixing \placeformula to \startformula. This will place a single number vertically centred with respect to the equation. When all the subformulas should be numbered individually, one specifies number=auto.

There is a predefined shorthand for \startmathalignment which is \startalign to match the amsmath name. However, \startmathalignment should be preferred, as \startalign already has a different meaning outside math mode.

The implementation is found in math-ali.mkiv.


Method Meaning
n number of columns
m number of column pairs
distance distance between column pairs
align alignment of columns
number numbering mode for lines


To imitate certain LaTeX contructs (some might not yet work on the Wiki). More examples can be found in A. Mahajan, Display Math in ConTeXt, MAPS 34, 22–34 (2006).

  • align
    \NC v \NC= u + at, \NR
    \NC d \NC= ut + \frac{1}{2} at^2. \NR

  • gather
    \NC v = u + at, \NR
    \NC d = ut + \frac{1}{2} at^2. \NR

  • alignat
    \NC x_1 \NC + \NC x_2 \NC + \NC 6x_3 \NC = \NC 170, \NR
    \NC 3x_1 \NC - \NC 110x_2 \NC - \NC x_3 \NC = \NC 4, \NR
    \NC 14x_1 \NC + \NC 13x_2 \NC + \NC 10x_3 \NC = \NC 25. \NR

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: