texlive[71740] Master/texmf-dist: lastpage (8jul24)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 8 22:13:02 CEST 2024


Revision: 71740
          https://tug.org/svn/texlive?view=revision&revision=71740
Author:   karl
Date:     2024-07-08 22:13:02 +0200 (Mon, 08 Jul 2024)
Log Message:
-----------
lastpage (8jul24)

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
    trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty
    trunk/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty
    trunk/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty

Modified: trunk/Master/texmf-dist/doc/latex/lastpage/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lastpage/README	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/doc/latex/lastpage/README	2024-07-08 20:13:02 UTC (rev 71740)
@@ -1,4 +1,4 @@
-README for lastpage package, 2024-07-03, v2.1b
+README for lastpage package, 2024-07-07, v2.1c
 
 
 TABLE OF CONTENTS

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	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex	2024-07-08 20:13:02 UTC (rev 71740)
@@ -9,7 +9,7 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2024-07-03 v2.1b
+%% Version: 2024-07-07 v2.1c
 %% Info: Refers to last page's name
 %% 
 %% Copyright (C) 2010 - 2024 by
@@ -66,7 +66,7 @@
 \usepackage[draft]{showkeys}[2024/05/23]% v3.21 Show cite and label keys (DPC, MH)
 %%      Use final instead of draft to hide the keys. %%
 \usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-01-20]% v7.01h
-%% Hypertext links for LaTeX
+\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX
 \hypersetup{extension=pdf,%
  plainpages=false,%
  pdflang={en},%
@@ -77,9 +77,8 @@
  pdfview=Fit,%
  pdfstartview=Fit,%
  pdfpagelayout=SinglePage%
-}
-\@ifpackageloaded{hyperref}{}{\usepackage{url}[2013/09/16]}% v3.4
-\usepackage{lastpage}[2024/07/03]% v2.1b
+}}{\usepackage{url}[2013/09/16]}% v3.4
+\usepackage{lastpage}[2024/07/07]% v2.1c
 \renewcommand{\@evenfoot}{%
  \normalsize\slshape \today\hfil \upshape %
  page \thepage{} of \pageref{LastPage}}
@@ -91,7 +90,7 @@
 \section*{Example for lastpage}
 \markboth{Example for lastpage}{Example for lastpage}
 This example demonstrates the use of package\newline
-\textsf{lastpage}, v2.1b as of 2024-07-03 (HMM; JPG).\newline
+\textsf{lastpage}, v2.1c as of 2024-07-07 (HMM; JPG).\newline
 The package takes no options.\newline
 For more details please see the documentation!\newline
 

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	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.drv	2024-07-08 20:13:02 UTC (rev 71740)
@@ -9,7 +9,7 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2024-07-03 v2.1b
+%% Version: 2024-07-07 v2.1c
 %% Info: Refers to last page's name
 %% 
 %% Copyright (C) 2010 - 2024 by
@@ -58,7 +58,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \ProvidesFile{lastpage.drv}%
-  [2024-07-03 v2.1b Refers to last page's name (HMM)]
+  [2024-07-07 v2.1c Refers to last page's name (HMM)]
 \documentclass{ltxdoc}[2024/02/08]% v2.1j Standard LaTeX documentation class
 \usepackage{holtxdoc}[2019/12/09]%  v0.30 Private additional ltxdoc support (HO)
 \hypersetup{%

Modified: trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx	2024-07-08 20:13:02 UTC (rev 71740)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 %
 % File: lastpage.dtx
-% Version: 2024-07-03 v2.1b
+% Version: 2024-07-07 v2.1c
 % Info: Refers to last page's name
 %
 % Copyright © 2010 - 2024 by
@@ -65,7 +65,7 @@
 \input docstrip.tex
 \Msg{**********************************************************************}
 \Msg{* Installation                                                       *}
-\Msg{* Package: lastpage 2024-07-03 v2.1b Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2024-07-07 v2.1c Refers to last page's name (HMM)*}
 \Msg{**********************************************************************}
 
 \keepsilent
@@ -77,7 +77,7 @@
 This is a generated file.
 
 Project: lastpage
-Version: 2024-07-03 v2.1b
+Version: 2024-07-07 v2.1c
 Info: Refers to last page's name
 
 Copyright (C) 2010 - 2024 by
@@ -184,7 +184,7 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \ProvidesFile{lastpage.drv}%
-  [2024-07-03 v2.1b Refers to last page's name (HMM)]
+  [2024-07-07 v2.1c Refers to last page's name (HMM)]
 \documentclass{ltxdoc}[2024/02/08]% v2.1j Standard LaTeX documentation class
 \usepackage{holtxdoc}[2019/12/09]%  v0.30 Private additional ltxdoc support (HO)
 \hypersetup{%
@@ -233,23 +233,23 @@
 % \DoNotIndex{\@auxout,\@evenfoot,\@firstofone,\@firstoftwo,\@ifl at t@r,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifundefined,\@kernel at reserved@label at data,\@mainaux,\@number,\@oddfoot}
 % \DoNotIndex{\addtocounter,\AddToHook,\arabic,\begin}
-% \DoNotIndex{\bigskip,\clearpage,\csname,\documentclass,\EdefUnescapeString,\empty,\end,\endcsname}
-% \DoNotIndex{\enddocument,\ExplSyntaxOff,\ExplSyntaxOn,\fmtversion}
+% \DoNotIndex{\bigskip,\clearpage,\csname,\detokenize,\documentclass,\EdefUnescapeString,\empty,\end}
+% \DoNotIndex{\endcsname,\enddocument,\expanded,\ExplSyntaxOff,\ExplSyntaxOn,\fmtversion}
 % \DoNotIndex{\g,\gdef,\here,\hfil,\Hy at temp,\Hy at unicodefalse}
-% \DoNotIndex{\hypersetup,\if at filesw,\if at nobreak,\ifHy at hypertexnames,\ifHy at pageanchor,\ifHy at plainpages}
+% \DoNotIndex{\hypersetup,\if,\if at filesw,\if at nobreak,\ifHy at hypertexnames,\ifHy at pageanchor,\ifHy at plainpages}
 % \DoNotIndex{\ifdim,\ifnum,\IfPackageAtLeastTF,\IfPackageLoadedTF,\ifvmode,\ifx,\immediate,\input}
 % \DoNotIndex{\label,\lastpage,\lastpage-example.tex,\lastpage.dtx,\lastpage.sty,\lastpagee.sty}
 % \DoNotIndex{\lastpageclassic.sty,\lastpagemodern.sty,\LaTeX,\LaTeX-kernel,\listfiles}
-% \DoNotIndex{\makeatletter,\makeatother,\markboth,\mbox,\message,\MessageBreak}
+% \DoNotIndex{\makeatletter,\makeatother,\markboth,\meaning,\mbox,\message,\MessageBreak}
 % \DoNotIndex{\NeedsTeXFormat,\newcommand,\newcounter,\newline,\newpage,\nobreak}
 % \DoNotIndex{\noindent,\normalsize,\numexpr,\origenddocument,\PackageError,\PackageWarning}
 % \DoNotIndex{\PackageWarningNoLine,\pagenumbering,\pageref,\pdfstringdef,\protect,\ProvidesPackage}
 % \DoNotIndex{\qquad,\RequirePackage,\section,\ShowHook,\slshape,\smallskip,\space,\test,\textbf}
 % \DoNotIndex{\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt,\the,\thepage}
-% \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write}
+% \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write,\xlastpage at rmpage,\xxlastpage at rmpage}
 %
 % \title{The \xpackage{lastpage} package}
-% \date{2024-07-03 v2.1b}
+% \date{2024-07-07 v2.1c}
 % \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}\\
 %   invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}}
 %
@@ -744,7 +744,7 @@
 \usepackage[draft]{showkeys}[2024/05/23]% v3.21 Show cite and label keys (DPC, MH)
 %%      Use final instead of draft to hide the keys. %%
 \usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-01-20]% v7.01h
-%% Hypertext links for LaTeX
+\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX
 \hypersetup{extension=pdf,%
  plainpages=false,%
  pdflang={en},%
@@ -755,9 +755,8 @@
  pdfview=Fit,%
  pdfstartview=Fit,%
  pdfpagelayout=SinglePage%
-}
-\@ifpackageloaded{hyperref}{}{\usepackage{url}[2013/09/16]}% v3.4
-\usepackage{lastpage}[2024/07/03]% v2.1b
+}}{\usepackage{url}[2013/09/16]}% v3.4
+\usepackage{lastpage}[2024/07/07]% v2.1c
 \renewcommand{\@evenfoot}{%
  \normalsize\slshape \today\hfil \upshape %
  page \thepage{} of \pageref{LastPage}}
@@ -769,7 +768,7 @@
 \section*{Example for lastpage}
 \markboth{Example for lastpage}{Example for lastpage}
 This example demonstrates the use of package\newline
-\textsf{lastpage}, v2.1b as of 2024-07-03 (HMM; JPG).\newline
+\textsf{lastpage}, v2.1c as of 2024-07-07 (HMM; JPG).\newline
 The package takes no options.\newline
 For more details please see the documentation!\newline
 
@@ -905,7 +904,7 @@
 % \DescribeMacro{lastpage.sty}
 % We first need to determine whether we are on \TeX~2.09 or \LaTeX2e.\newline
 % (That line, which is too long for the documentation, reads:\newline
-% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/03 v2.1b lastpage:|\linebreak
+% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/07 v2.1c lastpage:|\linebreak
 % | 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}|.)
 %
 %    \begin{macrocode}
@@ -913,7 +912,7 @@
 %% Part of the "lastpage" package
 %% loads either lastpage2.09.sty for TeX 2.09 or lastpage2e.sty for LaTeX 2e
 %% with code from https://groups.google.com/g/comp.text.tex/c/-Qmhj1ZI4xM
-\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/03 v2.1b lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/07 v2.1c lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
 \begingroup \expandafter \ifx \csname documentclass\endcsname\relax
 \endgroup \expandafter \input{lastpage209.sty}
 \else \endgroup \expandafter \loadlastpage
@@ -953,7 +952,7 @@
 %<*lastpage2e>
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpage2e}[2024/07/03 v2.1b %
+\ProvidesPackage{lastpage2e}[2024/07/07 v2.1c %
   Decide which 2e lastpage version to use (HMM)]
 \@ifl at t@r\fmtversion{2023/06/01}{\RequirePackage{lastpagemodern}}{%
                                  \RequirePackage{lastpageclassic}}
@@ -968,7 +967,7 @@
 %<*lastpageclassic>
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpageclassic}[2024/07/03 v2.1b %
+\ProvidesPackage{lastpageclassic}[2024/07/07 v2.1c %
   Refers to last page's name (HMM; JPG)]
 %% allows for things like "Page \thepage{} of \pageref{LastPage}"
 %% to get "Page 7 of 9"
@@ -1386,7 +1385,7 @@
 %<*lastpagemodern>
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[2023-06-01]
-\ProvidesPackage{lastpagemodern}[2024-07-03 v2.1b %
+\ProvidesPackage{lastpagemodern}[2024-07-07 v2.1c %
   Refers to last page's name (HMM; JPG)]
 %% allows for things like "Page \thepage{} of \pageref{LastPage}"
 %% to get "Page 7 of 9" or "Page VII of IX";
@@ -1500,9 +1499,19 @@
           \else%
 %    \end{macrocode}
 % |\@currentHpage| should be |page.<some number>|, |\lastpage at rmpage| removes the
-% \mbox{\textquotedblleft |page.|\textquotedblright .}
+% \mbox{\textquotedblleft |page.|\textquotedblright .} Next compilation run,
+% |\lastpage at lastpageHy| gets defined via the \xfile{aux} file.
+% If we arrived at this place, but the definition is still empty,
+% then |\@currentHpage| has some unexpected content.
 %    \begin{macrocode}
             \gdef\lastpage at Hy{\lastpage at rmpage{\@currentHpage}}%
+            \ifx\lastpage at lastpageHy\empty\relax%
+              \PackageWarningNoLine{lastpage}{%
+                \string\@currentHpage\space is\MessageBreak%
+                \meaning\@currentHpage\MessageBreak%
+                not beginning with "page.",\MessageBreak%
+                \string\lastpage at lastpageHy\space is now let empty.}%
+            \fi%
           \fi%
         \fi%
        }%
@@ -1513,14 +1522,20 @@
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\lastpage at rmpage}
-% |\lastpage at rmpage| removes the \mbox{\textquotedblleft |page.|\textquotedblright ,}
-%  but just boldly assumes that |#1| is now |page.<some number>|.
+% |\lastpage at rmpage| removes the \mbox{\textquotedblleft |page.|\textquotedblright.}
+%
 %    \begin{macrocode}
-%% similar to https://tex.stackexchange.com/a/12811/6865
-\def\lastpage at rmpage#1{\expandafter\lastpage at currentH#1\relax}
-\def\lastpage at currentH#1.#2\relax{#2}
+%% Code provided by David Carlisle at https://tex.stackexchange.com/a/721877
+\def\lastpage at rmpage#1{%
+  \expandafter\xlastpage at rmpage\expanded{#1}\xlastpage at rmpage page.%
+  \xlastpage at rmpage\xxlastpage at rmpage{#1}}
+\def\xlastpage at rmpage #1page.#2\xlastpage at rmpage#3\xxlastpage at rmpage#4{%
+  \if$\detokenize{#1}$#2%\else#4
+  \fi}
 
 %    \end{macrocode}
+% |\else#4| means, that it did not start with |page.|, and whatever it is,
+% we cannot use this |#4| for |\lastpage at Hy|.
 % \end{macro}
 % \begin{macro}{\lastpage at putl@bel}
 % \indent This command does the writing of the label.
@@ -1601,7 +1616,7 @@
 
 %    \end{macrocode}
 % \end{macro}
-%
+%\pagebreak
 % \begin{macro}{\lastpage at fileswtest}
 % \indent \hspace*{2em}Later it will be determined whether it is allowed to write
 % to the \xfile{aux} file. If it was \emph{not} allowed, it is checked
@@ -1740,7 +1755,7 @@
 % \begin{description}
 % \item[-] \TeX, \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 %
@@ -1750,7 +1765,7 @@
 % \begin{description}
 % \item[-] \TeX-format \LaTeX{}, v2.09
 %
-% \item[-] package \xpackage{lastpage209}, 2024-07-03, v2.1b,
+% \item[-] package \xpackage{lastpage209}, 2024-07-07, v2.1c,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 % and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.\smallskip
@@ -1762,7 +1777,7 @@
 % \item[-] \TeX-format \LaTeXe{} 1994/12/01 or newer,
 %   \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 %
@@ -1773,7 +1788,7 @@
 % \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2023-05-31,\newline
 %   \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 % and can use
@@ -1790,7 +1805,7 @@
 % \item[-] \TeX-format \LaTeXe{} 2023-06-01 or newer,\newline
 %   \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 % and can use
@@ -1805,7 +1820,7 @@
 % The |lastpage-example.tex| requires the same file as all
 % documents using the \xpackage{lastpage} package, i.\,e.
 % \begin{description}
-% \item[-] package \xpackage{lastpage}, 2024-07-03, v2.1b,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
 %   \url{https://ctan.org/pkg/lastpage}\newline
 %   (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
@@ -2086,6 +2101,7 @@
 % to update it. Further I would like to thank \textsc{Heiko Oberdiek}
 % for providing a~lot~(!) of useful packages (from which I also learned everything
 % I know about creating a file in \xfile{dtx} format, OK, say it: copying).
+% Thanks to \textsc{David Carlisle} for the new code for |\lastpage at rmpage|.
 % Thanks for bug reports go to \textsc{Ulrike Fischer} (several times),
 % \textsc{Sebastian Bank}, \textsc{James Hedges}, \textsc{Mikhail Titov},
 % \textsc{Micha\l{} Herman}, \textsc{Matteo Gamboz}, and \textsc{James Small}.
@@ -2267,8 +2283,7 @@
 %     \item Replaced |\immediate\write| by a form of (pseudo-code!) |\immediate\protected at write|.
 %             (Thanks to \textsc{Ulrike Fischer} for the error report and solution!)
 %     \item Update of the |\lastpage at putl@bel| code to \pkg{hyperref} 2023-07-08, v7.01b,
-%             which now allows fnsymbol as page numbering scheme (while links to, for example,
-%             a page named $\|$ still do not work).
+%             which now allows fnsymbol as page numbering scheme.
 %   \end{Version}
 %   \begin{Version}{2023-10-06 v2.0d}
 %     \item For plain arabic page numbers only, \pkg{lastpage} again writes the page number
@@ -2291,6 +2306,10 @@
 %             The defining operation for |\lastpage at Hy| has been changed to catch this
 %             and other different cases.
 %   \end{Version}
+%   \begin{Version}{2024-07-07 v2.1c}
+%     \item With help from \textsc{David Carlisle} |\lastpage at rmpage| no longer assumes
+%             |\@currentHpage| to begin with |page.|.
+%   \end{Version}
 % \end{History}
 % \bigskip
 %

Modified: trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins	2024-07-08 20:13:02 UTC (rev 71740)
@@ -9,7 +9,7 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2024-07-03 v2.1b
+%% Version: 2024-07-07 v2.1c
 %% Info: Refers to last page's name
 %% 
 %% Copyright (C) 2010 - 2024 by
@@ -59,7 +59,7 @@
 \input docstrip.tex
 \Msg{**********************************************************************}
 \Msg{* Installation                                                       *}
-\Msg{* Package: lastpage 2024-07-03 v2.1b Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2024-07-07 v2.1c Refers to last page's name (HMM)*}
 \Msg{**********************************************************************}
 
 \keepsilent
@@ -71,7 +71,7 @@
 This is a generated file.
 
 Project: lastpage
-Version: 2024-07-03 v2.1b
+Version: 2024-07-07 v2.1c
 Info: Refers to last page's name
 
 Copyright (C) 2010 - 2024 by

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty	2024-07-08 20:13:02 UTC (rev 71740)
@@ -9,7 +9,7 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2024-07-03 v2.1b
+%% Version: 2024-07-07 v2.1c
 %% Info: Refers to last page's name
 %% 
 %% Copyright (C) 2010 - 2024 by
@@ -59,7 +59,7 @@
 %% Part of the "lastpage" package
 %% loads either lastpage2.09.sty for TeX 2.09 or lastpage2e.sty for LaTeX 2e
 %% with code from https://groups.google.com/g/comp.text.tex/c/-Qmhj1ZI4xM
-\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/03 v2.1b lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/07 v2.1c lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
 \begingroup \expandafter \ifx \csname documentclass\endcsname\relax
 \endgroup \expandafter \input{lastpage209.sty}
 \else \endgroup \expandafter \loadlastpage

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty	2024-07-08 20:13:02 UTC (rev 71740)
@@ -9,7 +9,7 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2024-07-03 v2.1b
+%% Version: 2024-07-07 v2.1c
 %% Info: Refers to last page's name
 %% 
 %% Copyright (C) 2010 - 2024 by

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty	2024-07-08 20:13:02 UTC (rev 71740)
@@ -9,7 +9,7 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2024-07-03 v2.1b
+%% Version: 2024-07-07 v2.1c
 %% Info: Refers to last page's name
 %% 
 %% Copyright (C) 2010 - 2024 by
@@ -58,7 +58,7 @@
 %% 
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpage2e}[2024/07/03 v2.1b %
+\ProvidesPackage{lastpage2e}[2024/07/07 v2.1c %
   Decide which 2e lastpage version to use (HMM)]
 \@ifl at t@r\fmtversion{2023/06/01}{\RequirePackage{lastpagemodern}}{%
                                  \RequirePackage{lastpageclassic}}

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty	2024-07-08 20:13:02 UTC (rev 71740)
@@ -9,7 +9,7 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2024-07-03 v2.1b
+%% Version: 2024-07-07 v2.1c
 %% Info: Refers to last page's name
 %% 
 %% Copyright (C) 2010 - 2024 by
@@ -58,7 +58,7 @@
 %% 
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpageclassic}[2024/07/03 v2.1b %
+\ProvidesPackage{lastpageclassic}[2024/07/07 v2.1c %
   Refers to last page's name (HMM; JPG)]
 %% allows for things like "Page \thepage{} of \pageref{LastPage}"
 %% to get "Page 7 of 9"

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty	2024-07-08 20:12:52 UTC (rev 71739)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty	2024-07-08 20:13:02 UTC (rev 71740)
@@ -9,7 +9,7 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2024-07-03 v2.1b
+%% Version: 2024-07-07 v2.1c
 %% Info: Refers to last page's name
 %% 
 %% Copyright (C) 2010 - 2024 by
@@ -58,7 +58,7 @@
 %% 
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[2023-06-01]
-\ProvidesPackage{lastpagemodern}[2024-07-03 v2.1b %
+\ProvidesPackage{lastpagemodern}[2024-07-07 v2.1c %
   Refers to last page's name (HMM; JPG)]
 %% allows for things like "Page \thepage{} of \pageref{LastPage}"
 %% to get "Page 7 of 9" or "Page VII of IX";
@@ -109,6 +109,13 @@
           \ifx\lastpage at Hptest\empty\relax%
           \else%
             \gdef\lastpage at Hy{\lastpage at rmpage{\@currentHpage}}%
+            \ifx\lastpage at lastpageHy\empty\relax%
+              \PackageWarningNoLine{lastpage}{%
+                \string\@currentHpage\space is\MessageBreak%
+                \meaning\@currentHpage\MessageBreak%
+                not beginning with "page.",\MessageBreak%
+                \string\lastpage at lastpageHy\space is now let empty.}%
+            \fi%
           \fi%
         \fi%
        }%
@@ -116,9 +123,13 @@
     }{}%
   }%
 
-%% similar to https://tex.stackexchange.com/a/12811/6865
-\def\lastpage at rmpage#1{\expandafter\lastpage at currentH#1\relax}
-\def\lastpage at currentH#1.#2\relax{#2}
+%% Code provided by David Carlisle at https://tex.stackexchange.com/a/721877
+\def\lastpage at rmpage#1{%
+  \expandafter\xlastpage at rmpage\expanded{#1}\xlastpage at rmpage page.%
+  \xlastpage at rmpage\xxlastpage at rmpage{#1}}
+\def\xlastpage at rmpage #1page.#2\xlastpage at rmpage#3\xxlastpage at rmpage#4{%
+  \if$\detokenize{#1}$#2%\else#4
+  \fi}
 
 \newcommand{\lastpage at putl@bel}{%
   \IfPackageLoadedTF{pageslts}{\relax}{%



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