following scenario: I want to automatically generate a newsletter with some small articles, which is working fine. (I am generating LaTeX-code with data from a small database). But now I want to include some images to fill the space left (I want to have entirely filled pages), but I don't want to get more pages than needed for the articles.
So: is there a way to check with LaTeX, if there is space left on the last page and how much?
I hope you can understand what I mean.
\advance\spaceleft by-\pagetotal. – wipet Jun 05 '17 at 08:40\rule{1mm}{\spaceleft}, the rule is pushed on the next page? There should be enough space for it right? – tobiasBora Sep 30 '21 at 15:49\advance. That meant the last paragraph wasn't included in page total. With that fixed, you still need to remove 3 or 4pt from the rule height to prevent a page break. I'm not sure why this happens exactly. I'll give it some thought, but you will probably get an answer much more quickly if you post a new question about it (because then someone like egreg or David Carlisle will see it). – Ian Thompson Oct 01 '21 at 14:43