[XeTeX] sting manipulation macros

Michiel Kamermans pomax at nihongoresources.com
Sun Oct 19 18:42:23 CEST 2008


caapv 208 wrote:
> --- Michiel Kamermans <pomax at nihongoresources.com> wrote:
>
>   
>> I needed to compare individual glyphs in sections of
>> text to unicode 
>> block start and end markers, so that I could insert
>> tex macros between 
>> characters of different unicode blocks (if the font
>> definitions for 
>> those blocks were different).
>>     
>
> You can use XeTeXinterchartoks for the purpose.
Actually, I can't, for two reasons.

1) it uses numbered blocks, without me being able to say which 
characters go in which blocks. I want to have control, not have to rely 
on some internally numbered blocks with fixed content. a dedicated block 
for CJK for instance is useless to me if I want to use different markup 
for Korean (maybe a nice jamo font) and Japanese (perhaps some obscure 
sousho font).

2) more importantly, the built-in XeTeX charclass system relies on a 
state-change matrix for saying what happens on from-A-to-B state 
changes. This is incredibly silly: I don't want to have to specify the 
mad combinatorial list of all possibly changes from each of the 
individual unicode blocks, to every other one. That would be madness. I 
want to be able to say what should happen when a particular block 
starts, or when a particular block ends, and MAYBE - if I *really* need 
it - manually add specific rules for when a particular block A is 
followed by a particular block B.

For this, the currently available functionality isn't good enough by 
far, and an almost trivial addition to the engine would allow for more 
control by the user (which is why we all use TeX in the first place) 
while offering great enrichment to what we can do in macros because we 
can perform conditional logic based on the properties of individual 
characters.

- Mike


More information about the XeTeX mailing list