texlive[71099] Master/texmf-dist: lastpage (27apr24)

commits+karl at tug.org commits+karl at tug.org
Sat Apr 27 21:56:47 CEST 2024


Revision: 71099
          https://tug.org/svn/texlive?view=revision&revision=71099
Author:   karl
Date:     2024-04-27 21:56:46 +0200 (Sat, 27 Apr 2024)
Log Message:
-----------
lastpage (27apr24)

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-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/doc/latex/lastpage/README	2024-04-27 19:56:46 UTC (rev 71099)
@@ -1,4 +1,4 @@
-README for lastpage package, 2023-10-14, v2.0e
+README for lastpage package, 2024-04-27, v2.1a
 
 
 TABLE OF CONTENTS
@@ -50,7 +50,7 @@
 the compiled example (lastpage-example.pdf), 
 driver (lastpage.drv), lastpage.dtx,
 installation file (lastpage.ins), 
-the style files (lastpage.sty, lastpage209.sty, lastpage23.sty,
+the style files (lastpage.sty, lastpage209.sty, lastpage2e.sty,
 lastpageclassic.sty, lastpagemodern.sty),
 and this README, already sorted in a TDS tree:
 https://mirror.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
@@ -83,7 +83,7 @@
 c) Install the files "*.sty" in your TDS tree:
      cp lastpage.sty TDS:tex/latex/lastpage/
      cp lastpage209.sty TDS:tex/latex/lastpage/
-     cp lastpage23.sty TDS:tex/latex/lastpage/
+     cp lastpage2e.sty TDS:tex/latex/lastpage/
      cp lastpageclassic.sty TDS:tex/latex/lastpage/
      cp lastpagemodern.sty TDS:tex/latex/lastpage/
    Replace "TDS:" by the prefix of your TDS tree

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-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex	2024-04-27 19:56:46 UTC (rev 71099)
@@ -9,10 +9,10 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2023-10-14 v2.0e
+%% Version: 2024-04-27 v2.1a
 %% Info: Refers to last page's name
 %% 
