justify-kp icon indicating copy to clipboard operation
justify-kp copied to clipboard

Sometimes lines aren't broken after failing to fill the previous line perfectly

Open wasamasa opened this issue 8 years ago • 1 comments

See the "No editor comes close." sentence in the middle of the picture. I can understand that without hyphenation the justification algorithm can fail to fill lines perfectly and sometimes leaves a word sticking out the line. What I don't understand is why it can happen that the next word isn't put on a new line. Is this some special case TeX deals with on a case-by-case basis?

wasamasa avatar Sep 19 '17 17:09 wasamasa

Well TeX would try REAAAAAAAAALY hard to hyphenate and not leave an orphan, or just stretch the hell out of everything. It has an almost infinite penalty to have just a single word on a newline. Now probably shifting comes close would induce too much error on the previous line... but frankly I guess I should just ignore it on the last line as a special rule and always break two words.

This might also be a bug as it seems to only happen on the last line?

Fuco1 avatar Sep 19 '17 19:09 Fuco1