[XeTeX] hyphenating words with hyphen

Jonathan Kew jfkthame at googlemail.com
Tue Oct 6 15:10:40 CEST 2009


On 6 Oct 2009, at 13:49, Vadim Radionov wrote:

>> To make this apply at the beginning of the text (or of a word), I  
>> think
>> you'd need
>>
>>  \XeTeXinterchartoks 255 \cyrdash = {.....}
>>
>> because 255 is the "reserved" class for "edge of text run".
>>
>
> If I put
>
> \XeTeXinterchartoks 255 \cyrdash = {\scalebox{.75}[1]}
>
> compilation breaks on the first occurrence em-dash with
>
> ! TeX capacity exceeded, sorry [save size=5000]
>
> Exactly the same happens with {\hskip.125em} while {a} cause no  
> problem

Ah yes, recursion. Sorry, I didn't think about that. The transition  
from "boundary" to \cyrdash is found again following the inserted  
material, so it gets inserted again....and again....and again....

To solve this, you should be able to switch \XeTeXinterchartokenstate  
off/on dynamically: turn it off during the pre-dash token list, then  
generate the scaled dash you actually want, turn the feature back on,  
and end with a macro that gobbles the original dash token from the  
input. Or something like that.... untested....!

JK



More information about the XeTeX mailing list