Hi Wim, On Tue, 31 Jul 2007, WN wrote: > Hi Aditya > > Basically I want to include the RSFS font and some user defined symbols from > txexa as explained in my previous email. > > I did some testing with the test code which I send and found the cause of the > problem, however no solution yet. > The cause of the problem lies in the line where I say > > \definetypeface[MyFace] [mm] [math] [modern] *[modern] *[encoding=ec] > > This will enable the user defined symbols and all the math symbols as shown > via \showmathcharacters are correct. > > However all the matrix, mathmatrix environments don't adhere to the aligment > I specify except for the first option i.e. > when I say \startmatrix[align={right, etc .... }] everything is aligned to > the right but the other aligment options are ignored. > > When I substitute *[modern]* with *[default] *as in > > \definetypeface[MyFace] [mm] [math] [modern] *[default] *[encoding=ec] > > In this instance all the aligment as specified in the matrix, mathmatrix > environments work. However some of the > math symbols like \Delta are incorrect. And my user defined symbols are also > incorrect. Phew! This was a hard to find bug. First, to illustrate the bug: \definetypeface[mainface] [rm] [serif] [modern] [default] [encoding=texansi] \definetypeface[mainface] [mm] [math] [modern] [modern] [encoding=texansi] \setupbodyfont[mainface,11pt] \loggingall \starttext \startformula A = \startmatrix[align={left,right}] \NC 11 \NC 2 \NR \NC 2 \NC -5 \NR \stopmatrix \stopformula \stoptext Try with and without the font declarations. With the font declarations, you lost matrix alignment. The reason is that \startmatrix uses \scratchcounter, which gets rewritten when using a font collection other than "default". One fix it to replace \scractcounter in matrix constructions by some other counter, for example \!!counta. So, add this to your file (beware of false line breaks in email) \unprotect \def\dostartmathmatrix[#1][#2]% {\begingroup \edef\currentmathmatrix{#1}% \doifassignmentelse{#2}{\setupmathmatrix[#1][#2]}\donothing \null \executeifdefined{\??mx:\mathmatrixparameter\c!location}{\getvalue{\??mx:\v!lohi}}% \mathmatrixleft \mathmatrixbox\bgroup \pushmacro\domatrixNC \let\endmath\relax \def\NC{\domatrixNC}% \def\MC{\domatrixNC\ifmmode\else$\def\endmath{$}\fi}% \global\let\domatrixNC\dodomatrixNC \def\NR{\endmath\global\let\domatrixNC\dodomatrixNC\crcr}% \normalbaselines \mathsurround\zeropoint \everycr\emptytoks \tabskip\zeropoint \eqaligncolumn\zerocount % could be \!!counta \processcommacommand[\mathmatrixparameter\c!align]{\advance\eqaligncolumn\plusone\dosetmatrixcolumn}% \!!counta=\ifnum\eqaligncolumn>\!!counta \eqaligncolumn \else \plusone \fi \global\eqaligncolumn\plusone \preparemathmatrix } % uses !!counta \def\buildmathmatrix % beware: etex only {\scratchtoks\emptytoks \expanded{\scratchtoks{\the\scratchtoks\the\!!toksa}}% \dorecurse{\numexpr\!!counta-\plusone\relax} {\expanded{\scratchtoks{\the\scratchtoks\the\!!toksb}}}% \expanded{\scratchtoks{\the\scratchtoks\the\!!toksc }}} \protect Hans, this needs to be changed in core-mat.tex. I do not know if something can be done to avoid such errors in future. Wim, I am attaching a modified version of your file which gives the correct output. (I needed to make some changes since I did not have your map file for rsfs). You loose some symbols from the math collection. I do not know how to add extra math symbol sets without loosing these characters. Look at math-tim.tex to see how more families can be supported. But I would suggest waiting for mkiv, where the limit on font families will be removed and some of this font mess would be cleaner. Aditya