texlive[74631] Master/texmf-dist: needspace (15mar25)
commits+karl at tug.org
commits+karl at tug.org
Sat Mar 15 20:40:07 CET 2025
Revision: 74631
https://tug.org/svn/texlive?view=revision&revision=74631
Author: karl
Date: 2025-03-15 20:40:07 +0100 (Sat, 15 Mar 2025)
Log Message:
-----------
needspace (15mar25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/needspace/needspace.pdf
trunk/Master/texmf-dist/source/latex/needspace/needspace.ins
trunk/Master/texmf-dist/tex/latex/needspace/needspace.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/needspace/README.md
trunk/Master/texmf-dist/doc/latex/needspace/changes.txt
trunk/Master/texmf-dist/source/latex/needspace/needspace.dtx
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/needspace/README
trunk/Master/texmf-dist/source/latex/needspace/needspace.tex
Deleted: trunk/Master/texmf-dist/doc/latex/needspace/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/needspace/README 2025-03-15 19:39:38 UTC (rev 74630)
+++ trunk/Master/texmf-dist/doc/latex/needspace/README 2025-03-15 19:40:07 UTC (rev 74631)
@@ -1,79 +0,0 @@
-
-The NEEDSPACE package
-=====================
-
-Provides the \needspace and \Needspace macros for
-requesting a certain amount of space on the current
-page for the following material.
-
-
-INSTALLATION
-------------
-
-Run `pdflatex` on needspace.tex to produce the files
- needspace.ins and needspace.sty,
-as well as to compile the PDF documentation.
-
-Execute `tex needspace.ins` to produce the files above
-except needspace.ins itself (and the PDF file, obviously).
-
-
-CHANGE HISTORY
---------------
-
-* v1.3c (2010/09/12):
- Patch to improve behaviour with commands like `\section` that use
- `\addvspace`. See [this thread][ctt] on comp.text.tex.
-
-[ctt]: http://groups.google.com/group/comp.text.tex/browse_frm/thread/8d849a1e0be2120e
-
-* v1.3b (2009/09/03):
- New maintainer (Will Robertson)
-
-* 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}
-
-* 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, ...)
-
-* 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.
-
-
-COPYRIGHT AND LICENSING
------------------------
-
-Authors: Donald Arseneau and Peter Wilson (Herries Press)
-Maintainer: Will Robertson (will dot robertson at latex-project dot org)
-Copyright 1996-2003 Peter Wilson
-Copyright 2010 Will Robertson
-
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either
-version 1.3c of this license or (at your option) any
-later version: <http://www.latex-project.org/lppl.txt>
-
-This work has the LPPL maintenance status "maintained".
-The Current Maintainer of this work is Will Robertson.
-
-This work consists of the files needspace.tex and the
-derived files needspace.sty and needspace.ins.
-
-
-MAINTENANCE
------------
-
-Please report bugs or request features:
- <http://github.com/wspr/herries-press/issues>
-
-Developmental and historical versions:
- <http://github.com/wspr/herries-press>
-
-Current release version:
- <http://ctan.tug.org/pkg/needspace>
-
Added: trunk/Master/texmf-dist/doc/latex/needspace/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/needspace/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/needspace/README.md 2025-03-15 19:40:07 UTC (rev 74631)
@@ -0,0 +1,58 @@
+
+The NEEDSPACE package
+=====================
+
+Provides the \needspace and \Needspace macros for
+requesting a certain amount of space on the current
+page for the following material.
+
+
+INSTALLATION
+------------
+
+Run `pdflatex` on needspace.dtx to produce the files
+ needspace.ins and needspace.sty,
+as well as to compile the PDF documentation.
+
+Execute `tex needspace.ins` to produce the files above
+except needspace.ins itself (and the PDF file, obviously).
+
+
+CHANGE HISTORY
+--------------
+
+See changes.txt
+
+COPYRIGHT AND LICENSING
+-----------------------
+
+Authors: Donald Arseneau and Peter Wilson (Herries Press)
+Maintainer: LaTeX Project
+Copyright 1996-2003 Peter Wilson
+Copyright 2010 Will Robertson
+Copyright 2025 LaTeX Project
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any
+later version: <http://www.latex-project.org/lppl.txt>
+
+This work has the LPPL maintenance status "maintained".
+The Current Maintainer of this work is the LaTeX Project.
+
+This work consists of the files needspace.dtx and the
+derived files needspace.sty and needspace.ins.
+
+
+MAINTENANCE
+-----------
+
+Please report bugs or request features:
+ <https://github.com/LaTeX-Package-Repositories/herries-press/issues>
+
+Developmental and historical versions:
+ <https://github.com/LaTeX-Package-Repositories/herries-press>
+
+Current release version:
+ <https://ctan.tug.org/pkg/needspace>
+
Property changes on: trunk/Master/texmf-dist/doc/latex/needspace/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/needspace/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/needspace/changes.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/needspace/changes.txt 2025-03-15 19:40:07 UTC (rev 74631)
@@ -0,0 +1,28 @@
+2025-03-15 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * needspace.dtx:
+ Do not produce extra space if there is an \addvspace following (issue #32)
+
+* v1.3c (2010/09/12):
+ Patch to improve behaviour with commands like `\section` that use
+ `\addvspace`. See [this thread][ctt] on comp.text.tex.
+
+[ctt]: http://groups.google.com/group/comp.text.tex/browse_frm/thread/8d849a1e0be2120e
+
+* v1.3b (2009/09/03):
+ New maintainer (Will Robertson)
+
+* 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}
+
+* 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, ...)
+
+* 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.
+
Property changes on: trunk/Master/texmf-dist/doc/latex/needspace/changes.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/needspace/needspace.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/source/latex/needspace/needspace.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/needspace/needspace.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/needspace/needspace.dtx 2025-03-15 19:40:07 UTC (rev 74631)
@@ -0,0 +1,190 @@
+
+%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5%%%%%%%%%6
+% Bundled source file for the NEEDSPACE package
+%--------1---------2---------3---------4---------5---------6
+% Please see the accompanying README for author,
+% license, documentation and installation information
+%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5%%%%%%%%%6
+
+
+%%%%%%%%%%%%%%%%%%%%
+%% PACKAGE SOURCE %%
+%%%%%%%%%%%%%%%%%%%%
+
+\begin{filecontents*}[overwrite]{needspace.sty}
+
+%% See needspace.dtx for Copyright and other information
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{needspace}[2025/03/13 v1.3e reserve vertical space]
+
+\newcommand{\needspace}[1]{%
+ \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+ \begingroup
+ \@tempskipb \lastskip
+ \vskip -\@tempskipb
+ \setlength\dimen@{#1}%
+ \advance\dimen@\@tempskipb
+ \vskip\z@\@plus\dimen@
+ \penalty -100
+ \vskip\z@\@plus -\dimen@
+ \vskip\dimen@
+ \penalty 9999%
+ \vskip -\dimen@
+ \vskip\@tempskipb % reinsert \lastskip
+ \endgroup
+}
+
+\newcommand\Needspace{%
+ \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+ \@tempskipb \lastskip
+ \vskip -\@tempskipb
+ \penalty-100
+ \begingroup
+ \@ifstar{\@sneedsp@}{\@needsp@}%
+}
+
+\newcommand\@sneedsp@[1]{%
+ \setlength\dimen@{#1}%
+ \advance\dimen@\@tempskipb
+ \dimen at ii\pagegoal \advance\dimen at ii-\pagetotal
+ \ifdim \dimen@>\dimen at ii
+ \break
+ \else
+ \vskip\@tempskipb % reinsert \lastskip
+ \fi
+ \endgroup
+}
+
+\newcommand\@needsp@[1]{%
+ \setlength\dimen@{#1}%
+ \advance\dimen@\@tempskipb
+ \dimen at ii\pagegoal \advance\dimen at ii-\pagetotal
+ \ifdim \dimen@>\dimen at ii
+ \ifdim \dimen at ii>\z@
+ \vfil
+ \fi
+ \break
+ \else
+ \vskip\@tempskipb % reinsert \lastskip
+ \fi
+ \endgroup
+}
+
+\end{filecontents*}
+%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5
+
+
+% Conditionally compile the documentation & generate the .ins file:
+\providecommand\documentationCompile{Y}
+\makeatletter
+\if\documentationCompile N
+ \expandafter\@@end
+\fi
+
+
+\begin{filecontents*}{needspace.ins}
+%&latex
+\def\documentationCompile{N}
+\input needspace.dtx
+\csname@@end\endcsname
+\end{filecontents*}
+
+
+%%%%%%%%%%%%%%%%%%%
+%% DOCUMENTATION %%
+%%%%%%%%%%%%%%%%%%%
+
+\documentclass{ltxdoc}
+\usepackage[it,medium]{titlesec}
+\usepackage[T1]{fontenc}
+\usepackage{microtype}
+\usepackage{lmodern}
+\usepackage[sc,osf]{mathpazo}
+\linespread{1.1}
+\frenchspacing
+
+\usepackage{fancyvrb}
+
+\usepackage[svgnames]{xcolor}
+\usepackage[colorlinks,linktocpage]{hyperref}
+\DeclareRobustCommand\pkg{\textsf}
+
+\usepackage{needspace}
+\GetFileInfo{needspace.sty}
+
+\begin{document}
+
+\title{The \pkg{needspace} package}
+\author{%
+ Author: Peter Wilson, Herries Press\\
+ Maintainer: \LaTeX{} Project team\\
+ \url{https://github.com/LaTeX-Package-Repositories/herries-press}%
+}
+\date{\fileversion \qquad \filedate}
+
+\maketitle
+
+\section{Documentation}
+
+This packages two commands, \cs{needspace} and \cs{Needspace}, for reserving
+space to keep a certain amount of material from being split over a page break.
+If there is not enough space, a \verb|\newpage| is automatically inserted.
+
+The \cs{needspace}\meta{length} macro reserves an \emph{approximate}
+amount of space \meta{length} for the material following to be kept on
+the same page. The accuracy of its calculations depend on what
+penalties are in effect, but is efficient and normally adequate. A
+short page will be ragged bottom even if \cs{flushbottom} is in
+effect.
+
+\cs{Needspace}\marg{length} is less efficient but reserves the
+requested space \meta{length} exactly. It should only be used between
+paragraphs. Short pages that are produced by \cs{Needspace} will be
+ragged bottom but short pages produced by \cs{Needspace*}\marg{length}
+will be flush bottom if \cs{flushbottom} is in effect.
+
+\section{Examples}
+
+Here, we request that we need next five lines on a single page/column:
+\begin{verbatim}
+... previous text.
+
+\needspace{5\baselineskip}
+The next five lines ...
+\end{verbatim}
+
+\newpage
+\noindent
+In this case, the space is reserved more accurately:
+\begin{verbatim}
+... previous text.
+
+\Needspace*{4\baselineskip}
+ The major principles are:
+\begin{itemize}
+\item ...
+\end{verbatim}
+
+
+\section*{Licence and copyright}
+
+This work may be modified and/or distributed under the terms and
+conditions of the \LaTeX\ Project Public
+License\footnote{\url{http://www.latex-project.org/lppl.txt}},
+version~1.3c or later (your choice). The current maintainer of this
+work is the \LaTeX{} Project team.
+
+\bigskip
+ \noindent
+ Copyright Peter Wilson, 1996--2003 \\
+ Copyright Will Robertson, 2010, 2013\\
+ Copyright LaTeX Project, 2025
+
+\clearpage
+\parindent=0pt
+
+\section{Implementation}
+\VerbatimInput{needspace.sty}
+
+\end{document}
Property changes on: trunk/Master/texmf-dist/source/latex/needspace/needspace.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/needspace/needspace.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/needspace/needspace.ins 2025-03-15 19:39:38 UTC (rev 74630)
+++ trunk/Master/texmf-dist/source/latex/needspace/needspace.ins 2025-03-15 19:40:07 UTC (rev 74631)
@@ -1,4 +1,4 @@
%&latex
\def\documentationCompile{N}
-\input needspace.tex
+\input needspace.dtx
\csname@@end\endcsname
Deleted: trunk/Master/texmf-dist/source/latex/needspace/needspace.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/needspace/needspace.tex 2025-03-15 19:39:38 UTC (rev 74630)
+++ trunk/Master/texmf-dist/source/latex/needspace/needspace.tex 2025-03-15 19:40:07 UTC (rev 74631)
@@ -1,163 +0,0 @@
-
-%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5%%%%%%%%%6
-% Bundled source file for the NEEDSPACE package
-%--------1---------2---------3---------4---------5---------6
-% Please see the accompanying README for author,
-% license, documentation and installation information
-%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5%%%%%%%%%6
-
-
-%%%%%%%%%%%%%%%%%%%%
-%% PACKAGE SOURCE %%
-%%%%%%%%%%%%%%%%%%%%
-
-\RequirePackage{filecontents}
-\begin{filecontents*}{needspace.sty}
-
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{needspace}[2010/09/12 v1.3d 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@
- \vskip\z at skip % hide the previous |\vskip| from |\addvspace|
- \endgroup
-}
-
-\newcommand{\Needspace}{\@ifstar{\@sneedsp@}{\@needsp@}}
-
-\newcommand{\@sneedsp@}[1]{\par \penalty-100\begingroup
- \setlength{\dimen@}{#1}%
- \dimen at ii\pagegoal \advance\dimen at ii-\pagetotal
- \ifdim \dimen@>\dimen at ii
- \break
- \fi\endgroup}
-
-\newcommand{\@needsp@}[1]{\par \penalty-100\begingroup
- \setlength{\dimen@}{#1}%
- \dimen at ii\pagegoal \advance\dimen at ii-\pagetotal
- \ifdim \dimen@>\dimen at ii
- \ifdim \dimen at ii>\z@
- \vfil
- \fi
- \break
- \fi\endgroup}
-
-\end{filecontents*}
-%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5
-
-
-% Conditionally compile the documentation & generate the .ins file:
-\providecommand\documentationCompile{Y}
-\makeatletter
-\if\documentationCompile N
- \expandafter\@@end
-\fi
-
-
-\begin{filecontents*}{needspace.ins}
-%&latex
-\def\documentationCompile{N}
-\input needspace.tex
-\csname@@end\endcsname
-\end{filecontents*}
-
-
-%%%%%%%%%%%%%%%%%%%
-%% DOCUMENTATION %%
-%%%%%%%%%%%%%%%%%%%
-
-\documentclass{ltxdoc}
-\usepackage[it,medium]{titlesec}
-\usepackage[T1]{fontenc}
-\usepackage{microtype}
-\usepackage{lmodern}
-\usepackage[sc,osf]{mathpazo}
-\linespread{1.1}
-\frenchspacing
-
-\usepackage{fancyvrb}
-
-\usepackage[svgnames]{xcolor}
-\usepackage[colorlinks,linktocpage]{hyperref}
-\DeclareRobustCommand\pkg{\textsf}
-
-\usepackage{needspace}
-\GetFileInfo{needspace.sty}
-
-\begin{document}
-
-\title{The \pkg{needspace} package}
-\author{%
- Author: Peter Wilson, Herries Press\\
- Maintainer: Will Robertson\\
- \texttt{will dot robertson at latex-project dot org}%
-}
-\date{\fileversion \qquad \filedate}
-
-\maketitle
-
-\section{Documentation}
-
-This packages two commands, \cs{needspace} and \cs{Needspace}, for reserving
-space to keep a certain amount of material from being split over a page break.
-If there is not enough space, a \verb|\newpage| is automatically inserted.
-
-The \cs{needspace}\meta{length} macro reserves an \emph{approximate} amount of space \meta{length} for
-the material following to be kept on the same page. The accuracy of its
-calculations depend on what penalties are in effect, but is efficient and
-normally adequate. A short page will be ragged bottom even if \cs{flushbottom}
-is in effect.
-
-\cs{Needspace}\marg{length} is less efficient but reserves the requested space \meta{length} exactly. It
-should only be used between paragraphs. Short pages that are produced by
-\cs{Needspace} will be ragged bottom but short pages produced by
-\cs{Needspace*}\marg{length} will be flush bottom if \cs{flushbottom} is in
-effect.
-
-\section{Examples}
-
-Here, we request that we need next five lines on a single page/column:
-\begin{verbatim}
-... previous text.
-
-\needspace{5\baselineskip}
-The next five lines ...
-\end{verbatim}
-
-\newpage
-\noindent
-In this case, the space is reserved more accurately:
-\begin{verbatim}
-... previous text.
-
-\Needspace*{4\baselineskip}
- The major principles are:
-\begin{itemize}
-\item ...
-\end{verbatim}
-
-
-\section*{Licence and copyright}
-
-This work may be modified and/or distributed under the terms and
-conditions of the \LaTeX\ Project Public License\footnote{\url{http://www.latex-project.org/lppl.txt}}, version~1.3c or later (your choice).
-The current maintainer of this work is Will Robertson.
-
-\bigskip
- \noindent
- Copyright Peter Wilson, 1996--2003 \\
- Copyright Will Robertson, 2010, 2013
-
-\clearpage
-\parindent=0pt
-
-\section{Implementation}
-\VerbatimInput{needspace.sty}
-
-\end{document}
Modified: trunk/Master/texmf-dist/tex/latex/needspace/needspace.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/needspace/needspace.sty 2025-03-15 19:39:38 UTC (rev 74630)
+++ trunk/Master/texmf-dist/tex/latex/needspace/needspace.sty 2025-03-15 19:40:07 UTC (rev 74631)
@@ -1,35 +1,59 @@
+%% See needspace.dtx for Copyright and other information
+
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{needspace}[2010/09/12 v1.3d reserve vertical space]
+\ProvidesPackage{needspace}[2025/03/13 v1.3e reserve vertical space]
\newcommand{\needspace}[1]{%
+ \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
\begingroup
- \setlength{\dimen@}{#1}%
+ \@tempskipb \lastskip
+ \vskip -\@tempskipb
+ \setlength\dimen@{#1}%
+ \advance\dimen@\@tempskipb
\vskip\z@\@plus\dimen@
- \penalty -100\vskip\z@\@plus -\dimen@
+ \penalty -100
+ \vskip\z@\@plus -\dimen@
\vskip\dimen@
\penalty 9999%
\vskip -\dimen@
- \vskip\z at skip % hide the previous |\vskip| from |\addvspace|
+ \vskip\@tempskipb % reinsert \lastskip
\endgroup
}
-\newcommand{\Needspace}{\@ifstar{\@sneedsp@}{\@needsp@}}
+\newcommand\Needspace{%
+ \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+ \@tempskipb \lastskip
+ \vskip -\@tempskipb
+ \penalty-100
+ \begingroup
+ \@ifstar{\@sneedsp@}{\@needsp@}%
+}
-\newcommand{\@sneedsp@}[1]{\par \penalty-100\begingroup
- \setlength{\dimen@}{#1}%
- \dimen at ii\pagegoal \advance\dimen at ii-\pagetotal
- \ifdim \dimen@>\dimen at ii
- \break
- \fi\endgroup}
+\newcommand\@sneedsp@[1]{%
+ \setlength\dimen@{#1}%
+ \advance\dimen@\@tempskipb
+ \dimen at ii\pagegoal \advance\dimen at ii-\pagetotal
+ \ifdim \dimen@>\dimen at ii
+ \break
+ \else
+ \vskip\@tempskipb % reinsert \lastskip
+ \fi
+ \endgroup
+}
-\newcommand{\@needsp@}[1]{\par \penalty-100\begingroup
- \setlength{\dimen@}{#1}%
- \dimen at ii\pagegoal \advance\dimen at ii-\pagetotal
- \ifdim \dimen@>\dimen at ii
- \ifdim \dimen at ii>\z@
- \vfil
+\newcommand\@needsp@[1]{%
+ \setlength\dimen@{#1}%
+ \advance\dimen@\@tempskipb
+ \dimen at ii\pagegoal \advance\dimen at ii-\pagetotal
+ \ifdim \dimen@>\dimen at ii
+ \ifdim \dimen at ii>\z@
+ \vfil
+ \fi
+ \break
+ \else
+ \vskip\@tempskipb % reinsert \lastskip
\fi
- \break
- \fi\endgroup}
+ \endgroup
+}
More information about the tex-live-commits
mailing list.