[tex-hyphen] weighting hyphenation points

Taco Hoekwater taco at elvenkind.com
Thu May 20 12:06:45 CEST 2010


Stephan Hennig wrote:
> 
> That results in the following hyphenation weights:
> 
>   Text -20- il -0- lus -10- tra -15- ti -5- on
>   Tal -20- ent -0- wäs -10- se -15- rung
> 

My implementation plan for luatex 0.70 is to attach fixed penalty
values to each of the A-E pattern types. The cumulation of these
penalties are then stored inside the generated discretionaries.
So no 'weights', but actual TeX-style penalties.

   A) word compounds  - penalty -20 (e.g.)
       adds Text[-20]illustration, Tal[-20]entwässerung
       so now:
       Text[-20]illustration
       Tal[-20]entwässerung

   B) affix hyphenation - penalty -5
       adds Textillustra[-5]tion, Talent[-5]wässe[-5]rung,
       so now:
       Text[-20]illustra[-5]tion
       Tal[-20]ent[-5]wässe[-5]rung

   C) all valid hyphenations - penalty 50
       adds Text[50]il[50]lus[50]tra[50]ti[50]on, 
Tal[50]ent[50]wäs[50]se[50]rung
       so now:
       Text[30]il[50]lus[50]tra[45]ti[50]on
       Tal[30]ent[45]wäs[50]se[45]rung

   D) undesirable hyphenations - penalty 1000
       adds Textil[1000]lustrati[1000]on
       so now:
       Text[30]il[1050]lus[50]tra[45]ti[1050]on
       Tal[30]ent[45]wäs[50]se[45]rung

   E) sense distorting - penalty 10000
       adds Textil[10000]lustration, Talent[10000]wässerung
       so now:
       Text[30]il[10000]lus[50]tra[45]ti[1050]on
       Tal[30]ent[10000]wäs[50]se[45]rung

Best wishes,
Taco


More information about the tex-hyphen mailing list