[XeTeX] \XeTeXmathcode problem with amssymb

Jonathan Kew jonathan_kew at sil.org
Thu May 29 20:00:00 CEST 2008


On 29 May 2008, at 6:30 pm, Mehdi Omidali wrote:

> Hi,
> I compiled the following lines with xelatex (0.998.3) on miktex 2.7
>
> \documentclass{article}
> \usepackage{amssymb}
> \font\tenrgm="Scheherazade" at 15pt
> \font\sevrgm="Scheherazade" at 9pt
> \font\fivrgm="Scheherazade" at 7pt
> \newfam\fardig
> \textfont\fardig=\tenrgm
> \scriptfont\fardig=\sevrgm
> \scriptscriptfont\fardig=\fivrgm
> \XeTeXmathcode`2="7 "4 "06F2%
> \begin{document}
> $$2x^2$$
> \end{document}
>
> and the result is http://www.omidali.com/sample1.pdf
> The problem as you see is that the numbers 2 (and any other number)  
> is not
> shown. But if you just commnet \usepackage{amssymb} it works  
> perfectly like here
> http://www.omidali.com/sample2.pdf
>
> Is this again just a miktex problem?

No, the issue is that amssymb allocates a couple of math families,  
and therefore changes the family number that subsequently gets  
assigned by \newfam\fardig. When I tried this example, \fardig is set  
to 6, not 4.

Better, surely, to use the symbolic name in your mathcode assignment:

	\XeTeXmathcode`2="7 \fardig "06F2%

Then you don't need to rely on knowing the exact family number.

JK



More information about the XeTeX mailing list