[XeTeX] hyphenating words with hyphen

Jonathan Kew jfkthame at googlemail.com
Tue Oct 6 14:23:47 CEST 2009


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

> Thank you, Jonathan,
>
> That was my obvious typo -- i mixed up these two token lists.  This
> way it works
> fine!
>
> Yours,
>
> Vadim
>
> PS.  Another problem I've tried to solve with  \XeTeXinterchartoks is
> x-scaling the em-dash which is often two wide (and copyright sometimes
> prohibits changing the font itself).   So I can put
>
> \newXeTeXintercharclass\cyrdash
> \XeTeXcharclass `\—\cyrdash
> \XeTeXinterchartoks 0 \cyrdash = {\nobreak\hskip.125em\scalebox{.75} 
> [1]}
> \XeTeXinterchartoks \cyrdash 0 = {\hskip.125em}
>
> leaving no spaces around the dash. But unfortunately this does not
> work in the very beinning of the paragraph.

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".

An alternative approach, though, might be to replace the em-dash with  
an en-dash, or if that's too short, with two en-dashes kerned so as to  
partially overlap; this should let you get the appearance you want  
without requiring the graphicx package.

JK



More information about the XeTeX mailing list