% needspace.sty
%
% Provides a command to reserve space at the bottom of a page. If there
% is not enough space on the current page (column) a new page (column)
% is started.
%
% author: Peter Wilson (CUA)
%         (now at peter.r.wilson@boeing.com)
% Copyright 1996
% Released under the LaTeX Project Public License
%
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{needspace}[2002/09/11 v1.2 reserve vertical space]

\newcommand{\needspace}[1]{{%
  \setlength{\dimen@}{#1}%
  \vskip \z@ \@plus \dimen@\pagebreak[3]\vskip \z@ \@plus -\dimen@\relax}}


\endinput

% Example use:
% previous text.\par
% \needspace{5\baselineskip} % need next 5 lines on a single page/column
% The next five lines ...
%
% Changes v1.2 (2002/09/11)
% o At the suggestion of Robin Fairbairns, added use of \dimen@ to capture 
%   the argument so that calc package commands can be used in the argument.
%