LaTeX: show block only if there is enough space left

Hi LaTeX lovers and TeX programmers!

I am currently developing a one-page document class for single sheets that should be generated automatically. Unfortunately, the limited space does not allow me to display everything on the page, so I need to completely skip some articles (I do not want only one half of the article to be printed on the flyer).

In pseudo code, this is the command I'm looking for:

\if_sufficient_vspace_left
    {<big block/minipage with an article>}
    {<otherwise do nothing or something else>}

And the following options are used:

  • If there is enough vertical space on the page for the next article, print the article completely. Otherwise, add only the title to the Other Articles list.
  • If there is enough vertical space left, add more advertising, otherwise add less or do nothing.

I am pretty sure that this will be the way to get this. For example, a TeX team \leadersworking in vertical and horizontal modes only inserts a leader if there is enough free space. Unfortunately, I do not want to repeat anything, and another action can be great.

Any keywords and tips for useful teams would be appreciated. You do not need to publish complete solutions (but you can, of course).

Thanks a
lot Christoph

+5
source share
1 answer

"needspace" , , , , break:

http://ctan.org/pkg/needspace

:

\needspace{5\BaseLineSkip}    %  assume you need 5 lines for minipage
    {<big block/minipage with an article>}

, , , , , , , LaTeX "float":

http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions

+1

All Articles