Am 19.05.2010 20:45, schrieb Arthur Reutenauer:
In case anybody is reading this
Why wouldn't we? ;-)
Well, I'm merely pipe-dreaming. ;-)
patterns have to have not only one
weight attribute, but two attributes:
* a priority that solves conflicts (fighting pattern sets),
* a weight (or a demerit in case of TeX) that is to be associated
with a potential hyphenation point to steers the paragraph breaking
algorithm towards more legible paragraph breaks.
I'm not sure I get that. Could you make a small example?
Sure! Consider this case:
* a regular pattern set containing all valid hyphenations,
priority 3,
weight 10,
* a compound-word pattern set, that matches only word compounds,
priority 2,
weight 20,
* an undesirable pattern set, that recognizes valid, but undesirable
hyphenations
priority 1,
weight 1 or even zero.
If any of the latter two pattern sets has a match, that hyphenation
point should get a different hyphenation weight than the base weight 10.
But what if the regular pattern set has a match, too? Both new
pattern sets should take precedence over the regular pattern set[1],
even though weight is higher than base weight in one case and lower in
the other case. One value is not enough to encode hyphenation weights
and conflict resolution (pattern set ranking). A second value is required.
Best regards,
Stephan Hennig
[1] As for the relative ranking of compound word and undesirable pattern
sets, the latter should have highest priority, since it does less harm
to miss a word compound hyphenation than to generate a line break at an
undesirable hyphenation, IMHO.