[XeTeX] xltxtra wishlist

Jonathan Kew jonathan_kew at sil.org
Wed May 30 13:02:35 CEST 2007


On 30 May 2007, at 11:42 am, Will Robertson wrote:

> On 30/05/2007, at 18:01 , Jjgod Jiang wrote:
>
>> \XeTeXcharclass\Punct=\@@jop}
>> [snip]
>> \XeTeXinterchartoks\@@nchar\@@ideog = {\bJap}
>
> Neat way to solve that problem!
> (I assume it's efficient.)
>
> Hang on. In a different context, that could also deal with kerning
> adjustments...but that would mess up the whole "auto-alphabet"
> switching. I wonder if the same internal idea could be used for per--
> character-pair adjustments as well as fitting into the charclass
> concept.

You really don't want to go there... yes, in principle it could be  
done, but the current implementation in terms of char classes  
wouldn't be suitable for lots of adjustments at the individual  
character level (myriads of singleton classes!).

Also, note that kerning adjustments are likely to be font-specific,  
whereas this mechanism applies independent of the current font; it's  
intended for things that really belong at the character level, not  
the glyph level.

Kerning adjustments should be done as part of a more general  
mechanism for overriding details of glyph selection and placement in  
OpenType fonts -- which has not yet been designed, sorry.

> Anyway, I'd like to add this info to my XeTeX-reference document.
> I still need to get around to documenting the new maths primitives,  
> too.
>
> Are these the only two primitives added for this feature?
> What are the pre-defined charclasses?

All characters are initialized to class 0 by xetex; then unicode- 
letters.tex reassigns a bunch based on their Unicode character  
properties. See the end of that file (in svn).

> (If ideograph = 1 and punctuation = 4 by default there must be  
> more...)
> What is the maximum number of charclasses possible?

256 (numbered 0..255). Note that class 255 has a predefined meaning,  
though, so you probably don't want to use it for real characters.  
This class value is used to represent a text run boundary (edge of  
word, etc).

Oh, and there's also a "non-class" numbered 256, which is ignored  
(can be useful for diacritics).

> I assume those equals signs are optional?

yes

> Finally, what's the syntax of that final toks argument? Can the
> braces be omitted for a single token?

no. It's a token list, just like when you do \toks0={...}

JK





More information about the XeTeX mailing list