On Sat, 14 May 2011, Alasdair McAndrew wrote:

Hello,

I'm trying to typeset some linear algebra exercises for my students; the
exercises will be within a table, and each second element will be a system
of linear equations.  This sort of thing:

\starttable[|l|M|l|M|]
\NC (a) \NC %

\startmathalignment[n=7,align={right,middle,right,middle,right,middle,right}]
     \NC 3x\NC +\NC 6y\NC -\NC 2z\NC =\NC -13\NR
     \NC -6x\NC -\NC 9y\NC +\NC 5z\NC =\NC 22\NR
     \NC 3x\NC +\NC 3y\NC -\NC 5z\NC =\NC -13\NR
   \stopmathalignment
\NC (b) \NC %

\startmathalignment[n=7,align={right,middle,right,middle,right,middle,right}]
\NC x\NC +\NC 3y\NC +\NC 3z\NC =\NC -4\NR
\NC x\NC +\NC 4y\NC +\NC 5z\NC =\NC -5\NR
\NC 2x\NC +\NC 4y\NC +\NC 3z\NC =\NC -5\NR
\stopmathalignment
\NC\AR
\stoptable

But this doesn't work.  There seems to be a problem with the mathalignment
environment within the table.  What do I need enclose these in so that they
will be treated as displayed equations within the table environment?

(Untested): \framed[align=normal,width=fit]{\startformula \startmathalignment ... \stopmathalignment \stopformula}

math alignment is a display math environment, and must be inside a \startformula ... \stopformula.

Two comments:

1. You know about \definemathalignment, right?
2. I think that this effect can be obtained more easily using

\startitemize[two,columns,a]
  \item ...
  \item ..
\stopitemize

but you might need to insert a negative \vskip (or \blank) to get matrix to align with the item symbol.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 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
___________________________________________________________________________________

Reply via email to