You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Manuel Mall <mm...@arcus.com.au> on 2005/11/13 11:33:50 UTC

Hyphenation

In preparation for the upcoming 0.90 release I was reviewing the 
examples in examples/fo/basic. When looking at the output of hyphen.fo 
I noticed that in both the English hyphenation example and the German 
hyphenation example 4 consecutive lines ending with hyphens were 
generated.

It was my understanding that the Knuth algorithm was designed to exactly 
prevent this situation by adding a penalty to a hyphen break and by 
adding additional demerits for consecutive line ending with hyphens.

Have I misunderstood the algorithm (the most likely scenario), or is the 
example a particular 'unfortunate' case, or is our implementation 
incomplete or incorrect?

On a related matter: Knuth says in his paper that hyphenations in 
unjustified text are even less desirable than in justified text and 
suggests 10 times higher penalty (500 instead of 50) for hyphenations 
breaks in unjustified text. I don't think we do that.

Manuel