You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, lua-widow-control selects the paragraph with the fewest absolute demerits. However, a paragraph's demerits is the sum of the demerits for each line, so a longer paragraph will almost always have more demerits, even if it has a lower badness.
Choices
cost = demerits
This is what we have right now. This probably isn't a great choice, for the reasons discussed above.
cost = demerits / prevgraf
This is a decent option. It tries to minimize the average demerits for each line.
cost = sqrt(demerits) / prevgraf
This tries to minimize the badness for each line.
cost = demerits / sqrt(prevgraf)
This tries to minimize the average demerits, while slightly penalizing longer paragraphs. This makes sense, since given two paragraphs with equal average demerits per line, you should prefer the shorter one since it will give fewer overall "bad" lines.
The text was updated successfully, but these errors were encountered:
Right now, lua-widow-control selects the paragraph with the fewest absolute demerits. However, a paragraph's demerits is the sum of the demerits for each line, so a longer paragraph will almost always have more demerits, even if it has a lower badness.
Choices
cost = demerits
This is what we have right now. This probably isn't a great choice, for the reasons discussed above.
cost = demerits / prevgraf
This is a decent option. It tries to minimize the average demerits for each line.
cost = sqrt(demerits) / prevgraf
This tries to minimize the badness for each line.
cost = demerits / sqrt(prevgraf)
This tries to minimize the average demerits, while slightly penalizing longer paragraphs. This makes sense, since given two paragraphs with equal average demerits per line, you should prefer the shorter one since it will give fewer overall "bad" lines.
The text was updated successfully, but these errors were encountered: