Hi LaTeX enthusiasts and TeX programmers!
I'm currently developing a single-page document class for some kind of flyers which should be generated automatically. Unfortunately the limited amount of space doesn't make it possible to display everything on the page, so I need to skip some articles completely (I don't want only one half of a article printed on the flyer).
In pseudo code, thats the command I am looking for:
\if_sufficient_vspace_left
{<big block/minipage with an article>}
{<otherwise do nothing or something else>}
And the use cases are:
- If there is enough vertical space for the following article left on the page, print the article completely. Otherwise add only the headline to an »Other Articles« list.
- If there is enough vertical space left, add a big advertisement, otherwise add a smaller one or do nothing.
I am quite sure that there will be a way to obtain this. For example, the TeX command \leaders
, which works in vertical and horizontal mode, only inserts the leader if there is enough space left. Unfortunately I don't want to repeat anything, and an else action might be great too.
Any keywords and tips to useful commands will be appreciated. You don't have to post complete solutions (but you can of course).
Many thanks,
Christoph