On Sat, 22 Aug 2009, Michail Vidiassov wrote:
Dear All,
I have fixed this by using:
label.rt(textext("\framed[frame=off,align=right]{One\\Two}"),origin);
And what about proper tables there? Replacing One\\Two in the above code with $ \startmathmatrix \NC 1 \NC 1 \NR \NC 1 \NC 1 \NR \stopmathmatrix $
All metapost environments expand their arguments, so anything looking for an optional argument fails. There are workarounds, though \unexpanded\def\MYMATRIX% {$\startmathmatrix \NC 1 \NC 1 \NR \NC 1 \NC 1 \NR \stopmathmatrix$} \starttext \startMPcode label.rt(\sometxt{\MYMATRIX}, origin) ; label.rt(textext ("\MYMATRIX"), (5cm,0)) ; \stopMPcode \stoptext And if you really want it to work, we need to make cetrain things unexpandable \unprotect \def\dodefinemathmatrix[#1]% [#2]% {\unexpanded\setvalue{\e!start#1}{\dodoubleempty\dostartmathmatrix[#1]}% \unexpanded\setvalue{\e!stop #1}{\dostopmathmatrix}% \setupmathmatrix[#1]}% [#2] \definemathmatrix[matrix] \definemathmatrix[\v!mathmatrix] \unexpanded\def\dodomatrixNC {\gdef\domatrixNC{\endmath&}} % To avoid errors in expansion \let\NC\relax \let\NR\relax \protect Now this works \starttext \startMPcode label.rt(\sometxt{$\startmathmatrix \NC 1 \NC 1 \NR \NC 1 \NC 1 \NR \stopmathmatrix$}, origin) ; \stopMPcode \stoptext Hans, should we add this to strc-ali? Aditya