\ProvidesPackage{ifenoughspace}[2011/05/12 David Monniaux]
\newcommand{\ifenoughspace}[3]{%
  \@tempdimc\pagegoal \advance\@tempdimc-\pagetotal%
  \ifdim #1>\@tempdimc #3 \else #2\fi}
