[XeTeX] Re: [MacTeX] XeTeX

Ross Moore ross at ics.mq.edu.au
Wed Apr 14 04:08:25 CEST 2004


On 14/04/2004, at 12:54 AM, Ross Moore wrote:

> Here's what I've just discovered:
>
> Using the \mathcode settings from  plain.tex :
>
>     \mathcode`\(="4028
>             4*16^6 + 0*16^5 + 2*16 + 8 = 67108904    (XeTeX gives this)
>     \mathcode`\=="303D
>             3*16^6 + 0*16^5 + 3*16 + 13 = 50331709   (XeTeX gives this)
> but sometimes the shift is different:
>     \mathcode`\.="013A
>             0*16^5 + 1*16^4 + 3*16 + 10 = 65594     (XeTeX gives this)
>     \mathcode`\-="2200
>             2*16^6 + 2*16^4 + 0*16 + 0 = 33685504   (XeTeX gives this)

Doh!
  because of the zeros, these are all consistent with:
          ?*16^6 + ?*16^4 + ?*16 + ?
as confirmed by:

     \mathcode`\^^A="3223  % \downarrow
             3*16^3 + 2*16^2 + 2*16 + 3 = 12835       (TeX gives this)
             3*16^6 + 2*16^4 + 2*16 + 3 = 50462755    (XeTeX gives this)

(Hmm; at  ~1:00am  this simple explanation escaped me!)


So it looks like the \mathcode numbers have been built from
the 3 separate pieces of information
    e.g.  "3223  =  3 2 23    (each in Hexadecimal)

which xetex  stores (or reads back) as:  "03 "02 "0023

Also, the  mathcode "8000 trick is used by several
LaTeX packages. For testing this:

\count255="8000
\showthe\count255
{\obeyspaces%
\mathcode`\ ="8000 % \space
\count255=\mathcode`\ % space
\showthe\count255%
}%

TeX gives:      32768 = 2^{15} = "8000
XeTeX gives:   134217728 = 2^{27} = 8 x 16^6 = "08 00 0000


> So the bits are being mis-interpreted, either on setting
> the \mathcode , or upon reading back its value.

Over to you now Jonathan  --- welcome to the list !


Cheers

	Ross


------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------

_______________________________________________
MacTeX mailing list
http://tug.org/mailman/listinfo/mactex



More information about the XeTeX mailing list