[texhax] Calculate remaining space after a page break and a \penalty of 10000
wl-chmw at gmx.de
Wed Nov 10 13:37:18 CET 2010
I'm writing on a package that places the lyrics of a song block wise on
a page, so that as little vertical space as possible is occupied. The
calculations are based on \pagetotal and \pagegoal (resp. \vsize, if
\pagegoal is not yet given).
This is working rather well, except for one thing. Page breaks are not
done using \eject, but are left up to TeX, by simply assuming, that the
whole page is unused and thus using enough vertical space, so that TeX
is ejecting the page, while respecting all \penaltys. This leaves the
problem, that the assumed free space may be incorrect, e.g. if the
lyrics block is following a section head.
Now, is there a way to tell TeX to remove the "\nobreak-content" from
main vertical list, put it back to the list of recent contributions and
do an eject? Or, if this is not possible, is there a way to calculate
the vertical size of the recently contributed boxes, that would be
taken to the next page?
PS: I've had some difficulties finding the right words, to explain
this problem. I hope what you understood is what I meant.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: not available
More information about the texhax