Hi,
Trying to sum up what we currently have regarding ligature prevention, it looks 
like we have three mechanisms available:

1. \replaceword[set][input][output]
Ex.: \replaceword[ligs][Auflage][Au{fl}age]
Replaces a word input with the corresponding output.
Doesn't work at the moment with LMTX.
Can be used for words with multiple wrong ligatures (Auflaufform).
Does not take derived forms into account (e.g., replacements for Auflage and 
Auflagen must both be defined).

2. \blockligatures
Works as a font feature to block certain ligatures
Works also for derived forms of a given word (e.g., \blockligatures[Au:fl:age] 
will also block the fl-ligature in "Auflagen").
Currently, can't be used when multiple ligatures should be suppressed. 
\blockligatures[Au:fl:au:ff:orm] blocks the fl-ligature, but the ff-ligature 
still shows up. This here seems to works though:
\blockligatures [
Au:fl:auf,
au:ff:orm,
]
Don't know if there are unwanted side-effects to that approach.

3. \startexceptions
Works via hyphenation exceptions. To define exceptions for "Auflage" and 
"Auflaufform" use:
\startexceptions[de]
au{f-}{l}{fl}(f\zwnj l)age
Au{f-}{l}{fl}(f\zwnj l)au{f-}{f}{ff}(f\zwnj f)orm
\stopexceptions

This does not work automatically for derived forms; you'll have to define 
plural and other forms as well.
As this works with hyphenation exceptions you'll have to add legal hyphenation 
points as well, so for "Auflage", you will actually need:
\startexceptions[de]
au{f-}{l}{fl}(f\zwnj l)a-ge
\stopexceptions

IMO, the \blockligatures is the cleanest, both conceptually and syntax wise. 
Being able to implicitely disable derived forms is a big plus, but of course 
there may be drawbacks I don't see now. The only downsides I see currently is 
that you need workarounds to block multiple ligatures in a single words, of 
which there might not be too many. And, it's kind of an "all or nothing" 
approach as you cannot define sets of blocked ligatures. (But that may not be a 
relevant use case anyway.)

Anything, I've missed? Other aspects to think about here? How about performance 
issues? (The blockligatures-mechanism resulted in this: with a word list of 
about 2200 words it took a bit more than five seconds to process 23 A5 pages 
than 2.5 seconds without the blocked ligatures. I'll test with the other 
methods later or tomorrow.)

Denis



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to