[XeTeX] Hyphenation around „ß“

Jonathan Kew jfkthame at googlemail.com
Mon Jan 13 13:06:27 CET 2014


On 13/1/14 10:32, Philip Taylor wrote:
>
>
> Khaled Hosny wrote:
>
>> That is a known issue with Knuth's \showhyphens in XeTeX's way of
>> forming "native" word nodes AFAIK, xltxtra package has a modified
>> \showhyphens from Jonathan that should work with XeTeX.
>
> Hmm, thank you Khaled.  I took one look and knew in an instant
> that it would not worked in an IniXeTeX environment :
>
> 	\@for\@ii:=#1\do{\xxt at showhyphens{\@ii}}%
>
> Is there a simpler version that does not rely on all these
> adjunct bells and whistles ?

Only if someone cares to write it!

The basic issue with the original \showhyphens is that it relies on 
tex's display of an underfull box. But when working with 
unicode/opentype ("native") fonts, xetex strips any potential 
hyphenation points that didn't actually get used during paragraph 
building, so that they won't disrupt font shaping within the individual 
words; therefore, they don't show up when an underfull box is logged.

So IIRC, the alternative version works by setting the word into a 
zero-width \vbox, and then extracting the resulting word fragments from 
the list of (all overfull) lines in the paragraph and assembling them 
into a line for display. Of course this could all be written from 
scratch using tex primitives, but at the time it seemed easier to make 
use of some higher-level tools.

> And why does Jonathan's example
> use the reformed orthopgraphy patterns when we are trying
> to hyphenate words with eszet ?

It doesn't matter; I was just aiming to show that ß does not prevent 
xetex correctly finding a hyphenation point that's specified by the 
patterns in use.




More information about the XeTeX mailing list