summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/needspace
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-12 22:40:59 +0000
committerKarl Berry <karl@freefriends.org>2010-09-12 22:40:59 +0000
commitb7a0b0162c49aea864ceea62a3defd130f36660b (patch)
treeb15007802f46bd91a1e579dc65c229aba4aeab0b /Master/texmf-dist/tex/latex/needspace
parenta3600660f91c0e808336c01cb388e7b357c289f4 (diff)
needspace update (12sep10)
git-svn-id: svn://tug.org/texlive/trunk@19684 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/needspace')
-rw-r--r--Master/texmf-dist/tex/latex/needspace/needspace.sty75
1 files changed, 17 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/latex/needspace/needspace.sty b/Master/texmf-dist/tex/latex/needspace/needspace.sty
index ee286352e8e..a30aa51a16c 100644
--- a/Master/texmf-dist/tex/latex/needspace/needspace.sty
+++ b/Master/texmf-dist/tex/latex/needspace/needspace.sty
@@ -1,21 +1,22 @@
-% needspace.sty
-%
-% Provides commands 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, Herries Press
-% Maintainer: Will Robertson (will dot robertson at latex-project dot org)
-% Copyright 1996--2003 Peter Wilson
-% Released under the LaTeX Project Public License
-%
-%
+%% LaTeX2e file `needspace.sty'
+%% generated by the `filecontents' environment
+%% from source `needspace' on 2010/09/12.
+%%
+
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{needspace}[2009/09/03 v1.3b reserve vertical space]
+\ProvidesPackage{needspace}[2010/09/12 v1.3c reserve vertical space]
-\newcommand{\needspace}[1]{\begingroup\setlength{\dimen@}{#1}%
- \vskip\z@\@plus\dimen@ \penalty -100\vskip\z@\@plus -\dimen@
- \vskip\dimen@ \penalty 9999\vskip -\dimen@\endgroup}
+\newcommand{\needspace}[1]{%
+ \begingroup
+ \setlength{\dimen@}{#1}%
+ \vskip\z@\@plus\dimen@
+ \penalty -100\vskip\z@\@plus -\dimen@
+ \vskip\dimen@
+ \penalty 9999%
+ \vskip -\dimen@
+ \vskip\z@skip % hide the previous |\vskip| from |\addvspace|
+ \endgroup
+}
\newcommand{\Needspace}{\@ifstar{\@sneedsp@}{\@needsp@}}
@@ -36,45 +37,3 @@
\break
\fi\endgroup}
-\endinput
-
-% Example uses:
-%
-% ... previous text.\par
-% \needspace{5\baselineskip} % need next 5 lines on a single page/column
-% The next five lines ...
-%
-% \Needspace*{4\baselineskip} % need 4 lines kept on same page
-% The major principles are:
-% \begin{itemize}
-% \item ...
-%
-%
-% The \needspace macro reserves an APPROXIMATE amount of space (depending
-% on what penalties are in effect) but is efficient and normally adequate.
-% A short page will be ragged bottom even if \flushbottom is in
-% effect.
-%
-% \Needspace is less efficient but reserves the requested space. It
-% should only be used between paragraphs. Short pages produced by
-% \Needspace{<length>} will be ragged bottom but short pages produced by
-% \Needspace*{<length>} will be flush bottom if \flushbottom is in effect.
-%
-% Changes v1.3b (2009/09/03)
-% New maintainer (Will Robertson)
-%
-% Changes v1.3a (2003/02/18)
-% At the suggestion of Donald Arseneau (private emails) changed guts of
-% \needspace from
-% ... \vskip\z@\@plus\dimen@\pagebreak[3]\vskip\z@\@plus-\dimen@\endgroup}
-%
-% Changes v1.3 (2003/02/07)
-% Added \Needspace (an extended version of postings by Donald Arseneau
-% to comp.text.tex e.g., in November 1993, August 1995, September 1997, ...)
-%
-% Changes v1.2 (2002/09/11)
-% 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.
-%
-%
-%