[Trennmuster] selektive Ligaturwahl
Stephan Hennig
sh-list at posteo.net
Fr Dez 19 23:41:24 CET 2014
Am 18.12.2014 um 21:20 schrieb Guenter Milde:
> Die Lua- und Python-Versionen können leicht modifiziert/erweitet und
> entweder als Präprozessor oder LuaTeX-Paket zum Setzen von ZWNJ oder
> "| oder wasimmer zwischen Ligaturkandidaten (ff,fi,fl, st, ...)
> genutzt werden (für Lua ist das bereits getan).
Neben der eigentlich bezweckten LuaTeX-Einbettung enthält das
Verzeichnis examples/lua/patternize/ übrigens auch ein Skript
patternize.lua, welches von stdin liest und auf stdout ausgibt:
> $ texlua patternize.lua --help
> usage: texlua patternize.lua [options]
> Decomposes UTF-8 encoded strings from stdin into Liang patterns and calculates s
> pots indicating, e.g., valid hyphenation points. Results are written to stdout,
> optionally with decomposition information. Options:
> long short arg description
> --help -h show help
> --patterns -p file set pattern file to use for decomposition
> Files '<file>' as well as 'hyph-<file>.pat.txt' are
> searched in that order using the kpse library.
> Patterns must be pure text in UTF-8 encoding.
> -T equivalent to -p hyph-de-1901.pat.txt
> -S equivalent to -p hyph-de-ch-1901.pat.txt
> -R equivalent to -p hyph-de-1996.pat.txt
> --verbose -v output decomposition information
> --leading -l num set minimum leading spot distance (default 2)
> --trailing -t num set minimum trailing spot distance (default 2)
> --mins -m num set minimum leading and trailing spot distances
> -0 ... -9 equivalent to -m 0 ... -m 9
> --chars -c chars set special characters, argument is a string of up to
> three UTF-8 characters:
> 1. spot character, default is HYPHEN-MINUS '-'
> 2. explicit spot character, default is EQUALS SIGN '='
> 3. boundary character, default is FULL STOP '.'
>
> $ echo "Häschen Häscher" |texlua patternize.lua -T -v
> pattern file: c:/texlive/2014/texmf-dist/tex/generic/hyph-utf8/patterns/txt/hyph
> -de-1901.pat.txt (15624 patterns read)
> spot mins, special characters: 2 2 '-=.'
>
> . h ä s c h e n .
> ä1s
> h ä4s
> 1s c
> ä s4c
> h ä5s c
> c4h
> s c h2e
> h ä6s5c h e n
> h2e n .
> .0h0ä6s5c4h2e0n0.
> häs-chen
>
> . h ä s c h e r .
> ä1s
> h ä4s
> 1s c
> ä s4c
> h ä5s c
> c4h
> s c h2e
> h2e r .
> .0h0ä5s4c4h2e0r0.
> hä-scher
Viele Grüße,
Stephan Hennig
Mehr Informationen über die Mailingliste Trennmuster