-%% Copyright (C) 2010 - 2023 by
+%% Copyright (C) 2010 - 2024 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -64,9 +64,9 @@
          \message{^^JLaTeX Info: Executing hook `enddocument/afterlastpage'.}}%
 }{\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}%
  }
-\usepackage[draft]{showkeys}[2023/05/11]% v3.19 Show cite and label keys (DPC, MH)
+\usepackage[draft]{showkeys}[2023/07/08]% v3.19 Show cite and label keys (DPC, MH)
 %%      Use final instead of draft to hide the keys. %%
-\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2023-07-08]% v7.01b
+\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-01-20]% v7.01h
 %% Hypertext links for LaTeX
 \hypersetup{extension=pdf,%
  plainpages=false,%
@@ -80,7 +80,7 @@
  pdfpagelayout=SinglePage%
 }
 \@ifpackageloaded{hyperref}{}{\usepackage{url}[2013/09/16]}% v3.4
-\usepackage{lastpage}[2023-10-14]% v2.0e
+\usepackage{lastpage}[2024/04/27]% v2.1a
 \renewcommand{\@evenfoot}{%
  \normalsize\slshape \today\hfil \upshape %
  page \thepage{} of \pageref{LastPage}}
@@ -92,7 +92,7 @@
 \section*{Example for lastpage}
 \markboth{Example for lastpage}{Example for lastpage}
 This example demonstrates the use of package\newline
-\textsf{lastpage}, v2.0e as of 2023-10-14 (HMM; JPG).\newline
+\textsf{lastpage}, v2.1a as of 2024-04-27 (HMM; JPG).\newline
 The package takes no options.\newline
 For more details please see the documentation!\newline
 
@@ -117,7 +117,7 @@
 usage is to the benefit of the trademark owner.\newline
 
 \textbf{Tip}: Use \textit{logical page numbers}
-for the display of the pdf (in Adobe Acrobat Reader 2023.006.20320:
+for the display of the pdf (in Adobe Acrobat Reader 2024.002.20687:
 Edit $>$ Preferences $>$ Page Display $>$
 Page Content and Information: Use logical page numbers)!\newline
 
@@ -190,7 +190,7 @@
 With modern \LaTeX{} it is possible to say:
 \begin{quote}
 \begin{verbatim}
-\NeedsTeXFormat{LaTeX2e}[2023-06-01]
+\NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \documentclass{article}
 \pagenumbering{fnsymbol}
 \begin{document}

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-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.drv	2024-04-27 19:56:46 UTC (rev 71099)
@@ -9,10 +9,10 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2023-10-14 v2.0e
+%% Version: 2024-04-27 v2.1a
 %% Info: Refers to last page's name
 %% 
-%% Copyright (C) 2010 - 2023 by
+%% Copyright (C) 2010 - 2024 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -57,9 +57,9 @@
 %%  Tommy Muench         + 2014-01-02
 %%  Hans-Klaus Muench    + 2014-08-24
 %% 
-\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \ProvidesFile{lastpage.drv}%
-  [2023-10-14 v2.0e Refers to last page's name (HMM)]
+  [2024-04-27 v2.1a Refers to last page's name (HMM)]
 \documentclass{ltxdoc}[2023/03/28]% 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-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx	2024-04-27 19:56:46 UTC (rev 71099)
@@ -1,19 +1,18 @@
 % \iffalse meta-comment
 %
 % File: lastpage.dtx
-% Version: 2023-10-14 v2.0e
+% Version: 2024-04-27 v2.1a
 % Info: Refers to last page's name
 %
-% Copyright © 2010 - 2023 by
+% Copyright © 2010 - 2024 by
 %    H.-Martin Münch <Martin dot Muench at Uni-Bonn dot de>
 % Portions of code copyrighted by other people as marked.
 %
 % This package was invented by Jeffrey P. Goldberg.
 % I thought that a replacement was needed and therefore created the pageslts package,
-% https://ctan.org/pkg/pageslts
-% . Nevertheless, for compatibility with existing documents/packages as well as for
-% the low amount of resources needed by the lastpage package (no new counter!),
-% I updated this package.
+% https://ctan.org/pkg/pageslts. Nevertheless, for compatibility with existing
+% documents/packages as well as for the low amount of resources needed by the
+% lastpage package (no new counter!), I updated this package.
 % Thanks go to Jeffrey P. Goldberg for allowing me to do this.
 %
 % While this package allows for things like "Page \thepage{} of \pageref{LastPage}"
@@ -66,7 +65,7 @@
 \input docstrip.tex
 \Msg{**********************************************************************}
 \Msg{* Installation                                                       *}
-\Msg{* Package: lastpage 2023-10-14 v2.0e Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2024-04-27 v2.1a Refers to last page's name (HMM)*}
 \Msg{**********************************************************************}
 
 \keepsilent
@@ -78,10 +77,10 @@
 This is a generated file.
 
 Project: lastpage
-Version: 2023-10-14 v2.0e
+Version: 2024-04-27 v2.1a
 Info: Refers to last page's name
 
-Copyright (C) 2010 - 2023 by
+Copyright (C) 2010 - 2024 by
     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 Portions of code copyrighted by other people as marked.
 
@@ -184,9 +183,9 @@
 %
 %    \begin{macrocode}
 %<*driver>
-\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \ProvidesFile{lastpage.drv}%
-  [2023-10-14 v2.0e Refers to last page's name (HMM)]
+  [2024-04-27 v2.1a Refers to last page's name (HMM)]
 \documentclass{ltxdoc}[2023/03/28]% v2.1j Standard LaTeX documentation class
 \usepackage{holtxdoc}[2019/12/09]%  v0.30 Private additional ltxdoc support (HO)
 \hypersetup{%
@@ -251,7 +250,7 @@
 % \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write}
 %
 % \title{The \xpackage{lastpage} package}
-% \date{2023-10-14 v2.0e}
+% \date{2024-04-27 v2.1a}
 % \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}\\
 %   invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}}
 %
@@ -370,7 +369,7 @@
 % \section{Some \textsc{Warnings}\label{sec:warn}}
 % \subsection{\texttt{\textbackslash AtEndDocument}\label{ssec:aed}}
 % \indent {\bfseries |\AtEndDocument| is not used by the \pkg{lastpagemodern.sty}
-% version of the lastpage package, requiring \LaTeX -format 2022-11-01
+% version of the lastpage package, requiring \LaTeX -format 2023-06-01
 % or newer. Instead |\AddToHook{enddocument/afterlastpage}| is used
 % and the problem does not arise.}
 % \bigskip
@@ -413,7 +412,7 @@
 % \subsection{Interaction with ancient versions of the \xpackage{endfloat} package\label{sec:endfloat}}
 %
 % \indent {\bfseries |\AtEndDocument| is not used by the \pkg{lastpagemodern.sty}
-% version of the lastpage package, requiring \LaTeX -format 2022-11-01
+% version of the lastpage package, requiring \LaTeX -format 2023-06-01
 % or newer. Instead |\AddToHook{enddocument/afterlastpage}| is used
 % and the problem does not arise.}
 %
@@ -552,22 +551,13 @@
 % (with appropriate options) can do this.
 %
 % \subsection{Other packages manipulating \texttt{\textbackslash lastpage at putlabel}}
-% The \xpackage{hyperref} package redefined the |\lastpage at putlabel| command,
-% and the \xpackage{revtex4} class still redefines the |\lastpage at putlabel| command,
-% and the \xpackage{hyperref} package redefined the |\lastpage at putlabel| command,
-% if the \xpackage{revtex4} class was used, and the \xpackage{pageslts} package
+% The \xpackage{revtex4} class redefines the |\lastpage at putlabel| command
+% (with outdated two arguments), and the \xpackage{pageslts} package
 % \textquotedblleft kills\textquotedblright{} the |\lastpage at putlabel| command,
 % because that package uses more advanced labels.\newline
-% In my humble opinion it would be preferably if one package (the original one,
-% i.\,e. \xpackage{lastpage}) would do the job right, all others packages would
-% check for the version of that package, and if an old version is found,
-% an error (or at least a warning) message about the use of an outdated
-% package is given, and \textit{then} as
-% \textquotedblleft last aid\textquotedblright{} the command of the outdated
-% package is redefined.\newline
-% Therefore here none of the definitions or commands of the other packages
-% is altered, but |\lastpage at putlabel| was replaced by |\lastpage at putl@bel|.
-% Because |\lastpage at putlabel| is no longer called, now there should not be any
+% None of the definitions or commands of the other packages are altered,
+% but |\lastpage at putlabel| was replaced by |\lastpage at putl@bel|.
+% Because \linebreak |\lastpage at putlabel| is no longer called, now there should not be any
 % double definitions of the \texttt{lastpage} label.
 % \newpage
 %
@@ -740,9 +730,9 @@
          \message{^^JLaTeX Info: Executing hook `enddocument/afterlastpage'.}}%
 }{\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}%
  }
-\usepackage[draft]{showkeys}[2023/05/11]% v3.19 Show cite and label keys (DPC, MH)
+\usepackage[draft]{showkeys}[2023/07/08]% v3.19 Show cite and label keys (DPC, MH)
 %%      Use final instead of draft to hide the keys. %%
-\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2023-07-08]% v7.01b
+\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-01-20]% v7.01h
 %% Hypertext links for LaTeX
 \hypersetup{extension=pdf,%
  plainpages=false,%
@@ -756,7 +746,7 @@
  pdfpagelayout=SinglePage%
 }
 \@ifpackageloaded{hyperref}{}{\usepackage{url}[2013/09/16]}% v3.4
