-
-
Notifications
You must be signed in to change notification settings - Fork 101
Implementation Notes
TeX takes a running-total approach to the problem of page breaking, updating \pagetotal
(the sum of the height of vboxes on current page) as vboxes get added. SILE sums the vboxes on the vertical list every time the page builder is called, (i.e. every time more vertical material is added) which is pretty inefficient - mind you, adding up a bunch of numbers is not too difficult. This could, plausibly, be optimised; but the principle of separation of concerns means that it is better for the page breaking routine to be stateless. The separation-of-concerns principle means that we can replace the page breaking algorithm with a completely different one, without requiring any interplay with the typesetter object. The only weakness is that this makes the insertion problem more difficult.