# [texhax] Calculate remaining space after a page break and a \penalty of 10000

Wolfgang Lorenz wl-chmw at gmx.de
Wed Nov 10 13:37:18 CET 2010

Hello List,

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?

Greetings,
Wolfgang Lorenz

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...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://tug.org/pipermail/texhax/attachments/20101110/e4198eed/attachment-0001.bin>

More information about the texhax mailing list