-\usepackage{lastpage}[2023-10-14]% v2.0e
+\usepackage{lastpage}[2024/04/27]% v2.1a
 \renewcommand{\@evenfoot}{%
  \normalsize\slshape \today\hfil \upshape %
  page \thepage{} of \pageref{LastPage}}
@@ -768,7 +758,7 @@
 \section*{Example for lastpage}
 \markboth{Example for lastpage}{Example for lastpage}
 This example demonstrates the use of package\newline
-\textsf{lastpage}, v2.0e as of 2023-10-14 (HMM; JPG).\newline
+\textsf{lastpage}, v2.1a as of 2024-04-27 (HMM; JPG).\newline
 The package takes no options.\newline
 For more details please see the documentation!\newline
 
@@ -793,7 +783,7 @@
 usage is to the benefit of the trademark owner.\newline
 
 \textbf{Tip}: Use \textit{logical page numbers}
-for the display of the pdf (in Adobe Acrobat Reader 2023.006.20320:
+for the display of the pdf (in Adobe Acrobat Reader 2024.002.20687:
 Edit $>$ Preferences $>$ Page Display $>$
 Page Content and Information: Use logical page numbers)!\newline
 
@@ -866,7 +856,7 @@
 With modern \LaTeX{} it is possible to say:
 \begin{quote}
 \begin{verbatim}
-\NeedsTeXFormat{LaTeX2e}[2023-06-01]
+\NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \documentclass{article}
 \pagenumbering{fnsymbol}
 \begin{document}
@@ -904,7 +894,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}[2023/10/14 v2.0e lastpage:|\linebreak
+% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/04/27 v2.1a lastpage:|\linebreak
 % | 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}|.)
 %
 %    \begin{macrocode}
