3 ms·
The classic paper in which Knuth and Plass described the algorithm is actually very readable and enjoyable [1] — though it's long (66 pages!), you can just stop
by svat 8y ago
The classic paper in which Knuth and Plass described the algorithm is actually very readable and enjoyable [1] — though it's long (66 pages!), you can just stop at any point and still get a lot of value out of it.
PS: I started collecting a few of the more obscure implementations of TeX here (https://github.com/tex-other https://github.com/tex-other) — please let me know if there are more that I missed (other than the popular ones: pdfTeX/XeTeX/LuaTeX which are in TeX Live / MiKTeX and don't require archival). Among these, there are JavaScript and C implementations of this algorithm.
[1]: http://eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf http://eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf