texlive[60414] Master/texmf-dist: lastpage (4sep21)

commits+karl at tug.org commits+karl at tug.org
Sat Sep 4 00:08:11 CEST 2021


Revision: 60414
          http://tug.org/svn/texlive?view=revision&revision=60414
Author:   karl
Date:     2021-09-04 00:08:11 +0200 (Sat, 04 Sep 2021)
Log Message:
-----------
lastpage (4sep21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/lastpage/README
    trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.pdf
    trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
    trunk/Master/texmf-dist/doc/latex/lastpage/lastpage.pdf
    trunk/Master/texmf-dist/source/latex/lastpage/lastpage.drv
    trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx
    trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins
    trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
    trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty

Modified: trunk/Master/texmf-dist/doc/latex/lastpage/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lastpage/README	2021-09-03 22:07:52 UTC (rev 60413)
+++ trunk/Master/texmf-dist/doc/latex/lastpage/README	2021-09-03 22:08:11 UTC (rev 60414)
@@ -1,4 +1,4 @@
-README for lastpage package, 2015/03/29, v1.2m
+README for lastpage package, 2021/09/03, v1.2n
 
 
 TABLE OF CONTENTS
@@ -32,9 +32,9 @@
 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. This version of this license is in
-http://www.latex-project.org/lppl/lppl-1-3c.txt
+https://www.latex-project.org/lppl/lppl-1-3c.txt
 and the latest version of this license is in
-http://www.latex-project.org/lppl.txt
+https://www.latex-project.org/lppl.txt
 and version 1.3c or later is part of all distributions of LaTeX version
 2005/12/01 or later.
 
@@ -52,7 +52,7 @@
 installation file (lastpage.ins), 
 the style files (lastpage.sty, lastpage209.sty),
 and this README, already sorted in a TDS tree:
-http://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
+https://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
 
 
 3 INSTALLATION
@@ -92,7 +92,7 @@
      pdflatex undolabl.dtx
      makeindex -s gind.ist lastpage.idx
      pdflatex lastpage.dtx
-e) Update the databases if necessary, e.g. for teTeX:
+e) Update the databases, if necessary, e.g. for teTeX:
      mktexlsr .../texmf 
 f) Create the lastpage-example.pdf, if necessary, e.g.
      pdflatex lastpage-example.tex
@@ -110,7 +110,7 @@
 The lastpage package does not depend on other packages,
 but the lastpage.dtx does (for unpacking and constructing
 the documentation), see "7.1 Downloads" in the manual
-http://mirrors.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf
+https://mirrors.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf
 
 
 5 PACKAGE COMPATIBILITY
@@ -127,7 +127,7 @@
 * Author of the original main code: 
    Jeffrey P. Goldberg (Thanks!)
 * Author of the recent package and current maintainer:
-   H.-Martin M\xFCnch
+   H.-Martin Münch
 
 
 7 BUG REPORTS
@@ -153,7 +153,7 @@
 Bug address
 -----------
 Bug reports can be send to the maintainer:
-  H.-Martin M\xFCnch
+  H.-Martin Münch
   <Martin [dot] Muench [at] Uni-Bonn [dot] de>
 
 

Modified: trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex	2021-09-03 22:07:52 UTC (rev 60413)
+++ trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex	2021-09-03 22:08:11 UTC (rev 60414)
@@ -9,9 +9,9 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2015/03/29 v1.2m
+%% Version: 2021/09/03 v1.2n
 %% 
-%% Copyright (C) 2010 - 2015 by
+%% Copyright (C) 2010 - 2021 by
 %%     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -24,9 +24,9 @@
 %% conditions of the LaTeX Project Public License, either
 %% version 1.3c of this license or (at your option) any later
 %% version. This version of this license is in
-%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
 %% and the latest version of this license is in
-%%    http://www.latex-project.org/lppl.txt
+%%    https://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of
 %% LaTeX version 2005/12/01 or later.
 %% 
@@ -66,7 +66,7 @@
  hyperindex=false,%
  pdflang={en},%
  pdftitle={lastpage package example},%
- pdfauthor={Hans-Martin Muench},%
+ pdfauthor={H.-Martin Muench},%
  pdfsubject={Example for the lastpage package},%
  pdfkeywords={LaTeX, lastpage, H.-Martin Muench},%
  pdfview=Fit,%
@@ -78,7 +78,7 @@
 %% must be loaded for the \url used in this example:
 %% \usepackage{url}
 %% or just use \let\url\texttt for the one used url.
-\usepackage{lastpage}[2015/03/29]% v1.2m
+\usepackage{lastpage}[2021/09/03]% v1.2n
 \makeatletter
 \renewcommand{\@evenfoot}{%
  \normalsize\slshape \today\hfil \upshape %
@@ -94,7 +94,7 @@
 \markboth{Example for lastpage}{Example for lastpage}
 
 This example demonstrates the use of package\newline
-\textsf{lastpage}, v1.2m as of 2015/03/29 (HMM; JPG).\newline
+\textsf{lastpage}, v1.2n as of 2021/09/03 (HMM; JPG).\newline
 The package takes no options.\newline
 For more details please see the documentation!\newline
 
@@ -118,12 +118,10 @@
 trademark owner. There is no intention of infringement; the
 usage is to the benefit of the trademark owner.\newline
 
-\textbf{Tip}: Use \textit{logical page numbers} for
-the display of the pdf!\newline
-(In Adobe Reader XI (11.0.10): \underline{E}dit $>$
-Prefere\underline{n}ces (Ctrl+k) $>$ Page Display $>$
-Page Content and Information $>$ Use logical page
-\nolinebreak{\underline{n}umbers.)}\newline
+\textbf{Tip}: Use \textit{logical page numbers}
+for the display of the pdf (in Adobe Reader DC 2021.005.20060:
+Edit $>$ Preferences $>$ Categories: Page Display $>$
+Page Content and Information: Use logical page numbers)!\newline
 
 If you are more ambitious in respect to your aims with this package,
 you might want to have a look at the \textsf{pageslts} package:\newline
@@ -162,7 +160,54 @@
 \noindent The page (\verb|\thepage|): \thepage \newline
 
 \noindent Last page's name (LastPage): \pageref{LastPage}
+
+\bigskip
+
+\noindent There was the question:
+
+\begin{quote}
+\begin{verbatim}
+\documentclass{article}
+\usepackage{hyperref}
+\usepackage{lastpage}
+\begin{document}
+\ifnum\thepage=\pageref{LastPage} foo \else bar \fi
 \end{document}
+\end{verbatim}
+
+producing the error
+\textquotedblleft missing number, treated as zero\textquotedblright.
+\end{quote}
+
+\noindent \verb|\pageref| inserts a hyperlink, \verb|\pageref{LastPage}|
+is not expandable and the code breaks.\newline
+The code does not generally work even without hyperref.
+
+\begin{quote}
+\begin{verbatim}
+\documentclass{article}
+\usepackage{hyperref}
+\usepackage{lastpage}
+\pagenumbering{Roman}
+\begin{document}
+\addtocounter{page}{8}
+\edef\here{\thepage}
+\makeatletter
+\ifx\here\lastpage at lastpage\relax foo \else bar \fi
+\makeatother
+\end{document}
+\end{verbatim}
+\end{quote}
+
+\noindent does work, because \verb|\lastpage at lastpage| contains the name
+of the page, example:\newline
+\verb|Page \thepage{} is page \makeatletter\lastpage at lastpage\makeatother.|%
+\newline
+prints:\newline
+Page \thepage{} is page \makeatletter\lastpage at lastpage\makeatother.%
+\newline
+This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
+\end{document}
 \endinput
 %%
 %% End of file `lastpage-example.tex'.

Modified: trunk/Master/texmf-dist/doc/latex/lastpage/lastpage.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/lastpage/lastpage.drv
===================================================================
--- trunk/Master/texmf-dist/source/latex/lastpage/lastpage.drv	2021-09-03 22:07:52 UTC (rev 60413)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.drv	2021-09-03 22:08:11 UTC (rev 60414)
@@ -9,9 +9,9 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2015/03/29 v1.2m
+%% Version: 2021/09/03 v1.2n
 %% 
-%% Copyright (C) 2010 - 2015 by
+%% Copyright (C) 2010 - 2021 by
 %%     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -24,9 +24,9 @@
 %% conditions of the LaTeX Project Public License, either
 %% version 1.3c of this license or (at your option) any later
 %% version. This version of this license is in
-%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
 %% and the latest version of this license is in
-%%    http://www.latex-project.org/lppl.txt
+%%    https://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of
 %% LaTeX version 2005/12/01 or later.
 %% 
@@ -56,8 +56,8 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2014/05/01]
 \ProvidesFile{lastpage.drv}%
-  [2015/03/29 v1.2m Refers to last page's name (HMM)]
-\documentclass{ltxdoc}[2014/09/29]% v2.0u
+  [2021/09/03 v1.2n Refers to last page's name (HMM)]
+\documentclass{ltxdoc}[2015/03/26]% v2.0w
 \usepackage{holtxdoc}[2012/03/21]%  v0.24
 %% lastpage may work with earlier versions of LaTeX2e and those
 %% class and package, but this was not tested.

Modified: trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx	2021-09-03 22:07:52 UTC (rev 60413)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx	2021-09-03 22:08:11 UTC (rev 60414)
@@ -1,9 +1,9 @@
 % \iffalse meta-comment
 %
 % File: lastpage.dtx
-% Version: 2015/03/29 v1.2m
+% Version: 2021/09/03 v1.2n
 %
-% Copyright (C) 2010 - 2015 by
+% Copyright (C) 2010 - 2021 by
 %    H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
 % Portions of code copyrighted by other people as marked.
 %
@@ -40,7 +40,7 @@
 %
 % Also a TDS.ZIP file is provided that contains all the files
 % already sorted in a TDS tree:
-% http://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
+% https://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
 %
 %<*ignore>
 \begingroup
@@ -57,7 +57,7 @@
 \input docstrip.tex
 \Msg{*********************************************************************}
 \Msg{* Installation}
-\Msg{* Package: lastpage 2015/03/29 v1.2m Refers to last page's name (HMM)}
+\Msg{* Package: lastpage 2021/09/03 v1.2n Refers to last page's name (HMM)}
 \Msg{*********************************************************************}
 
 \keepsilent
@@ -69,9 +69,9 @@
 This is a generated file.
 
 Project: lastpage
-Version: 2015/03/29 v1.2m
+Version: 2021/09/03 v1.2n
 
-Copyright (C) 2010 - 2015 by
+Copyright (C) 2010 - 2021 by
     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
 Portions of code copyrighted by other people as marked.
 
@@ -84,9 +84,9 @@
 conditions of the LaTeX Project Public License, either
 version 1.3c of this license or (at your option) any later
 version. This version of this license is in
-   http://www.latex-project.org/lppl/lppl-1-3c.txt
+   https://www.latex-project.org/lppl/lppl-1-3c.txt
 and the latest version of this license is in
-   http://www.latex-project.org/lppl.txt
+   https://www.latex-project.org/lppl.txt
 and version 1.3c or later is part of all distributions of
 LaTeX version 2005/12/01 or later.
 
@@ -170,8 +170,8 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[2014/05/01]
 \ProvidesFile{lastpage.drv}%
-  [2015/03/29 v1.2m Refers to last page's name (HMM)]
-\documentclass{ltxdoc}[2014/09/29]% v2.0u
+  [2021/09/03 v1.2n Refers to last page's name (HMM)]
+\documentclass{ltxdoc}[2015/03/26]% v2.0w
 \usepackage{holtxdoc}[2012/03/21]%  v0.24
 %% lastpage may work with earlier versions of LaTeX2e and those
 %% class and package, but this was not tested.
@@ -207,7 +207,7 @@
 %
 % \fi
 %
-% \CheckSum{286}
+% \CheckSum{316}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -256,7 +256,7 @@
 % \DoNotIndex{\lastpage at testa,\lastpage at testb,\lastpage at one}
 %
 % \title{The \xpackage{lastpage} package}
-% \date{2015/03/29 v1.2m}
+% \date{2021/09/03 v1.2n}
 % \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}\\
 %   invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}}
 %
@@ -402,7 +402,27 @@
 % \indent (The \xpackage{pageslts} package solves this problem by using
 % |\AfterLastShipout| from \textsc{Heiko Oberdiek's} \xpackage{atveryend}
 % package for the references\\
-% |\lastpageref{VeryLastPage}| and |\lastpageref{LastPages}|.)
+% |\lastpageref{VeryLastPage}| and |\lastpageref{LastPages}|.)\\
+% \xpackage{lastpage} uses |\AtEndDocument{|\ldots|\clearpage|\ldots|}|, thus\\
+%|\usepackage{lastpage}|\ldots|\AtEndDocument{|\textit{something}|}|
+% will place \textit{something} after the |\clearpage|. To place it earlier, use\\
+% |\AtEndDocument{|\textit{something}|}|\ldots|\usepackage{lastpage}|.
+% If the \textit{something} is not known before |\usepackage{lastpage}|,
+% you can use for example
+% \begin{verbatim}
+% ...
+% \def\beforeLastpageClearpage{\relax}
+% \AtEndDocument{\beforeLastpageClearpage}
+% \usepackage{lastpage}
+% \begin{document}
+% ...
+% \def\beforeLastpageClearpage{\textit{something}}%
+% ...
+% \end{document}
+% \end{verbatim}
+% (might need a protected and/or expanded |\def|). When |\cleapage| leads
+% to some output, |\cleapage\textit{something}| instead of |\textit{something}|
+% might be wanted.
 %
 % \subsection{Interaction with very old versions of the \xpackage{endfloat} package\label{sec:endfloat}}
 %
@@ -530,8 +550,6 @@
 % \indent (The \xpackage{pageslts} package with |\lastpageref{lastpage}| and
 % appropriate package options should cope even with this case.)
 %
-% \newpage
-%
 % \subsection{Page counter overflow\label{ss:overflow}}
 %
 % \indent \textquotedblleft The ranges of supported counter values are more or less
@@ -698,7 +716,7 @@
 %  because they take over the complete page layout.\textquotedblright (\textsc{Piet van %
 %  Oostrum}: Page layout in \LaTeX{}, March~2, 2004, section~16; fancyhdr.pdf)\\
 %  \xpackage{nofm} as of 1991/02/25 (without version number), available at\\
-%  \url{http://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},\\
+%  \url{https://mirrors.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},\\
 %  does not work with e.\,g. \xpackage{hyperref}, redefines |\enddocument|
 %  as well as |\@oddhead|, |\@evenhead|, |\@oddfoot|, and |\@evenfoot|.\\
 %  If you know the (CTAN) location of a \textbf{working}~(!) version,
@@ -710,6 +728,29 @@
 % \item[-] You may want to have a look at the \xpackage{count1to} package.
 % \end{description}
 %
+% \DescribeMacro{totalcount}
+% \begin{description}
+% \item[-] The \xpackage{totalcount} package provides |\totalpages|.
+%  If there are only arabic page numbers consecutively running from 1 to the last page,
+%  this works. But for example
+%  
+% \begin{quote}
+%\begin{verbatim}
+%\documentclass{article}
+%\usepackage[page]{totalcount}
+%\pagenumbering{Roman}
+%\begin{document}
+%\addtocounter{page}{49}
+%Page \thepage{} of \totalpages
+%\end{document}
+%\end{verbatim}
+% \end{quote}
+%
+%  prints \textquotedblleft Page L of 50\textquotedblright,
+%  where the number of pages is one (and no hyperlink is provided to the
+%  last page even if \xpackage{hyperref} is used).
+% \end{description}
+%
 % \DescribeMacro{zref}
 % \begin{description}
 % \item[-] The \xpackage{zref} package of \textsc{Heiko Oberdiek} requires
@@ -719,6 +760,12 @@
 %  whatsoever).
 % \end{description}
 %
+% \DescribeMacro{memoir}
+% \begin{description}
+% \item[-] The \xpackage{memoir} class provides |\thelastpage| (page number printed
+%  on last page) and |\thelastsheet| (number of pages).
+% \end{description}
+%
 % \bigskip
 %
 % \noindent (You programmed or found another alternative,
@@ -748,7 +795,7 @@
  hyperindex=false,%
  pdflang={en},%
  pdftitle={lastpage package example},%
- pdfauthor={Hans-Martin Muench},%
+ pdfauthor={H.-Martin Muench},%
  pdfsubject={Example for the lastpage package},%
  pdfkeywords={LaTeX, lastpage, H.-Martin Muench},%
  pdfview=Fit,%
@@ -760,7 +807,7 @@
 %% must be loaded for the \url used in this example:
 %% \usepackage{url}
 %% or just use \let\url\texttt for the one used url.
-\usepackage{lastpage}[2015/03/29]% v1.2m
+\usepackage{lastpage}[2021/09/03]% v1.2n
 \makeatletter
 \renewcommand{\@evenfoot}{%
  \normalsize\slshape \today\hfil \upshape %
@@ -776,7 +823,7 @@
 \markboth{Example for lastpage}{Example for lastpage}
 
 This example demonstrates the use of package\newline
-\textsf{lastpage}, v1.2m as of 2015/03/29 (HMM; JPG).\newline
+\textsf{lastpage}, v1.2n as of 2021/09/03 (HMM; JPG).\newline
 The package takes no options.\newline
 For more details please see the documentation!\newline
 
@@ -800,12 +847,10 @@
 trademark owner. There is no intention of infringement; the
 usage is to the benefit of the trademark owner.\newline
 
-\textbf{Tip}: Use \textit{logical page numbers} for
-the display of the pdf!\newline
-(In Adobe Reader XI (11.0.10): \underline{E}dit $>$
-Prefere\underline{n}ces (Ctrl+k) $>$ Page Display $>$
-Page Content and Information $>$ Use logical page
-\nolinebreak{\underline{n}umbers.)}\newline
+\textbf{Tip}: Use \textit{logical page numbers}
+for the display of the pdf (in Adobe Reader DC 2021.005.20060:
+Edit $>$ Preferences $>$ Categories: Page Display $>$
+Page Content and Information: Use logical page numbers)!\newline
 
 If you are more ambitious in respect to your aims with this package,
 you might want to have a look at the \textsf{pageslts} package:\newline
@@ -844,7 +889,54 @@
 \noindent The page (\verb|\thepage|): \thepage \newline
 
 \noindent Last page's name (LastPage): \pageref{LastPage}
+
+\bigskip
+
+\noindent There was the question:
+
+\begin{quote}
+\begin{verbatim}
+\documentclass{article}
+\usepackage{hyperref}
+\usepackage{lastpage}
+\begin{document}
+\ifnum\thepage=\pageref{LastPage} foo \else bar \fi
 \end{document}
+\end{verbatim}
+
+producing the error
+\textquotedblleft missing number, treated as zero\textquotedblright.
+\end{quote}
+
+\noindent \verb|\pageref| inserts a hyperlink, \verb|\pageref{LastPage}|
+is not expandable and the code breaks.\newline
+The code does not generally work even without hyperref.
+
+\begin{quote}
+\begin{verbatim}
+\documentclass{article}
+\usepackage{hyperref}
+\usepackage{lastpage}
+\pagenumbering{Roman}
+\begin{document}
+\addtocounter{page}{8}
+\edef\here{\thepage}
+\makeatletter
+\ifx\here\lastpage at lastpage\relax foo \else bar \fi
+\makeatother
+\end{document}
+\end{verbatim}
+\end{quote}
+
+\noindent does work, because \verb|\lastpage at lastpage| contains the name
+of the page, example:\newline
+\verb|Page \thepage{} is page \makeatletter\lastpage at lastpage\makeatother.|%
+\newline
+prints:\newline
+Page \thepage{} is page \makeatletter\lastpage at lastpage\makeatother.%
+\newline
+This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
+\end{document}
 %</example>
 %    \end{macrocode}
 %
@@ -864,7 +956,7 @@
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[2014/05/01]
 \ProvidesPackage{lastpage}%
-  [2015/03/29 v1.2m Refers to last page's name (HMM; JPG)]%
+  [2021/09/03 v1.2n Refers to last page's name (HMM; JPG)]%
 
 %% lastpage may work with earlier versions of LaTeX,
 %% but this was not tested. Please consider updating
@@ -922,12 +1014,13 @@
 \def\lastpage at one{1}
 %    \end{macrocode}
 %
-% We define |\lastpage at hyper|, |\lastpage at nameref|, and |\lastpage at LTS|
-% to be \textquotedblleft \texttt{0}\textquotedblright{}.
+% We define |\lastpage at hyper|, |\lastpage at nameref|, |\lastpage at french|, and
+% |\lastpage at LTS| to be \textquotedblleft \texttt{0}\textquotedblright{}.
 %
 %    \begin{macrocode}
 \gdef\lastpage at hyper{0}
 \gdef\lastpage at nameref{0}
+\gdef\lastpage at french{0}
 \gdef\lastpage at LTS{0}
 %    \end{macrocode}
 %
@@ -944,7 +1037,9 @@
 % \indent |\AtBeginDocument| it is checked whether various packages are loaded.\\
 % (|\@ifpackageloaded| cannot be used later than |\AtBeginDocument|.)\\
 % If this is the case, |\lastpage@<package abbreviation>| is defined as
-% \texttt{1} (otherwise it stays \texttt{0}).
+% \texttt{1} (otherwise it stays \texttt{0}).\\
+% The \xpackage{ltxcmds} package provides |\ltx at ifpackageloaded|, which can be used
+% also after |\AtBeginDocument|, but \xpackage{lastpage} tries to not load other packages.
 %
 %    \begin{macrocode}
 \AtBeginDocument{%
@@ -951,6 +1046,8 @@
   \@ifpackageloaded{tikz}{\gdef\lastpage at tikz{1}}{}%
   \@ifpackageloaded{hyperref}{\gdef\lastpage at hyper{1}}{}%
   \@ifpackageloaded{nameref}{\gdef\lastpage at nameref{1}}{}%
+  \@ifpackageloaded{french}{\gdef\lastpage at french{1}}{}%
+  \@ifpackageloaded{frenchle}{\gdef\lastpage at french{1}}{}%
   \@ifpackageloaded{pageslts}{%
     \PackageWarning{lastpage}{Package pageslts found.\MessageBreak%
       Therefore the lastpage package is no longer\MessageBreak%
@@ -1252,6 +1349,9 @@
        {The lastpage package was not allowed to write to an .aux file.\MessageBreak%
         This package does not work without access to an .aux file.\MessageBreak%
         Press Ctrl+Z to exit.\MessageBreak%
+        But it is OK if the .aux file was already updated\MessageBreak%
+        by a previouse compiler run\MessageBreak%
+        and would not have changed anyway.\MessageBreak%
        }%
     \fi%
   \fi%
@@ -1281,26 +1381,23 @@
 %
 % \begin{macro}{\AtEndDocument}
 % \indent |\AtEndDocument| we again (re)define |\lastpage at putlabel|
-% to do nothing and define |\lastpage at lastpage| and |\lastpage at lastpageHy|.
-% Without this definition there would happen an |undefined| error when
-% comparing with |\lastpage at lastpage| and |\lastpage at lastpageHy|.
+% to do nothing and check |\lastpage at lastpage| and |\lastpage at lastpageHy|,
+% whether they are still unchanged, which is OK for the first run only.
 %
 %    \begin{macrocode}
+\gdef\lastpage at lastpage{\relax}%
+\gdef\lastpage at lastpageHy{\relax}%
+
 \AtEndDocument{%
   \gdef\lastpage at putlabel{\relax}%
   \ifx\lastpage at LTS\lastpage at one%
   \else%
-    \@ifundefined{lastpage at lastpage}%
-     {\gdef\lastpage at lastpage{LastpagePackageError}%
-     % If there really is a page numbered (!) "LastpagePackageError",
-     % you will get the rerun warning whether it is necessary or not.
+    \ifx\lastpage at lastpage\relax%
       \PackageWarning{lastpage}{Rerun to get the references right}%
-     }{% already defined, nothing to be done.
-     }%
-    \@ifundefined{lastpage at lastpageHy}%
-     {\gdef\lastpage at lastpageHy{LastpagePackageError}%
-     }{% already defined, nothing to be done.
-     }%
+    \fi%
+    \ifx\lastpage at lastpageHy\relax%
+      \PackageWarning{lastpage}{Rerun to get the references right}%
+    \fi%
   \fi%
 %    \end{macrocode}
 %
@@ -1320,9 +1417,15 @@
 %
 % After this we issue a |\clearpage| to put out all floats,
 % which are still floating, and place the \texttt{LastPage} label.
+% Sometimes |\clearpage| might be undefined.
 %
 %    \begin{macrocode}
-    \clearpage\lastpage at putl@bel%
+    \@ifundefined{clearpage}{\relax}{\clearpage}%
+    \ifx\lastpage at french\lastpage at one% french or frenchle loaded
+      \addtocounter{page}{+1}\lastpage at putl@bel\addtocounter{page}{-1}%
+    \else% neither one loaded
+      \lastpage at putl@bel%
+    \fi%
 %    \end{macrocode}
 %
 % When writing to files is not allowed, nothing can be done. But when
@@ -1368,7 +1471,7 @@
 % \begin{description}
 % \item[-] \TeX Format \LaTeXe{}: \url{https://www.CTAN.org}
 %
-% \item[-] document class \xpackage{ltxdoc}, 2014/09/29, v2.0u,\\
+% \item[-] document class \xclass{ltxdoc}, 2015/03/26, v2.0w,\\
 %   \url{https://www.ctan.org/pkg/ltxdoc}
 %
 % \item[-] package \xpackage{holtxdoc}, 2012/03/21, v0.24,\\
@@ -1384,12 +1487,12 @@
 % \begin{description}
 % \item[-] \TeX Format \LaTeXe{}, \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2015/03/29, v1.2m,\\
+% \item[-] package \xpackage{lastpage}, 2021/09/03, v1.2n,\\
 %   \url{https://www.ctan.org/pkg/lastpage}
 % \end{description}
 % and can use
 % \begin{description}
-% \item[-] package \xpackage{hyperref}, 2012/11/06, 6.83m,\\
+% \item[-] package \xpackage{hyperref}, 2012/11/06, v6.83m,\\
 %   \url{https://www.ctan.org/pkg/hyperref}
 % \end{description}
 %
@@ -1399,16 +1502,16 @@
 % \begin{description}
 % \item[-] \TeX Format \LaTeX{}, v2.09
 %
-% \item[-] package \xpackage{lastpage209}, 2015/03/29, v1.2m, included in\\
+% \item[-] package \xpackage{lastpage209}, 2021/09/03, v1.2n, included in\\
 %   \hspace*{-2em}\url{http://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip}%
 % \end{description}
 % and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.\\
 %
 % \DescribeMacro{lastpage-example.tex}
-% The \texttt{lastpage-example.tex} requires the same file as all
+% The |lastpage-example.tex| requires the same file as all
 % documents using the \xpackage{lastpage} package, i.\,e.
 % \begin{description}
-% \item[-] package \xpackage{lastpage}, 2015/03/29, v1.2m,\\
+% \item[-] package \xpackage{lastpage}, 2021/09/03, v1.2n,\\
 %   \url{https://www.ctan.org/pkg/lastpage}\\
 %   (Well, it is the example file for this package, and because you are reading the
 %    documentation for the \xpackage{lastpage} package, it can be assumed that you already
@@ -1462,8 +1565,11 @@
 % \DescribeMacro{nofm}
 % \DescribeMacro{totpages}
 % \DescribeMacro{lastpage}
+% \DescribeMacro{totalcount}
 % \DescribeMacro{zref}
-% As possible alternatives in section~\ref{sec:Alternatives}, Alternatives, there are listed
+% \DescribeMacro{memoir}
+% As possible alternatives in section~\ref{sec:Alternatives}, Alternatives,
+% there are listed (newer versions might be available):
 % \begin{description}
 % \item[-] package \xpackage{pageslts}, 2014/01/19, v1.2c,\\
 %   \url{https://www.ctan.org/pkg/pageslts}
@@ -1476,15 +1582,21 @@
 %   \url{https://www.ctan.org/pkg/count1to}
 %
 % \item[-] package \xpackage{nofm}, 1991/02/25, v?.?,\\
-%   \url{http://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},
+%   \url{https://mirrors.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},
 %   does not work with e.\,g. \xpackage{hyperref}
 %
 % \item[-] package \xpackage{totpages}, 2005/09/19, v2.00,\\
 %   \url{https://www.ctan.org/pkg/totpages}
 %
+% \item[-] package \xpackage{totalcount}, 2018/01/21, v1.0a,\\
+%   \url{https://www.ctan.org/pkg/totalcount}.
+%
 % \item[-] package \xpackage{zref}, 2012/04/04, v2.24,\\
 %   \url{https://www.ctan.org/pkg/zref},
 %   requires $\varepsilon$-\TeX{}.
+%
+% \item[-] class \xpackage{memoir}, 2021/06/16, v3.7p,\\
+%   \url{https://ctan.org/tex-archive/macros/latex/contrib/memoir/}.
 % \end{description}
 %
 % \DescribeMacro{Oberdiek}
@@ -1498,8 +1610,8 @@
 % are quite probably both recent and compatible among themselves.\\
 %
 % \DescribeMacro{hyperref}
-% \noindent \xpackage{hyperref} is not included in that bundle and needs to be downloaded
-% separately,\\
+% \noindent \xpackage{hyperref} is not included in that bundle and needs to be
+% downloaded separately,\\
 % \url{http://mirrors.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.\\
 %
 % \DescribeMacro{M\"{u}nch}
@@ -1507,7 +1619,6 @@
 % \url{https://www.ctan.org/author/muench-hm}.\\
 %
 % \subsection{Package, unpacking TDS}
-%
 % \paragraph{Package.} This package is available on CTAN.org.
 % \begin{description}
 % \item[\url{http://mirrors.ctan.org/macros/latex/contrib/lastpage/lastpage.dtx}]\hspace*{0.1cm} \\
@@ -1519,7 +1630,7 @@
 % \item[\url{http://mirrors.ctan.org/macros/latex/contrib/lastpage/README}]\hspace*{0.1cm} \\
 %       The README file.
 % \end{description}
-% There is also a \texttt{lastpage.tds.zip} available:
+% There is also a |lastpage.tds.zip| available:
 % \begin{description}
 % \item[\url{http://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip}]\hspace*{0.1cm} \\
 %       Everything in TDS compliant, compiled format
@@ -1535,11 +1646,11 @@
 %
 % \bigskip
 %
-% \noindent For required other packages, see the preceding subsection.
+% \noindent For required other packages see the preceding subsection.
 %
 % \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
 % \docstrip{} archive. The files are extracted by running the
-% \xfile{.dtx} through \plainTeX:
+% \xext{dtx} through \plainTeX{}:
 % \begin{quote}
 %   \verb|tex lastpage.dtx|
 % \end{quote}
@@ -1549,7 +1660,7 @@
 % \paragraph{TDS.} Now the different files must be moved into
 % the different directories in your installation TDS tree
 % (also known as \xfile{texmf} tree), \textbf{but first you should delete
-% the old \xpackage{lastpage} files (which are probably located in other directories).}
+% the old \xpackage{lastpage} files (which are probably located in other directories)}.
 % You can make a backup of the old files before deleting them, of course.
 % \begin{quote}
 % \def\t{^^A
@@ -1627,8 +1738,8 @@
 %
 % \subsection{Refresh file name databases}
 %
-% If your \TeX~distribution (\teTeX, \mikTeX,\TeX live,\dots) relies on file name
-% databases, you must refresh these. For example, \teTeX{} users run
+% If your \TeX~distribution (\TeX live, \mikTeX, \teTeX, \dots) relies on 
+% file name databases, you must refresh these. For example, \teTeX{} users run
 % \verb|texhash| or \verb|mktexlsr|.
 %
 % \subsection{Some details for the interested}
@@ -1802,10 +1913,9 @@
 %     \item Minor details.
 %   \end{Version}
 %   \begin{Version}{2011/07/03 v1.2h}
-%     \item The \xpackage{holtxdoc} package was fixed (recent: 2011/02/04, v0.21),
-%             therefore the warning in \xfile{drv} could be removed.~-- Adapted
-%             the style of this documentation to new \textsc{Oberdiek} \xfile{dtx}
-%             style.
+%     \item The \xpackage{holtxdoc} package was fixed, therefore the warning
+%             in \xfile{drv} could be removed.~-- Adapted the style of this documentation
+%             to new \textsc{Oberdiek} \xfile{dtx} style.
 %     \item New versions of \xpackage{pagesLTS}, \xpackage{ulem}, \xpackage{hyperref},%
 %             \xpackage{papermas} packages.
 %     \item Corrected references in the README and manual.
@@ -1855,6 +1965,10 @@
 %     \item Updates to a lot (!) of details in the documentation (manual \& README),
 %             very small changes in code.
 %   \end{Version}
+%   \begin{Version}{2021/09/03 v1.2n}
+%     \item Updates to the documentation (manual \& README), to the example, and
+%             several small changes in code.
+%   \end{Version}
 % \end{History}
 %
 % \bigskip

Modified: trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins	2021-09-03 22:07:52 UTC (rev 60413)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins	2021-09-03 22:08:11 UTC (rev 60414)
@@ -9,9 +9,9 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2015/03/29 v1.2m
+%% Version: 2021/09/03 v1.2n
 %% 
-%% Copyright (C) 2010 - 2015 by
+%% Copyright (C) 2010 - 2021 by
 %%     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -24,9 +24,9 @@
 %% conditions of the LaTeX Project Public License, either
 %% version 1.3c of this license or (at your option) any later
 %% version. This version of this license is in
-%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
 %% and the latest version of this license is in
-%%    http://www.latex-project.org/lppl.txt
+%%    https://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of
 %% LaTeX version 2005/12/01 or later.
 %% 
@@ -57,7 +57,7 @@
 \input docstrip.tex
 \Msg{*********************************************************************}
 \Msg{* Installation}
-\Msg{* Package: lastpage 2015/03/29 v1.2m Refers to last page's name (HMM)}
+\Msg{* Package: lastpage 2021/09/03 v1.2n Refers to last page's name (HMM)}
 \Msg{*********************************************************************}
 
 \keepsilent
@@ -69,9 +69,9 @@
 This is a generated file.
 
 Project: lastpage
-Version: 2015/03/29 v1.2m
+Version: 2021/09/03 v1.2n
 
-Copyright (C) 2010 - 2015 by
+Copyright (C) 2010 - 2021 by
     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
 Portions of code copyrighted by other people as marked.
 
@@ -84,9 +84,9 @@
 conditions of the LaTeX Project Public License, either
 version 1.3c of this license or (at your option) any later
 version. This version of this license is in
-   http://www.latex-project.org/lppl/lppl-1-3c.txt
+   https://www.latex-project.org/lppl/lppl-1-3c.txt
 and the latest version of this license is in
-   http://www.latex-project.org/lppl.txt
+   https://www.latex-project.org/lppl.txt
 and version 1.3c or later is part of all distributions of
 LaTeX version 2005/12/01 or later.
 

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty	2021-09-03 22:07:52 UTC (rev 60413)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty	2021-09-03 22:08:11 UTC (rev 60414)
@@ -9,9 +9,9 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2015/03/29 v1.2m
+%% Version: 2021/09/03 v1.2n
 %% 
-%% Copyright (C) 2010 - 2015 by
+%% Copyright (C) 2010 - 2021 by
 %%     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -24,9 +24,9 @@
 %% conditions of the LaTeX Project Public License, either
 %% version 1.3c of this license or (at your option) any later
 %% version. This version of this license is in
-%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
 %% and the latest version of this license is in
-%%    http://www.latex-project.org/lppl.txt
+%%    https://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of
 %% LaTeX version 2005/12/01 or later.
 %% 
@@ -56,7 +56,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2014/05/01]
 \ProvidesPackage{lastpage}%
-  [2015/03/29 v1.2m Refers to last page's name (HMM; JPG)]%
+  [2021/09/03 v1.2n Refers to last page's name (HMM; JPG)]%
 
 %% lastpage may work with earlier versions of LaTeX,
 %% but this was not tested. Please consider updating
@@ -82,6 +82,7 @@
 \def\lastpage at one{1}
 \gdef\lastpage at hyper{0}
 \gdef\lastpage at nameref{0}
+\gdef\lastpage at french{0}
 \gdef\lastpage at LTS{0}
 \def\lastpage at firstpage{1}
 
@@ -89,6 +90,8 @@
   \@ifpackageloaded{tikz}{\gdef\lastpage at tikz{1}}{}%
   \@ifpackageloaded{hyperref}{\gdef\lastpage at hyper{1}}{}%
   \@ifpackageloaded{nameref}{\gdef\lastpage at nameref{1}}{}%
+  \@ifpackageloaded{french}{\gdef\lastpage at french{1}}{}%
+  \@ifpackageloaded{frenchle}{\gdef\lastpage at french{1}}{}%
   \@ifpackageloaded{pageslts}{%
     \PackageWarning{lastpage}{Package pageslts found.\MessageBreak%
       Therefore the lastpage package is no longer\MessageBreak%
@@ -236,6 +239,9 @@
        {The lastpage package was not allowed to write to an .aux file.\MessageBreak%
         This package does not work without access to an .aux file.\MessageBreak%
         Press Ctrl+Z to exit.\MessageBreak%
+        But it is OK if the .aux file was already updated\MessageBreak%
+        by a previouse compiler run\MessageBreak%
+        and would not have changed anyway.\MessageBreak%
        }%
     \fi%
   \fi%
@@ -248,25 +254,28 @@
   \fi%
   }
 
+\gdef\lastpage at lastpage{\relax}%
+\gdef\lastpage at lastpageHy{\relax}%
+
 \AtEndDocument{%
   \gdef\lastpage at putlabel{\relax}%
   \ifx\lastpage at LTS\lastpage at one%
   \else%
-    \@ifundefined{lastpage at lastpage}%
-     {\gdef\lastpage at lastpage{LastpagePackageError}%
-     % If there really is a page numbered (!) "LastpagePackageError",
-     % you will get the rerun warning whether it is necessary or not.
+    \ifx\lastpage at lastpage\relax%
       \PackageWarning{lastpage}{Rerun to get the references right}%
-     }{% already defined, nothing to be done.
-     }%
-    \@ifundefined{lastpage at lastpageHy}%
-     {\gdef\lastpage at lastpageHy{LastpagePackageError}%
-     }{% already defined, nothing to be done.
-     }%
+    \fi%
+    \ifx\lastpage at lastpageHy\relax%
+      \PackageWarning{lastpage}{Rerun to get the references right}%
+    \fi%
   \fi%
   \if at filesw%
     \message{^^JAED: lastpage setting LastPage^^J}%
-    \clearpage\lastpage at putl@bel%
+    \@ifundefined{clearpage}{\relax}{\clearpage}%
+    \ifx\lastpage at french\lastpage at one% french or frenchle loaded
+      \addtocounter{page}{+1}\lastpage at putl@bel\addtocounter{page}{-1}%
+    \else% neither one loaded
+      \lastpage at putl@bel%
+    \fi%
   \else%
     \ifx\lastpage at LTS\lastpage at one%
     \else%

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty	2021-09-03 22:07:52 UTC (rev 60413)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty	2021-09-03 22:08:11 UTC (rev 60414)
@@ -9,9 +9,9 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2015/03/29 v1.2m
+%% Version: 2021/09/03 v1.2n
 %% 
-%% Copyright (C) 2010 - 2015 by
+%% Copyright (C) 2010 - 2021 by
 %%     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -24,9 +24,9 @@
 %% conditions of the LaTeX Project Public License, either
 %% version 1.3c of this license or (at your option) any later
 %% version. This version of this license is in
-%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
 %% and the latest version of this license is in
-%%    http://www.latex-project.org/lppl.txt
+%%    https://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of
 %% LaTeX version 2005/12/01 or later.
 %% 



More information about the tex-live-commits mailing list.