[NTG-context] Hyphenation in multi-language projects

denis.maier at unibe.ch denis.maier at unibe.ch
Wed Sep 14 09:19:29 CEST 2022

> -----Urspr√ľngliche Nachricht-----
> Von: ntg-context <ntg-context-bounces at ntg.nl> Im Auftrag von Max
> Chernoff via ntg-context
> Gesendet: Mittwoch, 14. September 2022 08:51
> An: ntg-context at ntg.nl
> Cc: Max Chernoff <mseven at telus.net>; context at st.estfiles.de
> Betreff: Re: [NTG-context] Hyphenation in multi-language projects
> Hi Steffen,
> > … \replaceword should be the correct way for proper hyphenation??
> Well I'm not sure if it's "correct", but it seems to work. Based on my testing,
> having three subsequent sets of groups ({A}{B}{C}) is converted to a
> discretionary. The discretionary hyphen "\-" is equivalent to the Plain TeX
> command "\discretionary{-}{}{}", so
>    \replaceword[hyphenations][steffen][steff{-}{}{}en]
> acts just like "steff\-en". TeX won't otherwise hyphenate a word with
> discretionaries, so this means that "steff-en" will be the only allowable
> hyphenation.

Just one caveat though. IIRC, Hans has mentioned that this kind of stuff is slower than using the hyphenation engine directly. (That's why he has reimplemented the ligature suppression mechanism on the hyphenation level, rather than acting on the node list.) 


More information about the ntg-context mailing list