On Tue, 13 Feb 2007, Mojca Miklavec wrote:
Hello,
is there a nice way to [mis]use \startalign or combine it with something else to typeset equations like the following one (in a fixed-width font)?
fixed-width font? Then you can just use \starttable with appropriate setting for distance. Even otherwise you can use starttable with |m| columns, but I understant math align better.
a + b = 9 a - b = 3 ___________ 2a = 12
\noalign is your friend. Here is the first approximation \starttext \startformula \startalign[n=5] \NC a \NC + \NC b \NC = \NC 9 \NR \NC a \NC - \NC b \NC = \NC 3 \NR \noalign{\hrule} \NC 2a \NC \NC \NC = \NC 12 \NR \stopalign \stopformula \stoptext Hmm... the width of the rule is too long, so lets use something with a fixed width \starttext \startformula \startmatrix[n=5] \NC a \NC + \NC b \NC = \NC 9 \NR \NC a \NC - \NC b \NC = \NC 3 \NR \noalign{\hrule} \NC 2a \NC \NC \NC = \NC 12 \NR \stopmatrix \stopformula \stoptext Hmm... distance and alignment are wrong, so lets correct that \starttext \startformula \startmatrix[n=5,distance=.3em,align={right,middle,right,middle,right}] \NC a \NC + \NC b \NC = \NC 9 \NR \NC a \NC - \NC b \NC = \NC 3 \NR \noalign{\hrule} \NC 2a \NC \NC \NC = \NC 12 \NR \stopmatrix \stopformula \stoptext Voila! I did not know that ConTeXt math alignment macros could do something like this. Aditya