Simon Pepping wrote: > Note that The TeXbook is TeX's user guide. Yes, Knuth's users > are quite advanced. It was my first book in the direction of > computers, and one of the most inspirational I have read. > > The TeX program is described in 'TeX The Program'. That text

Oops. You're right. That is volume 2 from the same "Computers and Typesetting" series. > set up all the tools. It is up to yourself to decide whether > knowing TeX's implementation is useful. It is a best-fit > algorithm. There is no look-ahead. For example, TeX is not > able to balance two facing pages (or two columns on a page, > which for TeX is the same). I guess that a dissertation like > that cited above contains much more information than > implemented in TeX. I'm not sure. The general TeX page-breaking algorithm is discussed in the paragraphs before Appendix A of Chapter 3 of "Digital Typography". The general box/glue/penalty model is used, but only the current page is considered. So I think the difference between best-fit and total-fit (as described here anyway) is the amount of look-ahead itself, not so much the algorithm. This is why I thought Finn's (IIRC) idea of a variable look-ahead makes sense. A look-ahead of zero pages is a best-fit, a look-ahead of all pages is a total-fit. But the algorithm is the same. Anyway, I agree that the paper is probably the best source, but wanted to give Jeremias some options. Victor Mote