[XeTeX] Re: [MacTeX] XeTeX

Ross Moore ross at ics.mq.edu.au
Tue Apr 13 16:54:12 CEST 2004


Hi Bruno,

On 13/04/2004, at 11:49 PM, Bruno Voisin wrote:

>> The left-parenthesis character is at  ascii 40,
>> hence at code-point 40 (decimal) in Unicode.
>> Note that:
>>    16424 = 40 + 2^{14}
>> 67108904 = 40 + 2^{26}
>>
>> So it looks to me that the lower (at least 8) bits
>> are correct, but not the upper ones.
>>
>> Using other characters (e.g. - , = and . ) give similar
>> results; viz.
>>   using  \mathcode`\.="013A  ( = 314 = 58 + 2^8 )
>>   xetex produces:     65594  = 58 + 2^16
>>
>> Thus it seems that \mathcode values are either being
>> read incorrectly, or are not being set correctly.
>> This is something internal to the compiled binary,
>> and cannot be influenced at the macro/user level.
>>
>> Since it's just one bit that's wrong (but not always
>> the same bit!) then hopefully it's easily fixed.
>
> I'm wondering whether it's related to encodings. The ReadMe.rtf file 
> inside the .pkg installer says XeTeX works with UTF-8 and UTF-16 input 
> only, and hence that the only existing TeX input files that are 
> processed properly are those that use 7-bit ASCII characters 
> exclusively. I don't know whether that means that all 
> character-producing TeX control sequences, including math symbols, are 
> converted internally to their Unicode code points, and whether that 
> might explain the problem.

No, it's not the Unicode code-points --- I'd already checked for that.
Besides, the characters (except for 'minus-sign') are in the 
ascii-plane.

But it *is* probably related to expanding the number of bits in a word,
resulting in a bit-shift.

Here's what I've just discovered:

Using the \mathcode settings from  plain.tex :

     \mathcode`\(="4028
             4*16^3 + 0*16^2 + 2*16 + 8 = 16424
             4*16^6 + 0*16^5 + 2*16 + 8 = 67108904    (XeTeX gives this)

     \mathcode`\=="303D
             3*16^3 + 0*16^2 + 3*16 + 13 = 12349
             3*16^6 + 0*16^5 + 3*16 + 13 = 50331709   (XeTeX gives this)


but sometimes the shift is different:
e.g.
     \mathcode`\.="013A
             0*16^3 + 1*16^2 + 3*16 + 10 = 314
             0*16^5 + 1*16^4 + 3*16 + 10 = 65594     (XeTeX gives this)
and
     \mathcode`\-="2200
             2*16^3 + 2*16^2 + 0*16 + 0 = 8704
             2*16^6 + 2*16^4 + 0*16 + 0 = 33685504   (XeTeX gives this)


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



Cheers

	Ross


>
> Bruno
> _______________________________________________
> MacTeX mailing list
> http://tug.org/mailman/listinfo/mactex
>
>
------------------------------------------------------------------------
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