[luatex] Interfere with page breaking to balance pages

Taco Hoekwater taco at elvenkind.com
Thu Oct 18 10:11:17 CEST 2012

On 10/17/2012 05:11 PM, Patrick Gundlach wrote:
>>> you can do something like this:
>>> tex.box["AtBeginShipoutBox"]
>>> that's a bit more luaeque IMO.
>> Nice, but when did Taco tell you that secret?  I can't find it in the
>> LuaTeX manual. :/

Documentation oversight (it happens).

On the original problem: TeX's page breaking is more than a little
tricky to get 'into' from the Lua end because there are a bunch
of interwoven C functions that mutually depend on each other's
calculations. In fact, that is why the current interface is so
weird: it closely follows what the internals do.

When we exposed the current situation, it was not at all
clear what a 'good' interface would look like (and personally, I
am still not sure). So, any constructive thoughts on that would
be welcome.

A better, cleaner solution would be nice to have, but whatever
form it takes, it will require some digging and a bit of a rewrite in
the internal code. And to make sure at the same time that something
important does not break is tricky, which is also part of why it has
not been done yet.

Best wishes,

More information about the luatex mailing list