There is some interesting discussion on the LaTeX stack overflow page about the challenge of detecting and preventing rivers during the typesetting process:
Avoiding rivers becomes a rather non-trivial optimization problem. In Holkner's paper he found that it took ~1 minute just to typeset 1200 words. Some of his experiments took more than six hours to complete.
rendall•5h ago
Futility Closet had a cheerful, wholesome podcast for many years until abruptly ending it without much explanation. Glad to see they're still busy. Anyone know what happened? I always wondered.
antognini•3h ago
I'm just impressed that the website is still around and they are adding new items. They've been going for more than twenty years at this point!
antognini•6h ago
https://tex.stackexchange.com/questions/4507/avoiding-rivers...
https://tex.stackexchange.com/questions/29049/how-to-define-...
And if you really want to get into it, there is a rather detailed paper by Alex Holkner: https://gwern.net/doc/design/typography/tex/2006-holkner.pdf
Avoiding rivers becomes a rather non-trivial optimization problem. In Holkner's paper he found that it took ~1 minute just to typeset 1200 words. Some of his experiments took more than six hours to complete.