3 ms·
There is an interesting blind spot in the article. When the author has two paragraphs shown, one greedy and one Knuth-Plass and declares the second to be "more
by jws 8y ago
There is an interesting blind spot in the article. When the author has two paragraphs shown, one greedy and one Knuth-Plass and declares the second to be "more rectangular" it only looks so because of the colons added to the second to show the ideal length. The differences in the line lengths are actually identical. Measuring from the longest line the greedy is [0,2,3,1,many] where the Knuth-Plass is [2,0,3,1,many].
The author's assertion is true, the example data just doesn't show it although it looks like it does because of the extra marking.
- svat 8y agoGood catch. In fact, it's possible that TeX (and humans) judge the first paragraph as better. Here they are, with colons after each: xxxx x xxxx xxxxx xx xx xxxxx x: xx xxxxxxx xxxxx xxx xxxx xxx : xxxxx x x xxx xxxx xxx xx xx : xxxxxxx x xxxx xx xxxx xxx xxx : xx xxxx x xxxx xxxxx xx xx xxxxx : x xx xxxxxxx xxxxx xxx xxxx xxx: xxxxx x x xxx xxxx xxx xx xx : xxxxxxx x xxxx xx xxxx xxx xxx : xx Note that in reality the paragraphs will not be typeset as above, but the spaces will be stretched or shrunk so that the lines have identical width. The reason the first could be judged as better is that TeX has penalties (\adjdemerits) when consecutive lines belong to "incompatible fitness classes" (e.g. very loose lines following very tight lines), so it may be possible that the first paragraph can count as (tight, loose, loose, loose), and the latter as (loose, tight, loose, loose), which is worse.