@@ -912,7 +902,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}[2023/10/14 v2.0e lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2024/04/27 v2.1a 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
@@ -952,9 +942,9 @@
 %<*lastpage2e>
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpage2e}[2023/10/14 v2.0e %
+\ProvidesPackage{lastpage2e}[2024/04/27 v2.1a %
   Decide which 2e lastpage version to use (HMM)]
-\@ifl at t@r\fmtversion{2022/11/01}{\RequirePackage{lastpagemodern}}{%
+\@ifl at t@r\fmtversion{2023/06/01}{\RequirePackage{lastpagemodern}}{%
                                  \RequirePackage{lastpageclassic}}
 \message{^^J}
 %</lastpage2e>
@@ -967,7 +957,7 @@
 %<*lastpageclassic>
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpageclassic}[2023/10/14 v2.0e %
+\ProvidesPackage{lastpageclassic}[2024/04/27 v2.1a %
   Refers to last page's name (HMM; JPG)]
 %% allows for things like "Page \thepage{} of \pageref{LastPage}"
 %% to get "Page 7 of 9"
@@ -1384,8 +1374,8 @@
 %    \begin{macrocode}
 %<*lastpagemodern>
 %% Part of the "lastpage" package
-\NeedsTeXFormat{LaTeX2e}[2022-11-01]
-\ProvidesPackage{lastpagemodern}[2023-10-14 v2.0e %
+\NeedsTeXFormat{LaTeX2e}[2023-06-01]
+\ProvidesPackage{lastpagemodern}[2024-04-27 v2.1a %
   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";
@@ -1413,49 +1403,25 @@
 
 %    \end{macrocode}
 %
-% People use the label |LastPage| for calculations, for example with
-% \begin{quote}
-%\begin{verbatim}
-%\getrefbykeydefault{LastPage}{page}{0}
-%\end{verbatim}
-% \end{quote}
-% and with
-% \begin{quote}
-%\begin{verbatim}
-%\getpagerefnumber{LastPage}
-%\end{verbatim}
-% \end{quote}
-% (using the \pkg{refcount} package). On the one hand, direct calculations do not work,
-% if the page \textquotedblleft number\textquotedblright{} is not
-% a plain arabic number (1, 2, 3,\ldots) but |alph| (a, b, c,\ldots), |Alph| (A, B, C,\ldots),
-% |roman| (i, ii, iii, iv,\ldots), |Roman| (I, II, III, IV,\ldots),
-% |fnsymbol| (foot note symbols: \textasteriskcentered{} (asterisk), \textdagger{} (dagger),
-% \textdaggerdbl{} (double dagger), \textsection{} (section symbol),\ldots) or some other fancy name.
-% On the other hand, if the page number \emph{is} a plain arabic number,
-% calculations do work, if that plain number can be extracted from the label.
-% To handle non-numeric page \textquotedblleft number\textquotedblright{} as well as providing
-% extractable numeric page numbers, we need to determine (later), whether a page number is numeric or not:
+% \begin{macro}{\lastpage at IfNumericTF}
+% |\lastpage at IfNumericTF| was needed to determine whether a page number was numeric or not.
+% Although it is no longer used, I am reluctant to remove it because it may have been used
+% in other places in documents.
 %
-% \begin{macro}{\lastpage at gobbleminus}
 %    \begin{macrocode}
 \newcommand\lastpage at gobbleminus[1]{\ifx-#1\else#1\fi}
-%% from https://texfaq.org/FAQ-isitanum
-
 %    \end{macrocode}
-% \end{macro}
+% which is from \url{https://texfaq.org/FAQ-isitanum},
 %    \begin{macrocode}
 \newcounter{lastpagecount}
-
 %    \end{macrocode}
-% \begin{macro}{\lastpage at IfNumericTF}
+% and similar to \url{https://tex.stackexchange.com/a/12811/17119}
 %    \begin{macrocode}
 \newcommand{\lastpage at IfNumericTF}[3]{%
-%% similar to https://tex.stackexchange.com/a/17119
 \sbox\z@{\c at lastpagecount=0\lastpage at gobbleminus{#1}\relax}%
 \ifdim\wd0>\z@\relax#3% is not numeric
 \else#2% is numeric
-\fi%
-}
+\fi}
 
 %    \end{macrocode}
 % \end{macro}
@@ -1462,9 +1428,8 @@
 %
 % \DescribeMacro{\AddToHook\{begindocument/end\}}
 % \indent |\lastpage at putlabel|, used by older versions of this package,
-% is redefined e.\,g. by \xpackage{revtex}, \xpackage{frenchle},
-% \xpackage{PPRcorners}, and old versions of \xpackage{hyperref}.
-% While now |\lastpage at putl@bel| is used instead, \xpackage{revtex}
+% is/was redefined by other packages.
+% While now |\lastpage at putl@bel| is used instead, other packages
 % could also define a label \texttt{LastPage},
 % which then would be multiply defined. (Which is no big issue,
 % if it is associated with the same page.) Therefore we define
@@ -1483,8 +1448,8 @@
 % (thanks to Ulrike Fischer for the report).
 %
 %    \begin{macrocode}
-%% From https://tex.stackexchange.com/a/542425 with thanks to
-%% Prof. Enrico Gregorio
+%% from https://tex.stackexchange.com/a/12811/542425
+%% with thanks to Prof. Enrico Gregorio
 \long\def\protected at iwrite#1#2#3{%
   \begingroup%
   #2%
@@ -1498,42 +1463,15 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% We need two macros for writing numeric and non-numeric page
-% \textquotedblleft numbers\textquotedblright{} into the \xfile{aux} file:
-%
-% \begin{macro}{\lastpage at numeric}
+% \begin{macro}{\lastpage at rmpage}
+% Just once we need |\@currentHpage| without the \mbox{\textquotedblleft |page.|\textquotedblright :}
 %    \begin{macrocode}
-\newcommand{\lastpage at numeric}{\protected at iwrite\@auxout{}{%
- \string\newlabel{LastPage}{%
-  {\@currentlabel}%
-  {\thepage}%
-  {\@currentlabelname}%
-  {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor page.\Hy at temp\fi%
-                               }{\@currentHref}}%
-  {\@kernel at reserved@label at data}}}%
- }
+%% 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}
 
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\lastpage at nonnumeric}
-%    \begin{macrocode}
-\newcommand{\lastpage at nonnumeric}{\protected at iwrite\@auxout{}{%
- \string\newlabel{LastPage}{%
-  {\@currentlabel}%
-  {\IfPackageLoadedTF{hyperref}{\string\begingroup%
-       \string\pdfstringdefDisableCommands{\string\let%
-       \string\TextOrMath\string\@firstoftwo}\thepage%
-       \string\endgroup%
-     }{\thepage}}%
-  {\@currentlabelname}%
-  {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor page.\Hy at temp\fi%
-                               }{\@currentHref}}%
-  {\@kernel at reserved@label at data}}}%
- }
-
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{\lastpage at putl@bel}
 % \indent This command does the writing of the label.
 % If the \xpackage{pageslts} package is used, this \xpackage{lastpage} package
@@ -1544,9 +1482,7 @@
 \newcommand{\lastpage at putl@bel}{%
   \IfPackageLoadedTF{pageslts}{\relax}{%
 %    \end{macrocode}
-%
-% \noindent Otherwise the label is set:\newpage
-%
+% \noindent Otherwise the label is set:
 % \noindent If the \xpackage{hyperref} package is used, but page-anchors are disabled,
 % the hyperlinking will not work. (The warning will also be shown, when only
 % |\pageref*{LastPage}| is used (or neither one), but without messing with |\pageref|
@@ -1553,13 +1489,21 @@
 % we cannot detect this.)
 %
 %    \begin{macrocode}
-    \IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\else%
-      \PackageWarningNoLine{lastpage}{%
-        The \string\pageref{LastPage} link does not work\MessageBreak%
-        using hyperref with disabled option `pageanchor'.\MessageBreak%
-        Better enable `pageanchor' or use\MessageBreak%
-        \string\pageref*{LastPage} (not generating a link)%
-        }\fi}{}%
+    \IfPackageLoadedTF{hyperref}{%
+      \IfPackageAtLeastTF{hyperref}{2023-11-07}{\relax}{%
+        \PackageError{lastpage}{hyperref package version too old}{%
+          required version: 2023-11-07 or newer, found version:\MessageBreak%
+          \csname ver at hyperref.sty\endcsname\MessageBreak%
+          Update hyperref or use lastpageclassic.sty instead of\MessageBreak%
+          lastpagemodern.sty!}}%
+      \ifHy at pageanchor\else%
+        \PackageWarningNoLine{lastpage}{%
+          The \string\pageref{LastPage} link does not work\MessageBreak%
+          using hyperref with disabled option `pageanchor'.\MessageBreak%
+          Better enable `pageanchor' or use\MessageBreak%
+          \string\pageref*{LastPage} (not generating a link)}%
+      \fi%
+     }{}%
     \begingroup%
 %    \end{macrocode}
 %
@@ -1577,65 +1521,25 @@
 % may be no more invocations of the output routines.
 % To force the write out, we need to do an |\immediate| protected write
 % into the \xfile{aux} file.
-%
 %    \begin{macrocode}
-      \IfPackageLoadedTF{hyperref}{%
-        % with code from \Hy at EveryPageAnchor of the hyperref package,
-        % 2023-07-08 v7.01b
-        \ifHy at pageanchor%
-          \ifHy at hypertexnames%
-            \ifHy at plainpages%
-              \def\Hy at temp{\the\c at page}%
-              \def\Hy at TempPageAnchor{\hyper@@anchor{page.\the\c at page}}%
-              \Hy at PageAnchorSlidesPlain%
-            \else%
-              % No \begingroup, because we are in a group anyway.
-              \let\@number\@firstofone%
-              \Hy at unicodefalse%
-              \Hy at PageAnchorSlide%
-              \pdfstringdef\@the at H@page{\thepage}%
-              % No \endgroup, because we are in a group anyway.
-              \EdefUnescapeString\@the at H@page{\@the at H@page}%
-              \def\Hy at TempPageAnchor{\hyper@@anchor{page.\@the at H@page}}%
-              \def\Hy at temp{\@the at H@page}%
-            \fi%
-          \else%
-            % NOT! \Hy at GlobalStepCount\Hy at pagecounter
-            \def\Hy at TempPageAnchor{\hyper@@anchor{page.\the\Hy at pagecounter}}%
-            \def\Hy at temp{\the\Hy at pagecounter}%
-          \fi%
-        \fi%
-      }{}%
-      \IfFormatAtLeastTF{2023/06/01}{%
+      \protected at iwrite\@auxout{}{\string\newlabel{LastPage}{%
+        {\@currentlabel}{\thepage}{\@currentlabelname}%
+        {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\@currentHpage\fi%
+                                     }{\@currentHref}}%
+        {\@kernel at reserved@label at data}}%
+       }%
 %    \end{macrocode}
-%
-% \noindent The |\label| command has been extended, see \LaTeX{} News Issue~37,
-% June~2023 (\LaTeX{} release 2023-06-01),
-% \url{https://www.latex-project.org/news/latex2e-news/ltnews37.pdf}.
-%
-% Here we need to distinguish between numeric page numbers, which shall be extractable,
-% and non-numeric ones, which need some protection:
-%    \begin{macrocode}
-        \lastpage at IfNumericTF{\thepage}{\lastpage at numeric}{\lastpage at nonnumeric}%
-       }{\IfPackageLoadedTF{hyperref}{\protected at iwrite\@auxout{}{%
-            \string\newlabel{LastPage}{{}{\thepage}{}{%
-            \ifHy at pageanchor page.\Hy at temp\fi}{}}}%
-          }{\IfPackageLoadedTF{nameref}{\protected at iwrite\@auxout{}{%
-               \string\newlabel{LastPage}{{}{\thepage}{}{}{}}}%
-             }{\protected at iwrite\@auxout{}{\string\newlabel{LastPage}{%
-                {}{\thepage}}}%
-              }%
-           }%
-        }%
-%    \end{macrocode}
-%
+% \pagebreak
 % \noindent We also save the values, so that we can later (next rerun) check,
 % whether they have been saved in the \xfile{aux} file.
 %
 %    \begin{macrocode}
-      \protected at iwrite\@auxout{}{\string\gdef\string\lastpage at lastpage{\thepage}}%
-      \gdef\lastpage at Hy{\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\Hy at temp\fi}{}}%
-      \protected at iwrite\@auxout{}{\string\gdef\string\lastpage at lastpageHy{\lastpage at Hy}}%
+      \protected at iwrite\@auxout{}{%
+        \string\gdef\string\lastpage at lastpage{\thepage}}%
+      \gdef\lastpage at Hy{\IfPackageLoadedTF{hyperref}{%
+        \ifHy at pageanchor\lastpage at rmpage{\@currentHpage}\fi}{}}%
+      \protected at iwrite\@auxout{}{%
+        \string\gdef\string\lastpage at lastpageHy{\lastpage at Hy}}%
 %    \end{macrocode}
 %
 % \noindent After the write-out we restore the page number again,
@@ -1691,7 +1595,6 @@
 
 %    \end{macrocode}
 % \end{macro}
-% \newpage
 %
 % \begin{macro}{\lastpage at fileswtestHy}
 % \indent \hspace*{2em}When the \xpackage{hyperref} package has been loaded,
@@ -1702,7 +1605,7 @@
 %    \begin{macrocode}
 \newcommand{\lastpage at fileswtestHy}{%
   \ifHy at pageanchor%
-    \lastpage at fileswtest{\Hy at temp}{\lastpage at lastpageHy}%
+    \lastpage at fileswtest{\@currentHpage}{\@the at H@page}%
   \else%
     \lastpage at fileswtest{\empty}{\lastpage at lastpageHy}%
   \fi%
@@ -1789,7 +1692,7 @@
 % \begin{description}
 % \item[-] \TeX, \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
+% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 %
@@ -1799,10 +1702,10 @@
 % \begin{description}
 % \item[-] \TeX-format \LaTeX{}, v2.09
 %
-% \item[-] package \xpackage{lastpage209}, 2023-10-14, v2.0e,
+% \item[-] package \xpackage{lastpage209}, 2024-04-27, v2.1a,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
-% and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.
+% and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.\smallskip
 %
 % \DescribeMacro{lastpage2e.sty}
 % The |lastpage2e.sty| for \LaTeXe{} (i.\,e. each document using
@@ -1811,7 +1714,7 @@
 % \item[-] \TeX-format \LaTeXe{} 1994/12/01 or newer,
 %   \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
+% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 %
@@ -1819,16 +1722,17 @@
 % The |lastpageclassic.sty| for \LaTeXe{} (i.\,e. each document using
 % the \xpackage{lastpageclassic} package) requires:
 % \begin{description}
-% \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2022/11/01,\newline
+% \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2023-05-31,\newline
 %   \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
+% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 % and can use
 % \begin{description}
 % \item[-] package \xpackage{hyperref}, 2023-07-08, v7.01b,
-%   \url{https://ctan.org/pkg/hyperref}
+%   \url{https://ctan.org/pkg/hyperref}\newline
+%   (probably also some older and newer versions)
 % \end{description}
 %
 % \DescribeMacro{lastpagemodern.sty}
@@ -1835,23 +1739,25 @@
 % The |lastpagemodern.sty| for \LaTeXe{} (i.\,e. each document using
 % the \xpackage{lastpagemodern} package) requires:
 % \begin{description}
-% \item[-] \TeX-format \LaTeXe{} 2022-11-01, better yet 2023-06-01 or newer,\newline
+% \item[-] \TeX-format \LaTeXe{} 2023-06-01 or newer,\newline
 %   \url{https://www.CTAN.org}
 %
-% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
+% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
 %   \url{https://ctan.org/pkg/lastpage}
 % \end{description}
 % and can use
 % \begin{description}
-% \item[-] package \xpackage{hyperref}, 2023-07-08, v7.01b,
+% \item[-] package \xpackage{hyperref}, 2023-11-07 and newer
+%   (tested with: 2024-01-20, v7.01h),
 %   \url{https://ctan.org/pkg/hyperref}
 % \end{description}
+% \pagebreak
 %
 % \DescribeMacro{lastpage-example.tex}
 % The |lastpage-example.tex| requires the same file as all
 % documents using the \xpackage{lastpage} package, i.\,e.
 % \begin{description}
-% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
+% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
 %   \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
@@ -1862,10 +1768,10 @@
 % \item[-] class \xpackage{article}, 2023-05-17, v1.4n, from \xpackage{classes}:
 %           \url{https://ctan.org/pkg/classes}
 %
-% \item[-] package \xpackage{showkeys}, 2023-05-11, v3.19,
+% \item[-] package \xpackage{showkeys}, 2023-07-08, v3.19,
 %   \url{https://ctan.org/pkg/showkeys}
 %
-% \item[-] package \xpackage{hyperref}, 2023-07-08, v7.01b,
+% \item[-] package \xpackage{hyperref}, 2024-01-20, v7.01h,
 %   \url{https://ctan.org/pkg/hyperref}
 % \end{description}
 %
@@ -1886,7 +1792,7 @@
 % \xpackage{fancyheadings}), but because they were mentioned, also they are listed
 % here:
 % \begin{description}
-% \item[-] package \xpackage{fancyhdr}, 2022-11-09, v4.1,
+% \item[-] package \xpackage{fancyhdr}, 2024/04/23, v4.2,
 %   \url{https://ctan.org/pkg/fancyhdr}
 %
 % \item[-] package \xpackage{nccfancyhdr}, 2004/12/07, v1.1,
@@ -1929,7 +1835,7 @@
 % \item[-] package \xpackage{zref}, 2023-09-14, v2.35,
 %   \url{https://ctan.org/pkg/zref}
 %
-% \item[-] class \xpackage{memoir}, 2023-08-21, v3.8.1,
+% \item[-] class \xpackage{memoir}, 2024-01-26, v3.8.2,
 %   \url{https://ctan.org/pkg/memoir}.
 % \end{description}
 %
@@ -1971,13 +1877,13 @@
 % \end{description}
 % which additionally contains\\
 % \begin{tabular}{ll}
-% lastpage.ins         & The installation file.\\
-% lastpage.drv         & The driver to generate the documentation.\\
-% lastpage.sty         & The \xext{sty}le file.\\
-% lastpage209.sty      & The \xext{sty}le file for \LaTeX2.09{} \textbf{only}.\\
-% lastpage2e.sty       & The \xext{sty}le file to determine which 2e-style to use.\\
-% lastpageclassic.sty  & The \xext{sty}le file for older \LaTeX-formats.\\
-% lastpagemodern.sty   & The \xext{sty}le file for the recent \LaTeX-format.\\
+% lastpage.ins         & The \texttt{ins}tallation file.\\
+% lastpage.drv         & The \mbox{\texttt{dr}i\texttt{v}er} to generate the documentation.\\
+% lastpage.sty         & The \texttt{sty}le file.\\
+% lastpage209.sty      & The \texttt{sty}le file for \LaTeX2.09{} \textbf{only}.\\
+% lastpage2e.sty       & The \texttt{sty}le file to determine which 2e-style to use.\\
+% lastpageclassic.sty  & The \texttt{sty}le file for older \LaTeX-formats.\\
+% lastpagemodern.sty   & The \texttt{sty}le file for the recent \LaTeX-format.\\
 % lastpage-example.tex & The example file.%
 % \end{tabular}
 %
@@ -2131,12 +2037,10 @@
 % inventing the \xpackage{lastpage} package as well as for allowing me
 % 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),
-% and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex}
-% newsgroups for their help in all things \TeX{}. Thanks for bug reports
-% to \textsc{Ulrike Fischer} (twice), \textsc{Sebastian Bank}, \textsc{James Hedges},
-% \textsc{Mikhail Titov}, \textsc{Micha\l{} Herman}, \textsc{Matteo Gamboz}, and
-% \textsc{James Small}.
+% I know about creating a file in \xfile{dtx} format, OK, say it: copying).
+% Thanks for bug reports go to \textsc{Ulrike Fischer} (twice),
+% \textsc{Sebastian Bank}, \textsc{James Hedges}, \textsc{Mikhail Titov},
+% \textsc{Micha\l{} Herman}, \textsc{Matteo Gamboz}, and \textsc{James Small}.
 % Thanks to \textsc{Sven Siegmund} for pointing out a necessary further
 % explanation in the documentation.
 %
@@ -2315,7 +2219,8 @@
 %     \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.
+%             which now allows fnsymbol as page numbering scheme (while links to, for example,
+%             a page named $\|$ still do not work).
 %   \end{Version}
 %   \begin{Version}{2023-10-06 v2.0d}
 %     \item For plain arabic page numbers only, \pkg{lastpage} again writes the page number
@@ -2325,6 +2230,13 @@
 %   \begin{Version}{2023-10-14 v2.0e}
 %     \item Replaced a |\PackageError| by |\PackageWarningNoLine| as suggested by \textsc{Ulrike Fischer}.
 %   \end{Version}
+%   \begin{Version}{2024-04-27 v2.1a}
+%     \item Utilizes the new |\@currentHpage| provided by the \LaTeX -kernel.
+%     \item The issue with |\thepage| (former |\lastpage at nonnumeric| command) has has been fixed
+%             at 2023-11-07, \url{https://github.com/latex3/hyperref/issues/303}.
+%     \item |\lastpage at IfNumericTF| is no longer needed, but has not been removed
+%             so as not to break older documents that use it in a different context.
+%   \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-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins	2024-04-27 19:56:46 UTC (rev 71099)
@@ -9,10 +9,10 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2023-10-14 v2.0e
+%% Version: 2024-04-27 v2.1a
 %% Info: Refers to last page's name
 %% 
-%% Copyright (C) 2010 - 2023 by
+%% Copyright (C) 2010 - 2024 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -60,7 +60,7 @@
 \input docstrip.tex
 \Msg{**********************************************************************}
 \Msg{* Installation                                                       *}
-\Msg{* Package: lastpage 2023-10-14 v2.0e Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2024-04-27 v2.1a Refers to last page's name (HMM)*}
 \Msg{**********************************************************************}
 
 \keepsilent
@@ -72,10 +72,10 @@
 This is a generated file.
 
 Project: lastpage
-Version: 2023-10-14 v2.0e
+Version: 2024-04-27 v2.1a
 Info: Refers to last page's name
 
-Copyright (C) 2010 - 2023 by
+Copyright (C) 2010 - 2024 by
     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 Portions of code copyrighted by other people as marked.
 

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty	2024-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty	2024-04-27 19:56:46 UTC (rev 71099)
@@ -9,10 +9,10 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2023-10-14 v2.0e
+%% Version: 2024-04-27 v2.1a
 %% Info: Refers to last page's name
 %% 
-%% Copyright (C) 2010 - 2023 by
+%% Copyright (C) 2010 - 2024 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -60,7 +60,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}[2023/10/14 v2.0e lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2024/04/27 v2.1a 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-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty	2024-04-27 19:56:46 UTC (rev 71099)
@@ -9,10 +9,10 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2023-10-14 v2.0e
+%% Version: 2024-04-27 v2.1a
 %% Info: Refers to last page's name
 %% 
-%% Copyright (C) 2010 - 2023 by
+%% Copyright (C) 2010 - 2024 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty	2024-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty	2024-04-27 19:56:46 UTC (rev 71099)
@@ -9,10 +9,10 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2023-10-14 v2.0e
+%% Version: 2024-04-27 v2.1a
 %% Info: Refers to last page's name
 %% 
-%% Copyright (C) 2010 - 2023 by
+%% Copyright (C) 2010 - 2024 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -59,9 +59,9 @@
 %% 
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpage2e}[2023/10/14 v2.0e %
+\ProvidesPackage{lastpage2e}[2024/04/27 v2.1a %
   Decide which 2e lastpage version to use (HMM)]
-\@ifl at t@r\fmtversion{2022/11/01}{\RequirePackage{lastpagemodern}}{%
+\@ifl at t@r\fmtversion{2023/06/01}{\RequirePackage{lastpagemodern}}{%
                                  \RequirePackage{lastpageclassic}}
 \message{^^J}
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty	2024-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty	2024-04-27 19:56:46 UTC (rev 71099)
@@ -9,10 +9,10 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2023-10-14 v2.0e
+%% Version: 2024-04-27 v2.1a
 %% Info: Refers to last page's name
 %% 
-%% Copyright (C) 2010 - 2023 by
+%% Copyright (C) 2010 - 2024 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -59,7 +59,7 @@
 %% 
 %% Part of the "lastpage" package
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpageclassic}[2023/10/14 v2.0e %
+\ProvidesPackage{lastpageclassic}[2024/04/27 v2.1a %
   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-04-27 19:56:35 UTC (rev 71098)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty	2024-04-27 19:56:46 UTC (rev 71099)
@@ -9,10 +9,10 @@
 %% This is a generated file.
 %% 
 %% Project: lastpage
-%% Version: 2023-10-14 v2.0e
+%% Version: 2024-04-27 v2.1a
 %% Info: Refers to last page's name
 %% 
-%% Copyright (C) 2010 - 2023 by
+%% Copyright (C) 2010 - 2024 by
 %%     H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
 %% Portions of code copyrighted by other people as marked.
 %% 
@@ -58,8 +58,8 @@
 %%  Hans-Klaus Muench    + 2014-08-24
 %% 
 %% Part of the "lastpage" package
-\NeedsTeXFormat{LaTeX2e}[2022-11-01]
-\ProvidesPackage{lastpagemodern}[2023-10-14 v2.0e %
+\NeedsTeXFormat{LaTeX2e}[2023-06-01]
+\ProvidesPackage{lastpagemodern}[2024-04-27 v2.1a %
   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";
@@ -73,22 +73,17 @@
 \gdef\lastpage at lastpageHy{??}
 
 \newcommand\lastpage at gobbleminus[1]{\ifx-#1\else#1\fi}
-%% from https://texfaq.org/FAQ-isitanum
-
 \newcounter{lastpagecount}
-
 \newcommand{\lastpage at IfNumericTF}[3]{%
-%% similar to https://tex.stackexchange.com/a/17119
 \sbox\z@{\c at lastpagecount=0\lastpage at gobbleminus{#1}\relax}%
 \ifdim\wd0>\z@\relax#3% is not numeric
 \else#2% is numeric
-\fi%
-}
+\fi}
 
 \AddToHook{begindocument/end}{\gdef\lastpage at putlabel{\relax}}
 
-%% From https://tex.stackexchange.com/a/542425 with thanks to
-%% Prof. Enrico Gregorio
+%% from https://tex.stackexchange.com/a/12811/542425
+%% with thanks to Prof. Enrico Gregorio
 \long\def\protected at iwrite#1#2#3{%
   \begingroup%
   #2%
@@ -99,83 +94,41 @@
   \if at nobreak\ifvmode\nobreak\fi\fi%
   }
 
-\newcommand{\lastpage at numeric}{\protected at iwrite\@auxout{}{%
- \string\newlabel{LastPage}{%
-  {\@currentlabel}%
-  {\thepage}%
-  {\@currentlabelname}%
-  {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor page.\Hy at temp\fi%
-                               }{\@currentHref}}%
-  {\@kernel at reserved@label at data}}}%
- }
+%% 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}
 
-\newcommand{\lastpage at nonnumeric}{\protected at iwrite\@auxout{}{%
- \string\newlabel{LastPage}{%
-  {\@currentlabel}%
-  {\IfPackageLoadedTF{hyperref}{\string\begingroup%
-       \string\pdfstringdefDisableCommands{\string\let%
-       \string\TextOrMath\string\@firstoftwo}\thepage%
-       \string\endgroup%
-     }{\thepage}}%
-  {\@currentlabelname}%
-  {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor page.\Hy at temp\fi%
-                               }{\@currentHref}}%
-  {\@kernel at reserved@label at data}}}%
- }
-
 \newcommand{\lastpage at putl@bel}{%
   \IfPackageLoadedTF{pageslts}{\relax}{%
-    \IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\else%
-      \PackageWarningNoLine{lastpage}{%
-        The \string\pageref{LastPage} link does not work\MessageBreak%
-        using hyperref with disabled option `pageanchor'.\MessageBreak%
-        Better enable `pageanchor' or use\MessageBreak%
-        \string\pageref*{LastPage} (not generating a link)%
-        }\fi}{}%
+    \IfPackageLoadedTF{hyperref}{%
+      \IfPackageAtLeastTF{hyperref}{2023-11-07}{\relax}{%
+        \PackageError{lastpage}{hyperref package version too old}{%
+          required version: 2023-11-07 or newer, found version:\MessageBreak%
+          \csname ver at hyperref.sty\endcsname\MessageBreak%
+          Update hyperref or use lastpageclassic.sty instead of\MessageBreak%
+          lastpagemodern.sty!}}%
+      \ifHy at pageanchor\else%
+        \PackageWarningNoLine{lastpage}{%
+          The \string\pageref{LastPage} link does not work\MessageBreak%
+          using hyperref with disabled option `pageanchor'.\MessageBreak%
+          Better enable `pageanchor' or use\MessageBreak%
+          \string\pageref*{LastPage} (not generating a link)}%
+      \fi%
+     }{}%
     \begingroup%
       \addtocounter{page}{-1}%
-      \IfPackageLoadedTF{hyperref}{%
-        % with code from \Hy at EveryPageAnchor of the hyperref package,
-        % 2023-07-08 v7.01b
-        \ifHy at pageanchor%
-          \ifHy at hypertexnames%
-            \ifHy at plainpages%
-              \def\Hy at temp{\the\c at page}%
-              \def\Hy at TempPageAnchor{\hyper@@anchor{page.\the\c at page}}%
-              \Hy at PageAnchorSlidesPlain%
-            \else%
-              % No \begingroup, because we are in a group anyway.
-              \let\@number\@firstofone%
-              \Hy at unicodefalse%
-              \Hy at PageAnchorSlide%
-              \pdfstringdef\@the at H@page{\thepage}%
-              % No \endgroup, because we are in a group anyway.
-              \EdefUnescapeString\@the at H@page{\@the at H@page}%
-              \def\Hy at TempPageAnchor{\hyper@@anchor{page.\@the at H@page}}%
-              \def\Hy at temp{\@the at H@page}%
-            \fi%
-          \else%
-            % NOT! \Hy at GlobalStepCount\Hy at pagecounter
-            \def\Hy at TempPageAnchor{\hyper@@anchor{page.\the\Hy at pagecounter}}%
-            \def\Hy at temp{\the\Hy at pagecounter}%
-          \fi%
-        \fi%
-      }{}%
-      \IfFormatAtLeastTF{2023/06/01}{%
-        \lastpage at IfNumericTF{\thepage}{\lastpage at numeric}{\lastpage at nonnumeric}%
-       }{\IfPackageLoadedTF{hyperref}{\protected at iwrite\@auxout{}{%
-            \string\newlabel{LastPage}{{}{\thepage}{}{%
-            \ifHy at pageanchor page.\Hy at temp\fi}{}}}%
-          }{\IfPackageLoadedTF{nameref}{\protected at iwrite\@auxout{}{%
-               \string\newlabel{LastPage}{{}{\thepage}{}{}{}}}%
-             }{\protected at iwrite\@auxout{}{\string\newlabel{LastPage}{%
-                {}{\thepage}}}%
-              }%
-           }%
-        }%
-      \protected at iwrite\@auxout{}{\string\gdef\string\lastpage at lastpage{\thepage}}%
-      \gdef\lastpage at Hy{\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\Hy at temp\fi}{}}%
-      \protected at iwrite\@auxout{}{\string\gdef\string\lastpage at lastpageHy{\lastpage at Hy}}%
+      \protected at iwrite\@auxout{}{\string\newlabel{LastPage}{%
+        {\@currentlabel}{\thepage}{\@currentlabelname}%
+        {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\@currentHpage\fi%
+                                     }{\@currentHref}}%
+        {\@kernel at reserved@label at data}}%
+       }%
+      \protected at iwrite\@auxout{}{%
+        \string\gdef\string\lastpage at lastpage{\thepage}}%
+      \gdef\lastpage at Hy{\IfPackageLoadedTF{hyperref}{%
+        \ifHy at pageanchor\lastpage at rmpage{\@currentHpage}\fi}{}}%
+      \protected at iwrite\@auxout{}{%
+        \string\gdef\string\lastpage at lastpageHy{\lastpage at Hy}}%
       \addtocounter{page}{+1}%
     \endgroup%
    }%
@@ -209,7 +162,7 @@
 
 \newcommand{\lastpage at fileswtestHy}{%
   \ifHy at pageanchor%
-    \lastpage at fileswtest{\Hy at temp}{\lastpage at lastpageHy}%
+    \lastpage at fileswtest{\@currentHpage}{\@the at H@page}%
   \else%
     \lastpage at fileswtest{\empty}{\lastpage at lastpageHy}%
   \fi%



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