-----Ursprüngliche Nachricht----- Von: ntg-context
Im Auftrag von Max Chernoff via ntg-context Gesendet: Mittwoch, 14. September 2022 08:51 An: ntg-context@ntg.nl Cc: Max Chernoff ; context@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.) Best, Denis