[XeTeX] Use of Apple Symbols font in XeLaTeX
Jonathan Kew
jonathan_kew at sil.org
Fri Sep 17 12:55:44 CEST 2004
On 17 Sep 2004, at 11:29 am, Bruno Voisin wrote:
> Le 17 sept. 04, à 11:34, Bruno Voisin a écrit :
>
>> Alas this does not work. I suspect the problem is actually more
>> serious: in XeTeX, a two-digit text character declaration such as "1C
>> becomes a four-digit one "001C (I think);
Well, sort of... they're all just numeric constants. So "1C is really
just another way of saying 28, and "001C is the same.
>> but what does become a four-digit math character declaration such as
>> "321C, where the first digit refers to the class (relation, binary
>> operation, opening delimiter, ordinary character, etc.) and the
>> second digit to the font family (1 for math italic, 2 for math
>> symbol, 3 for math extension, etc.)?
This is also just a number; it equals 12828. The interpretation of the
separate hex digits as distinct "fields" is a "magic convention" wired
into TeX. You could define your mathchars using decimal constants if
you like, and TeX would interpret them just the same.
>> Is it simply "32001C?
>>
>> I am asking this because, apparently, \DeclareMathSymbol works
>> essentially as follows, for a definition of the form
>> \DeclareMathSymbol{\applewhitesquare}{\mathord}{applesymbols}{"25A1}
>>
>> \DeclareMathSymbol{#1}{#2}{#3}{"#4}
>> -> \set at mathsymbol{sym#3}{#1}{#2}{#4}
>> -> \mathchardef{#1}="{#2}{sym#3}{#4}
>>
>> where the arguments have been replaced by their hexadecimal numeric
>> equivalents wherever necessary. Hence, what the \mathchardef syntax
>> becomes in XeTeX seems crucial to the issue.
>
> Well, I should just have tried. Doing this:
>
> \DeclareFontFamily{U}{appsym}{}
> \DeclareFontShape{U}{appsym}{m}{n}{<-> "Apple\space Symbols"}{}
>
> \DeclareSymbolFont{applesymbols}{U}{appsym}{m}{n}
> % defines a new math font family \symapplesymbols
>
> \makeatletter
> \mathchardef\testwhitesquare="0\hexnumber@\symapplesymbols25A1
> \makeatother
> % \hexnumber@ is LaTeX's command for extracting an hexadecimal value
> between 0 and F
>
> I get the error message:
>
> ! Bad mathchar (730529).
> l.208 ...esquare="0\hexnumber@\symapplesymbols25A1
>
> which seems to indicate that \mathchar's larger than four digits
> (actually larger than standard TeX's default "7FFF) are simply not
> allowed.
Yes, so it seems.
> There's certainly something I've figured out wrongly somewhere,
> something's I've implicitly assumed that I shouldn't, but what?
No, I don't think there is; you're seeing an area where an 8-to-16 bit
extension has not been attempted.
Does Omega include an extended \mathchar, by any chance? That might
provide a model for what should be done, but at present I don't think
you can encode character codes > 255 in a \mathchar.
The standard TeX math fonts, of course, don't use character codes >
255, and so this wasn't a problem for supporting legacy math
formatting; but it's a problem as we look to a properly Unicode-encoded
future.
JK
More information about the XeTeX
mailing list