On 7/28/2021 7:24 PM, Thomas A. Schmitz via ntg-context wrote: > Hi all, > > just two quick questions: a couple of weeks ago, there was a long > discussion on ligature exceptions in, e.g., German. Hans provided an > elegant new mechanism (\startlanguageoptions). So my two questions: > > 1. Is the old mechanism (\replaceword[eg][Auflage][Au{fl}age]) now > obsolete? I tried using it, but unwanted ligatures still occurred. If it > is indeed deprecated, I'll add a note to the wiki (this would mean that > the current texlive version does not have the new mechanism and the > latest lmtx doesn't use the old one, so that's somewhat problematic). it's not too hard to make it work, see attached, but the new one is nicer because it permits more detailed control in luametatex you can do things like Au{\norightligaturing f}lage that is: each character can have a set of options; ok, one can do that with attributes but that is less efficients options have been introduced for ligatures, kerns, expansion etc (you can diff the attached lmt file with the lua file of the same name to see the difference in approach > 2. Both mechanisms only work for complete words, is that right? So I > can't just provide a pattern such as "uf|forder," I have to provide a > full list with all inflected forms: > > auf|fordern > auf|fordert > auf|fordernd > Auf|forderung > Auf|forderungen > > and for 1-3 also the forms with a capital letter. just lowercase will do if you look at the example files you can see that there are pre/post snippets possibel so basically you can create something pre [a|b|c] post which saves some definitions (make we can have pre/post lists which will nicely explode into huge lists but memory is not the issue here) while the replacement works by running over the node list, the second mechanism is using a callback at the hyphenation level (so per language) where each word is anyway checked against an exception list, so in addition that word can now be fed into a function and depending on outcome be fed back into the machinery (there are trackers that give insight in the process) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------