texlive[73014] Master/texmf-dist: lastpage
commits+karl at tug.org
commits+karl at tug.org
Sun Dec 1 22:52:10 CET 2024
Revision: 73014
https://tug.org/svn/texlive?view=revision&revision=73014
Author: karl
Date: 2024-12-01 22:52:10 +0100 (Sun, 01 Dec 2024)
Log Message:
-----------
lastpage
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-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/doc/latex/lastpage/README 2024-12-01 21:52:10 UTC (rev 73014)
@@ -1,4 +1,4 @@
-README for lastpage package, 2024-07-07, v2.1c
+README for lastpage package, 2024-11-24, v2.1d
TABLE OF CONTENTS
@@ -8,10 +8,9 @@
2 Download
3 Installation
4 Additional Packages
-5 Package Compatibility
-6 Authors/Maintainer
-7 Bug Reports
-8 Known Problems
+5 Authors/Maintainer
+6 Bug Reports
+7 Known Problems
1 INTRODUCTION
@@ -25,8 +24,7 @@
has output after this package, or the number of pages
instead of the last page's name is needed, or the page
numbers exceed a certain range, there might be problems,
-which can be solved by using the pageslts package instead
-[which needs updating to current LaTeX-format and therefore might fail].
+which can be solved by using the pageslts package instead.
This material is published under the LPPL 1.3c: This work may be
distributed and/or modified under the conditions of the LaTeX Project
@@ -47,9 +45,9 @@
Also a ZIP file is provided that contains the files:
the manual (lastpage.pdf), the example (lastpage-example.tex),
-the compiled example (lastpage-example.pdf),
+the compiled example (lastpage-example.pdf),
driver (lastpage.drv), lastpage.dtx,
-installation file (lastpage.ins),
+installation file (lastpage.ins),
the style files (lastpage.sty, lastpage209.sty, lastpage2e.sty,
lastpageclassic.sty, lastpagemodern.sty),
and this README, already sorted in a TDS tree:
@@ -115,23 +113,16 @@
https://mirror.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf
-5 PACKAGE COMPATIBILITY
-=======================
-
-lastpage is not compatible with the ancient version 2.0
-(and earlier) of the endfloat package. The recent version of
-endfloat is available at https://ctan.org/pkg/endfloat
-
-6 AUTHORS/MAINTAINER
+5 AUTHORS/MAINTAINER
====================
-* Author of the original main code:
+* Author of the original main code:
Jeffrey P. Goldberg (Thanks!)
* Author of the recent package and current maintainer:
H.-Martin Münch
-7 BUG REPORTS
+6 BUG REPORTS
=============
A bug report should contain:
@@ -158,7 +149,8 @@
<Martin [dot] Muench [at] Uni-Bonn [dot] de>
-8 KNOWN PROBLEMS
+7 KNOWN PROBLEMS
================
-Really a lot, see chapter 3 of the documentation!
\ No newline at end of file
+In simple cases none, but otherwise a lot,
+see chapter 3 of the documentation!
\ No newline at end of file
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-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex 2024-12-01 21:52:10 UTC (rev 73014)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-07-07 v2.1c
+%% Version: 2024-11-24 v2.1d
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -31,7 +31,7 @@
%% The Current Maintainer of this work is H.-Martin Muench.
%%
%% This package was invented by Jeffrey P. Goldberg.
-%% I thought that a replacement was needed and therefore created the pageslts package,
+%% I thought that an enhancement 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.
@@ -58,14 +58,9 @@
%%
\documentclass[british]{article}[2024/02/08]% v1.4n Standard LaTeX document class
\makeatletter
-\@ifl at t@r\fmtversion{2022/11/01}{%
- \AddToHook{enddocument/afterlastpage}[lastpage]{%
- \message{^^JLaTeX Info: Executing hook `enddocument/afterlastpage'.}}%
-}{\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}%
- }
\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
+\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-10-30]% v7.01k
\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX
\hypersetup{extension=pdf,%
plainpages=false,%
@@ -77,11 +72,11 @@
pdfview=Fit,%
pdfstartview=Fit,%
pdfpagelayout=SinglePage%
-}}{\usepackage{url}[2013/09/16]}% v3.4
-\usepackage{lastpage}[2024/07/07]% v2.1c
-\renewcommand{\@evenfoot}{%
+}}{\usepackage{url}[2013/09/16]}% v3.4 Verb mode for urls, etc.
+\usepackage{lastpage}[2024/11/24]% v2.1d Refers to last page's name (HMM; JPG)]
+\renewcommand{\@evenfoot}{{%
\normalsize\slshape \today\hfil \upshape %
- page \thepage{} of \pageref{LastPage}}
+ page \thepage{} of \pageref{LastPage}}}
\renewcommand{\@oddfoot}{\@evenfoot}
\makeatother
\listfiles
@@ -90,7 +85,7 @@
\section*{Example for lastpage}
\markboth{Example for lastpage}{Example for lastpage}
This example demonstrates the use of package\newline
-\textsf{lastpage}, v2.1c as of 2024-07-07 (HMM; JPG).\newline
+\textsf{lastpage}, v2.1d as of 2024-11-24 (HMM; JPG).\newline
The package takes no options.\newline
For more details please see the documentation!\newline
@@ -172,10 +167,12 @@
\noindent does work (two compilations needed), because \verb|\lastpage at lastpage|
contains the name of the page, \mbox{example:}
\begin{verbatim}
-Page \thepage{} is (not) page \makeatletter\lastpage at lastpage\makeatother.
+Page \thepage{} is (not) page
+\makeatletter\lastpage at lastpage\makeatother.
\end{verbatim}
prints:\newline
-Page \thepage{} is (not) page \makeatletter\lastpage at lastpage\makeatother.
+Page \thepage{} is (not) page
+\makeatletter\lastpage at lastpage\makeatother.
\newline
This can be broken for example by \verb|\pagenumbering{fnsymbol}|
(because then \verb|\edef\here{\thepage}| does not work).
@@ -188,7 +185,7 @@
With modern \LaTeX{} it is possible to say:
\begin{quote}
\begin{verbatim}
-\NeedsTeXFormat{LaTeX2e}[2023-11-01]
+\NeedsTeXFormat{LaTeX2e}[2024-06-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-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.drv 2024-12-01 21:52:10 UTC (rev 73014)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-07-07 v2.1c
+%% Version: 2024-11-24 v2.1d
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -31,7 +31,7 @@
%% The Current Maintainer of this work is H.-Martin Muench.
%%
%% This package was invented by Jeffrey P. Goldberg.
-%% I thought that a replacement was needed and therefore created the pageslts package,
+%% I thought that an enhancement 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.
@@ -56,9 +56,8 @@
%% Tommy Muench + 2014-01-02
%% Hans-Klaus Muench + 2014-08-24
%%
-\NeedsTeXFormat{LaTeX2e}[2023-11-01]
-\ProvidesFile{lastpage.drv}%
- [2024-07-07 v2.1c Refers to last page's name (HMM)]
+\NeedsTeXFormat{LaTeX2e}[2024-06-01]
+\ProvidesFile{lastpage.drv}[2024-11-24 v2.1d 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-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.dtx 2024-12-01 21:52:10 UTC (rev 73014)
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: lastpage.dtx
-% Version: 2024-07-07 v2.1c
+% Version: 2024-11-24 v2.1d
% Info: Refers to last page's name
%
% Copyright © 2010 - 2024 by
@@ -9,7 +9,7 @@
% 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,
+% I thought that an enhancement 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.
@@ -65,7 +65,7 @@
\input docstrip.tex
\Msg{**********************************************************************}
\Msg{* Installation *}
-\Msg{* Package: lastpage 2024-07-07 v2.1c Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2024-11-24 v2.1d Refers to last page's name (HMM)*}
\Msg{**********************************************************************}
\keepsilent
@@ -77,7 +77,7 @@
This is a generated file.
Project: lastpage
-Version: 2024-07-07 v2.1c
+Version: 2024-11-24 v2.1d
Info: Refers to last page's name
Copyright (C) 2010 - 2024 by
@@ -99,7 +99,7 @@
The Current Maintainer of this work is H.-Martin Muench.
This package was invented by Jeffrey P. Goldberg.
-I thought that a replacement was needed and therefore created the pageslts package,
+I thought that an enhancement 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.
@@ -182,9 +182,8 @@
%
% \begin{macrocode}
%<*driver>
-\NeedsTeXFormat{LaTeX2e}[2023-11-01]
-\ProvidesFile{lastpage.drv}%
- [2024-07-07 v2.1c Refers to last page's name (HMM)]
+\NeedsTeXFormat{LaTeX2e}[2024-06-01]
+\ProvidesFile{lastpage.drv}[2024-11-24 v2.1d 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{%
@@ -230,26 +229,27 @@
% }%^^A
% \expandafter\endgroup\x
%
-% \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,\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,\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,\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,\xlastpage at rmpage,\xxlastpage at rmpage}
+% \DoNotIndex{\@auxout,\@evenfoot,\@firstofone,\@firstoftwo,\@ifl at t@r,\@ifpackagelater,\@ifpackageloaded,%
+% \IfPackageAtLeastF,\IfPackageLoadedT,\IfPackageLoadedTF,%
+% \@ifundefined,\@kernel at reserved@label at data,\@mainaux,\@number,\@oddfoot,%
+% \addtocounter,\AddToHook,\arabic,\begin,%
+% \bigskip,\clearpage,\csname,\detokenize,\documentclass,\EdefUnescapeString,\empty,\end,%
+% \endcsname,\enddocument,\expanded,\ExplSyntaxOff,\ExplSyntaxOn,\fmtversion,%
+% \g,\gdef,\here,\hfil,\Hy at temp,\Hy at unicodefalse,\Hy at EveryPageAnchor,%
+% \hypersetup,\if,\if at filesw,\if at nobreak,\ifHy at hypertexnames,\ifHy at pageanchor,\ifHy at plainpages,%
+% \ifdim,\ifnum,\ifvmode,\ifx,\immediate,\input,%
+% \label,\lastpage,\lastpage-example.tex,\lastpage.dtx,\lastpage.sty,\lastpagee.sty,%
+% \lastpageclassic.sty,\lastpagemodern.sty,\LaTeX,\LaTeX-kernel,\listfiles,%
+% \makeatletter,\makeatother,\markboth,\meaning,\mbox,\message,\MessageBreak,%
+% \NeedsTeXFormat,\newcommand,\newcounter,\newline,\newpage,\nobreak,%
+% \noindent,\normalsize,\numexpr,\origenddocument,\PackageError,\PackageNoteNoLine,\PackageWarning,%
+% \PackageWarningNoLine,\pagenumbering,\pageref,\pdfstringdef,\protect,\ProvidesPackage,%
+% \qquad,\renewcommand,\RequirePackage,\section,\ShowHook,\slshape,\smallskip,\space,\test,\textbf,%
+% \textit,\textquotedblleft,\textquotedblright,\textsf,\texttt,\the,\thepage,%
+% \today,\upshape,\url,\usepackage,\value,\verb,\wd,\write,\xlastpage at rmpage,\xxlastpage at rmpage}
%
% \title{The \xpackage{lastpage} package}
-% \date{2024-07-07 v2.1c}
+% \date{2024-11-24 v2.1d}
% \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}\\
% invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}}
%
@@ -283,26 +283,17 @@
% If any damage occurs by the use of information presented there,
% only the author of the respective pages might be liable,
% not the one who has referred to those pages.
-%
-% \bigskip
-%
-% \textbf{Note: At several places in this manual as alternative the \pkg{pageslts}
-% package is \textquotedblleft advertised\textquotedblright. The current version
-% 2015/12/21 v1.2f of that package has not yet been updated to the new hook mechanism.
-% In special cases (for example }|\pagenumbering{fnsymbol}|\textbf{) the current version
-% of that package combined with a current \LaTeX-format fails. Together with a lot of
-% other packages (small to large, public as well as private, some probably obsolete)
-% it is in my update queue.}
-%
% \newpage
-%
% \tableofcontents
%
% \section{Introduction}
% \indent This \LaTeX{} package puts the label \texttt{LastPage}
-% (at end of the document) into the \xfile{aux} file, allowing the user to refer
-% to the last page of a document via |\pageref{LastPage}|.
-% This might be particularly useful in places like headers or footers.
+% (at end of the document via hook |enddocument/afterlastpage|,
+% for older formats via |\AtEndDocument|, for \LaTeX2.09{} via
+% redefining |\enddocument|) into the \xfile{aux} file,
+% allowing the user to refer to the last page of a document via
+% |\pageref{LastPage}|. This might be particularly useful
+% in places like headers or footers.
%
% \bigskip
%
@@ -326,7 +317,7 @@
% (or |\input{lastpage.sty}| if |\usepackage| is unknown).
%
% \indent For example for various draft forms it is desirable to have a
-% page reference to the last page, so that e.\,g. page footers can
+% page reference to the last page, so that e.\,g.\ page footers can
% contain something like \textquotedblleft page $N$ of $K$\textquotedblright,
% where $N$ is the current page and $K$ is the last page. Once the package
% is loaded, anywhere in the text references can be made to the label
@@ -352,11 +343,11 @@
%
% The \xpackage{lastpage} package does not provide the words
% \textquotedblleft page\textquotedblright{} or \textquotedblleft of\textquotedblright{},
-% but e.\,g. the \xclass{handout} class uses \textquotedblleft of\textquotedblright{} in
+% but e.\,g.\ the \xclass{handout} class uses \textquotedblleft of\textquotedblright{} in
% the definition of the footer. (In the \texttt{lastpage-example} also
% |\@evenfoot| is redefined, but it is not the \xpackage{lastpage} \emph{package}
% redefining this.) If you want to change \textquotedblleft page\textquotedblright{} or
-% \textquotedblleft of\textquotedblright{} (e.\,g. to another language), you therefore
+% \textquotedblleft of\textquotedblright{} (e.\,g.\ to another language), you therefore
% have got to look in the used class/package(s)/preamble instead of in the
% \xpackage{lastpage} package.\bigbreak
%
@@ -363,12 +354,11 @@
% If the total \emph{number} of pages of a document is needed,
% the kernel already gives this by |\makeatletter\@abspage at last\makeatother|,
% |\thetotalpages|, and |\PreviousTotalPages| (needing at least two compiler runs).
-% \newpage
%
% \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 2023-06-01
+% version of the lastpage package, requiring \LaTeX -format 2024-06-01
% or newer. Instead |\AddToHook{enddocument/afterlastpage}| is used
% and the problem does not arise.}
% \bigskip
@@ -411,7 +401,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 2023-06-01
+% version of the lastpage package, requiring \LaTeX -format 2024-06-01
% or newer. Instead |\AddToHook{enddocument/afterlastpage}| is used
% and the problem does not arise.}
%
@@ -446,7 +436,7 @@
% (with \textbf{s} at the end) at your disposal for remediation.)
%
% \subsection{No write access to the \xfile{aux} file}
-% Some packages (e.\,g. \xpackage{tikz} and \xpackage{selectp}) sometimes prevent
+% Some packages (e.\,g.\ \xpackage{tikz} and \xpackage{selectp}) sometimes prevent
% the output to the \xfile{aux} file. In that case a warning is issued. This is
% no problem as long as there is another compilation run where the label to the
% last page can be placed via the \xfile{aux} file.
@@ -465,7 +455,7 @@
% The \xpackage{pageslts} package puts |\lastpageref{LastPages}|
% (with \textbf{s} at the end) at your disposal for remediation,
% giving the number of pages and linking to the last page, if linking is provided
-% for examaple by the \pkg{hyperref} package.
+% for examaple by the \xpackage{hyperref} package.
%
% \subsection{\texttt{\textbackslash addtocounter\{page\}\{\ldots\} and %
% \texttt{\textbackslash setcounter\{page\}\{\ldots\}}}}
@@ -496,7 +486,7 @@
% page numbering schemes are not provided.\newline
% The \xpackage{pageslts} package does this with labels
% \texttt{pagesLTS.<numbering scheme>}, where \texttt{<numbering scheme>} is
-% e.\,g. arabic, roman, Roman, alph, or Alph.\linebreak
+% e.\,g.\ arabic, roman, Roman, alph, or Alph.\linebreak
% For fnsymbol please use |\lastpageref{pagesLTS.fnsymbol}| instead of\newline
% |\pageref{pagesLTS.fnsymbol}|.
%
@@ -503,7 +493,7 @@
% \subsection{Current page}
% The command |\thepage| gives the \textbf{name} of the current page
% in the current page numbering scheme, which is different from the
-% current total/absolute page number e.\,g. with a second
+% current total/absolute page number e.\,g.\ with a second
% page numbering scheme, |\addtocounter{page}{...}|, or |\setcounter{page}{...}|,
% and it will not be an arabic number at all,
% if the current page numbering scheme is not arabic.\newline
@@ -541,8 +531,8 @@
% \end{tabular}\\[1ex]
% \texttt{MAX} = \texttt{2147483647}
% \end{quote}
-% \textquotedblright{} (\textsc{Heiko Oberdiek}:
-% The \xpackage{alphalph} package, 2010/04/18, v2.3, first table, p.~2).
+% \textquotedblright\ (\xpackage{alphalph} package manual, 2019/12/09, v2.6,
+% first table, p.~2).
%
% \noindent When \textit{any} page is out of that range, there will be a counter overflow.\newline
% \xpackage{lastpage} probably is not the right package to be asked
@@ -549,17 +539,32 @@
% to correct this anyway, but the \xpackage{pageslts} package
% (with appropriate options) can do this.
%
+% When MAX is exceeded via
+% |\setcounter{<name>}{| something greater than MAX (or smaller then $-$MAX) |}|,
+% then the error
+% \begin{quote}
+% \begin{verbatim}
+% ! Number too big.
+% I can only go up to 2147483647='17777777777="7FFFFFFF,
+% so I'm using that number instead of yours.
+% \end{verbatim}
+% \end{quote}
+% \vspace{-\baselineskip}
+% will arise. But if the counter has a value of $2\,147\,483\,647 = {}$MAX,
+% and |\addtocounter{<name>}{+1}| is tried, no error is issued, but
+% |\arabic{<name>}| prints $-2147483648$, and further |\addtocounter{<name>}{+1}|s
+% give $-2147483647$, $-2147483646$ and so on.\\
+% For a counter value of $-2\,147\,483\,647 = -$MAX and |\addtocounter{<name>}{-1}|s
+% after $-2147483647$ it is printed $-2147483648$, $2147483647$, $2147483646$ and so on
+% (without any message in the \xfile{log} file about any possible issue).
+%
% \subsection{Other packages manipulating \texttt{\textbackslash lastpage at putlabel}}
% 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
-% 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.
+% to place a label |LastPage|.\newline
+% |\lastpage at putlabel| in the \xpackage{lastpage} package was replaced by |\lastpage at putl@bel|,
+% but the |LastPage| label could become defined more than once.
%
-% \subsection{\texttt{\textbackslash pagenumbering\{fnsymbol\}}}
+% \subsection{\texttt{\textbackslash pagenumbering\{fnsymbol\}}\label{subsec:fnsymbol}}
% When using the foot-note-symbols as page numbers,
% it can be necessary to declare in the document's preamble:
% \begin{verbatim}
@@ -570,27 +575,18 @@
% \DeclareTextCommand{\textparagraph}{PD1}{¶}
% \DeclareTextCommand{\textbardbl}{PD1}{‖}
% \end{verbatim}
-% \newpage
%
% \section{Alternatives\label{sec:Alternatives}}
% There are similar packages, which do (or do not) similar things (or even more).
% As I neither know what exactly you want to accomplish when using this package
% (e.\,g.~page number vs. page name, hyperlinks or not), nor what resources
-% you have (e.\,g.~\TeX, \LaTeX2e, $\varepsilon$-\TeX{}, \LaTeX-format as recent
-% as 2022-11-01 or newer), here is a list of some possible alternatives:
-%
-% \DescribeMacro{pageslts}\vspace*{-\baselineskip}
+% your system has (e.\,g.~\TeX, \LaTeX2e, $\varepsilon$-\TeX{}, \LaTeX-format as recent
+% as 2024-06-01 or newer), here is a list of some possible alternatives:
% \begin{description}
-% \item[-]
-% \textbf{Note: The current version 2015/12/21 v1.2f of the \pkg{pageslts} package
-% has not yet been updated to the new hook mechanism. In special cases (for example }%
-% |\pagenumbering{fnsymbol}|\textbf{) the current version of that package combined
-% with a current \LaTeX-format fails. Together with several other packages
-% (small to large, public as well as private, some probably obsolete) it is
-% in the update queue.}\newline
+% \item[-]\DescribeMacro{pageslts}
% The \xpackage{pageslts} package first started as a revision of this
-% \xpackage{lastpage} package, but it became obvious that a replacement was
-% needed to accomplish what the \xpackage{pageslts} package does. For backward
+% \xpackage{lastpage} package, but I~thought that an enhancement was needed
+% to accomplish what the \xpackage{pageslts} package does. For backward
% compatibility, a label named |LastPage| is provided.
% Thus |\usepackage{lastpage}| can be replaced by\newline
% |\usepackage[pagecontinue=false,alphMult=0,AlphMulti=0,|\newline
@@ -601,14 +597,17 @@
% |fnsymbolmult=true,romanMult=true,RomanMulti=true]{pageslts}|.\newline
% Benefits of \xpackage{pageslts} package (with appropriate options) are:
% \begin{description}
-% \item[+] Labels \texttt{LastPage} (|\AtEndDocument|) and\newline
-% \texttt{VeryLastPage} (|\AfterLastShipout|),\newline
-% allowing the user to refer to the (very) last page of a document.
+% \item[+] Labels \texttt{LastPage} (|\AddToHook{enddocument/afterlastpage}|,
+% formerly |\AtEndDocument|; same as the \xpackage{LastPage} package) and
+% \texttt{VeryLastPage} (also |\AddToHook{enddocument/afterlastpage}|,
+% but formerly\newline%
+% |\AfterLastShipout|), allowing the user to refer to the
+% (very) last page of a document.
% \item[+] For example, when more than one page numbering scheme is used,
-% the label \texttt{LastPage}\textbf{s} gives the total \textit{number} of pages.
+% the label \mbox{\texttt{LastPage}\textbf{s}} gives the total \textit{number} of pages.
% \item[+] At the last page of each page numbering scheme a label\newline
% \texttt{pagesLTS.<numbering scheme>} is placed, where
-% \texttt{<numbering scheme>} is e.\,g. arabic, roman, Roman, alph, or Alph.
+% \texttt{<numbering scheme>} is e.\,g.\ arabic, roman, Roman, alph, or Alph.
% For fnsymbol please use |\lastpageref{pagesLTS.fnsymbol}| instead of\newline
% |\pageref{pagesLTS.fnsymbol}|.
% \item[+] When the same numbering scheme is used twice, the page numbers
@@ -619,58 +618,46 @@
% \textit{name} in the current page numbering scheme.
% |\theCurrentPageLocal| gives the current number of pages in the current
% page numbering scheme. |\thepage| and |\theCurrentPageLocal| are different
-% e.\,g. when |\addtocounter{page}{...}| or |\setcounter{page}{...}| were used.
+% e.\,g.\ when |\addtocounter{page}{...}| or |\setcounter{page}{...}| were used.
% \item[+] At the first page of the document a label \texttt{pagesLTS.0} is created.
-% \item[+] The \xpackage{alphalph} package is supported, i.\,e.
+% \item[+] The \xpackage{alphalph} package is supported, i.\,e.\ %
% page numbers alph or Alph $>26$ and fnsymbol $>9$ can be used
% (with according options set). Even zero and negative page numbers can be used
% with \texttt{arabic}, \texttt{alph}, \texttt{Alph}, \texttt{roman}, \texttt{Roman},
% and \texttt{fnsymbol} page numbering (with \xpackage{alphalph} package and
% according options).
-% \item[+] It is checked whether a (very) old \xpackage{endfloat} package
-% is in use. If it is, a warning or even an error message is given,
-% depending on \xpackage{endfloat} version.
-% \item[+] A rerun warning is given, when labels have changed.
% \end{description}
-% Further labels are provided for special cases.
-% \end{description}
+% Further labels are provided for special cases.\\
+% \url{https://ctan.org/pkg/pageslts}
%
-% \DescribeMacro{totpages}\vspace{-\baselineskip}
-% \begin{description}
-% \item[-] The \xpackage{totpages} package provides a \texttt{totpages} label similar to
-% \texttt{LastPages}\newline
-% |\AtEndDocument| (instead of |\AfterLastShipout|, as done by \xpackage{pageslts}).
+% \item[-]\DescribeMacro{LaTeX-kernel}
+% The number of pages is nowadays available via |\@abspage at last|,\linebreak
+% |\thetotalpages|, and |\PreviousTotalPages| from the kernel,
+% but when more than one page numbering scheme is used
+% (for example pages I~to X and then 1~to 10, thus number of pages
+% \hbox{\textquotedblleft 20\textquotedblright ,} but name of the last page
+% \hbox{\textquotedblleft 10\textquotedblright ),}
+% or when or the fnsymbol page numbering scheme is used, or another package
+% has output after this package, or the page numbers exceed a certain range,
+% there might be issues. (Is the total number of pages wanted? Or is the name
+% of the last page sought?)\newline
+% |\the\ReadonlyShipoutCounter| contains the number of currently shipped out pages,
+% i.\,e.\ current page minus one.
+%
+% \item[-]\DescribeMacro{totpages}
+% The \xpackage{totpages} package provides a \texttt{totpages} label similar to
+% \texttt{LastPages}, but |\AtEndDocument| instead of hook |enddocument/afterlastpage|
+% of the \pkg{pageslts} package.
% The \xpackage{totpages} package additionally computes the number of paper sheets
% needed to (double) print the document (with one, two, three,\ldots{} pages on
% one sheet of paper) (which can be achieved also with the \xpackage{papermas} package,
% an extension of the \xpackage{pageslts} package, which further allows to compute
-% the mass of that printed version of the document, useful e.\,g. when sending it
-% by mail to determine the postage).
-% \end{description}
+% the mass of that printed version of the document, useful e.\,g.\ when sending it
+% by mail to determine the postage).\\
+% \url{https://ctan.org/pkg/totpages}
%
-% \DescribeMacro{nofm.sty}\vspace{-\baselineskip}
-% \begin{description}
-% \item[-] \textquotedblleft There is a package \xpackage{nofm.sty} available,
-% but some versions of it are defective, and most don't work with \xpackage{fancyhdr}
-% because they take over the complete page layout.\textquotedblright (\textsc{Piet van %
-% Oostrum}: Page layout in \LaTeX{}, March~2, 2004, section~16; fancyhdr.pdf)\newline
-% \xpackage{nofm} as of 1991/02/25 (without version number), available at\newline
-% \href{https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty}{%
-% https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty}, \linebreak
-% does not work with e.\,g. \xpackage{hyperref}, redefines |\enddocument|
-% as well as |\@oddhead|, |\@evenhead|, |\@oddfoot|, and |\@evenfoot|.\newline
-% If you know the (CTAN) location of a \textbf{working}~(!) version,
-% please send an e-mail to the \xpackage{lastpage} maintainer, thanks!
-% \end{description}
-%
-% \DescribeMacro{count1to}\vspace{-\baselineskip}
-% \begin{description}
-% \item[-] You may want to have a look at the \xpackage{count1to} package.
-% \end{description}
-%
-% \DescribeMacro{totalcount}\vspace{-\baselineskip}
-% \begin{description}
-% \item[-] The \xpackage{totalcount} package provides |\totalpages|.
+% \item[-]\DescribeMacro{totalcount}
+% 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
%
@@ -688,62 +675,66 @@
%
% 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}
+% last page even if \xpackage{hyperref} is used).\\
+% \url{https://ctan.org/pkg/totalcount}
%
-% \DescribeMacro{zref}\vspace{-\baselineskip}
-% \begin{description}
-% \item[-] The \xpackage{zref} package of \textsc{Heiko Oberdiek} requires
-% $\varepsilon$-\TeX{}. \xpackage{lastpageclassic} does not require $\varepsilon$-\TeX{},
-% but if you already have $\varepsilon$-\TeX{} (and use \xpackage{lastpagemodern}),
-% you may also have a look at the extensive \xpackage{zref} package,
-% whether it suits your needs better (or additionally or whatsoever).
-% \end{description}
+% \item[-]\DescribeMacro{totcount}
+% The \xpackage{totcount} package provides the last value of a counter, thus also the value
+% of the \texttt{page} counter. You do not get a hyperlink to the last page, only the numerical
+% value of the last page name is given \mbox{(i.\,e.~X+72} pages gives 72 instead of 82
+% as total number of pages), and the number of pages can be changed for example
+% by |\addtocounter|.\\
+% \url{https://ctan.org/pkg/totcount}
+% \pagebreak
%
-% \DescribeMacro{memoir}\vspace{-\baselineskip}
-% \begin{description}
-% \item[-] The \xpackage{memoir} \emph{class} provides |\thelastpage| (page number printed
-% on last page) and |\thelastsheet| (number of pages).
-% \end{description}
+% \item[-]\DescribeMacro{nofm}
+% \textquotedblleft There is a package \xpackage{nofm.sty} available, but some versions
+% of it are defective, and most don't work with \xpackage{fancyhdr} 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{https://mirror.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 (\url{https://CTAN.org}) location of a
+% \textbf{working}~(!) version, please send me an e-mail, thanks!
%
-% \DescribeMacro{LaTeX-kernel}\vspace{-\baselineskip}
-% \begin{description}
-% \item[-] The number of pages is nowadays available via |\@abspage at last|,
-% |\thetotalpages|, and |\PreviousTotalPages| from the kernel,
-% but when more than one page numbering scheme is used
-% (for example pages I~to X and then 1~to 10, thus number of pages
-% \hbox{\textquotedblleft 20\textquotedblright ,} but name of the last page
-% \hbox{\textquotedblleft 10\textquotedblright ),}
-% or when or the fnsymbol page numbering scheme is used, or another package
-% has output after this package, or the page numbers exceed a certain range,
-% there might be issues. (Is the total number of pages wanted? Or is the name
-% of the last page sought?)
+% \item[-]\DescribeMacro{count1to}
+% The \xpackage{count1to} package \textquotedblleft sets |\count1| to |\count8|
+% with the values of page to subparagraph. |\count9| is used to flag odd
+% pages. \ldots\ [T]he code for the TotalPages
+% label\textquotedblright\ (package manual, 2024-06-13) has been removed
+% from the current package version.\\
+% \url{https://ctan.org/pkg/count1to}
+%
+% \item[-]\DescribeMacro{zref}
+% The \xpackage{zref} package \textquotedblleft implements an extensible referencing
+% system\textquotedblright\ (package manual, 2023-09-14).\\
+% \url{https://ctan.org/pkg/zref}
+%
+% \item[-]\DescribeMacro{memoir}
+% The \xpackage{memoir} \emph{class} provides |\thelastpage| (page number printed
+% on last page) and |\thelastsheet| (number of pages).\\
+% \url{https://ctan.org/pkg/memoir}
% \end{description}
%
% \bigskip
%
% \noindent (You programmed or found another alternative,
-% which is available at \url{CTAN.org}?\newline
-% OK, send an e-mail to me with the name, location at \url{CTAN.org},
+% which is available at\newline
+% \url{https://CTAN.org}?
+% OK, send an e-mail to me with the name, location at CTAN,
% and a short notice, and I will probably include it in the list above.)
-% \smallskip
+% \newpage
%
-% \noindent About how to get those packages, please see subsection~\ref{ss:Downloads}.
-%
% \section{Example}
-%
% \begin{macrocode}
%<*example>
\documentclass[british]{article}[2024/02/08]% v1.4n Standard LaTeX document class
\makeatletter
-\@ifl at t@r\fmtversion{2022/11/01}{%
- \AddToHook{enddocument/afterlastpage}[lastpage]{%
- \message{^^JLaTeX Info: Executing hook `enddocument/afterlastpage'.}}%
-}{\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}%
- }
\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
+\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-10-30]% v7.01k
\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX
\hypersetup{extension=pdf,%
plainpages=false,%
@@ -755,11 +746,11 @@
pdfview=Fit,%
pdfstartview=Fit,%
pdfpagelayout=SinglePage%
-}}{\usepackage{url}[2013/09/16]}% v3.4
-\usepackage{lastpage}[2024/07/07]% v2.1c
-\renewcommand{\@evenfoot}{%
+}}{\usepackage{url}[2013/09/16]}% v3.4 Verb mode for urls, etc.
+\usepackage{lastpage}[2024/11/24]% v2.1d Refers to last page's name (HMM; JPG)]
+\renewcommand{\@evenfoot}{{%
\normalsize\slshape \today\hfil \upshape %
- page \thepage{} of \pageref{LastPage}}
+ page \thepage{} of \pageref{LastPage}}}
\renewcommand{\@oddfoot}{\@evenfoot}
\makeatother
\listfiles
@@ -768,7 +759,7 @@
\section*{Example for lastpage}
\markboth{Example for lastpage}{Example for lastpage}
This example demonstrates the use of package\newline
-\textsf{lastpage}, v2.1c as of 2024-07-07 (HMM; JPG).\newline
+\textsf{lastpage}, v2.1d as of 2024-11-24 (HMM; JPG).\newline
The package takes no options.\newline
For more details please see the documentation!\newline
@@ -850,10 +841,12 @@
\noindent does work (two compilations needed), because \verb|\lastpage at lastpage|
contains the name of the page, \mbox{example:}
\begin{verbatim}
-Page \thepage{} is (not) page \makeatletter\lastpage at lastpage\makeatother.
+Page \thepage{} is (not) page
+\makeatletter\lastpage at lastpage\makeatother.
\end{verbatim}
prints:\newline
-Page \thepage{} is (not) page \makeatletter\lastpage at lastpage\makeatother.
+Page \thepage{} is (not) page
+\makeatletter\lastpage at lastpage\makeatother.
\newline
This can be broken for example by \verb|\pagenumbering{fnsymbol}|
(because then \verb|\edef\here{\thepage}| does not work).
@@ -866,7 +859,7 @@
With modern \LaTeX{} it is possible to say:
\begin{quote}
\begin{verbatim}
-\NeedsTeXFormat{LaTeX2e}[2023-11-01]
+\NeedsTeXFormat{LaTeX2e}[2024-06-01]
\documentclass{article}
\pagenumbering{fnsymbol}
\begin{document}
@@ -904,7 +897,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/07 v2.1c lastpage:|\linebreak
+% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/11/24 v2.1d lastpage:|\linebreak
% | 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}|.)
%
% \begin{macrocode}
@@ -912,7 +905,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/07 v2.1c lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2024/11/24 v2.1d 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,13 +945,14 @@
%<*lastpage2e>
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\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}}{%
+\ProvidesPackage{lastpage2e}[2024/11/24 v2.1d %
+ Decide which 2e lastpage version to use (HMM)]
+\@ifl at t@r\fmtversion{2024/06/01}{\RequirePackage{lastpagemodern}}{%
\RequirePackage{lastpageclassic}}
\message{^^J}
%</lastpage2e>
% \end{macrocode}
+% \newpage
%
% \DescribeMacro{lastpageclassic.sty}
% In case of older \LaTeX-formats \pkg{lastpageclassic.sty} is loaded:
@@ -967,7 +961,7 @@
%<*lastpageclassic>
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpageclassic}[2024/07/07 v2.1c %
+\ProvidesPackage{lastpageclassic}[2024/11/24 v2.1d %
Refers to last page's name (HMM; JPG)]
%% allows for things like "Page \thepage{} of \pageref{LastPage}"
%% to get "Page 7 of 9"
@@ -1031,7 +1025,7 @@
% \end{macrocode}
%
% |\lastpage at putlabel|, used by older versions of this package,
-% is redefined e.\,g. by \xpackage{revtex}, \xpackage{frenchle},
+% 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}
% could also define a label \texttt{LastPage},
@@ -1126,6 +1120,7 @@
% \end{macrocode}
% \end{macro}
+% \newpage
%
% \begin{macro}{\lastpage at putlabelhyper}%
% \indent When \xpackage{hyperref} has been loaded, the label is set with the
@@ -1176,12 +1171,11 @@
% \end{macrocode}
%
% We do not count the pages ourselves, and so they could have been changed by
-% e.\,g. |\pagenumbering{...}|, |\addtocounter{page}{...}|,\newline
+% e.\,g.\ |\pagenumbering{...}|, |\addtocounter{page}{...}|,\newline
% |\setcounter{page}{...}|. Thus the page might have the number one
% while not being the first page at all. Using the \xpackage{everyshi}
% package would help, but this package should not require other packages.
-% The \xpackage{pageslts} package does a better handling, but requires
-% some other packages.\newline
+% The \xpackage{pageslts} package does a better handling.\newline
% We will make a mistake here at most once:
%
% \begin{macrocode}
@@ -1227,7 +1221,6 @@
% \end{macrocode}
% \end{macro}
-% \newpage
%
% \begin{macro}{\lastpage at putlabelNR}
% \indent The \xpackage{nameref} package redefines |\label| to have five arguments
@@ -1284,8 +1277,7 @@
Press Ctrl+Z to exit.\MessageBreak%
But it is OK if the .aux file was already updated\MessageBreak%
by a previous compiler run\MessageBreak%
- and would not have changed anyway.\MessageBreak%
- }%
+ and would not have changed anyway.}%
\fi%
\fi%
}
@@ -1384,8 +1376,8 @@
% \begin{macrocode}
%<*lastpagemodern>
%% Part of the "lastpage" package
-\NeedsTeXFormat{LaTeX2e}[2023-06-01]
-\ProvidesPackage{lastpagemodern}[2024-07-07 v2.1c %
+\NeedsTeXFormat{LaTeX2e}[2024-06-01]
+\ProvidesPackage{lastpagemodern}[2024-11-24 v2.1d %
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";
@@ -1445,21 +1437,23 @@
% if it is associated with the same page.) Therefore we define
%
% \begin{macrocode}
-\AddToHook{begindocument/end}{\gdef\lastpage at putlabel{\relax}}
+\AddToHook{begindocument/end}{%
+ \IfPackageLoadedT{pageslts}{%
+ \PackageNoteNoLine{lastpage}{Packages pageslts and lastpage used.\MessageBreak%
+ lastpage is not necessary when loading pageslts}%
+ }%
+ \gdef\lastpage at putlabel{\relax}%
+ }
% \end{macrocode}
%
-% Because |\lastpage at putlabel| might be (re)defined later, depending on the order
-% in which the packages are loaded, we will do this again at the end of the document.
-%
% \begin{macro}{\protected at iwrite}
% \indent We need an |\immediate\protected at write|. Just |\immediate\write| had led to errors,
% for example when packages like \pkg{babel-greek} re-defined |\roman|\ %
-% (thanks to Ulrike Fischer for the report).
+% (thanks to \textsc{Ulrike Fischer} for the report).
%
% \begin{macrocode}
-%% from https://tex.stackexchange.com/a/12811/542425
-%% with thanks to Prof. Enrico Gregorio
+%% Code provided by Prof. Enrico Gregorio at https://tex.stackexchange.com/a/542425
\long\def\protected at iwrite#1#2#3{%
\begingroup%
#2%
@@ -1478,22 +1472,41 @@
% \begin{macrocode}
\newcommand{\lastpage at makeHy}{%
\gdef\lastpage at Hy{}%
- \IfPackageLoadedTF{hyperref}{%
+ \IfPackageLoadedT{hyperref}{%
\ifHy at pageanchor%
- \@ifundefined{@currentHpage}{%
- \PackageError{lastpage}{%
- Kernel command \string\@currentHpage\space is undefined}{%
- Please contact the lastpage maintainer.}%
% \end{macrocode}
% |\gdef\lastpage at Hy{}|, but that was already done at the beginning of this command.
% \begin{macrocode}
- }{\xdef\lastpage at Hptest{Doc-Start}%
- \ifx\lastpage at Hptest\@currentHpage\relax%
- \gdef\lastpage at Hy{\@currentHpage}%
+ \def\lastpage at Hptest{Doc-Start}%
+ \ifx\lastpage at Hptest\@currentHpage\relax%
+ \gdef\lastpage at Hy{\@currentHpage}%
+ \else%
+ \edef\lastpage at Hptest{\@currentHpage}%
+ \ifx\lastpage at Hptest\empty\relax%
+% \end{macrocode}
+% |\gdef\lastpage at Hy{}|, but that was already done at the beginning of this command.
+% \begin{macrocode}
\else%
- \edef\lastpage at Hptest{\@currentHpage}%
- \ifx\lastpage at Hptest\empty\relax%
+ \def\lastpage at Hptest{page.}%
+ \ifx\lastpage at Hptest\@currentHpage\relax
+ \def\lastpage at Hptest{\csname @fnsymbol\endcsname \c at page }%
+ \ifx\lastpage at Hptest\thepage\relax%
+ \ifnum\value{page}=3\else%
+ \PackageWarningNoLine{lastpage}{You should add a\MessageBreak
+ \string\DeclareTextCommand{...}{PD1}{...}\MessageBreak%
+ (see the lastpage package manual, 3.13 %
+ \string\pagenumbering{fnsymbol})\MessageBreak%
+ to your document's preamble}%
% \end{macrocode}
+% See \autoref{subsec:fnsymbol}: \nameref{subsec:fnsymbol}, page~\pageref{subsec:fnsymbol}.
+% \begin{macrocode}
+ \fi%
+ \fi%
+ \PackageWarningNoLine{lastpage}{%
+ \string\@currentHpage\space is\MessageBreak%
+ just "page." without number,\MessageBreak%
+ \string\lastpage at lastpageHy\space is now let empty}%
+% \end{macrocode}
% |\gdef\lastpage at Hy{}|, but that was already done at the beginning of this command.
% \begin{macrocode}
\else%
@@ -1510,14 +1523,14 @@
\string\@currentHpage\space is\MessageBreak%
\meaning\@currentHpage\MessageBreak%
not beginning with "page.",\MessageBreak%
- \string\lastpage at lastpageHy\space is now let empty.}%
+ \string\lastpage at lastpageHy\space is now let empty}%
\fi%
\fi%
\fi%
- }%
+ \fi%
\fi%
- }{}%
- }%
+ }%
+ }
% \end{macrocode}
% \end{macro}
@@ -1537,41 +1550,34 @@
% |\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.
-% If the \xpackage{pageslts} package is used, this \xpackage{lastpage} package
-% is not needed at all. The \xpackage{LastPage} label would even be defined twice.
-% Thus, if \xpackage{pageslts} is used, here nothing is done.
+% 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 |\pageref{LastPage}| nor |\pageref*{LastPage}|),
+% but without messing with |\pageref| we cannot detect this.)
%
% \begin{macrocode}
\newcommand{\lastpage at putl@bel}{%
- \IfPackageLoadedTF{pageslts}{\relax}{%
+ \IfPackageLoadedT{hyperref}{%
+ \IfPackageAtLeastF{hyperref}{2024-10-30}{%
+ \PackageError{lastpage}{hyperref package version too old}{%
+ required version: 2024-10-30 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}
-% \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|
-% we cannot detect this.)
%
-% \begin{macrocode}
- \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}
-%
% \noindent Since the page has been put out, we are on the page \textit{after} that page.
% We therefore subtract one from the page counter. (For the compiler,
% this is equal to |\advance\c at page\m at ne|, but for human readers of the code
@@ -1578,31 +1584,41 @@
% it is probably easier to understand.)
%
% \begin{macrocode}
- \addtocounter{page}{-1}%
+ \addtocounter{page}{-1}%
% \end{macrocode}
%
+% If the \xpackage{pageslts} package is used, this \xpackage{lastpage} package
+% is not needed at all. The \xpackage{LastPage} label would even be defined twice.
+% Thus, if \xpackage{pageslts} is used, here nothing is done.
+%
+% \begin{macrocode}
+ \IfPackageLoadedTF{pageslts}{% then pageslts writes the label for "LastPage".
+% \end{macrocode}
+%
% \noindent Simply using |\label| for \texttt{LastPage} would not work,
% because labels wait for the output routines to work, and there
% 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}
- \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\newlabel{LastPage}{%
+ {\@currentlabel}{\thepage}{\@currentlabelname}%
+ {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\@currentHpage\fi%
+ }{\@currentHref}}%
+ {\@kernel at reserved@label at data}}%
}%
+ }%
% \end{macrocode}
% \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}}%
- \lastpage at makeHy%
- \protected at iwrite\@auxout{}{%
- \string\gdef\string\lastpage at lastpageHy{\lastpage at Hy}}%
+ \protected at iwrite\@auxout{}{%
+ \string\gdef\string\lastpage at lastpage{\thepage}}%
+ \lastpage at makeHy%
+ \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,
@@ -1609,14 +1625,13 @@
% since there might be other things still to be done.
%
% \begin{macrocode}
- \addtocounter{page}{+1}%
- \endgroup%
- }%
+ \addtocounter{page}{+1}%
+ \endgroup%
}
% \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
@@ -1684,14 +1699,12 @@
%
% \begin{macrocode}
\AddToHook{enddocument/afterlastpage}{%
- \IfPackageLoadedTF{pageslts}{\relax}{%
- \gdef\lastpage at putlabel{??}%
- \ifx\lastpage at lastpage\lastpage at putlabel\relax%
- \AddToHook{enddocument/info}{%
- \PackageWarning{lastpage}{Rerun to get the references right}%
- }%
- \fi%
- }%
+ \gdef\lastpage at putlabel{??}%
+ \ifx\lastpage at lastpage\lastpage at putlabel\relax%
+ \AddToHook{enddocument/info}{%
+ \PackageWarning{lastpage}{Rerun to get the references right}%
+ }%
+ \fi%
\gdef\lastpage at putlabel{\relax}%
% \end{macrocode}
%
@@ -1705,7 +1718,7 @@
% We put in a |\message| to show, in what order things (which were called) are done.
%
% \begin{macrocode}
- \message{^^Jenddocument/afterlastpage: lastpage setting LastPage.^^J}%
+ \message{^^Jenddocument/afterlastpage (AED): lastpage setting LastPage.^^J}%
\IfPackageLoadedTF{french}{%
\addtocounter{page}{+1}\lastpage at putl@bel\addtocounter{page}{-1}%
}{\IfPackageLoadedTF{frenchle}{%
@@ -1722,10 +1735,8 @@
% (if \xpackage{hyperref} has been loaded) |\lastpage at fileswtestHy|.
%
% \begin{macrocode}
- \IfPackageLoadedTF{pageslts}{\relax}{%
- \lastpage at fileswtest{\thepage}{\lastpage at lastpage}%
- \IfPackageLoadedTF{hyperref}{\lastpage at fileswtestHy}{\relax}%
- }%
+ \lastpage at fileswtest{\thepage}{\lastpage at lastpage}%
+ \IfPackageLoadedT{hyperref}{\lastpage at fileswtestHy}%
\fi%
}
%</lastpagemodern>
@@ -1750,45 +1761,45 @@
% \end{description}
%
% \DescribeMacro{lastpage.sty}
-% The |lastpage.sty| (i.\,e. each document using the \xpackage{lastpage} package)
+% The |lastpage.sty| (i.\,e.\ each document using the \xpackage{lastpage} package)
% requires:
% \begin{description}
% \item[-] \TeX, \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
+% \item[-] package \xpackage{lastpage}, 2024-11-24, v2.1d,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
%
% \DescribeMacro{lastpage209.sty}
-% The |lastpage209.sty| for \LaTeX2.09{} (i.\,e. each document using
+% The |lastpage209.sty| for \LaTeX2.09{} (i.\,e.\ each document using
% the \xpackage{lastpage209} package) requires:
% \begin{description}
% \item[-] \TeX-format \LaTeX{}, v2.09
%
-% \item[-] package \xpackage{lastpage209}, 2024-07-07, v2.1c,
+% \item[-] package \xpackage{lastpage209}, 2024-11-24, v2.1d,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.\smallskip
%
% \DescribeMacro{lastpage2e.sty}
-% The |lastpage2e.sty| for \LaTeXe{} (i.\,e. each document using
+% The |lastpage2e.sty| for \LaTeXe{} (i.\,e.\ each document using
% the \xpackage{lastpage2e} package) requires:
% \begin{description}
% \item[-] \TeX-format \LaTeXe{} 1994/12/01 or newer,
% \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
+% \item[-] package \xpackage{lastpage}, 2024-11-24, v2.1d,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
%
% \DescribeMacro{lastpageclassic.sty}
-% The |lastpageclassic.sty| for \LaTeXe{} (i.\,e. each document using
+% 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 2023-05-31,\newline
+% \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2024-05-31,\newline
% \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
+% \item[-] package \xpackage{lastpage}, 2024-11-24, v2.1d,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and can use
@@ -1799,19 +1810,19 @@
% \end{description}
%
% \DescribeMacro{lastpagemodern.sty}
-% The |lastpagemodern.sty| for \LaTeXe{} (i.\,e. each document using
+% The |lastpagemodern.sty| for \LaTeXe{} (i.\,e.\ each document using
% the \xpackage{lastpagemodern} package) requires:
% \begin{description}
-% \item[-] \TeX-format \LaTeXe{} 2023-06-01 or newer,\newline
+% \item[-] \TeX-format \LaTeXe{} 2024-06-01 or newer,\newline
% \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
+% \item[-] package \xpackage{lastpage}, 2024-11-24, v2.1d,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and can use
% \begin{description}
-% \item[-] package \xpackage{hyperref}, 2023-11-07 and newer
-% (tested with: 2024-05-23, v7.01i),
+% \item[-] package \xpackage{hyperref}, probably 2023-11-07 and newer
+% (tested with: 2024-10-30 v7.01k),
% \url{https://ctan.org/pkg/hyperref}
% \end{description}
% \pagebreak
@@ -1820,7 +1831,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-07, v2.1c,
+% \item[-] package \xpackage{lastpage}, 2024-11-24, v2.1d,
% \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
@@ -1834,89 +1845,10 @@
% \item[-] package \xpackage{showkeys}, 2024-05-23, v3.21,
% \url{https://ctan.org/pkg/showkeys}
%
-% \item[-] package \xpackage{hyperref}, 2024-05-23, v7.01i,
+% \item[-] package \xpackage{hyperref}, 2024-10-30, v7.01k,
% \url{https://ctan.org/pkg/hyperref}
% \end{description}
%
-% \DescribeMacro{endfloat}
-% The \xpackage{endfloat} package is not required, but because
-% the \xpackage{lastpage} package is incompatible with \textit{ancient} versions
-% of the \xpackage{endfloat} package (see subsection~\ref{sec:endfloat}),
-% here the recent one (at the time of writing this documentation) is listed:
-% \begin{description}
-% \item[-] package \xpackage{endfloat}, 2019/04/15, v2.7,
-% \url{https://ctan.org/pkg/endfloat}
-% \end{description}
-%
-% \DescribeMacro{fancyhdr}
-% \DescribeMacro{nccfancyhdr}
-% Neither the \xpackage{fancyhdr} nor the \xpackage{nccfancyhdr} package is required
-% (older versions of the \xpackage{lastpage} package used its predecessor
-% \xpackage{fancyheadings}), but because they were mentioned, also they are listed
-% here:
-% \begin{description}
-% \item[-] package \xpackage{fancyhdr}, 2024/04/23, v4.2,
-% \url{https://ctan.org/pkg/fancyhdr}
-%
-% \item[-] package \xpackage{nccfancyhdr}, 2004/12/07, v1.1,
-% \url{https://ctan.org/pkg/nccfancyhdr}
-% \end{description}
-%
-% \DescribeMacro{count1to}
-% \DescribeMacro{nofm}
-% \DescribeMacro{totpages}
-% \DescribeMacro{lastpage}
-% \DescribeMacro{totalcount}
-% \DescribeMacro{zref}
-% \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}, 2015/12/21, v1.2f,
-% \url{https://ctan.org/pkg/pageslts}
-%
-% \item[-] package \xpackage{papermas}, 2023-04-12, v1.1a; the \xpackage{papermas}
-% package can be considered as kind of add-on to the \xpackage{pageslts} package.\newline
-% \url{https://ctan.org/pkg/papermas}
-%
-% \item[-] package \xpackage{count1to}, 2009/05/24, v2.1,
-% \url{https://ctan.org/pkg/count1to}
-%
-% \item[-] package \xpackage{nofm}, 1991/02/25,
-% \href{https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty}{%
-% https://mirror.ctan.org/obsolete/macros/latex209/}%
-% \href{https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty}{%
-% contrib/misc/nofm.sty},
-% does not work with e.\,g. \xpackage{hyperref}
-%
-% \item[-] package \xpackage{totpages}, 2005/09/19, v2.00,
-% \url{https://ctan.org/pkg/totpages}
-%
-% \item[-] package \xpackage{totalcount}, 2018/01/21, v1.0a,
-% \url{https://ctan.org/pkg/totalcount}
-%
-% \item[-] package \xpackage{zref}, 2023-09-14, v2.35,
-% \url{https://ctan.org/pkg/zref}
-%
-% \item[-] class \xpackage{memoir}, 2024-01-26, v3.8.2,
-% \url{https://ctan.org/pkg/memoir}.
-% \end{description}
-%
-% \DescribeMacro{Oberdiek}
-% \DescribeMacro{holtxdoc}
-% \DescribeMacro{zref}
-% All packages of the `oberdiek' bundle
-% (especially \xpackage{holtxdoc} and \xpackage{zref})
-% are also available in a TDS compliant ZIP archive:\newline
-% \url{https://mirror.ctan.org/install/macros/latex/contrib/oberdiek.tds.zip}.\newline
-% It is probably best to download and use this, because the packages in there
-% are quite probably both recent and compatible among themselves.\par
-%
-% \DescribeMacro{hyperref}
-% \noindent \xpackage{hyperref} is not included in that bundle and needs to be
-% downloaded separately,\newline
-% \url{https://mirror.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.\par
-%
% \DescribeMacro{Münch}
% A hyperlinked list of my (other) packages can be found at\newline
% \url{https://ctan.org/author/muench-hm}.
@@ -1936,7 +1868,7 @@
% There is also a |lastpage.tds.zip| available:
% \begin{description}
% \item[\url{https://mirror.ctan.org/install/macros/latex/contrib/lastpage.tds.zip}]\hspace*{0.1cm}
-% Everything in TDS compliant, compiled format
+% Everything in TDS compliant, compiled format.
% \end{description}
% which additionally contains\\
% \begin{tabular}{ll}
@@ -1956,7 +1888,7 @@
%
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
% \docstrip{} archive. The files are extracted by running the
-% \xext{.dtx} through \plainTeX{}:
+% \xext{.dtx} through \plainTeX :
% \begin{quote}
% \verb|tex lastpage.dtx|
% \end{quote}
@@ -2041,7 +1973,7 @@
% \end{quote}
% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
% TDS installing feature, then some files can already be in the right
-% place, see the documentation of \docstrip{}.
+% place, see the documentation of \docstrip.
%
% \subsection{Refresh file name databases}
% If your \TeX~distribution (\TeX\,Live, \mikTeX, \dots) relies on
@@ -2052,11 +1984,11 @@
% \paragraph{Unpacking with \LaTeX.}
% The \xfile{.dtx} chooses its action depending on the format:
% \begin{description}
-% \item[\plainTeX:] Run \docstrip{} and extract the files.
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
% \item[\LaTeX:] Generate the documentation.
% \end{description}
-% If you insist on using \LaTeX{} for \docstrip{} (really,
-% \docstrip{} does not need \LaTeX ), then inform the autodetect routine
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX ), then inform the autodetect routine
% about your intention:
% \begin{quote}
% \verb|latex \let\install=y\input{lastpage.dtx}|
@@ -2096,7 +2028,7 @@
% \section{Acknowledgements}
%
% I (\textsc{H.-Martin Münch}) would like to thank
-% \textsc{Jeffrey P. Goldberg} (jeffrey+news at goldmark dot org) for
+% \textsc{Jeffrey P. Goldberg} \mbox{(jeffrey+}\allowbreak news at goldmark dot org) for
% 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
@@ -2139,7 +2071,7 @@
% \end{Version}
% \begin{Version}{2010/02/18 v1.1}
% \item Proposed |LastPages| label by \textsc{H.-Martin Münch}
-% on \Newsgroup{comp.text.tex}, see e.\,g.
+% on \Newsgroup{comp.text.tex}, see e.\,g.\ %
% \url{https://groups.google.com/g/comp.text.tex/c/Ad8pO2Rw_HY/m/8EfHqT1JB0QJ};
% now available in the \xpackage{pageslts} package.
% \end{Version}
@@ -2179,7 +2111,8 @@
% checked for the |\hyperref| command, in case \xpackage{hyperref} was not
% loaded at |\begin{document}| yet. (Bug reported by \textsc{Sebastian Bank},
% thanks!)\newline
-% [\pkg{lastpagemodern.sty} just uses |\IfPackageLoadedTF{hyperref}|.]
+% [\pkg{lastpagemodern.sty} just uses |\IfPackageLoadedT{hyperref}| and
+% |\IfPackageLoadedTF{hyperref}|.]
% \item Changed the |\unit| definition (got rid of an old |\rm|). [Removed in v2.0a.]
% \item Changed |\lastpage at puthyperlabel| to |\lastpage at putlabelhyper| analogous to
% |\pagesLTS at putlabelhyper| of the \xpackage{pageslts} package.
@@ -2308,8 +2241,17 @@
% \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.|.
+% |\@currentHpage| to begin with \mbox{\textquotedblleft |page.|\textquotedblright .}
% \end{Version}
+% \begin{Version}{2024-11-24 v2.1d}
+% \item The \xpackage{pageslts} package has been repaired, thus here the warnings are removed.
+% \item Several small changes in documentation and |lastpagemodern.sty| because of the updates
+% of \LaTeX-format (to 2024-06-01), \xpackage{hyperref} package (to 2024-10-30, v7.01k),
+% and \xpackage{pageslts} package (to 2024-11-20, v2.0a).
+% \item Added a warning message about missing |\DeclareTextCommand{...}{PD1}{...}|
+% (cf.~\autoref{subsec:fnsymbol}: \nameref{subsec:fnsymbol}, page~\pageref{subsec:fnsymbol}).
+% \item Documentation section about alternatives rewritten.
+% \end{Version}
% \end{History}
% \bigskip
%
@@ -2316,8 +2258,6 @@
% When you find a mistake or have a suggestion for an improvement of this package,
% please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.)
% \newpage
-%
% \PrintIndex
-%
% \Finale
\endinput
\ No newline at end of file
Modified: trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins 2024-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/source/latex/lastpage/lastpage.ins 2024-12-01 21:52:10 UTC (rev 73014)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-07-07 v2.1c
+%% Version: 2024-11-24 v2.1d
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -31,7 +31,7 @@
%% The Current Maintainer of this work is H.-Martin Muench.
%%
%% This package was invented by Jeffrey P. Goldberg.
-%% I thought that a replacement was needed and therefore created the pageslts package,
+%% I thought that an enhancement 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.
@@ -59,7 +59,7 @@
\input docstrip.tex
\Msg{**********************************************************************}
\Msg{* Installation *}
-\Msg{* Package: lastpage 2024-07-07 v2.1c Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2024-11-24 v2.1d Refers to last page's name (HMM)*}
\Msg{**********************************************************************}
\keepsilent
@@ -71,7 +71,7 @@
This is a generated file.
Project: lastpage
-Version: 2024-07-07 v2.1c
+Version: 2024-11-24 v2.1d
Info: Refers to last page's name
Copyright (C) 2010 - 2024 by
@@ -93,7 +93,7 @@
The Current Maintainer of this work is H.-Martin Muench.
This package was invented by Jeffrey P. Goldberg.
-I thought that a replacement was needed and therefore created the pageslts package,
+I thought that an enhancement 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.
Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty 2024-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage.sty 2024-12-01 21:52:10 UTC (rev 73014)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-07-07 v2.1c
+%% Version: 2024-11-24 v2.1d
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -31,7 +31,7 @@
%% The Current Maintainer of this work is H.-Martin Muench.
%%
%% This package was invented by Jeffrey P. Goldberg.
-%% I thought that a replacement was needed and therefore created the pageslts package,
+%% I thought that an enhancement 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.
@@ -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/07 v2.1c lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2024/11/24 v2.1d 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-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty 2024-12-01 21:52:10 UTC (rev 73014)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-07-07 v2.1c
+%% Version: 2024-11-24 v2.1d
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -31,7 +31,7 @@
%% The Current Maintainer of this work is H.-Martin Muench.
%%
%% This package was invented by Jeffrey P. Goldberg.
-%% I thought that a replacement was needed and therefore created the pageslts package,
+%% I thought that an enhancement 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.
Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty 2024-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty 2024-12-01 21:52:10 UTC (rev 73014)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-07-07 v2.1c
+%% Version: 2024-11-24 v2.1d
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -31,7 +31,7 @@
%% The Current Maintainer of this work is H.-Martin Muench.
%%
%% This package was invented by Jeffrey P. Goldberg.
-%% I thought that a replacement was needed and therefore created the pageslts package,
+%% I thought that an enhancement 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.
@@ -58,9 +58,9 @@
%%
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\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}}{%
+\ProvidesPackage{lastpage2e}[2024/11/24 v2.1d %
+ Decide which 2e lastpage version to use (HMM)]
+\@ifl at t@r\fmtversion{2024/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-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty 2024-12-01 21:52:10 UTC (rev 73014)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-07-07 v2.1c
+%% Version: 2024-11-24 v2.1d
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -31,7 +31,7 @@
%% The Current Maintainer of this work is H.-Martin Muench.
%%
%% This package was invented by Jeffrey P. Goldberg.
-%% I thought that a replacement was needed and therefore created the pageslts package,
+%% I thought that an enhancement 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.
@@ -58,7 +58,7 @@
%%
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpageclassic}[2024/07/07 v2.1c %
+\ProvidesPackage{lastpageclassic}[2024/11/24 v2.1d %
Refers to last page's name (HMM; JPG)]
%% allows for things like "Page \thepage{} of \pageref{LastPage}"
%% to get "Page 7 of 9"
@@ -197,8 +197,7 @@
Press Ctrl+Z to exit.\MessageBreak%
But it is OK if the .aux file was already updated\MessageBreak%
by a previous compiler run\MessageBreak%
- and would not have changed anyway.\MessageBreak%
- }%
+ and would not have changed anyway.}%
\fi%
\fi%
}
Modified: trunk/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty 2024-12-01 21:24:58 UTC (rev 73013)
+++ trunk/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty 2024-12-01 21:52:10 UTC (rev 73014)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-07-07 v2.1c
+%% Version: 2024-11-24 v2.1d
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -31,7 +31,7 @@
%% The Current Maintainer of this work is H.-Martin Muench.
%%
%% This package was invented by Jeffrey P. Goldberg.
-%% I thought that a replacement was needed and therefore created the pageslts package,
+%% I thought that an enhancement 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.
@@ -57,8 +57,8 @@
%% Hans-Klaus Muench + 2014-08-24
%%
%% Part of the "lastpage" package
-\NeedsTeXFormat{LaTeX2e}[2023-06-01]
-\ProvidesPackage{lastpagemodern}[2024-07-07 v2.1c %
+\NeedsTeXFormat{LaTeX2e}[2024-06-01]
+\ProvidesPackage{lastpagemodern}[2024-11-24 v2.1d %
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";
@@ -79,10 +79,15 @@
\else#2% is numeric
\fi}
-\AddToHook{begindocument/end}{\gdef\lastpage at putlabel{\relax}}
+\AddToHook{begindocument/end}{%
+ \IfPackageLoadedT{pageslts}{%
+ \PackageNoteNoLine{lastpage}{Packages pageslts and lastpage used.\MessageBreak%
+ lastpage is not necessary when loading pageslts}%
+ }%
+ \gdef\lastpage at putlabel{\relax}%
+ }
-%% from https://tex.stackexchange.com/a/12811/542425
-%% with thanks to Prof. Enrico Gregorio
+%% Code provided by Prof. Enrico Gregorio at https://tex.stackexchange.com/a/542425
\long\def\protected at iwrite#1#2#3{%
\begingroup%
#2%
@@ -95,18 +100,31 @@
\newcommand{\lastpage at makeHy}{%
\gdef\lastpage at Hy{}%
- \IfPackageLoadedTF{hyperref}{%
+ \IfPackageLoadedT{hyperref}{%
\ifHy at pageanchor%
- \@ifundefined{@currentHpage}{%
- \PackageError{lastpage}{%
- Kernel command \string\@currentHpage\space is undefined}{%
- Please contact the lastpage maintainer.}%
- }{\xdef\lastpage at Hptest{Doc-Start}%
- \ifx\lastpage at Hptest\@currentHpage\relax%
- \gdef\lastpage at Hy{\@currentHpage}%
+ \def\lastpage at Hptest{Doc-Start}%
+ \ifx\lastpage at Hptest\@currentHpage\relax%
+ \gdef\lastpage at Hy{\@currentHpage}%
+ \else%
+ \edef\lastpage at Hptest{\@currentHpage}%
+ \ifx\lastpage at Hptest\empty\relax%
\else%
- \edef\lastpage at Hptest{\@currentHpage}%
- \ifx\lastpage at Hptest\empty\relax%
+ \def\lastpage at Hptest{page.}%
+ \ifx\lastpage at Hptest\@currentHpage\relax
+ \def\lastpage at Hptest{\csname @fnsymbol\endcsname \c at page }%
+ \ifx\lastpage at Hptest\thepage\relax%
+ \ifnum\value{page}=3\else%
+ \PackageWarningNoLine{lastpage}{You should add a\MessageBreak
+ \string\DeclareTextCommand{...}{PD1}{...}\MessageBreak%
+ (see the lastpage package manual, 3.13 %
+ \string\pagenumbering{fnsymbol})\MessageBreak%
+ to your document's preamble}%
+ \fi%
+ \fi%
+ \PackageWarningNoLine{lastpage}{%
+ \string\@currentHpage\space is\MessageBreak%
+ just "page." without number,\MessageBreak%
+ \string\lastpage at lastpageHy\space is now let empty}%
\else%
\gdef\lastpage at Hy{\lastpage at rmpage{\@currentHpage}}%
\ifx\lastpage at lastpageHy\empty\relax%
@@ -114,14 +132,14 @@
\string\@currentHpage\space is\MessageBreak%
\meaning\@currentHpage\MessageBreak%
not beginning with "page.",\MessageBreak%
- \string\lastpage at lastpageHy\space is now let empty.}%
+ \string\lastpage at lastpageHy\space is now let empty}%
\fi%
\fi%
\fi%
- }%
+ \fi%
\fi%
- }{}%
- }%
+ }%
+ }
%% Code provided by David Carlisle at https://tex.stackexchange.com/a/721877
\def\lastpage at rmpage#1{%
@@ -132,38 +150,38 @@
\fi}
\newcommand{\lastpage at putl@bel}{%
- \IfPackageLoadedTF{pageslts}{\relax}{%
- \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}%
- \protected at iwrite\@auxout{}{\string\newlabel{LastPage}{%
- {\@currentlabel}{\thepage}{\@currentlabelname}%
- {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\@currentHpage\fi%
- }{\@currentHref}}%
- {\@kernel at reserved@label at data}}%
+ \IfPackageLoadedT{hyperref}{%
+ \IfPackageAtLeastF{hyperref}{2024-10-30}{%
+ \PackageError{lastpage}{hyperref package version too old}{%
+ required version: 2024-10-30 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{pageslts}{% then pageslts writes the label for "LastPage".
+ }{\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}}%
- \lastpage at makeHy%
- \protected at iwrite\@auxout{}{%
- \string\gdef\string\lastpage at lastpageHy{\lastpage at Hy}}%
- \addtocounter{page}{+1}%
- \endgroup%
- }%
+ }%
+ \protected at iwrite\@auxout{}{%
+ \string\gdef\string\lastpage at lastpage{\thepage}}%
+ \lastpage at makeHy%
+ \protected at iwrite\@auxout{}{%
+ \string\gdef\string\lastpage at lastpageHy{\lastpage at Hy}}%
+ \addtocounter{page}{+1}%
+ \endgroup%
}
\newcommand{\lastpage at fileswtest}[2]{%
@@ -201,17 +219,15 @@
}
\AddToHook{enddocument/afterlastpage}{%
- \IfPackageLoadedTF{pageslts}{\relax}{%
- \gdef\lastpage at putlabel{??}%
- \ifx\lastpage at lastpage\lastpage at putlabel\relax%
- \AddToHook{enddocument/info}{%
- \PackageWarning{lastpage}{Rerun to get the references right}%
- }%
- \fi%
- }%
+ \gdef\lastpage at putlabel{??}%
+ \ifx\lastpage at lastpage\lastpage at putlabel\relax%
+ \AddToHook{enddocument/info}{%
+ \PackageWarning{lastpage}{Rerun to get the references right}%
+ }%
+ \fi%
\gdef\lastpage at putlabel{\relax}%
\if at filesw%
- \message{^^Jenddocument/afterlastpage: lastpage setting LastPage.^^J}%
+ \message{^^Jenddocument/afterlastpage (AED): lastpage setting LastPage.^^J}%
\IfPackageLoadedTF{french}{%
\addtocounter{page}{+1}\lastpage at putl@bel\addtocounter{page}{-1}%
}{\IfPackageLoadedTF{frenchle}{%
@@ -220,10 +236,8 @@
}%
}%
\else%
- \IfPackageLoadedTF{pageslts}{\relax}{%
- \lastpage at fileswtest{\thepage}{\lastpage at lastpage}%
- \IfPackageLoadedTF{hyperref}{\lastpage at fileswtestHy}{\relax}%
- }%
+ \lastpage at fileswtest{\thepage}{\lastpage at lastpage}%
+ \IfPackageLoadedT{hyperref}{\lastpage at fileswtestHy}%
\fi%
}
\endinput
More information about the tex-live-commits
mailing list.