TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm typesetting up some linear algebra notes, and in the process moving from LaTeX to ConTeXt. What is the most efficient method of entering matrices in ConTeXt? I can use plain TeX:


which is OK, but typesets all elements centered in their columns. To obtain right-aligned elements I'd have to add lots of hfill's through the matrix.


\NC 1 \NC 2 \NC 3 NR
\NC 5 \NC 6 \NC -6 \NR

which works, but is very wordy and cumbersome (I much prefer the "&, \" of LaTeX here). What is the canonical way of obtaining right-aligned entries in ConTeXt?


share|improve this question

The canonical way is to use \definemathmatrix.


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

In some ways, the ConTeXt style encourages you to separate content from presentation.

Typing \NC ... \NR can be simplified a bit by using editor macros. But that is not all that verbose compared to & and \\.

Also see Section 3 of this MAPS article that compares LaTeX and ConTeXt matrices.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.