summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-11-20 21:15:48 +0000
committerKarl Berry <karl@freefriends.org>2024-11-20 21:15:48 +0000
commitcb9bac7dfea30235b60a21f37400d0991daca15b (patch)
tree3a3c482e5abb5923c04c81a57f79f0178c0b77ab
parent0cdaa9c2b893971cf96c9a3431bfa37843e0cb9c (diff)
pageslts (20nov24)
git-svn-id: svn://tug.org/texlive/trunk@72912 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/pageslts/README134
-rw-r--r--Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdfbin323567 -> 305189 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex282
-rw-r--r--Master/texmf-dist/doc/latex/pageslts/pageslts.pdfbin619343 -> 576094 bytes
-rw-r--r--Master/texmf-dist/source/latex/pageslts/pageslts.drv52
-rw-r--r--Master/texmf-dist/source/latex/pageslts/pageslts.dtx3578
-rw-r--r--Master/texmf-dist/source/latex/pageslts/pageslts.ins60
-rw-r--r--Master/texmf-dist/tex/latex/pageslts/pageslts.sty1035
8 files changed, 1897 insertions, 3244 deletions
diff --git a/Master/texmf-dist/doc/latex/pageslts/README b/Master/texmf-dist/doc/latex/pageslts/README
index 996d076901c..e5fc3d73302 100644
--- a/Master/texmf-dist/doc/latex/pageslts/README
+++ b/Master/texmf-dist/doc/latex/pageslts/README
@@ -1,4 +1,4 @@
-README for pageslts package, 2015/12/21, v1.2f
+README for pageslts package, 2024-11-20, v2.0a
TABLE OF CONTENTS
@@ -17,11 +17,14 @@ TABLE OF CONTENTS
1 INTRODUCTION
==============
-This package puts the labels LastPage (\AtEndDocument) and
-VeryLastPage (\AfterLastShipout) into the .aux file,
-allowing the user to refer to the (very) last page of a
-document. This might be particularly useful in places like
-headers or footers.
+This package puts the labels LastPage
+(\AddToHook{enddocument/afterlastpage}, formerly
+\AtEndDocument) and VeryLastPage (also
+\AddToHook{enddocument/afterlastpage}, but formerly
+\AfterLastShipout) into the .aux file,
+allowing the user to refer to the last page of a document.
+This might be particularly useful in places like headers or
+footers.
When more than one page numbering scheme is used, these
references do not give the total number of pages. For this
case the label LastPages is introduced. Additionally, at the
@@ -39,7 +42,7 @@ the current total/absolute page number - in contrast to
numbering scheme. \theCurrentPageLocal gives the current
number of pages in the current page numbering scheme.
\thepage and \theCurrentPageLocal are different e. g. when
-\addtocounter{pageg}{...} or \setcounter{page}{...} were
+\addtocounter{page}{...} or \setcounter{page}{...} were
used.
At the first page of the document a label pagesLTS.0 is
created. This label can be referred to, too. Further labels
@@ -58,27 +61,27 @@ may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
This version of this license is in
-http://www.latex-project.org/lppl/lppl-1-3c.txt
+https://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
-http://www.latex-project.org/lppl.txt
-and version 1.3c or later is part of all distributions
-of LaTeX version 2005/12/01 or later.
+https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of
+LaTeX version 2005-12-01 or later.
2 DOWNLOAD
==========
-`pageslts' is available on CTAN:
-https://www.ctan.org/pkg/pageslts
+"pageslts" is available on CTAN:
+https://ctan.org/pkg/pageslts
Also a ZIP file is provided that contains the files:
the manual (pageslts.pdf), the example (pageslts-example.tex),
-the compiled example (pageslts-example.pdf),
+the compiled example (pageslts-example.pdf),
driver (pageslts.drv), pageslts.dtx,
-installation file (pageslts.ins),
+installation file (pageslts.ins),
the style file (pageslts.sty),
and this README, already sorted in a TDS tree:
-http://mirrors.ctan.org/install/macros/latex/contrib/pageslts.tds.zip
+https://mirror.ctan.org/install/macros/latex/contrib/pageslts.tds.zip
3 INSTALLATION
@@ -86,10 +89,10 @@ http://mirrors.ctan.org/install/macros/latex/contrib/pageslts.tds.zip
Installation with ZIP file in TDS format
----------------------------------------
-The ZIP file `pageslts.tds.zip' contains the files
+The ZIP file "pageslts.tds.zip" contains the files
sorted in a TDS tree. Thus you can directly unpack the
ZIP file inside a TDS tree.
-See https://www.ctan.org/TDS-guidelines for an explanation
+See https://ctan.org/TDS-guidelines for an explanation
of TDS.
Example:
cd /...somewhere.../texmf
@@ -106,11 +109,11 @@ a) Download the pageslts files from CTAN.
b) Check for old `pagesLTS.sty' at other locations in your
TeX installation and delete them (or back them up,
but in a way TeX does NOT find them automatically).
-c) Generate the package and driver files:
+c) Generate the package and driver files, if necessary:
tex pageslts.dtx
-d) Install the file `pageslts.sty' in your TDS tree:
+d) Install the file "pageslts.sty" in your TDS tree:
cp pageslts.sty TDS:tex/latex/pageslts/
- Replace `TDS:' by the prefix of your TDS tree
+ Replace "TDS:" by the prefix of your TDS tree
(texmf directory).
e) Create the documentation, if necessary, e.g.
pdflatex pageslts.dtx
@@ -118,8 +121,8 @@ e) Create the documentation, if necessary, e.g.
pdflatex pageslts.dtx
makeindex -s gind.ist pageslts.idx
pdflatex pageslts.dtx
-f) Update the databases, if necessary, e.g. for teTeX:
- mktexlsr .../texmf
+f) Update the databases, if necessary, e.g. for TeXLive
+ texhash or mktexlsr.
g) Create the pageslts-example.pdf, if necessary, e.g.
pdflatex pageslts-example.tex
pdflatex pageslts-example.tex
@@ -133,64 +136,50 @@ h) Copy the documentation files to
4 ADDITIONAL PACKAGES
=====================
-The pageslts.sty for LaTeX2e (i. e. all documents using the
+The pageslts.sty for LaTeX2e (i.e. all documents using the
pageslts package) requires:
-- TeXFormat LaTeX2e, 2015/01/01
-- package atveryend, 2011/06/30, v1.8, https://www.ctan.org/pkg/atveryend
-- package everyshi, 2001/05/15, v3.00, https://www.ctan.org/pkg/everyshi
-- package kvoptions, 2011/06/30, v3.11, https://www.ctan.org/pkg/kvoptions
-- package letltxmacro, 2010/09/02, v1.4, https://www.ctan.org/pkg/letltxmacro
-- package ltxcmds, 2011/11/09, v1.22, https://www.ctan.org/pkg/ltxcmds
-- package rerunfilecheck, 2011/04/15, v1.7, https://www.ctan.org/pkg/rerunfilecheck
-- package undolabl, 2015/03/29, v1.0l, https://www.ctan.org/pkg/undolabl
+- TeXFormat LaTeX2e, 2024-06-01
+- package undolabl, 2023-02-14, v1.0m, https://ctan.org/pkg/undolabl
+- package kvoptions, 2022-06-15, v3.15, https://ctan.org/pkg/kvoptions
+- if any of the options alphMult, AlphMulti, or fnsymbolmult is used:
+ package alphalph, 2019/12/09, v2.6, https://.ctan.org/pkg/alphalph
The pageslts-example.tex requires the same files as all
documents using the pageslts package, and additionally:
-- class article, 2014/09/29, v1.4h, from classes.dtx: https://www.ctan.org/pkg/classes
-- package alphalph, 2011/05/13, v2.4, https://www.ctan.org/pkg/alphalph
-- package lipsum, 2014/07/27, v1.3, https://www.ctan.org/pkg/lipsum
-- package showkeys, 2014/10/28, v3.17, https://www.ctan.org/pkg/showkeys
-- package hyperref, 2012/11/06, v6.83m, https://www.ctan.org/pkg/hyperref
-- package pageslts, 2015/12/21, v1.2f, https://www.ctan.org/pkg/pageslts
- (Well, it is the example file for this package, and
- because you are reading the README for the pageslts
- package, it can be assumed that you already have some
- version of it - is it the current one?)
-which again load other packages
-(see the result of the \listfiles command in the log-file
- of the example).
-Also the pageslts.dtx loads other packages
-(for unpacking and constructing the documentation),
+- class article, 2024/02/08, v1.4n, from classes.dtx: https://ctan.org/pkg/classes
+- package alphalph, 2019/12/09, v2.6, https://ctan.org/pkg/alphalph
+- package lipsum, 2021-09-20, v2.7, https://ctan.org/pkg/lipsum
+- package showkeys, 2024/05/23, v3.21, https://ctan.org/pkg/showkeys
+- package hyperref, 2024-10-30, v7.01k, https://ctan.org/pkg/hyperref
+- package pageslts, 2015/12/21, v2.0a, https://ctan.org/pkg/pageslts
+ (Well, it is the example file for this package, and because you are
+ reading the README for the pageslts package, it can be assumed that
+ you already have some version of it - is it the current one?)
+which again load other packages (see the result of the
+\listfiles command in the log-file of the example).
+
+Also the pageslts.dtx loads other packages
+(for unpacking and constructing the documentation),
see "7.1 Downloads" in the manual
-http://mirrors.ctan.org/macros/latex/contrib/pageslts/pageslts.pdf
+https://mirror.ctan.org/macros/latex/contrib/pageslts/pageslts.pdf
5 PACKAGE COMPATIBILITY
=======================
-* endfloat package:
- pageslts is not compatible with very old versions of
- endfloat(2.0 and older).
- Just get the recent version of the endfloat package from
- https://www.ctan.org/pkg/endfloat
-
-* lastpage package:
- \usepackage[pagecontinue=false]{pageslts}
- can simulate the behaviour of the lastpage package.
- Loading old (!) versions of the lastpage package before
- the pageslts package before the hyperref package results
- in multiply definitions of the LastPage label.
-
-* undolabl package:
- Version >= 1.0h is needed.
+* This package really does not work with an old LaTeX format without hooks,
+ or without e-TEX, or with a pagesLTS package, or with
+ version 2.0 from 1992 of the endfloats package, or hyperref from 2015,
+ or _*OLD*_ versions of undolabl or lastpage or turnthepage and so on.
* The romanbarpagenumber and pageslts package currently are
- not compatible.
+ not yet compatible.
+
6 AUTHOR/MAINTAINER
=====================
- H.-Martin Münch
+ H.-Martin Münch
7 BUG REPORTS
@@ -201,12 +190,12 @@ A bug report should contain:
warning messages.
* \errorcontextlines=\maxdimen can be added in the
TeX code to get more information in TeX error messages.
-* Minimal test file that shows the problem, but does not
- contain any unnecessary packages and code.
+* Minimal test file that shows the problem,
+ but does not contain any unnecessary packages and code.
* Used drivers/programs.
* Version information about used packages and programs.
-* If you are using LaTeX, then add "\listfiles". Then
- a list of version information is printed at the end
+* If you are using LaTeX, then add "\listfiles" to the document.
+ Then a list of version information is printed at the end
of the LaTeX run.
* Please no other files than the minimal test file.
The other files .log, .dvi, .ps, .pdf are seldom
@@ -216,11 +205,12 @@ A bug report should contain:
Bug address
-----------
Bug reports can be send to the maintainer:
- H.-Martin Münch
+ H.-Martin Münch
<Martin [dot] Muench [at] Uni-Bonn [dot] de>
8 KNOWN PROBLEMS
-=================
+================
-* except those already mentioned above: none. \ No newline at end of file
+* except those already mentioned above: none,
+ but see chapter 3 of the documentation \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf b/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf
index fadf9f41211..9aac472f354 100644
--- a/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf
+++ b/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex b/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex
index eb43fe74e79..f83fe46d585 100644
--- a/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex
+++ b/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex
@@ -9,10 +9,11 @@
%% This is a generated file.
%%
%% Project: pageslts
-%% Version: 2015/12/21 v1.2f
+%% Version: 2024-11-20 v2.0a
+%% Info: Variants of last page labels
%%
-%% Copyright (C) 2010 - 2015 by
-%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+%% 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.
%%
%% IMPORTANT NOTICE:
@@ -32,20 +33,15 @@
%% see the change in the page numbering scheme and will make mistakes.
%% The package takes options.
%%
-%% The usual disclaimer applies:
-%% If it doesn't work right that's your problem.
-%% (Nevertheless, send an e-mail to the maintainer
-%% when you find an error in this package.)
-%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
-%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
+%% LaTeX version 2005-12-01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
@@ -53,7 +49,7 @@
%%
%% This package first started as a revision of the lastpage
%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org),
-%% but it became obvious that a replacement was needed.
+%% but I thought a replacement was needed.
%%
%% This work consists of the main source file pageslts.dtx,
%% the README, and the derived files
@@ -62,20 +58,19 @@
%% pageslts-example.tex, pageslts-example.pdf.
%%
%% In memoriam
-%% Claudia Simone Barth + 1996/01/30
-%% Tommy Muench + 2014/01/02
-%% Hans-Klaus Muench + 2014/08/24
+%% Claudia Simone Barth + 1996-01-30
+%% Tommy Muench + 2014-01-02
+%% Hans-Klaus Muench + 2014-08-24
%%
-\documentclass[british]{article}[2014/09/29]% v1.4h
-\usepackage{lipsum}[2014/07/27]% v1.3
-\usepackage[draft]{showkeys}[2014/10/28]% v3.17
+\documentclass[british]{article}[2024/02/08]% v1.4n
+\usepackage{lipsum}[2021-09-20]% v2.7
+\usepackage[draft]{showkeys}[2024/05/23]% v3.21
%% Use final instead of draft to hide the keys. %%
-\usepackage{hyperref}[2012/11/06]% v6.83m
+\PassOptionsToPackage{hyperref}{pdfpagelabels=true,hyperindex=false}
+\usepackage{hyperref}[2024-10-30]% v7.01k
\hypersetup{%
extension=pdf,%
plainpages=false,%
- pdfpagelabels=true,%
- hyperindex=false,%
pdflang={en},%
pdftitle={pageslts package example},%
pdfauthor={Hans-Martin Muench},%
@@ -87,7 +82,7 @@
bookmarksopen=true%
}
\usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,%
- romanMult=true,RomanMulti=true]{pageslts}[2015/12/21]% v1.2f
+ romanMult=true,RomanMulti=true]{pageslts}[2024-11-20]% v2.0a
%% These are the default options. %%
\makeatletter
@@ -104,7 +99,6 @@
\renewcommand{\@oddfoot}{\@evenfoot}
\def\pagesLTSexampleArabic{3}
\def\pagesLTSexamplealph{23}
- \gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\makeatother
\listfiles
@@ -119,13 +113,14 @@
\markboth{Example for pageslts}{Example for pageslts}
This example demonstrates the most common uses of package\\
-\textsf{pageslts}, v1.2f as of 2015/12/21 (HMM).\\
+\textsf{pageslts}, v2.0a as of 2024-11-20 (HMM);\\
+\url{https://ctan.org/pkg/pageslts}.\\
+
The used options were \texttt{pagecontinue=true},
\texttt{alphMult=ab}, \texttt{AlphMulti=AB}, \linebreak
\texttt{fnsymbolmult=true},
\texttt{romanMult=true}, and \texttt{RomanMulti=true}
-(the default ones).\\
-For more details please see the documentation!\\
+(the default\linebreak ones). -- For more details please see the documentation!\\
\label{keys} To hide the \pageref{keys}{\qquad } use option
\texttt{final} instead of \texttt{draft} with the \textsf{showkeys}
@@ -145,7 +140,7 @@ Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
\lastpageref{LastPages} pages.\\
If the \textsf{hyperref} package is loaded, but the hyperlinks of the
references shall be suppressed, \verb|\pageref*{...}|
-and \verb|\lastpageref*{...}| can be used:\\
+and \verb|\lastpageref*{...}| can be used:\\[0.5\baselineskip]
Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
\lastpageref*{pagesLTS.roman}(\lastpageref*{pagesLTS.roman.local}) + %
\lastpageref*{pagesLTS.Roman}(\lastpageref*{pagesLTS.Roman.local}) + %
@@ -161,7 +156,7 @@ trademark owner. There is no intention of infringement; the
usage is to the benefit of the trademark owner.\\
\textbf{Tip}: Use \textit{logical page numbers}
-for the display of the pdf (in Adobe Reader DC 2015.008.20082:
+for the display of the pdf (in Adobe Reader Continuos Release 2024.004.20272:\\
Edit $>$ Preferences $>$ Categories: Page Display $>$
Page Content and Information: Use logical page numbers)!\\
@@ -170,12 +165,6 @@ Roman, alph, Alph or fnsymbol ones? No problem, e.\,g. just give a\\
\verb|\addtocounter{page}{|-\textit{some number}\verb|}| in the
source code of this example file (or uncomment the prepared line)!
-\bigskip
-
-Save per page about $200\unit{ml}$ water, $2\unit{g}$ CO$_{2}$
-and $2\unit{g}$ wood:\\
-Therefore please print only if this is really necessary.
-
\pagebreak
\tableofcontents
@@ -184,8 +173,7 @@ Therefore please print only if this is really necessary.
\pagenumbering{roman}
%% in case the page numbering is changed before,
-%% otherwise pagesLTS.current.local.roman on this page
-%% would be undefined
+%% otherwise pagesLTS.current.local.roman on this page would be undefined
\section{roman}
@@ -199,13 +187,13 @@ the first page, of course.)\\
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first\linebreak page):~\theCurrentPage \\
You can get this also in other formats:
\roman{CurrentPage}, \Roman{CurrentPage}, \arabic{CurrentPage},
\fnsymbol{CurrentPage}, \alph{CurrentPage}, \Alph{CurrentPage}.
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
You can get also this in other formats, too:
\roman{pagesLTS.current.local.roman}, \Roman{pagesLTS.current.local.roman},
@@ -241,8 +229,9 @@ because the number of pages does not change (only the page numbers).\\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -255,9 +244,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{lastpage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -277,10 +266,10 @@ a package with output \linebreak
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -299,8 +288,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -313,9 +304,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -350,10 +341,10 @@ The Roman page numbering scheme is continued later in section~\ref{Roman2})!
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -372,8 +363,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -386,9 +379,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pagesLTS} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -409,10 +402,10 @@ for the current or total page count}
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -431,8 +424,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -445,9 +440,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -468,10 +463,10 @@ in the source code.)\\
\noindent The page (from \verb|\thepage| command): \thepage \\
\noindent Current page (from \verb|\theCurrentPage|\ %
-command), i.\,e. counted continuously from the first page): \theCurrentPage \\
+command), i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (from \verb|\theCurrentPageLocal|\ %
-command), i.\,e. counted continuously from the first page of the
+command), i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal\\
\noindent Last page's number (LastPages): \lastpageref{LastPages}{\hskip3em }
@@ -485,15 +480,8 @@ current page numbering scheme): \theCurrentPageLocal\\
\section{fnsymbol}
-Adobe Reader DC 2015.008.20082 does not show the correct page names
-for all pages with \texttt{fnsymbol} page numbering scheme,
-while at least the (\ldots\ of \ldots ) part of the page number is displayed correctly.
-(Adobe Reader~X even got all pages right.)
-
-\bigskip
-
Without option \texttt{fnsymbolmult=true} of the \textsf{pageslts} package
-(and the help of \textsc{Heiko Oberdiek}'s \textsf{alphalph} package),
+(and the help of the \textsf{alphalph} package),
after page~9 (\textquotedblleft \ensuremath {\ddagger \ddagger }\textquotedblright )
(and also for negative page numbers) there would just appear a
\begin{quote}
@@ -512,8 +500,8 @@ the first, second, third,\ldots\ page (\ensuremath {**},
\ensuremath {\mathparagraph \mathparagraph }),
and after the tenth page the \textquotedblleft number\textquotedblright{} is
tripled (\ensuremath {***}, \ensuremath {\dagger \dagger \dagger },\ldots).
-Page zero is named 0 and negative pages just named like the positive ones
-with addition of a minus sign~($-$).
+Page zero is named 0 and negative pages are just named like the positive ones
+with addition of a minus \mbox{sign ($-$).}
\bigskip
@@ -523,10 +511,10 @@ with addition of a minus sign~($-$).
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -545,8 +533,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -559,9 +549,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -572,16 +562,16 @@ a package with output \linebreak
\pagenumbering{Roman}
-\section{Roman - again!\label{Roman2}}
+\section{Roman -- again!\label{Roman2}}
The page number would start with \textquotedblleft I\textquotedblright{} again --
but for the \textsf{pageslts} package (with option \texttt{pagecontinue=true},
or with option just \texttt{pagecontinue}, or even just
\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}).
-This package remembered the (\arabic{pagesLTS.double.Roman}-1)\footnote{%
-OK, here you have to compute this value for yourself, but %
-subtracting one should be manageable for \TeX{}nicians.} pages already
-done in Roman output, and therefore continues with page
+This package remembered the
+\arabic{pagesLTS.double.Roman}-1,
+i.\,e.~\the\numexpr\value{pagesLTS.double.Roman}-1\relax, pages
+already done in Roman output, and therefore continues with page
\textquotedblleft \thepage \textquotedblright .\\
If you want to start with \textquotedblleft I\textquotedblright{} all
over again, you will have two pages with the same name,
@@ -594,10 +584,10 @@ or a \verb|\setcounter{page}{1}|\ here (not demonstrated in this example file).\
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -616,7 +606,7 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never
\verb|\pageref{pagesLTS.fnsymbol}|!)\\
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
@@ -631,9 +621,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -665,10 +655,10 @@ The Roman page numbering scheme is continued later in section~\ref{Roman3})!
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -687,8 +677,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -701,9 +693,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -712,9 +704,9 @@ a package with output \linebreak
\newpage
-Without option \texttt{alphMult=ab} of the \textsf{pageslts} (and the help of
-\textsc{Heiko Oberdiek's} \textsf{alphalph} package), after page
-\textquotedblleft z\textquotedblright{} there would just appear a
+Without option \texttt{alphMult=ab} of the \textsf{pageslts} (and the help of the
+\textsf{alphalph} package), after page \textquotedblleft z\textquotedblright{} there
+would just appear a
\begin{quote}
\begin{verbatim}
LaTeX Error: Counter too large
@@ -741,16 +733,14 @@ in the source code here.
\section{Roman - third time!\label{Roman3}}
-The page number would start with
-\textquotedblleft I\textquotedblright{} again -- but
-for the \textsf{pageslts} package (with option \texttt{pagecontinue=true},
+The page number would start with \textquotedblleft I\textquotedblright{} again
+-- but for the \textsf{pageslts} package (with option \texttt{pagecontinue=true},
or with option just \texttt{pagecontinue}, or even just
\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}).
This package remembered the
-(\arabic{pagesLTS.double.Roman}-1)\footnote{OK, here %
-you have to compute this value for yourself, but %
-subtracting one should be managable for \TeX nicians.} pages already
-done in Roman output, and therefore continues with page
+\arabic{pagesLTS.double.Roman}-1,
+i.\,e.~\the\numexpr\value{pagesLTS.double.Roman}-1\relax, pages
+already done in Roman output, and therefore continues with page
\textquotedblleft \thepage \textquotedblright .\\
If you want to start with \textquotedblleft I\textquotedblright{} all
over again, you will have (at least) two pages with the same name,
@@ -764,10 +754,10 @@ but nevertheless you can do this by using option
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -786,8 +776,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -800,9 +792,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -834,10 +826,10 @@ third Roman sector.\\
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -856,8 +848,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -870,18 +864,20 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
\lipsum[1-3]
-Without option \texttt{alphMulti=AB} of the \textsf{pageslts} (and the help of
-\textsc{Heiko Oberdiek's} \textsf{alphalph} package), after page
-\textquotedblleft Z\textquotedblright{} there would just appear a
+\bigskip
+
+Without option \texttt{alphMulti=AB} of the \textsf{pageslts}
+(and the help of the \textsf{alphalph} package), after page
+\textquotedblleft Z\textquotedblright{} there would just appear~a
\begin{quote}
\begin{verbatim}
LaTeX Error: Counter too large
@@ -904,10 +900,10 @@ This is not demonstrated here, but see section~\ref{alph}.
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -926,8 +922,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -940,24 +938,12 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
-
-\medskip
-
-\noindent Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
-\lastpageref{pagesLTS.roman} (\lastpageref{pagesLTS.roman.local}) + %
-\lastpageref{pagesLTS.Roman} (\lastpageref{pagesLTS.Roman.local}) + %
-\lastpageref{pagesLTS.arabic} (\lastpageref{pagesLTS.arabic.local}) + %
-\lastpageref{pagesLTS.fnsymbol} (\lastpageref{pagesLTS.fnsymbol.local}) + %
-\lastpageref{pagesLTS.alph} (\lastpageref{pagesLTS.alph.local}) + %
-\lastpageref{pagesLTS.Alph} (\lastpageref{pagesLTS.Alph.local}) = %
-\lastpageref{LastPages} pages.
-
+(=~total number of pages)
\end{document}
\endinput
%%
diff --git a/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf b/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf
index 98f3b7a7b34..f4ccf5a1ba0 100644
--- a/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf
+++ b/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/pageslts/pageslts.drv b/Master/texmf-dist/source/latex/pageslts/pageslts.drv
index e14bf62e18c..51237652782 100644
--- a/Master/texmf-dist/source/latex/pageslts/pageslts.drv
+++ b/Master/texmf-dist/source/latex/pageslts/pageslts.drv
@@ -9,10 +9,11 @@
%% This is a generated file.
%%
%% Project: pageslts
-%% Version: 2015/12/21 v1.2f
+%% Version: 2024-11-20 v2.0a
+%% Info: Variants of last page labels
%%
-%% Copyright (C) 2010 - 2015 by
-%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+%% 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.
%%
%% IMPORTANT NOTICE:
@@ -32,20 +33,15 @@
%% see the change in the page numbering scheme and will make mistakes.
%% The package takes options.
%%
-%% The usual disclaimer applies:
-%% If it doesn't work right that's your problem.
-%% (Nevertheless, send an e-mail to the maintainer
-%% when you find an error in this package.)
-%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
-%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
+%% LaTeX version 2005-12-01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
@@ -53,7 +49,7 @@
%%
%% This package first started as a revision of the lastpage
%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org),
-%% but it became obvious that a replacement was needed.
+%% but I thought a replacement was needed.
%%
%% This work consists of the main source file pageslts.dtx,
%% the README, and the derived files
@@ -62,24 +58,19 @@
%% pageslts-example.tex, pageslts-example.pdf.
%%
%% In memoriam
-%% Claudia Simone Barth + 1996/01/30
-%% Tommy Muench + 2014/01/02
-%% Hans-Klaus Muench + 2014/08/24
+%% Claudia Simone Barth + 1996-01-30
+%% Tommy Muench + 2014-01-02
+%% Hans-Klaus Muench + 2014-08-24
%%
-\NeedsTeXFormat{LaTeX2e}[2015/01/01]
-\ProvidesFile{pageslts.drv}[2015/12/21 v1.2f
- Refers to special pages' numbers/names (HMM)]
-\documentclass[landscape]{ltxdoc}[2015/03/26]% v2.0w
-\usepackage{geometry}[2010/09/12]% v5.6
-\usepackage{holtxdoc}[2012/03/21]% v0.24
-%% pageslts may work with earlier versions of LaTeX2e and those
-%% class and packages, but this was not tested.
-%% Please consider updating your LaTeX, class, and packages
-%% to the most recent version (if they are not already the most
-%% recent version).
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\ProvidesFile{pageslts.drv}%
+ [2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)]
+\documentclass[landscape]{ltxdoc}[2024/02/08]% v2.1j Standard LaTeX documentation class
+\usepackage{geometry}[2020/01/02]% v5.9 Page Geometry
+\usepackage{holtxdoc}[2019/12/09]% v0.30 Private additional ltxdoc support (HO)
\hypersetup{%
pdfsubject={Refers to special pages' numbers/names (HMM)},%
- pdfkeywords={LaTeX, pageslts, pagesLTS, lastpage, page number, page name, H.-Martin Muench},%
+ pdfkeywords={LaTeX, pageslts, pagesLTS, lastpage, page number, page name},%
pdfencoding=auto,%
pdflang={en},%
breaklinks=true,%
@@ -94,14 +85,9 @@
pdfwindowui=true,%
pdfnewwindow=true%
}
-\usepackage{ulem}[2012/05/18]% no version is given in the ulem.sty file
+\usepackage{ulem}[2019-11-18]% no version is given in the ulem.sty file
\CodelineIndex
\hyphenation{created every-thing ignored}
-\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}
-\makeatletter
-\@ifundefined{eTeX}{\gdef\eTeX{$\m@th \varepsilon $-\TeX }}{% else \relax
-}
-\makeatother
\begin{document}
\DocInput{pageslts.dtx}%
\end{document}
diff --git a/Master/texmf-dist/source/latex/pageslts/pageslts.dtx b/Master/texmf-dist/source/latex/pageslts/pageslts.dtx
index b70a5ce6891..108e2539be6 100644
--- a/Master/texmf-dist/source/latex/pageslts/pageslts.dtx
+++ b/Master/texmf-dist/source/latex/pageslts/pageslts.dtx
@@ -1,29 +1,30 @@
% \iffalse meta-comment
%
% File: pageslts.dtx
-% Version: 2015/12/21 v1.2f
+% Version: 2024-11-20 v2.0a
+% Info: Variants of last page labels
%
-% Copyright (C) 2010 - 2015 by
-% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+% 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 first started as a revision of the lastpage
% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org),
-% but it became obvious that a replacement was needed.
+% but I thought a replacement was needed.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any later
% version. This version of this license is in
-% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% https://www.latex-project.org/lppl/lppl-1-3c.txt
% and the latest version of this license is in
-% http://www.latex-project.org/lppl.txt
+% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of
-% LaTeX version 2005/12/01 or later.
+% LaTeX version 2005-12-01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
-% The Current Maintainer of this work is H.-Martin Muench.
+% The Current Maintainer of this work is H.-Martin Münch.
%
% This work consists of the main source file pageslts.dtx,
% the README, and the derived files
@@ -31,12 +32,12 @@
% pageslts.ins, pageslts.drv,
% pageslts-example.tex, pageslts-example.pdf.
%
-% 'pageslts' is available on CTAN:
-% https://www.ctan.org/pkg/pageslts
+% "pageslts" is available on CTAN:
+% https://ctan.org/pkg/pageslts
%
% Also a TDS.ZIP file is provided that contains all the files
% already sorted in a TDS tree:
-% http://mirrors.ctan.org/install/macros/latex/contrib/pageslts.tds.zip
+% https://mirror.ctan.org/install/macros/latex/contrib/pageslts.tds.zip
%
%<*ignore>
\begingroup
@@ -51,10 +52,10 @@
%</ignore>
%<*install>
\input docstrip.tex
-\Msg{*********************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: pageslts 2015/12/21 v1.2f Refers to special pages' numbers/names (HMM)}
-\Msg{*********************************************************************************}
+\Msg{**********************************************************************************}
+\Msg{* Installation *}
+\Msg{* Package: pageslts 2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)*}
+\Msg{**********************************************************************************}
\keepsilent
\askforoverwritefalse
@@ -65,10 +66,11 @@
This is a generated file.
Project: pageslts
-Version: 2015/12/21 v1.2f
+Version: 2024-11-20 v2.0a
+Info: Variants of last page labels
-Copyright (C) 2010 - 2015 by
- H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+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.
IMPORTANT NOTICE:
@@ -88,20 +90,15 @@ of backslash pagenumbering, but in that case this package does not
see the change in the page numbering scheme and will make mistakes.
The package takes options.
-The usual disclaimer applies:
-If it doesn't work right that's your problem.
-(Nevertheless, send an e-mail to the maintainer
- when you find an error in this package.)
-
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3c of this license or (at your option) any later
version. This version of this license is in
- http://www.latex-project.org/lppl/lppl-1-3c.txt
+ https://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
- http://www.latex-project.org/lppl.txt
+ https://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of
-LaTeX version 2005/12/01 or later.
+LaTeX version 2005-12-01 or later.
This work has the LPPL maintenance status "maintained".
@@ -109,7 +106,7 @@ The Current Maintainer of this work is H.-Martin Muench.
This package first started as a revision of the lastpage
package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org),
-but it became obvious that a replacement was needed.
+but I thought a replacement was needed.
This work consists of the main source file pageslts.dtx,
the README, and the derived files
@@ -118,9 +115,9 @@ the README, and the derived files
pageslts-example.tex, pageslts-example.pdf.
In memoriam
- Claudia Simone Barth + 1996/01/30
- Tommy Muench + 2014/01/02
- Hans-Klaus Muench + 2014/08/24
+ Claudia Simone Barth + 1996-01-30
+ Tommy Muench + 2014-01-02
+ Hans-Klaus Muench + 2014-08-24
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -165,7 +162,6 @@ In memoriam
%</ignore>
%
% \section{The documentation driver file}
-%
% The next bit of code contains the documentation driver file for
% \TeX , i.\,e., the file that will produce the documentation you
% are currently reading. It will be extracted from this file by the
@@ -175,20 +171,15 @@ In memoriam
%
% \begin{macrocode}
%<*driver>
-\NeedsTeXFormat{LaTeX2e}[2015/01/01]
-\ProvidesFile{pageslts.drv}[2015/12/21 v1.2f
- Refers to special pages' numbers/names (HMM)]
-\documentclass[landscape]{ltxdoc}[2015/03/26]% v2.0w
-\usepackage{geometry}[2010/09/12]% v5.6
-\usepackage{holtxdoc}[2012/03/21]% v0.24
-%% pageslts may work with earlier versions of LaTeX2e and those
-%% class and packages, but this was not tested.
-%% Please consider updating your LaTeX, class, and packages
-%% to the most recent version (if they are not already the most
-%% recent version).
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\ProvidesFile{pageslts.drv}%
+ [2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)]
+\documentclass[landscape]{ltxdoc}[2024/02/08]% v2.1j Standard LaTeX documentation class
+\usepackage{geometry}[2020/01/02]% v5.9 Page Geometry
+\usepackage{holtxdoc}[2019/12/09]% v0.30 Private additional ltxdoc support (HO)
\hypersetup{%
pdfsubject={Refers to special pages' numbers/names (HMM)},%
- pdfkeywords={LaTeX, pageslts, pagesLTS, lastpage, page number, page name, H.-Martin Muench},%
+ pdfkeywords={LaTeX, pageslts, pagesLTS, lastpage, page number, page name},%
pdfencoding=auto,%
pdflang={en},%
breaklinks=true,%
@@ -203,40 +194,16 @@ In memoriam
pdfwindowui=true,%
pdfnewwindow=true%
}
-\usepackage{ulem}[2012/05/18]% no version is given in the ulem.sty file
+\usepackage{ulem}[2019-11-18]% no version is given in the ulem.sty file
\CodelineIndex
\hyphenation{created every-thing ignored}
-\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}
-\makeatletter
-\@ifundefined{eTeX}{\gdef\eTeX{$\m@th \varepsilon $-\TeX }}{% else \relax
-}
-\makeatother
\begin{document}
\DocInput{pageslts.dtx}%
\end{document}
%</driver>
% \end{macrocode}
-%
% \fi
%
-% \CheckSum{1790}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
% \GetFileInfo{pageslts.drv}
%
% \begingroup
@@ -254,34 +221,47 @@ In memoriam
% }%^^A
% \expandafter\endgroup\x
%
-% \DoNotIndex{\",\-,\,,\\,\noindent}
-% \DoNotIndex{\documentclass,\usepackage,\ProvidesPackage}
-% \DoNotIndex{\NeedsTeXFormat,\TeX,\LaTeX}
-% \DoNotIndex{\ldots,\thinspace,\textbackslash}
-% \DoNotIndex{\begin,\end}
-% \DoNotIndex{\textbf,\textit,\textquotedblleft,\textquotedblright,\textsc,\textsf,\texttt,\underline}
-% \DoNotIndex{\ifx,\ifnum,\ifodd,\enduremath}
-% \DoNotIndex{\newpage,\pagebreak,\clearpage,\newline,\linebreak,\nolinebreak}
-% \DoNotIndex{\lipsum,\MessageBreak,\pageref,\protect}
-% \DoNotIndex{\smallskip,\medskip,\bigskip,\hskip,\space,\hline}
-% \DoNotIndex{\advance,\@ne}
-% \DoNotIndex{\item}
-% \DoNotIndex{\@PackageInfoNoLine,\@bsphack,\@esphack,\@ehc,\@ehd,\@ifundefined,%
-% \addcontentsline,\arabic,\enddocument,\endinput,\href,\makeatletter,\makeatother,%
-% \section,\subsection,\tableofcontents,\verb}
+% \DoNotIndex{\ ,\",\,,\\,\@Alph,\@alph,\@bsphack,\@ehc,\@ehd,\@esphack,\@ifundefined,\@ne,%
+% \@currentlabel,\@currentlabelname,\@evenfoot,\@fnsymbol,\@gobble,\@ifl@t@r,%
+% \@kernel@reserved@label@data,\@oddfoot,\@tempcnta,\addcontentsline,\addtocounter,\AfterLastShipout,%
+% \Alph,\alph,\alphalph,\AlphAlph,\AlphMult,\alphMult,\AlphMulti,\arabic,\AtEndDocument,\baselineskip,%
+% \begin,\bigskip,\csname,\dagger,\ddagger,\detokenize,\documentclass,\endinput,%
+% \empty,\END,\end,\endcsname,\ensuremath,\expanded,\extract,\extract@,\fmtversion,%
+% \fnsymbol,\fnsymbolmult,\frontmatter,\gdef,\href,\hskip,\hypersetup,\hypertarget,\HyPsd@pageref,%
+% \if,\if@filesw,\if@nobreak,\ifnum,\ifodd,\ifx,\ifvmode,%
+% \IfPackageAtLeastTF,\IfPackageLoadedT,\IfPackageLoadedTF,\IfPackageLoadedWithOptionsF,%
+% \immediate,\jobname,\label,\LaTeX,\ldots,\linebreak,\lipsum,\listfiles,\loop,%
+% \makeatletter,\makeatother,\MessageBreak,\markboth,\mathparagraph,\mathsection,%
+% \mbox,\meaning,\newcommand,\NeedsTeXFormat,\NewCommandCopy,\newcounter,\newlabel,%
+% \nobreak,\noindent,\nolinebreak,\number,\numexpr,%
+% \options,\PackageError,\PackageInfo,\PackageNoteNoLine,\PackageWarning,\PackageWarningNoLine,%
+% \pagebreak,\pageref,\pagesLTS@tmpA,\pagesLTS@tmpB,\pagesLTS@tmpC,\pagesLTS@tmpD,\pagesLTS@tmpQ,\PassOptionsToPackage,%
+% \phantomsection,\ProvidesPackage,\protect,\qquad,\ref,\renewcommand,\repeat,\RequirePackage,%
+% \section,\setcounter,\smallskip,\space,\subsection,%
+% \tableofcontents,\textbackslash,\textbf,\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt,%
+% \the,\thepage,\thispagestyle,\undefined,\url,\usepackage,\value,\verb,%
+% \xpagesLTS@rmpage,\xxpagesLTS@rmpage,%
+% \c@page,\DeclareBoolOption,\DeclareStringOption,\ProcessKeyvalOptions,\setkeys,\SetupKeyvalOptions%
+% }
+%
+% \newlength\ltsindent
+% \setlength{\ltsindent}{\parindent}
+% \setlength{\parindent}{0pt}
+% \renewcommand{\indent}{\hspace*{\ltsindent}}
%
% \title{The \xpackage{pageslts} package}
-% \date{2015/12/21 v1.2f}
-% \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}}
+% \date{2024-11-20 v2.0a}
+% \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}}
%
% \maketitle
%
% \begin{abstract}
% \noindent This \LaTeX{} package puts the labels \texttt{LastPage}
-% (|\AtEndDocument|) and \texttt{VeryLastPage} (|\AfterLastShipout|)
-% into the \xfile{.aux} file, allowing the user to refer
-% to the (very) last page of a document. This might be
-% particularly useful in places like headers or footers.
+% (|\AddToHook{enddocument/afterlastpage}|, formerly |\AtEndDocument|)
+% and \texttt{VeryLastPage} (also |\AddToHook{enddocument/afterlastpage}|,
+% but formerly |\AfterLastShipout|) into the \xfile{.aux} file,
+% allowing the user to refer to the last page of a document.
+% This might be particularly useful in places like headers or footers.
% When more than one page numbering scheme is used,
% these references do not give the total \textit{number} of pages.
% For this case the label \texttt{LastPages} is introduced.
@@ -317,181 +297,143 @@ In memoriam
% but suppressing links, are supported.
% \end{abstract}
%
-% \noindent \textbf{Please make sure to first deinstall the obsolete
-% \xpackage{pagesLTS} package before installing this \xpackage{pageslts}
-% package!}\\
-% (There is at least one operating system which otherwise automatically
-% renames \xfile{pageslts} to \xfile{pagesLTS}.)
-%
-% \noindent Right after |\begin{document}| a |\pagenumbering{|\ldots|}| should
+% Right after |\begin{document}| a |\pagenumbering{|\ldots|}| should
% be called -- with the appropriate argument out of e.\,g.\\
% arabic (Arabic numerals: 1, 2, 3, 4,\ldots),\\
% roman (Lowercase Roman numerals: i, ii, iii, iv,\ldots),
% Roman (Uppercase Roman numerals: I, II, III, IV,\ldots),\\
% alph (Lowercase letters: a, b, c, d,\ldots),
% Alph (Uppercase letters: A, B, C, D,\ldots),\\
-% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots).
+% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots).\\
%
-% \noindent This package first started as a revision of the
+% This package first started as a revision of the
% \xpackage{lastpage} package of \textbf{Jeffrey P. Goldberg} (Thanks!),
-% but then it became obvious that a replacement was needed.
+% but then it was deemed necessary to provide a separate, enhanced package.
+% After updates of the kernel and the package,
+% \xpackage{lastpage} now does what it is supposed to do.\\
%
-% \noindent Disclaimer for web links: The author is not responsible for any contents
+% Disclaimer for web links: The author is not responsible for any contents
% referred to in this work unless he has full knowledge of illegal contents.
% 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 these pages.
-%
-% \noindent Save per page about $200\unit{ml}$ water,
-% $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:
-% Therefore please print only if this is really necessary.
-%
-% \bigskip
+% to these pages.\pagebreak
%
% \tableofcontents
-%
% \newpage
%
% \section{Introduction}
-%
-% \indent This package puts the labels \texttt{LastPage}
-% (|\AtEndDocument|) (same as my \xpackage{LastPage} package, invented by
-% \textsc{Jeffrey P. Goldberg}) and \texttt{VeryLastPage} (|\AfterLastShipout|)
-% into the \xfile{.aux} file, allowing the user to refer to the (very)
-% last page of a document via |\lastpageref{LastPage}| and
-% |\lastpageref{VeryLastPage}|. This might be particularly useful in
-% places like headers or footers. When more than one page numbering scheme
-% is used, these references do not give the total \textit{number} of pages.
-% For this case the label \texttt{LastPages} is introduced (similar to the
-% label \texttt{TotPages} of the \xpackage{TotPages} package, but
-% the label \texttt{LastPages} is set later in the document).
+% This package puts the labels \texttt{LastPage} (|\AddToHook{enddocument/afterlastpage}|,
+% formerly |\AtEndDocument|; same as the \xpackage{LastPage} package) and \texttt{VeryLastPage}
+% (also |\AddToHook{enddocument/afterlastpage}|, but formerly |\AfterLastShipout|) into the \xfile{.aux} file,
+% allowing the user to refer to the last page of a document via |\lastpageref{LastPage}| and
+% |\lastpageref{VeryLastPage}|. This might be particularly useful in places like headers or footers.
+% When more than one page numbering scheme is used, these references do not give the total \textit{number}
+% of pages. For this case the label \texttt{LastPages} is introduced (similar to the label \texttt{TotPages}
+% of the \xpackage{TotPages} package, but the label \texttt{LastPages} is set later in the document).
% Additionally, at the last page of each page numbering scheme a label
% \texttt{pagesLTS.<}\textit{numbering scheme}\texttt{>} is placed,
% where \texttt{<}\textit{numbering scheme}\texttt{>} is e.\,g.
% arabic, roman, Roman, alph, or Alph. For fnsymbol please use
% |\lastpageref{pagesLTS.fnsymbol}| instead of |\pageref{pagesLTS.fnsymbol}|.
-% When the same numbering scheme is used twice, the page numbers are
-% either reset to one or continued automatically, depending on the option
-% given when the package is called. The command |\theCurrentPage| prints
-% the current total/absolute page number - in contrast to |\thepage|,
-% which gives only the page \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}{|\ldots|}| or
-% |\setcounter{page}{|\ldots|}| were used. (See also \LaTeX\ bug~3421:
-% 3rd~page is even (twoside, titlepage, abstract),
-% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=anything&keyword=pagenumber&pr=latex%2F3421&search=}.)
-% At the first page of the document a label \texttt{pagesLTS.0} is
-% created. This label can be referred to, too. Further labels are
-% provided for special cases.\\
-% The \xpackage{alphalph} package is supported, i.\,e. page numbers
-% \texttt{alph} or \texttt{Alph} $>26$ and \texttt{fnsymbol} $>9$ can
-% be used (with the according options set). Even zero or negative page
-% numbers can be used with \texttt{arabic}, \texttt{alph}, \texttt{Alph}, and
-% \texttt{fnsymbol} page numbering (with \xpackage{alphalph} package
-% and according options), and zero \texttt{roman} and \texttt{Roman} pages,
-% too.
-%
-% \bigskip
-% \noindent Right after |\begin{document}| a |\pagenumbering{|\ldots|}|
-% should be called -- with the appropriate argument out of e.\,g.\\
+% When the same numbering scheme is used twice, the page numbers are either reset to one
+% or continued automatically, depending on the option given when the package is called.
+% The command |\theCurrentPage| prints the current total/absolute page number -- in contrast to |\thepage|,
+% which gives only the page \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}{|\ldots|}| or |\setcounter{page}{|\ldots|}| were used.
+% (See also \LaTeX\ bug~3421: 3rd~page is even (twoside, titlepage, abstract),
+% \url{https://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=anything&keyword=pagenumber&pr=latex%2F3421&search=}.)
+% At the first page of the document a label \texttt{pagesLTS.0} is created. Also to this label it can be referred.
+% Further labels are provided for special cases.\\
+%
+% The \xpackage{alphalph} package is supported, i.\,e.\ page numbers \texttt{alph} or \texttt{Alph} $>26$
+% and \texttt{fnsymbol} $>9$ can be used (with the according options set). Even zero or negative page
+% numbers can be used with \texttt{arabic}, \texttt{alph}, \texttt{Alph}, and \texttt{fnsymbol}
+% page numbering (with \xpackage{alphalph} package and according options), and zero \texttt{roman}
+% and \texttt{Roman} pages, too.\\
+%
+% Right after |\begin{document}| a |\pagenumbering{|\ldots|}| should be called --
+% with the appropriate argument out of e.\,g.\\
% arabic (Arabic numerals: 1, 2, 3, 4,\ldots),\\
% roman (Lowercase Roman numerals: i, ii, iii, iv,\ldots),
% Roman (Uppercase Roman numerals: I, II, III, IV,\ldots),\\
% alph (Lowercase letters: a, b, c, d,\ldots),
% Alph (Uppercase letters: A, B, C, D,\ldots),\\
-% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots).
+% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots).\\
%
-% \bigskip
-% \noindent This package first started as a revision of the
+% This package first started as a revision of the
% \xpackage{lastpage} package of \textsc{Jeffrey P. Goldberg} (Thanks!),
% but then it became obvious that a replacement was needed to accomplish
-% what this package does.
+% what this package does.\\
%
-% \bigskip
-% \noindent \textbf{Trademarks} appear throughout this documentation
-% without any trademark symbol; they are the property of their respective
-% trademark owner. There is no intention of infringement; the usage is
-% to the benefit of the trademark owner.
+% \textbf{Trademarks} appear throughout this documentation without any trademark symbol;
+% they are the property of their respective trademark owner. There is no intention of infringement;
+% the usage is to the benefit of the trademark owner.\\
%
-% \bigskip
% \phantomsection
-% \DescribeMacro{logical page numbers}
-% \noindent \textbf{Tip}: For the display of the \xfile{pdf}~file use
-% \textbf{logical page numbers} together with \xpackage{hyperref}!
-% \label{logical page numbers}
+% \DescribeMacro{logical page numbers}\label{logical page numbers}
+% \textbf{Tip}: For the display of the \xfile{pdf}~file use \textbf{logical page numbers}
+% together with \xpackage{hyperref}!
% \begin{description}
-% \item [-] In Adobe Reader DC 2015.008.20082 enable:\\
+% \item [-] In Adobe Reader Continuos Release 2024.004.20272 enable:\\
% Edit $>$ Preferences $>$ Categories: Page Display $>$
% Page Content and Information: Use logical page numbers
%
% \item[-] Use the \xpackage{hyperref} package with option |plainpages=false|\,.
% \end{description}
-% The display will be e.\,g.\ \textquotedblleft 7~(7~of~9)\textquotedblright,
+% The display will be e.\,g.\ \mbox{\textquotedblleft 7 (7 of 9)\textquotedblright ,}
% or, in case of Roman instead of arabic numbers,
-% \textquotedblleft VII~(7~of~9)\textquotedblright, and when different
+% \mbox{\textquotedblleft VII (7 of 9)\textquotedblright ,} and when different
% page numbers are used (see below) e.\,g. arabic after 10~Roman pages:
-% \textquotedblleft 17~(27~of~30)\textquotedblright.
-% Please try this with the compiled \xpackage{pageslts-example} file!
-%
-% \bigskip
-% \noindent The name of the \xpackage{pageslts} package refers to
-% Last, Total, and page numbering Schemes pages. \xpackage{pagesLTS}
-% was a former name of this package.
-%
-% \pagebreak
+% \mbox{\textquotedblleft 17 (27 of 30)\textquotedblright .}
+% Please try this with the compiled \xpackage{pageslts-example} file!\newline
+% The name of the \xpackage{pageslts} package refers to Last, Total, and page numbering Schemes pages.
+% \xpackage{pagesLTS} was a former name of this package.
%
% \section{Usage}
-%
-% \indent Just load the package placing
+% Just load the package by placing
% \begin{quote}
% |\usepackage[<|\textit{options}|>]{pageslts}|
% \end{quote}
-% \noindent in the preamble of your \LaTeXe\ source file
-% (about |\AtEndDocument| see subsection~\ref{ssec:aed})
-% and place a |\pagenumbering{...}| with appropriate argument
+% in the preamble of your \LaTeX\ source file and place a |\pagenumbering{...}| with appropriate argument
% (e.\,g.~arabic, roman, Roman, fnsymbol, alph, or Alph)
% right behind |\begin{document}| (see subsubsection~\ref{sss:nopnc})!\\
%
-% \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
-% 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 labels
-% \texttt{LastPage}, \texttt{VeryLastPage}, and \texttt{LastPages}
+% 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 contain something like
+%\textquotedblleft page \mbox{$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 labels \texttt{LastPage}, \texttt{VeryLastPage}, and \texttt{LastPages}
% (most times with |\pageref{...}|, but more save with |\lastpageref{...}|).
-% In particular one can use the \xpackage{fancyhdr} or \xpackage{nccfancyhdr}
-% package, or redefinitions of the page headings and footings to get
-% a reference to the (very) last page.\\
+% In particular one can use the \xpackage{fancyhdr} (\url{https://ctan.org/pkg/fancyhdr}) or
+% \xpackage{nccfancyhdr} (\url{https://ctan.org/pkg/nccfancyhdr}) package, or
+% redefinitions of the page headings and footings to get a reference to the last page.\\
+%
% \DescribeMacro{\pageref*}
% \DescribeMacro{\lastpageref*}
-% If the \xpackage{hyperref} package is used, the references are hyperlinked
-% to their aims. If these hyperlinks shall be suppressed, |\pageref*{...}|
-% and |\lastpageref*{...}| can be used.
+% If the \xpackage{hyperref} package is used, the references are hyperlinked to their targets.
+% If these hyperlinks shall be suppressed, |\pageref*{...}| and |\lastpageref*{...}| can be used.
%
% \subsection{Options}
% \DescribeMacro{options}
-% \indent The \xpackage{pageslts} package takes the following options:
+% The \xpackage{pageslts} package takes the following options:
%
% \subsubsection{pagecontinue\label{sss:pagecontinue}}
% \DescribeMacro{pagecontinue}
-% \indent When option \texttt{pagecontinue=false} is \textbf{not} given
-% (i.\,e. \texttt{pagecontinue} or \texttt{pagecontinue=true}
-% or no \texttt{pagecontinue} option at all), at each
+% When option \texttt{pagecontinue=false} is \textbf{not} given (i.\,e.\ \texttt{pagecontinue}
+% or \texttt{pagecontinue=true} or no \texttt{pagecontinue} option at all), at each
% |\pagenumbering{...}| command the number of the page will be continued
-% with the page number following the last page of the same page numbering
-% scheme. For example, if there are V~Roman pages in the frontmatter,
-% some arabic ones in the mainmatter, and then Roman ones again in the
-% backmatter, the last ones will start with VI instead of~I again.\\
-% \indent If you want to start with I (or i, 1, a, A, *,\ldots ) again,
-% set option \texttt{pagecontinue=false}. If you want to generally continue
-% the numbers, but for some page numbering scheme do not want this,
-% use \texttt{pagecontinue=true} and say |\setcounter{page}{1}|
-% after |\pagenumbering{...}| for that page numbering scheme.
+% with the page number following the last page of the same page numbering scheme. For example,
+% if there are V~Roman pages in the frontmatter, some arabic ones in the mainmatter, and then
+% Roman ones again in the backmatter, the last ones will start with VI instead of~I again.\\
%
-% \subsubsection{alphMult, AlphMulti, fnsymbolmult\label{sss:alphalph}}
+% If you want to start with I (or i, 1, a, A, *,\ldots ) again, set option
+% \texttt{pagecontinue=false}. If you want to generally continue the numbers,
+% but for some page numbering scheme do not want this, use \texttt{pagecontinue=true}
+% and say |\setcounter{page}{1}| after |\pagenumbering{...}| for that page numbering scheme.
%
-% \indent The page number printed in
+% \subsubsection{alphMult, AlphMulti, fnsymbolmult\label{sss:alphalph}}
+% The page number printed in
% \nolinebreak{\texttt{fnsymbol}\footnote{%
% \ensuremath {*},%
% \ensuremath {\dagger },%
@@ -507,45 +449,32 @@ In memoriam
% i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}} and
% \nolinebreak{\texttt{Alph}\footnote{A, B, C, D, E, F, G, H,%
% I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z}} must
-% be $>0$ and $<27$. After page~Z\quad \LaTeX\ \textit{should}
-% continue with AA, AB, AC,\ldots\ Some people prefer
-% AA, BB, CC,\ldots, but in hexadecimal it is $AA_{16}=170_{10}$
-% and $171_{10}=AB_{16}$, whereas $BB_{16}=187_{10}$. In any way
-% it should continue at all (maybe even with an user option to
-% choose between the two continuations), but instead only gives
-% an error:
+% be $>0$ and $<27$. After page~Z\quad \LaTeX\ \textit{should} continue with
+% AA, AB, AC,\ldots\ Some people prefer AA, BB, CC,\ldots, but in hexadecimal it is
+% $AA_{16}=170_{10}$ and $171_{10}=AB_{16}$, whereas $BB_{16}=187_{10}$. In any way
+% it should continue at all (maybe even with a user option to choose between the two
+% continuations), but instead only gives an error:
% \begin{quote}
% |LaTeX Error: Counter too large|\\
% |See the LaTeX manual or LaTeX Companion for explanation.|\\
% |You've lost some text. Try typing <return> to proceed.|\\
% |If that doesn't work, type X <return> to quit.|
% \end{quote}
-% But thanks to the \xpackage{alphalph} package by \textsc{Heiko Oberdiek}
-% these limitation no longer hold. With his |\erroralph| command
-% now even negative or zero page
-% \textquotedblleft numbers\textquotedblright{} are possible.\\
+% But thanks to the \xpackage{alphalph} package these limitation no longer hold.
+% With his |\erroralph| command now even negative or zero page
+% \textquotedblleft numbers\textquotedblright\ are possible.\\
+% Nevertheless, some \TeX\ capacity will be exceeded well before the
+% $2\,147\,483\,647^{\textnormal{th}}$ page.\\
%
% \DescribeMacro{alphMult}
% The string option \texttt{alphMult} takes three values: |ab|, |bb|, |0|:
% \begin{description}
-% \item[ab] After page z, the page
-% \textquotedblleft numbers\textquotedblright{} continue with
-% aa, ab, ac, ad,\ldots, fxshrxw (the default), and before a with
-% 0, -a, -b,\ldots, -z, -aa, -ab,\ldots, -fxshrxw ($=-21\,474\,836\,47$).
-% \item[bb] After page z, the page
-% \textquotedblleft numbers\textquotedblright{} continue with
-% aa, bb, cc, dd,\ldots, and before a with
-% 0, -a, -b,\ldots, -z, -aa, -bb,\ldots\\
-% (Internally up~to $\pm 55\,834\,558$ is allowed, but when printed will
-% exceed the \LaTeX\ capacity even for smaller numbers --
-% in the example file this happens at about $6\,500$.)\\
-% (If you have a document with more than $6\,500$~pages, you might
-% think about splitting it in volumes. And page
-% \textquotedblleft numbers\textquotedblright{} with about 100~digits
-% are probably not easy to grasp for the reader, too.)\\
-% \item[0] (zero) The \xpackage{pageslts} package does nothing,
-% thus the user is free to define the page
-% \textquotedblleft numbers\textquotedblright{} after~z and before~a.\\
+% \item[ab] After page z, the page \textquotedblleft numbers\textquotedblright\ continue with
+% aa, ab, ac, ad,\ldots, and before a with 0, -a, -b,\ldots, -z, -aa, \mbox{-ab,\ldots .}
+% \item[bb] After page z, the page \textquotedblleft numbers\textquotedblright\ continue with
+% aa, bb, cc, dd,\ldots, and before a with 0, -a, -b,\ldots, -z, -aa, \mbox{-bb,\ldots .}
+% \item[0] (zero) The \xpackage{pageslts} package does nothing, thus the user is free
+% to define the page \textquotedblleft numbers\textquotedblright\ after~z and before~a.\\
% (But if the user does not do anything at all, the\\
% \ |LaTeX Error: Counter too large|\\
% will appear again.)
@@ -554,18 +483,12 @@ In memoriam
% \DescribeMacro{AlphMulti}
% The string option \texttt{AlphMulti} takes three values: |AB|, |BB|, |0|:
% \begin{description}
-% \item[AB] After page Z, the page
-% \textquotedblleft numbers\textquotedblright{} continue with
-% AA, AB, AC, AD,\ldots, FXSHRXW (the default), and before A with
-% 0, -A, -B,\ldots, -Z, -AA, -AB,\ldots, -FXSHRXW.
-% \item[BB] After page Z, the page
-% \textquotedblleft numbers\textquotedblright{} continue with
-% AA, BB, CC, DD,\ldots, and before A with
-% 0, -A, -B,\ldots, -Z, -AA, -BB,\ldots \\
-% (About the limits please see |alphMult| above.)
-% \item[0] (zero) The \xpackage{pageslts} package does nothing,
-% thus the user is free to define the page
-% \textquotedblleft numbers\textquotedblright{} after~Z and before~A.\\
+% \item[AB] After page Z, the page \textquotedblleft numbers\textquotedblright\ continue with
+% AA, AB, AC, AD,\ldots, and before A with 0, -A, -B,\ldots, -Z, -AA, \mbox{-AB,\ldots .}
+% \item[BB] After page Z, the page \textquotedblleft numbers\textquotedblright\ continue with
+% AA, BB, CC, DD,\ldots, and before A with 0, -A, -B,\ldots, -Z, -AA, \mbox{-BB,\ldots .}
+% \item[0] (zero) The \xpackage{pageslts} package does nothing, thus the user is free
+% to define the page \textquotedblleft numbers\textquotedblright\ after~Z and before~A.\\
% (But if the user does not do anything at all, the\\
% \ |LaTeX Error: Counter too large|\\
% will appear again.)
@@ -573,228 +496,160 @@ In memoriam
%
% \DescribeMacro{fnsymbolmult}
% When option \texttt{fnsymbolmult=false} is \textbf{not} given
-% (i.\,e. \texttt{fnsymbolmult} or \texttt{fnsymbolmult=true}
-% or no \texttt{fnsymbolmult} option at all),
-% after 5 (\ensuremath {\mathparagraph }) the page
-% \textquotedblleft number\textquotedblright{} is continued with
-% the doubled \textquotedblleft number\textquotedblright{} of the
-% first, second, third,\ldots\ page (\ensuremath {**},
-% \ensuremath {\dagger \dagger }, \ensuremath {\ddagger \ddagger },
-% \ensuremath {\mathsection \mathsection },
-% \ensuremath {\mathparagraph \mathparagraph }),
-% and after the tenth page the
-% \textquotedblleft number\textquotedblright{} is tripled
-% (\ensuremath {***}, \ensuremath {\dagger \dagger \dagger },\ldots).
-% Compile the \textsf{pageslts-example.tex} with \pdfLaTeX\ and
-% see the resulting \xfile{pdf} file.\\
-% Before \ensuremath {*} (page~1) the page
-% \textquotedblleft numbers\textquotedblright{} are continued with
-% 0, \ensuremath {- * }, \ensuremath {- \dagger },\ldots,
-% \ensuremath {- \mathparagraph }, \ensuremath {- **},
-% \ensuremath {- \dagger \dagger },\ldots \\
-% If this is not wanted, set option \texttt{fnsymbolmult=false},
-% and \xpackage{pageslts} will do nothing and allow the user to change
-% the page \textquotedblleft number\textquotedblright . (But if the
-% user does not do anything at all, the\\
+% (but \texttt{fnsymbolmult} or \texttt{fnsymbolmult=true} or no \texttt{fnsymbolmult} option
+% at all), after \mbox{5 (\ensuremath {\mathparagraph })} the page
+% \textquotedblleft number\textquotedblright\ is continued with the doubled
+% \textquotedblleft number\textquotedblright{} of the first, second, third,\ldots\ page
+% (\ensuremath{**}, \ensuremath{\dagger\dagger}, \ensuremath{\ddagger\ddagger},
+% \ensuremath{\mathsection\mathsection}, \ensuremath{\mathparagraph\mathparagraph}),
+% and after the tenth page the \textquotedblleft number\textquotedblright\ is tripled
+% (\ensuremath{***}, \ensuremath{\dagger\dagger\dagger},\ldots).
+% Compile the \textsf{pageslts-example.tex} and see the resulting \xfile{pdf} file.\\
+%
+% Before \ensuremath{*} (page~1) the page \textquotedblleft numbers\textquotedblright\ are
+% continued with 0, \ensuremath{-*}, \ensuremath{-\dagger},\ldots, \ensuremath{-\mathparagraph},
+% \ensuremath{-**}, \ensuremath{-\dagger\dagger},\ldots\\
+% If this is not wanted, set option \texttt{fnsymbolmult=false}, and \xpackage{pageslts}
+% will do nothing and allow the user to change the page
+% \textquotedblleft number\textquotedblright . (But if the user does not do anything at all,
+% the\\
% \ |LaTeX Error: Counter too large|\\
-% will appear again.)\\
-% While in \LaTeXe\ arabic (page) numbers are possible up~to
-% |MAX|\,$ = 2\,147\,483\,647$ (cf.~the \xpackage{alphalph} package),\\
-% |\erroralphalph{\fnsymbolmult}{...}| numbers are possible up~to
-% 10\,737\,415 only. If this number is not only used internally
-% but printed, after number about 11\,705 (which is
-% 2\,341 times \ensuremath {\mathparagraph }) the \LaTeXe\ capacity
-% is exceeded, depending on the remaining file and its use of
-% \TeX\ capacity, of course. (If you have a document with more than
-% 11\,705~pages, you might think about splitting it in volumes.
-% And page \textquotedblleft numbers\textquotedblright{} with
-% 2\,341~digits are probably not easy to grasp for the reader, too.)\\
+% will appear again.)
%
% \subsubsection{romanMult, RomanMulti\label{sss:romanMult}}
-%
% \DescribeMacro{romanMult}
% \DescribeMacro{RomanMulti}
-% The options \texttt{romanMult(=true)} and \texttt{RomanMulti(=true)}
-% expand the |\roman| and |\Roman| page numbering scheme to values
-% below one ($<1$), i.\,e. 0, -i, -ii, -iii, -iv,\ldots\ and
-% 0, -I, -II, -III, -IV,\ldots, respectively.\\
-% Again the \TeX\ capacity will be exceeded before
-% \nolinebreak{$\pm$ |MAX|\,}$ = \pm 2\,147\,483\,647$, and even if
-% $1\,000\,000\,000$ is internally possible, this would print
-% $1\,000\,000$ times the letter~\textsf{m} (or~\textsf{M}),
-% which would require either very small print or quite huge paper size.\\
-% (If you have a document with so many pages, you might think
-% about splitting it in volumes. And page
-% \textquotedblleft numbers\textquotedblright{} with
-% thousands of digits are probably not easy to grasp for the reader,
-% too.)\\
-% If the expansion below $1$ is not wanted, set options
-% \texttt{romanMult=false} and/or \texttt{RomanMulti=false},
-% and \xpackage{pageslts} will do nothing and allow the user
-% to change the page \textquotedblleft number\textquotedblright .
-% (But if the user does not do anything at all, \LaTeX\ will just
-% ignore the values - not even a warning will be issued.)
+% The options \texttt{romanMult(=}\,\texttt{true)} and \texttt{RomanMulti(=}\,\texttt{true)}
+% expand the |\roman| and |\Roman| page numbering scheme to values below one ($<1$),
+% i.\,e.\ 0, -i, -ii, -iii, -iv,\ldots\ and 0, -I, -II, -III, -IV,\ldots, respectively.\\
+% Again the \TeX\ capacity will be exceeded well before \mbox{$\pm$ |MAX|\,}%
+% $ = \pm 2\,147\,483\,647$. If the expansion below~$1$ is not wanted, set options
+% \texttt{romanMult=false} and/or \texttt{RomanMulti=false}, and \xpackage{pageslts}
+% will do nothing and allow the user to change the page
+% \textquotedblleft number\textquotedblright. (But if the user does not do anything at all,
+% \LaTeX\ will just ignore those values -- not even a warning will be issued!)
%
% \subsubsection{Arabic page numbers}
-%
% \DescribeMacro{Arabic page numbers}
-% In \LaTeXe\ arabic (page) numbers are already possible between
-% |-MAX...MAX|, where |MAX|\,$ = 2\,147\,483\,647$ (cf.~the
-% \xpackage{alphalph} package), without any expansion necessary.
-% (But if you have a document with so many pages, you might think
-% about splitting it in volumes!)
+% In \LaTeX\ arabic (page) numbers are already possible between |-MAX...MAX|, where
+% |MAX|\,$ = 2\,147\,483\,647$ (cf.~the \xpackage{alphalph} package), without any expansion necessary.
%
% \subsection{Labels}
-%
% \DescribeMacro{pagesLTS.0}
-% \indent At the first page a label \texttt{pagesLTS.0} is created.
-% If |\pagenumbering{...}| is used right after
-% |\begin{document}|, this is much easier for the
-% \xpackage{pageslts} package (and chances for successful placing
-% of all labels are much higher;
-% \nolinebreak{cf.~subsubsection~\ref{sss:once}).}\\
+% At the first page a label \texttt{pagesLTS.0} is created. If |\pagenumbering{...}| is used right after
+% |\begin{document}|, this is much easier for the \xpackage{pageslts} package (and chances for
+% successful placing of all labels are much higher; \nolinebreak{cf.~subsubsection~\ref{sss:once}).}\\
%
% \DescribeMacro{LastPage}
-% |\AtEndDocument| (see subsection~\ref{ssec:aed}) this package defines
-% a label, \texttt{LastPage}, which the user can refer to with the\linebreak
-% |\lastpageref{LastPage}| command. While |\pageref{LastPage}| is also
-% possible (especially for backward compatibility with the \xpackage{LastPage}
-% package), this is discouraged, because it will not work when it is used
-% together with the \xpackage{hyperref} package and the \xpackage{fnsymbol}
-% page numbering scheme. (The \xpackage{LastPage} package did not work with
-% this combination, too, so if you want to, you can reproduce the old error
-% -- but you do not have to do it, but can use |\lastpageref{LastPage}|.)\\
+% |\AddToHook{enddocument/afterlastpage}| (formerly: |\AtEndDocument}| this package defines a label,
+% \texttt{LastPage}, which the user can refer to with the |\lastpageref{LastPage}| command.
+% In former times |\pageref{LastPage}| did not work when used together with the \xpackage{hyperref}
+% package and the |fnsymbol| page numbering scheme. This should work now.\\
%
% \DescribeMacro{VeryLastPage}
-% |\AfterLastShipout| the label \texttt{VeryLastPage} is defined, which
-% the user can also refer to with the |\lastpageref{VeryLastPage}| command.
-% Depending on usage of |\AtEndDocument| by other packages, \texttt{LastPage}
-% might not point to the very last page, but |\lastpageref{VeryLastPage}|
-% should do this (cf.~subsection~\ref{ssec:aed}).\\
+% |\AddToHook{enddocument/afterlastpage}| (formerly: |\AfterLastShipout|) the label
+% \texttt{VeryLastPage} is defined, which the user can also refer to with the
+% |\lastpageref{VeryLastPage}| command. With the new kernel hooks \texttt{LastPage}
+% as well as \texttt{VeryLastPage} point to the last page indeed.\\
%
% \DescribeMacro{LastPages}
% \DescribeMacro{page number}
% \DescribeMacro{number of pages}
-% When more than one page numbering scheme is used, neither \texttt{LastPage}
-% nor \texttt{VeryLastPage} give the total \textbf{number} of pages.
-% For example, for a document with VI+36 pages, both give
-% \textquotedblleft 36\textquotedblright{} as reference to the last page.
-% While this is correct, the total number of pages is 42, and this is given
-% by the reference to \texttt{LastPage\underline{s}}:
-% \nolinebreak{|\lastpageref{LastPage|\underline{|s|}|}|} (note the
-% \textquotedblleft s\textquotedblright{} at the end). When the
-% page number was manipulated by |\addtocounter{page}{...}|
-% or |\setcounter{page}{...}|, \texttt{LastPages} ignores this.
-% (At a page numbering change the page is reset to one (without option
-% |pagecontinue|). This is done by |\setcounter{page}{1}|, thus this is
-% ignored, too.)\\
+% When more than one page numbering scheme is used, neither \texttt{LastPage} nor
+% \texttt{VeryLastPage} give the total \textbf{number} of pages. For example, for a document
+% with VI+36 pages, both give \textquotedblleft 36\textquotedblright\ as reference to the last page.
+% While this is correct, the total number of pages is 42, and this is given by the reference to
+% \texttt{LastPage\underline{s}}: \nolinebreak{|\lastpageref{LastPage|\underline{|s|}|}|} (note the
+% \textquotedblleft s\textquotedblright\ at the end). When the page number was manipulated by
+% |\addtocounter{page}{...}| or |\setcounter{page}{...}|, \texttt{LastPages} ignores this.
+% (At a page numbering change the page is automatically reset to one (without option
+% |pagecontinue|). This is done by |\setcounter{page}{1}|, thus this is ignored, too.)\\
+%
+% \DescribeMacro{totpages}
% |\pageref{totpages}| of the \xpackage{totpages} package is similar to
-% |\lastpageref{LastPages}|, but while the target for \linebreak[4]
+% |\lastpageref{LastPages}|, but while the target for
% |\pageref{totpages}| is placed |\AtEndDocument|, the target for
-% |\lastpageref{LastPages}| is placed |\AfterLastShipout|, therefore
-% |\lastpageref{LastPages}| is safer to really get the total page number.\\
+% |\lastpageref{LastPages}| is placed in the hook |enddocument/afterlastpage|,
+% therefore |\lastpageref{LastPages}| is safer to really get the total page number.\\
%
-% \pagebreak
+% \DescribeMacro{\@abspage@last}
+% Nowadays the kernel provides |\@abspage@last|, which contains the number of pages.\\
%
% \DescribeMacro{\theCurrentPage}
-% |\theCurrentPage| gives the current total/absolute page, in contrast to
-% |\thepage|, which gives only the page \textit{name} in the current page
-% numbering scheme. For example, when there are Roman VII pages in the
-% frontmatter and afterwards in the mainmatter you are at arabic page~9,
-% then |\theCurrentPage| is~16, whereas |\thepage| is~9. When the page
-% \textquotedblleft number\textquotedblright{} (name) is manipulated by
-% |\addtocounter{page}{...}| or |\setcounter{page}{...}|, |\theCurrentPage|
-% \nolinebreak{ignores} this. Because \texttt{CurrentPage} is a normal
-% counter, you can also say e.\,g.~|\Roman{CurrentPage}| to get the value
-% in Roman page numbering scheme (e.\,g.~VIII for~8).\\
+% |\theCurrentPage| gives the current total/absolute page, in contrast to |\thepage|,
+% which gives only the page \textit{name} in the current page numbering scheme. For example,
+% when there are Roman VII~pages in the frontmatter and afterwards in the mainmatter you are
+% at arabic page~9, then |\theCurrentPage| is~16, whereas |\thepage| is~9. When the page
+% \textquotedblleft number\textquotedblright\ (name) is manipulated by
+% |\addtocounter{page}{...}| or |\setcounter{page}{...}|, |\theCurrentPage| ignores this.
+% Because \texttt{CurrentPage} is a normal counter, you can also say e.\,g.~|\Roman{CurrentPage}|
+% to get the value in Roman page numbering scheme (e.\,g.~VIII for~8).\\
%
% \phantomsection
-% \label{CurrentPageLocal}
% \DescribeMacro{\theCurrentPageLocal}
-% |\theCurrentPageLocal| gives the current (arabic) number of pages in the
-% current page numbering scheme. |\thepage| and |\theCurrentPageLocal| are
-% different e.\,g. when |\addtocounter{page}{...}| or
-% |\setcounter{page}{...}| were used.\\
-% |\theCurrentPageLocal| can be printed in other formats, e.\,g.
-% |\roman{pagesLTS.current.local.roman}|, but probably it only makes
-% sense if page numbering scheme and format are the same, e.\,g.
-% |\Roman{pagesLTS.current.local.Roman}| or\\
-% |\Alph{pagesLTS.current.local.Alph}|.\\
-% |\arabic{pagesLTS.current.local.|\ldots|}| probably make sense even
-% when combined with another page numbering scheme. And this is exactly
-% what |\theCurrentPageLocal| does:\\
+% |\theCurrentPageLocal|\label{CurrentPageLocal} gives the current (arabic)
+% number of pages in the current page numbering scheme. |\thepage| and |\theCurrentPageLocal|
+% are different e.\,g.~when |\addtocounter{page}{...}| or |\setcounter{page}{...}| were used.\\
+% |\theCurrentPageLocal| can be printed in other formats,
+% e.\,g.~|\roman{pagesLTS.current.local.roman}|, but probably it only makes sense
+% if page numbering scheme and format are the same,
+% e.\,g.~|\Roman{pagesLTS.current.local.Roman}| or\\
+% |\Alph{pagesLTS.current.local.Alph}|.
+% \pagebreak
+% |\arabic{pagesLTS.current.local.|\ldots|}| probably make sense even when combined with
+% another page numbering scheme. And this is exactly what |\theCurrentPageLocal| does:\\
% |\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS@pnc}}|.\\
%
% \DescribeMacro{pagesLTS. page numbering scheme . number }
-% If you want to refer to the last page of the first, second,\ldots\ use
-% of a page numbering scheme, you can refer to \linebreak
-% |pagesLTS.<page numbering scheme>.<number>|, e.\,g.
-% |\lastpageref{pagesLTS.Roman.1}|, where |<number>| is the occurrence
-% of the page numbering scheme. For details please see
+% If you want to refer to the last page of the first, second,\ldots\ use of a
+% page numbering scheme, you can refer to\linebreak
+% |pagesLTS.<page numbering scheme>.<number>|, e.\,g.~|\lastpageref{pagesLTS.Roman.1}|,
+% where |<number>| is the occurrence of the page numbering scheme. For details please see
% page~\pageref{pagesLTS.pnscheme.nr}.\\
%
-% \bigskip
% \DescribeMacro{\lastpageref}
-% For pages with the \texttt{fnsymbol} page numbering scheme,
-% |\lastpageref{...}| \nolinebreak{instead} of |\pageref{...}|
-% \textit{must} be used. This is required for pages some\-where
-% inside of the document as well as the (very) last page(s).
-% Because |\lastpageref{...}| is a synonym for |\pageref{...}|,
-% where no \xpackage{fnsymbol} page numbering scheme is used,
-% it is save(r) to use it for all references to labels provided
-% by the \xpackage{pageslts} package.
+% In former times for pages with the \texttt{fnsymbol} page numbering scheme,
+% |\lastpageref{...}| instead of |\pageref{...}| had to be used.
+% |\lastpageref| can be used for all pages.
%
% \subsection[\texttt{\textbackslash pagenumbering\{\ldots \}}]{%
% \texttt{\textbackslash pagenumbering\{\ldots \}}}
+% \vspace{-1.8\baselineskip}
% \DescribeMacro{\pagenumbering}
% \subsubsection{If \texttt{\textbackslash pagenumbering\{\ldots \}} is \textbf{not} used\label{sss:nopnc}}
-%
-% \indent When the \xpackage{pageslts} package is used, but |\pagenumbering{...}|
-% (with an argument like arabic, roman, Roman, fnsymbol, alph, or Alph)
-% is not used, there should be no problem, except that you might need
-% more~(!) compiler runs to get all references right, and some references
-% might even be missing (see below). The \xpackage{pageslts}
-% package tries to determine the page numbering scheme at the first
-% shipout, but success is not guaranteed. Thus please use |\pagenumbering{...}|
-% at the beginning of your document!\\
-% \indent Without |\pagenumbering{<something>}| (|<something>| e.\,g. = arabic)
-% at the beginning of the document, the page numbers might be given in
-% arabic \textit{by} (class) \textit{default}, but the \xpackage{pageslts}
-% package does not know about this without |\pagenumbering{arabic}|.~--\\
-% \indent The label \texttt{pagesLTS.0} is created at the first
-% page even if no |\pagenumbering{...}| command is given.
-% Maybe have a look at the \xfile{.aux} file after compiling your
-% document to detect further labels (of other packages, too).\\
-%
-% \pagebreak
+% When the \xpackage{pageslts} package is used, but |\pagenumbering{...}| (with an argument like
+% arabic, roman, Roman, fnsymbol, alph, or Alph) is not used, there should be no problem,
+% except that you might need more~(!) compiler runs to get all references right, and some
+% references might even be missing (see below). The \xpackage{pageslts} package tries to determine
+% the page numbering scheme at the first shipout, but success is not guaranteed. Thus please use
+% |\pagenumbering{...}| at the beginning of your document!\\
+% Without |\pagenumbering{<something>}| (|<something>| e.\,g.~=~arabic) at the beginning of the document,
+% the page numbers might be given in arabic \textit{by} (class) \textit{default}, but the
+% \xpackage{pageslts} package does not know about this without |\pagenumbering{arabic}|.~--\\
+% The label \texttt{pagesLTS.0} is created at the first page even if no |\pagenumbering{...}| command
+% is given. Maybe have a look at the \xfile{.aux} file after compiling your document to detect
+% further labels (of other packages, too).
%
% \subsubsection{If \texttt{\textbackslash pagenumbering\{\ldots \}} is used once\label{sss:once}}
-%
% \DescribeMacro{pagesLTS.0}
-% At the first page a label \texttt{pagesLTS.0} is created.
-% If |\pagenumbering{...}| is used right after |\begin{document}|,
-% this is much easier for the \xpackage{pageslts} package
+% At the first page a label \texttt{pagesLTS.0} is created. If |\pagenumbering{...}| is used
+% right after |\begin{document}|, this is much easier for the \xpackage{pageslts} package
% (and chances for successful placing of all labels are much higher).
%
% \subsubsection{If \texttt{\textbackslash pagenumbering\{\ldots \}} is used more than once}
-%
-% \indent Everything from the preceding subsubsections applies and additionally
-% the following:\\
-% \indent When different page numbering schemes are used, e.\,g.
-% Roman numbers for the frontmatter and arabic numbers for the
-% mainmatter, please use |\pagenumbering{...}| for each of them!
-% Even if you do this, the reference to neither the label \texttt{LastPage}
-% nor the label \texttt{VeryLastPage} gives the \textbf{total}
-% number of pages, but only the number of pages of the last used page
-% numbering scheme (which could be exactly what you want, e.\,g. if
-% you want to refer to the last page itself and do not want to
-% give the total number of pages).\\
+% Everything from the preceding subsubsections applies and additionally the following:\\
+%
+% When different page numbering schemes are used, e.\,g.~Roman numbers for the frontmatter
+% and arabic numbers for the mainmatter, please use |\pagenumbering{...}| for each of them!
+% Even if you do this, the reference to neither the label \texttt{LastPage} nor the label
+% \texttt{VeryLastPage} gives the \textbf{total} number of pages, but only the number of pages
+% of the last used page numbering scheme (which could be exactly what you want,
+% e.\,g.~if you want to refer to the last page itself and do not want to give the
+% total number of pages).\\
% \DescribeMacro{LastPages}
-% \indent For remediation the label
-% \nolinebreak{\texttt{LastPage}\textbf{\underline{s}}}
-% (with \textquotedblleft s\textquotedblright{} at its end) is
-% introduced. Please then refer to this label by \newline
-% |\lastpageref{LastPages}| instead of \texttt{LastPage} or
+% For remediation the label \nolinebreak{\texttt{LastPage}\textbf{\underline{s}}} (with
+% \textquotedblleft s\textquotedblright{} at its end) is introduced. Please then refer
+% to this label by |\lastpageref{LastPages}| instead of \texttt{LastPage} or
% \texttt{VeryLastPage}.\\
%
% \DescribeMacro{pagesLTS.arabic}
@@ -806,77 +661,43 @@ In memoriam
% Additionally, at the last page of each page numbering scheme a label
% \texttt{pagesLTS.<numbering scheme>} is placed, where
% \texttt{<numbering scheme>} is e.\,g.\ arabic, roman, Roman, alph,
-% Alph,\ldots .\\
-% For the \textbf{fnsymbol} page numbering scheme
-% |\lastpageref{pagesLTS.fnsymbol}| is needed instead of \newline
-% |\pageref{pagesLTS.fnsymbol}|. You can and should use
-% |\lastpageref{...}| also for the other page numbering schemes.\\
-%
-% \bigskip
-%
-% While at the time of the last revision of the \xpackage{pageslts} package
-% no other page numbering schemes were known to the maintainer,
-% this package in principle works with every scheme which is
-% recognized by the original |\pagenumbering| command.
-% But the \xpackage{hyperref} package only then works with crazy page names,
-% if the references to those pages are given in a certain way, thus the
-% combination of a new page numbering scheme, the \xpackage{hyperref}
-% and the \xpackage{pageslts} package might not work.~--
-% The \xpackage{pageslts} package by itself also works with schemes,
-% which the original |\pagenumbering{...}| does not recognize, but because
-% the original |\pagenumbering{...}| is called by the \xpackage{pageslts}
-% package, this might cause an error, see subsection~\ref{sec:unknown}!
-% (And if the number format is unknown to \LaTeX{}, the pages will have
-% no number, and therefore cannot be referenced. You might be able to
-% help yourself by using the \xpackage{hyperref} package and
-% manually placing |\hypertarget|s and |\href|s.)
+% Alph,\mbox{\ldots .}\\
+% Additional page numbering schemes are unknown for \xpackage{pageslts},
+% see \autoref{sec:unknown} \nameref{sec:unknown}.\\
%
% \subsubsection{If the same \texttt{\textbackslash pagenumbering\{\ldots \}}\ %
% scheme is used more than once\label{sss:twice}}
-%
-% \indent Everything from the preceding subsubsections applies and additionally
-% the following:\\
+% Everything from the preceding subsubsections applies and additionally the following:\\
% \DescribeMacro{pagecontinue}
-% \indent If the same page numbering scheme is used twice (or even more often)
-% in one document (e.\,g. in the frontmatter Roman: I--V, in the
-% mainmatter arabic: 1--20, and in the backmatter again Roman: VI--X),
-% the second time it is used, the page numbering is either continued (option
-% \texttt{pagecontinue} or \texttt{pagecontinue=true} or no option
-% \texttt{pagecontinue}; the default) or reset to one (option
-% \texttt{pagecontinue=false}). It is even possible to use
-% a~page numbering scheme more than twice.\\
+% If the same page numbering scheme is used twice (or even more often) in one document
+% (e.\,g.\ in the frontmatter Roman: I--V, in the mainmatter arabic: 1--20, and in the
+% backmatter again Roman: VI--X), the second time it is used, the page numbering is either
+% continued (option \texttt{pagecontinue} or \texttt{pagecontinue=true} or no option
+% \texttt{pagecontinue}; the default) or reset to one (option \texttt{pagecontinue=false}).
+% It is even possible to use a~page numbering scheme more than twice.\\
%
% \phantomsection
-% \label{pagesLTS.pnscheme.nr}
-% \DescribeMacro{pagesLTS. page numbering scheme . number }
-% If you want to refer to the last page of the first, second,\ldots\ use
-% of a page numbering scheme, page~V in the example above, you can refer to
-% |pagesLTS.<page numbering scheme>.<number>|, e.\,g.
-% |\lastpageref{pagesLTS.Roman.1}|, where |<number>| is the occurrence
-% of the page numbering scheme.\\
-%
-% \pagebreak
+% \DescribeMacro{pagesLTS. page numbering scheme . number }\label{pagesLTS.pnscheme.nr}
+% If you want to refer to the last page of the first, second,\ldots\ use of a
+% page numbering scheme, page~V in the example above, you can refer to
+% |pagesLTS.<page numbering scheme>.<number>|, e.\,g.~|\lastpageref{pagesLTS.Roman.1}|,
+% where |<number>| is the occurrence of the page numbering scheme.\\
%
-% If you want to refer to the first page of a page numbering scheme,
-% just place a label there, e.\,g.\\
+% If you want to refer to the first page of a page numbering scheme, just place a label there, e.\,g.\\
% \indent |\pagenumbering{Roman}| \\
% \indent |\section{Section title\label{RomanSection}}| \\
-% (You know where you use |\pagenumbering{...}| and this is the
-% \xpackage{pageslts} package, not the \xpackage{firstpage} one).\\
+% (You know where you use |\pagenumbering{...}| and this is the \xpackage{pageslts} package,
+% not the \xpackage{firstpage} package).\\
%
-% When you want to give the number of pages of each
-% \textquotedblleft sector\textquotedblright{} of the page numbering
-% scheme, you can use\\
+% When you want to give the number of pages of each \textquotedblleft sector\textquotedblright\ of
+% the page numbering scheme, you can use\\
% \DescribeMacro{pagesLTS. page numbering scheme . number .local.cnt}
% |\lastpages{<page numbering scheme>}{<number>}|, \\
-% where |<page numbering scheme>| is e.\,g. Roman, arabic,\ldots\ and
-% |<number>| the \textquotedblleft sector\textquotedblright{} number,
-% e.\,g.~|\lastpages{Roman}{2}|.\\
-% (Internally, the counter has the format
-% |pagesLTS.<page numbering scheme>.<number>.local.cnt|.)
-%
-% \noindent If you used the page numbering scheme Roman for three times,
-% you could say
+% where |<page numbering scheme>| is e.\,g. Roman, arabic,\ldots\ and |<number>| the
+% \textquotedblleft sector\textquotedblright{} number, e.\,g.~|\lastpages{Roman}{2}|.\\
+% (Internally, the counter has the format |pagesLTS.<page numbering scheme>.<number>.local.cnt|.)
+%
+% If you used the page numbering scheme Roman for three times, you could say
% \begin{verbatim}
% Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}\\
% There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
@@ -895,15 +716,13 @@ In memoriam
% 4 pages in the second Roman sector (IV -- VII), and\\
% 3 pages in the third Roman sector (VIII -- X).\\
% \end{quote}
-% (see e.\,g. the compiled \textsf{pageslts-example} file).\\
-%
-% If you want to continue one page numbering scheme, but later on
-% (third use of it, or for another page numbering scheme) want to
-% reset the page number, just say |\setcounter{page}{1}| there.\\
+% (see e.\,g.~the compiled \textsf{pageslts-example} file).\\
%
-% \pagebreak
+% If you want to continue one page numbering scheme, but later on (third use of it,
+% or for another page numbering scheme) want to reset the page number, just say
+% |\setcounter{page}{1}| there.\\
%
-% \noindent In your document the code
+% In your document the code
% \begin{verbatim}
% \makeatletter
% \renewcommand{\@evenfoot}%
@@ -913,162 +732,88 @@ In memoriam
% \renewcommand{\@oddfoot}{\@evenfoot}
% \makeatother
%\end{verbatim}
-% \noindent creates footers like\\
+% creates footers like\\
%
% \textquotedblleft\mbox{\textsl{DRAFT \today}\hspace{1cm}page V (5) of VII + 35 = 42 pages}\textquotedblright\\
%
-% \noindent or\\
+% or\\
%
% \textquotedblleft\mbox{\textsl{DRAFT \today}\hspace{1cm}page 10 (17) of VII + 35 = 42 pages}\textquotedblright\\
%
-% \noindent in the compiled document (cf.~the \texttt{pageslts-example} file).
+% in the compiled document (cf.~the \texttt{pageslts-example} file).\\
%
-% \noindent Code like
+% Code like
% \begin{verbatim}
% This book has \lastpageref{pagesLTS.Roman}+\lastpageref{pagesLTS.arabic} pages %
% (\lastpageref{LastPages} pages in total).
-% \end{verbatim}
-% \noindent produces output like
+%\end{verbatim}
+% produces output like
% \begin{quote}
% This book has X+85 pages (95 pages in total).
% \end{quote}
-% \noindent (when using the \xpackage{hyperref} package,
-% the references are even hyperlinked).\\
+% (when using the \xpackage{hyperref} package, the references are even hyperlinked).\\
%
-% If |\addtocounter{page}{...}| or |\setcounter{page}{...}| have been used,
-% the local version of \texttt{CurrentPage} can be used, |\theCurrentPageLocal|,
-% see subsection~\ref{CurrentPageLocal}.\\
+% If |\addtocounter{page}{...}| or |\setcounter{page}{...}| have been used, the local version of
+% \texttt{CurrentPage} can be used, |\theCurrentPageLocal|, see subsection~\ref{CurrentPageLocal}.\\
%
% \subsection{\xpackage{papermas}(s) package\label{ss:papermas}}
-% There is a kind of an add-on to this package, the \xpackage{papermas}
-% package, which can be used to compute the number of sheets of paper
-% needed to print a document (you can print more than one page of a
-% document on one sheet of paper) as well as the approximate mass
-% of the printout. Please see the \ref{ss:Downloads} subsection.
-%
-% \newpage
+% There is a kind of an add-on to this package, the \xpackage{papermas} package,
+% which can be used to compute the number of sheets of paper needed to print a document
+% (you can print more than one page of a document on one sheet of paper) as well as the
+% approximate mass of the printout. \url{https://ctan.org/pkg/papermas}
%
% \section{A few warnings\label{sec:warn}}
-%
% \subsection{Hyperref and repeated page numbers}
-%
-% When two (or more) different page numbering schemes are used, or the page number
-% is reset, or for any other reason there are two pages with the same number
-% (maybe in different format, e.\,g. $1$ and \textsc{I}), and \xpackage{hyperref} has
-% not been configured right, this can cause problems. Use \xpackage{hyperref} with
-% \texttt{plainpages=false} and \texttt{pdfpagelabels=true}, and everything should
-% be fine.\\
-% More details can be found at
-% \ \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdfpagelabels}.
-%
-% \subsection{\texttt{\textbackslash AtEndDocument}\label{ssec:aed}}
-%
-% \indent The output of a \LaTeXe\ run is not independent of the order
-% in which packages are loaded. It is often the case that the same
-% formats for which one must put tables and figure at the end,
-% are the ones in which endnotes are also required.
-% If one wants to use |\AtEndDocument| here as well (as done for
-% |\lastpageref{LastPage}|), then it is easy to get to three separate
-% uses of |\AtEndDocument| (assuming one uses this for the endnotes
-% as well). Clearly it is not safe for any package writer or user
-% to assume that no material will follow what they put into
-% |\AtEndDocument|. Therefore a message, which begins with
-% \texttt{AED}, is included in every usage of |\AtEndDocument|,
-% and it is tried to minimize any side effects the usage may have.\\
-%
-% As now \textsc{Heiko Oberdiek}'s \texttt{atveryend} package is used,
-% the references |\lastpageref{VeryLastPage}| and \newline
-% |\lastpageref{LastPages}| should work all right. About how to get the
-% \texttt{atveryend} package, please see subsection~\ref{ss:Downloads}.
-%
-% \subsection{Interaction with very old versions of the \xpackage{endfloat} %
-% package\label{sec:endfloat}}
-%
-% \indent The \emph{very} old version~2.0 (and earlier) of the \xpackage{endfloat}
-% package actually redefined the |\enddocument| command,
-% and so interfered drastically with the \LaTeXe\ commands which make use
-% of |\AtEndDocument|. Newer versions of \xpackage{endfloat} exist
-% (at the time of writing this documentation: v2.5d as of 2011/12/25)
-% in modern documentation form, which should be available from
-% the same source where you received this file, see subsection~\ref{ss:Downloads}.\\
-% A note is placed in the style file at the |\RequirePackage| section,
-% and later it is even 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.
-% This assumes, that the old versions of \xpackage{endfloat} at least gave
-% a version date, of course.\\
-% If you want your \texttt{LastPage} to label the last page of
-% these end floats, you need to load \xpackage{pageslts} \emph{after}
-% loading \xpackage{endfloat}, or to use \texttt{VeryLastPage} instead.
-% If, on the other hand, you \emph{want} \texttt{LastPage} to refer
-% to the (not so) last page, exclusive of the floats at the end,
-% then load in the reverse order. Independent from the order of
-% \xpackage{pageslts} and \xpackage{endfloat}, you will still need the
-% modified\footnote{New versions are available for over $15$~years now,
-% so it might be time to update, if you did not do it already.} version of
-% \xpackage{endfloat}.\\
-% Using the
-% \nolinebreak{\texttt{LastPage}\textbf{\underline{s}}\ (\textit{s}!)}\ label
-% should get you to the last page in all cases: |\lastpageref{LastPages}|.\\
-%
-% Other \LaTeX209\ (!) packages also seem to like to redefine
-% |\enddocument|. In addition to the old \xpackage{endfloat},
-% \xpackage{harvard} comes to mind. All of these will need to be
-% modified swiftly. \textbf{If possible, update to \LaTeXe{}!}
-%
-% \pagebreak
+% When two (or more) different page numbering schemes are used, or the page number is reset,
+% or for any other reason there are two pages with the same number (maybe in different format,
+% e.\,g.~$1$ and \textsc{I}), and \xpackage{hyperref} has not been configured right,
+% this can cause problems. Use \xpackage{hyperref} with \texttt{plainpages=false} and
+% \texttt{pdfpagelabels=true}, and everything should be fine. More details can be found at
+% \url{https://texfaq.org/FAQ-pdfpagelabels}.
%
% \subsection{\xpackage{showkeys} package\label{ssec:showkeys}}
-%
% When the \xpackage{showkeys} package has been loaded in \texttt{draft} mode,
% in the margin for each label a~box is displayed with the name of the label.
% \xpackage{showkeys} accomplishes this by redefining |\label|, but
-% \xpackage{pageslts} does not use |\label|, but writes directly to the
-% {\nobreak |\jobname|\xfile{.aux}-}\allowbreak file, and this is generally done
+% \xpackage{pageslts} does not always use |\label|, but sometimes writes directly into
+% the {\nobreak |\jobname|\xfile{.aux}-}\allowbreak file, and this is generally done
% \emph{after} the according page has shipped out, therefore no box can be placed
% on the \emph{preceding} page. At~least \xpackage{pageslts} gives a warning, that
% \xpackage{showkeys} cannot present the respective label.
%
% \subsection{\xpackage{lastpage} package\label{ssec:lastpage}}
-%
-% This package first started as a revision of the \xpackage{lastpage}
-% package of \textsc{Jeffrey P. Goldberg} (jeffrey+news at goldmark dot org),
-% but it became obvious that a replacement was needed to accomplish what this
-% package does. For backward compatibility, a~label named |LastPage| is provided.
-% Thus |\usepackage{lastpage}| can be replaced by\\
-% |\usepackage[pagecontinue=false,%|\newline
-% |alphMult=0,AlphMulti=0,fnsymbolmult=false,romanMult=false,RomanMulti=false]{pageslts}|,\\
+% This package first started as a revision of the \xpackage{lastpage} package of
+% \textsc{Jeffrey P. Goldberg} (jeffrey+news at goldmark dot org), but then I deemed
+% a replacement necessary to accomplish what this package does. For backward compatibility,
+% a~label named |LastPage| is provided. Thus |\usepackage{lastpage}| can be replaced by\\
+% |\usepackage[pagecontinue=false,alphMult=0,AlphMulti=0,fnsymbolmult=false,romanMult=false,RomanMulti=false%|%
+% \linebreak{}| ]{pageslts}|,\\
% if the behaviour of the \xpackage{lastpage} package should be simulated.
-% Using \textbf{old}~(!) versions of the \xpackage{lastpage} before the \xpackage{pageslts}
-% before the \xpackage{hyperref} [2012/11/06 v6.83m]
-% package results in multiply definitions of the |LastPage| label.
-% While the \xpackage{pageslts} package cancels the command |\lastpage@putlabel|
-% from the old \xpackage{lastpage} package (because it does this itself, and better),
-% \xpackage{hyperref} redefines |\lastpage@putlabel| and thereby reintroduces it again
-% (\xpackage{hyperref} should probably check for the version of the \xpackage{lastpage}
-% package and/or whether the \xpackage{pageslts} package was also loaded.)
+% It is also possible to load both packages (if recent versions are used).
%
% \subsection{Using an unknown page numbering scheme\label{sec:unknown}}
-%
-% \indent I do not know whether \LaTeXe\ can handle another page numbering
-% scheme (e.\,g.~Hebraic), but if you want to use it, this should be
-% no problem for the \xpackage{pageslts} package. But the original
-% |\pagenumbering{...}| as well as the \xpackage{hyperref} package
-% (if~used) might want to vote against it, especially when used together
-% with the \xpackage{pageslts} package. Especially especially
-% (\textit{sic}!) if the last page uses this new page numbering scheme,
+% While at the time of the latest revision of the \xpackage{pageslts} package
+% no other page numbering schemes (e.\,g.~Greek, Hebraic) were known to the maintainer,
+% this package in principle works with every scheme which is recognized by the original
+% |\pagenumbering| command. But the \xpackage{hyperref} package only then works with
+% special page names, if the references to those pages are given in a certain way,
+% thus the combination of a new page numbering scheme, the \xpackage{hyperref} and the
+% \xpackage{pageslts} package might not work.~--
+% The \xpackage{pageslts} package by itself also works with schemes, which the original
+% |\pagenumbering{...}| does not recognize, but because the original
+% |\pagenumbering{...}| is called by the \xpackage{pageslts} package, this might cause
+% an error. Especially if the last page uses this new page numbering scheme,
% you should check everything double (at least).\\
-% (And if the number format is unknown to \LaTeX{}, the pages will have
-% no number, and therefore cannot be referenced. You might be able to
-% help yourself by using the \xpackage{hyperref} package and
-% manually placing |\hypertarget|s and |\href|s.)
+% And if the number format is unknown to \LaTeX , the pages will have no number, and
+% therefore cannot be referenced. You might be able to help yourself by using the
+% \xpackage{hyperref} package and manually placing |\phantomsectin|\,s and
+% \nolinebreak{|\label{|\ldots|}|\,s} or even |\hypertarget|\,s and
+% \nolinebreak{|\href|\,s.}\pagebreak
%
% \subsection{Page counter overflow\label{ss:overflow}}
-%
-% \indent Without the use of the \xpackage{alphalph} package, the\\
-% \textquotedblleft ranges of supported counter values are more or less
-% restricted. Only \cs{arabic} can be used with any counter
-% value \TeX\ supports.
+% \underline{\textbf{WITHOUT~(!)}} the use of the \xpackage{alphalph} package, the\\[0.6ex]
+% \textquotedblleft ranges of supported counter values are more or less restricted.
+% Only \cs{arabic} can be used with any counter value \TeX\ supports.
% \begin{quote}
% \catcode`\|=12 %
% \begin{tabular}{@{}l|l|l|l@{}}
@@ -1087,137 +832,113 @@ In memoriam
% \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).\\
% Please see subsubsections~\ref{sss:alphalph} and \ref{sss:romanMult} for
-% instructions how to overcome these limitations.
-%
-% \newpage
-%
-% \subsection{Using the \xpackage{fnsymbol} page numbering scheme\label{ss:fnsymbol}}
-%
-% \indent Using the \texttt{fnsymbol} page numbering scheme can result in
-% problems -- big ones!\\
-% \textbf{When using this page numbering scheme, it is very important to use}
-% \ |\lastpageref{...}| \textbf{instead of}\ |\pageref{...}| \textbf{for any%
-% link to any label provided by the \xpackage{pageslts} package.}\\
-% While the \xpackage{pageslts} package tries really very hard to circumvent
-% any problem, other packages might screw up -- and quite totally for that.
-% So,~you have been warned!\\
-%
-% \begin{description}
-% \item[-] There can be a counter overflow, see preceding subsection~\ref{ss:overflow}.
-%
-% \item[-] Adobe Reader DC 2015.008.20082 does not show the correct page names
-% for all pages with \texttt{fnsymbol} page numbering scheme (see the example file),
-% while at least the (\ldots\ of \ldots ) part of the page number is displayed correctly
-% (see page~\pageref{logical page numbers}, tip about logical page numbers).
-% When the \xpackage{alphalph} package and the \xpackage{pageslts} package with
-% |fnsymbolmult| option are used, more page names are presented correctly by the Reader.
-% (Adobe Reader~X even got all pages right.)
-% \end{description}
-%
+% instructions how to overcome these limitations -- except \mbox{$\pm$MAX:}
+% When this 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).
% \newpage
%
% \section{Alternatives\label{sec:Alternatives}}
-%
-% There are similar packages, which do (or do not) similar things. 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.~\eTeX{}), here is a list of some possible alternatives:\\
-%
-% \DescribeMacro{LastPage}
-% \begin{description}
-% \item[-] The \xpackage{LastPage} package also provides the
-% \texttt{LastPage} label (but not \texttt{VeryLastPage} or
-% \texttt{LastPages}). If you only want this and have a quite
-% limited amount of \TeX\ resources, you might want to use that
-% package instead.
-%
-% \item[-] If \LaTeX2.09\ is still used, and if you are unable
-% to switch to \LaTeXe{}, the \LaTeX2.09{} compatible
-% \xpackage{lastpage209.sty} can be used (which is also contained
-% in the recent \xpackage{LastPage} package).
-% \end{description}
-%
-% \DescribeMacro{totpages}
-% \begin{description}
-% \item[-] The \xpackage{totpages} package provides a
-% \texttt{totpages} label similar to \texttt{LastPages},
-% but |\AtEndDocument| instead of |\AfterLastShipout|. Therefore
-% you should stay with \xpackage{pageslts}. 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). This can also be accomplished with the
-% \xpackage{papermas} package.
-% \end{description}
-%
-% \DescribeMacro{totcount}
-% \begin{description}
-% \item[-] 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 (i.\,e. X+72 pages gives 72
-% instead of 82 as total number of pages), and the number of pages
-% can be changed e.\,g. by |\addtocounter|.
-% \end{description}
-%
-% \DescribeMacro{nofm}
+% There are similar packages, which do (or do not) similar things. 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 your system has,
+% here is a list of some possible alternatives:
% \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)\\
+% \item[-]\DescribeMacro{LaTeX kernel}
+% The recent \LaTeX{} kernel already writes something like |\gdef \@abspage@last{42}|
+% to the end of the \xfile{aux} file, where |42| is the number of pages, regardless of
+% |\pagenumbering{...}| schemes, |\setcounter{page}{...}|, |\addtocounter{page}{...}|
+% or whatever. |\the\ReadonlyShipoutCounter| contains the number of currently shipped out pages,
+% i.e. current page minus one.
+%
+% \item[-]\DescribeMacro{LastPage}
+% The \xpackage{lastpage} package also provides the \texttt{LastPage} label
+% (but not \texttt{VeryLastPage} or \texttt{LastPages}). If you only want this and/or
+% have a quite limited amount of \TeX\ resources, you might want to use that package instead.
+% It includes versions for older \LaTeX-kernels and even for \mbox{\LaTeX2.09{}.}\\
+% \url{https://ctan.org/pkg/lastpage}
+%
+% \item[-]\DescribeMacro{totpages}
+% The \xpackage{totpages} package provides a \texttt{totpages} label similar to
+% \texttt{LastPages}, but |\AtEndDocument| instead of |\AfterLastShipout|. Therefore
+% you should stay with \xpackage{pageslts}. 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). This can also be accomplished with the
+% \xpackage{papermas} package (see \autoref{ss:papermas}).\\
+% \url{https://ctan.org/pkg/totpages}
+%
+% \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}
+%
+% \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{http://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},\\
+% \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://www.CTAN.org}) location of a%
+% If you know the (\url{https://CTAN.org}) location of a
% \textbf{working}~(!) version, please send me an e-mail, thanks!
-% \end{description}
-%
-% \DescribeMacro{count1to}
-% \begin{description}
-% \item[-] You may want to have a look at the \xpackage{count1to} package.
-% \end{description}
%
-% \DescribeMacro{zref}
-% \begin{description}
-% \item[-] The \xpackage{zref} package of \textsc{Heiko Oberdiek} requires
-% \eTeX . \xpackage{pageslts} does not require \eTeX , but if you
-% already have \eTeX , you may have a look at the extensive
-% \xpackage{zref} package, whether it suits your needs better
-% (or additionally or whatsoever).
+% \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}
% \end{description}
%
% \bigskip
%
% \noindent (You programmed or found another alternative,
-% which is available at \url{https://www.CTAN.org}?\\
+% which is available at \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
-%
-% \noindent About how to get those packages, please see subsection~\ref{ss:Downloads}.
-%
+% and a short notice, and I will probably include it in the list above.)
% \newpage
%
% \section{Example}
-%
% \begin{macrocode}
%<*example>
-\documentclass[british]{article}[2014/09/29]% v1.4h
-\usepackage{lipsum}[2014/07/27]% v1.3
-\usepackage[draft]{showkeys}[2014/10/28]% v3.17
+\documentclass[british]{article}[2024/02/08]% v1.4n
+\usepackage{lipsum}[2021-09-20]% v2.7
+\usepackage[draft]{showkeys}[2024/05/23]% v3.21
%% Use final instead of draft to hide the keys. %%
-\usepackage{hyperref}[2012/11/06]% v6.83m
+\PassOptionsToPackage{hyperref}{pdfpagelabels=true,hyperindex=false}
+\usepackage{hyperref}[2024-10-30]% v7.01k
\hypersetup{%
extension=pdf,%
plainpages=false,%
- pdfpagelabels=true,%
- hyperindex=false,%
pdflang={en},%
pdftitle={pageslts package example},%
pdfauthor={Hans-Martin Muench},%
@@ -1229,7 +950,7 @@ In memoriam
bookmarksopen=true%
}
\usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,%
- romanMult=true,RomanMulti=true]{pageslts}[2015/12/21]% v1.2f
+ romanMult=true,RomanMulti=true]{pageslts}[2024-11-20]% v2.0a
%% These are the default options. %%
\makeatletter
@@ -1246,11 +967,13 @@ In memoriam
\renewcommand{\@oddfoot}{\@evenfoot}
\def\pagesLTSexampleArabic{3}
\def\pagesLTSexamplealph{23}
- \gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\makeatother
\listfiles
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
\begin{document}
\pagenumbering{roman}
%% Note the first \pagenumbering immediately behind \begin{document}! %%
@@ -1261,13 +984,14 @@ In memoriam
\markboth{Example for pageslts}{Example for pageslts}
This example demonstrates the most common uses of package\\
-\textsf{pageslts}, v1.2f as of 2015/12/21 (HMM).\\
+\textsf{pageslts}, v2.0a as of 2024-11-20 (HMM);\\
+\url{https://ctan.org/pkg/pageslts}.\\
+
The used options were \texttt{pagecontinue=true},
\texttt{alphMult=ab}, \texttt{AlphMulti=AB}, \linebreak
\texttt{fnsymbolmult=true},
\texttt{romanMult=true}, and \texttt{RomanMulti=true}
-(the default ones).\\
-For more details please see the documentation!\\
+(the default\linebreak ones). -- For more details please see the documentation!\\
\label{keys} To hide the \pageref{keys}{\qquad } use option
\texttt{final} instead of \texttt{draft} with the \textsf{showkeys}
@@ -1287,7 +1011,7 @@ Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
\lastpageref{LastPages} pages.\\
If the \textsf{hyperref} package is loaded, but the hyperlinks of the
references shall be suppressed, \verb|\pageref*{...}|
-and \verb|\lastpageref*{...}| can be used:\\
+and \verb|\lastpageref*{...}| can be used:\\[0.5\baselineskip]
Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
\lastpageref*{pagesLTS.roman}(\lastpageref*{pagesLTS.roman.local}) + %
\lastpageref*{pagesLTS.Roman}(\lastpageref*{pagesLTS.Roman.local}) + %
@@ -1304,7 +1028,7 @@ trademark owner. There is no intention of infringement; the
usage is to the benefit of the trademark owner.\\
\textbf{Tip}: Use \textit{logical page numbers}
-for the display of the pdf (in Adobe Reader DC 2015.008.20082:
+for the display of the pdf (in Adobe Reader Continuos Release 2024.004.20272:\\
Edit $>$ Preferences $>$ Categories: Page Display $>$
Page Content and Information: Use logical page numbers)!\\
@@ -1313,12 +1037,6 @@ Roman, alph, Alph or fnsymbol ones? No problem, e.\,g. just give a\\
\verb|\addtocounter{page}{|-\textit{some number}\verb|}| in the
source code of this example file (or uncomment the prepared line)!
-\bigskip
-
-Save per page about $200\unit{ml}$ water, $2\unit{g}$ CO$_{2}$
-and $2\unit{g}$ wood:\\
-Therefore please print only if this is really necessary.
-
\pagebreak
\tableofcontents
@@ -1327,8 +1045,7 @@ Therefore please print only if this is really necessary.
\pagenumbering{roman}
%% in case the page numbering is changed before,
-%% otherwise pagesLTS.current.local.roman on this page
-%% would be undefined
+%% otherwise pagesLTS.current.local.roman on this page would be undefined
\section{roman}
@@ -1342,13 +1059,16 @@ the first page, of course.)\\
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first\linebreak page):~\theCurrentPage \\
You can get this also in other formats:
\roman{CurrentPage}, \Roman{CurrentPage}, \arabic{CurrentPage},
\fnsymbol{CurrentPage}, \alph{CurrentPage}, \Alph{CurrentPage}.
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
You can get also this in other formats, too:
\roman{pagesLTS.current.local.roman}, \Roman{pagesLTS.current.local.roman},
@@ -1384,8 +1104,9 @@ because the number of pages does not change (only the page numbers).\\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -1398,9 +1119,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{lastpage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -1420,10 +1141,10 @@ a package with output \linebreak
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -1442,8 +1163,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -1456,9 +1179,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -1481,6 +1204,9 @@ The Roman page numbering scheme is continued later in section~\ref{Roman2})!
\newpage
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
\pagenumbering{arabic}
\section{arabic}
@@ -1493,10 +1219,10 @@ The Roman page numbering scheme is continued later in section~\ref{Roman2})!
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -1511,12 +1237,17 @@ current page numbering scheme): \theCurrentPageLocal \\
\lastpages{Roman}{3}~pages in the third Roman sector
(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -1529,9 +1260,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pagesLTS} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -1552,10 +1283,13 @@ for the current or total page count}
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -1574,8 +1308,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -1588,9 +1324,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -1611,10 +1347,10 @@ in the source code.)\\
\noindent The page (from \verb|\thepage| command): \thepage \\
\noindent Current page (from \verb|\theCurrentPage|\ %
-command), i.\,e. counted continuously from the first page): \theCurrentPage \\
+command), i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (from \verb|\theCurrentPageLocal|\ %
-command), i.\,e. counted continuously from the first page of the
+command), i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal\\
\noindent Last page's number (LastPages): \lastpageref{LastPages}{\hskip3em }
@@ -1628,15 +1364,8 @@ current page numbering scheme): \theCurrentPageLocal\\
\section{fnsymbol}
-Adobe Reader DC 2015.008.20082 does not show the correct page names
-for all pages with \texttt{fnsymbol} page numbering scheme,
-while at least the (\ldots\ of \ldots ) part of the page number is displayed correctly.
-(Adobe Reader~X even got all pages right.)
-
-\bigskip
-
Without option \texttt{fnsymbolmult=true} of the \textsf{pageslts} package
-(and the help of \textsc{Heiko Oberdiek}'s \textsf{alphalph} package),
+(and the help of the \textsf{alphalph} package),
after page~9 (\textquotedblleft \ensuremath {\ddagger \ddagger }\textquotedblright )
(and also for negative page numbers) there would just appear a
\begin{quote}
@@ -1655,8 +1384,8 @@ the first, second, third,\ldots\ page (\ensuremath {**},
\ensuremath {\mathparagraph \mathparagraph }),
and after the tenth page the \textquotedblleft number\textquotedblright{} is
tripled (\ensuremath {***}, \ensuremath {\dagger \dagger \dagger },\ldots).
-Page zero is named 0 and negative pages just named like the positive ones
-with addition of a minus sign~($-$).
+Page zero is named 0 and negative pages are just named like the positive ones
+with addition of a minus \mbox{sign ($-$).}
\bigskip
@@ -1666,10 +1395,10 @@ with addition of a minus sign~($-$).
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -1688,8 +1417,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -1702,9 +1433,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -1715,16 +1446,16 @@ a package with output \linebreak
\pagenumbering{Roman}
-\section{Roman - again!\label{Roman2}}
+\section{Roman -- again!\label{Roman2}}
The page number would start with \textquotedblleft I\textquotedblright{} again --
but for the \textsf{pageslts} package (with option \texttt{pagecontinue=true},
or with option just \texttt{pagecontinue}, or even just
\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}).
-This package remembered the (\arabic{pagesLTS.double.Roman}-1)\footnote{%
-OK, here you have to compute this value for yourself, but %
-subtracting one should be manageable for \TeX{}nicians.} pages already
-done in Roman output, and therefore continues with page
+This package remembered the
+\arabic{pagesLTS.double.Roman}-1,
+i.\,e.~\the\numexpr\value{pagesLTS.double.Roman}-1\relax, pages
+already done in Roman output, and therefore continues with page
\textquotedblleft \thepage \textquotedblright .\\
If you want to start with \textquotedblleft I\textquotedblright{} all
over again, you will have two pages with the same name,
@@ -1737,10 +1468,13 @@ or a \verb|\setcounter{page}{1}|\ here (not demonstrated in this example file).\
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -1759,7 +1493,7 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never
\verb|\pageref{pagesLTS.fnsymbol}|!)\\
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
@@ -1774,9 +1508,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -1808,10 +1542,10 @@ The Roman page numbering scheme is continued later in section~\ref{Roman3})!
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -1830,8 +1564,13 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -1844,9 +1583,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -1855,9 +1594,9 @@ a package with output \linebreak
\newpage
-Without option \texttt{alphMult=ab} of the \textsf{pageslts} (and the help of
-\textsc{Heiko Oberdiek's} \textsf{alphalph} package), after page
-\textquotedblleft z\textquotedblright{} there would just appear a
+Without option \texttt{alphMult=ab} of the \textsf{pageslts} (and the help of the
+\textsf{alphalph} package), after page \textquotedblleft z\textquotedblright{} there
+would just appear a
\begin{quote}
\begin{verbatim}
LaTeX Error: Counter too large
@@ -1884,16 +1623,14 @@ in the source code here.
\section{Roman - third time!\label{Roman3}}
-The page number would start with
-\textquotedblleft I\textquotedblright{} again -- but
-for the \textsf{pageslts} package (with option \texttt{pagecontinue=true},
+The page number would start with \textquotedblleft I\textquotedblright{} again
+-- but for the \textsf{pageslts} package (with option \texttt{pagecontinue=true},
or with option just \texttt{pagecontinue}, or even just
\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}).
This package remembered the
-(\arabic{pagesLTS.double.Roman}-1)\footnote{OK, here %
-you have to compute this value for yourself, but %
-subtracting one should be managable for \TeX nicians.} pages already
-done in Roman output, and therefore continues with page
+\arabic{pagesLTS.double.Roman}-1,
+i.\,e.~\the\numexpr\value{pagesLTS.double.Roman}-1\relax, pages
+already done in Roman output, and therefore continues with page
\textquotedblleft \thepage \textquotedblright .\\
If you want to start with \textquotedblleft I\textquotedblright{} all
over again, you will have (at least) two pages with the same name,
@@ -1907,10 +1644,10 @@ but nevertheless you can do this by using option
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -1929,8 +1666,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -1943,9 +1682,9 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
@@ -1977,10 +1716,10 @@ third Roman sector.\\
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
@@ -1999,8 +1738,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -2013,18 +1754,20 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)\\
\lipsum[1-3]
-Without option \texttt{alphMulti=AB} of the \textsf{pageslts} (and the help of
-\textsc{Heiko Oberdiek's} \textsf{alphalph} package), after page
-\textquotedblleft Z\textquotedblright{} there would just appear a
+\bigskip
+
+Without option \texttt{alphMulti=AB} of the \textsf{pageslts}
+(and the help of the \textsf{alphalph} package), after page
+\textquotedblleft Z\textquotedblright{} there would just appear~a
\begin{quote}
\begin{verbatim}
LaTeX Error: Counter too large
@@ -2047,12 +1790,15 @@ This is not demonstrated here, but see section~\ref{alph}.
\noindent The page (\verb|\thepage|): \thepage \\
\noindent Current page (\verb|\theCurrentPage|),
-i.\,e. counted continuously from the first page): \theCurrentPage \\
+i.\,e.\ counted continuously from the first page): \theCurrentPage \\
\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e. counted continuously from the first page of the
+i.\,e.\ counted continuously from the first page of the
current page numbering scheme): \theCurrentPageLocal \\
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
@@ -2069,8 +1815,10 @@ current page numbering scheme): \theCurrentPageLocal \\
(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers,
because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\\
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\
-(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never \verb|\pageref{pagesLTS.fnsymbol}|!)\\
+\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+
(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
@@ -2083,48 +1831,32 @@ because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
-(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless
-a package with output \linebreak
-\verb|\AtEndDocument| after the \textsf{pageslts} package was added.)\\
+(\texttt{LastPage} and \texttt{VeryLastPage} are now identical, because both are now done
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\\
+\verb|\AtEndDocument| and \verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\\
\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
-
-\medskip
-
-\noindent Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
-\lastpageref{pagesLTS.roman} (\lastpageref{pagesLTS.roman.local}) + %
-\lastpageref{pagesLTS.Roman} (\lastpageref{pagesLTS.Roman.local}) + %
-\lastpageref{pagesLTS.arabic} (\lastpageref{pagesLTS.arabic.local}) + %
-\lastpageref{pagesLTS.fnsymbol} (\lastpageref{pagesLTS.fnsymbol.local}) + %
-\lastpageref{pagesLTS.alph} (\lastpageref{pagesLTS.alph.local}) + %
-\lastpageref{pagesLTS.Alph} (\lastpageref{pagesLTS.Alph.local}) = %
-\lastpageref{LastPages} pages.
-
+(=~total number of pages)
\end{document}
%</example>
% \end{macrocode}
-%
% \pagebreak
-%
% \StopEventually{}
%
% \section{The implementation}
-%
% (This and the source code of the example file are the reasons
% for printing the documentation in landscape format instead of portrait.)\\
%
-% We start off by checking that we are loading into \LaTeXe{} and
-% announcing the name and version of this package.
+% We start off by checking that we are loading into \LaTeXe{},
+% format version at least 2024-06-01, and announcing the name and version of this package.
%
% \begin{macrocode}
%<*package>
% \end{macrocode}
%
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}[2015/01/01]
-\ProvidesPackage{pageslts}[2015/12/21 v1.2f
- Refers to special pages' numbers/names (HMM)]
+\NeedsTeXFormat{LaTeX2e}[2024-06-01]
+\ProvidesPackage{pageslts}[2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)]
% \end{macrocode}
%
@@ -2145,189 +1877,63 @@ a package with output \linebreak
% \end{macrocode}
%
-% The package is now named `pageslts' but had been named `pagesLTS' before.
-% \LaTeX\ does not load a package two times, but it is case sensitive,
-% i.\,e. \emph{would} load `pageslts' and `pagesLTS', resulting in
-% possible problems. Therefore we check for a loaded `pagesLTS' package
-% (assuming |\pagesLTS@loaded| is not |p@gesLTSlo@ded| and not defined to
-% |p@gesLTSlo@ded| by another package). This check might work only for
-% the second and following compilation runs.
-%
-% \begin{macrocode}
-\@ifpackageloaded{pagesLTS}{%
- \def\pagesLTS@doubleload{p@gesLTSlo@ded}
- \ifx\pagesLTS@loaded\pagesLTS@doubleload%
- \PackageError{pageslts}{Requested pagesLTS instead of pageslts}{%
- You have requested package `pagesLTS'. This package is now named `pageslts'.\MessageBreak%
- Requesting `pagesLTS' as well as `pageslts' leads to loading the same package\MessageBreak%
- twice (and results in errors). Loading of `pageslts' will therefore be\MessageBreak%
- abandoned now. To fix this problem, please look in the \jobname.log file for\MessageBreak%
- LaTeX Warning: You have requested package `pagesLTS',\MessageBreak%
- \space \space \space \space \space \space \space \space \space \space \space \space \space%
- \space \space but the package provides `pageslts'.\MessageBreak%
- and change the package call in the calling style/document.\MessageBreak%
- If a style file made the mistake, please inform its maintainer and/or the\MessageBreak%
- maintainer of the pageslts package about it (after making sure you have\MessageBreak%
- the recent version of that style file).\MessageBreak%
- Thank you and sorry for the inconvenience!\MessageBreak%
- }
- \endinput
- \fi
- }{% \relax
- }
-
-\gdef\pagesLTS@loaded{p@gesLTSlo@ded}
-
-% \end{macrocode}
-%
-% For |\ltx@ifpackageloaded| the \xpackage{ltxcmds} package is needed,
-% also by \textsc{Heiko Oberdiek} (see subsection~\ref{ss:Downloads}):
-%
-% \begin{macrocode}
-\RequirePackage{ltxcmds}[2011/11/09]% v1.22
-% \end{macrocode}
-%
-% For its |\AfterLastShipout| (as well as its |\AtEndAfterFileList|) command
-% we need the \xpackage{atveryend} package by \textsc{Heiko Oberdiek}
-% (see subsection~\ref{ss:Downloads}):
-%
-% \begin{macrocode}
-\RequirePackage{atveryend}[2011/06/30]% v1.8
-\AtBeginDocument{%
- %% https://tex.stackexchange.com/a/45654/6865
- %% and https://tex.stackexchange.com/q/261445/6865
- \def\pagesLTS@etb{etoolbox.sty}%
- \let\pagesLTS@ave\@empty%
- \@for\@pageslts@currname:=\@filelist\do{%
- \ifx\@pageslts@currname\pagesLTS@etb\relax%
- \def\pagesLTS@ave{atveryend.sty}%
- \fi%
- \ifx\@pageslts@currname\pagesLTS@ave%
- \@ifpackagelater{atveryend}{2015/08/01}{%\relax
- \PackageInfo{pageslts}{etoolbox package loaded before atveryend package\MessageBreak%
- With atveryend version 1.8 of 2011/06/30 this caused a problem,\MessageBreak%
- which is probably solved in the new version used here.\MessageBreak%
- To play it safe, you could load the atveryend package\MessageBreak%
- before the etoolbox package.\MessageBreak%
- }%
- }{% else
- \PackageError{pageslts}{etoolbox package loaded before atveryend package}{%
- You can use both packages, but when etoolbox is loaded before atveryend,\MessageBreak%
- atveryend no longer detects \string\enddocument\space\MessageBreak%
- and hook "AtVeryVeryEnd" is not executed.\MessageBreak%
- Just load the atveryend package before the etoolbox package!\MessageBreak%
- }%
- }%
- \fi%
- }%
- }
-
-% \end{macrocode}
-%
-% For its |\EveryShipout| command we need the \xpackage{everyshi}
-% package by \textsc{Martin Schr\"{o}der} (see subsection~\ref{ss:Downloads}):
-%
-% \begin{macrocode}
-\RequirePackage{everyshi}[2001/05/15]% v3.00
-% \end{macrocode}
-%
-% For its |\LetLtxMacro| command we need the \xpackage{letltxmacro}
-% package by \textsc{Heiko Oberdiek} (see subsection~\ref{ss:Downloads}):
-%
-% \begin{macrocode}
-\RequirePackage{letltxmacro}[2010/09/02]% v1.4
-% \end{macrocode}
-%
-% For the handling of the options we need the \xpackage{kvoptions}
-% package also by \textsc{Heiko Oberdiek} (see subsection~\ref{ss:Downloads}):
-%
-% \begin{macrocode}
-\RequirePackage{kvoptions}[2011/06/30]% v3.11
-% \end{macrocode}
-%
-% The \xpackage{undolabl} package of \textsc{H.-Martin M\"{u}nch} (i.\,e. myself),
-% with code from \textsc{Ulrich Diez}, (see subsection~\ref{ss:Downloads})
+% The \xpackage{undolabl} package (see subsection~\ref{ss:Downloads})
% is needed to overwrite labels, when the same page numbering scheme
% is used twice (or even more often).
%
% \begin{macrocode}
-\RequirePackage{undolabl}[2015/03/29]% v1.0l
-% \end{macrocode}
-%
-% We use the \xpackage{rerunfilecheck} package by \textsc{Heiko Oberdiek}
-% to make sure that the user gets and sees the rerun warnings (if any).
-%
-% \begin{macrocode}
-\RequirePackage{rerunfilecheck}[2011/04/15]% v1.7
-% \end{macrocode}
-%
-% We must not forget to give the source of |Prelim@EveryShipout|:
-%
-% \begin{macrocode}
-%% pageslts package uses Prelim@EveryShipout code from the
-%% prelim2e package [2009/05/29 v1.3] by Martin Schr\"{o}der, thanks!
-
-% \end{macrocode}
-%
-% About the \xpackage{prelim2e} package by \textsc{Martin Schr\"{o}der}
-% see subsection~\ref{ss:Downloads}.\\
-%
-% A last information for the user(s):
-%
-% \begin{macrocode}
-%% pageslts may work with earlier versions of LaTeX2e and those packages,
-%% but this was not tested. Please consider updating your LaTeX
-%% and packages to the most recent version (if they are not already
-%% the most recent version).
+\RequirePackage{undolabl}[2023-02-14]
% \end{macrocode}
-% See subsection~\ref{ss:Downloads} about how to get them.\\
%
-% \pagebreak
-%
-% The very old version~2.0 (and earlier) of the \xpackage{endfloat}
-% package actually redefined the |\enddocument| command,
-% and so interfered drastically with the \LaTeXe\ commands which
-% make use of |\AtEndDocument|. Newer versions of \xpackage{endfloat}
-% exists (at the time of writing this documentation: v2.5d as of 2011/12/25)
-% in modern documentation form, which are available from \url{https://www.CTAN.org}
-% (see subsection~\ref{ss:Downloads}).
-% A~note is placed here, and later 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.
-% This assumes, that the old versions of \xpackage{endfloat} at least gave
-% a version date, of course.
+% For the handling of the options we use the
+% \xpackage{kvoptions} package (see subsection~\ref{ss:Downloads}):
%
% \begin{macrocode}
-%% The recent version of the endfloat package is v2.5d as of 2011/12/25.
-%% The pageslts package is not fully compatible with version 2.0
-%% (and earlier) of the endfloat package, because those versions
-%% redefined the \enddocument command.
+\RequirePackage{kvoptions}[2022-06-15]
-% \end{macrocode}
-%
-% The options are introduced:
-%
-% \begin{macrocode}
\SetupKeyvalOptions{family = pagesLTS,prefix = pagesLTS@}
-\DeclareBoolOption[true]{pagecontinue}% \pagesLTS@pagecontinue
\DeclareStringOption[ab]{alphMult}
\DeclareStringOption[AB]{AlphMulti}
\DeclareBoolOption[true]{romanMult}
\DeclareBoolOption[true]{RomanMulti}
\DeclareBoolOption[true]{fnsymbolmult}
+\DeclareBoolOption[true]{pagecontinue}
\ProcessKeyvalOptions*
% \end{macrocode}
%
-% For comparisons, zero, one, two and three are defined (|\z@|, |\@ne| and so on
-% do not work for this).
+% This package really does not work with an old \LaTeX{} format
+% without hooks, or without \eTeX, or with a \xpackage{pagesLTS} package,
+% or with version~2.0 from~1992 of the \xpackage{endfloats} package,
+% or \xpackage{hyperref} from 2015 and so on. Assuming that nobody
+% would combine those old things with a modern \LaTeX{} format,
+% we request a recent format and do not check for the rest.
+%
+% \begin{macrocode}
+\@ifl@t@r\fmtversion{2024-06-01}{}{
+ \PackageError{pageslts}{LaTeX format 2024-06-01 or newer needed}{%
+ Needed LaTeX format version: 2024-06-01 or newer.\MessageBreak%
+ Found\space\space LaTeX format version: \fmtversion.\MessageBreak%
+ Please update your TeX distribution!\MessageBreak%
+ Loading of pageslts package is aborted.}
+ \expandafter\endinput}
+
+% \end{macrocode}
+%
+% For comparisons, zero, one, two and three are defined
+% (|\z@|, |\@ne| and so on do not work for this)
+% and for the page numbering scheme handling some definitions are made.
%
% \begin{macrocode}
\def\pagesLTS@zero{0}
\def\pagesLTS@one{1}
\def\pagesLTS@two{2}
\def\pagesLTS@three{3}
+\def\pagesLTS@ab{ab}
+\def\pagesLTS@bb{bb}
+\def\pagesLTS@ABi{AB}
+\def\pagesLTS@BBi{BB}
% \end{macrocode}
%
@@ -2338,42 +1944,34 @@ a package with output \linebreak
% page numbering scheme. The user is informed accordingly.
%
% \begin{macrocode}
-\ifpagesLTS@pagecontinue%
- \PackageInfo{pageslts}{Option pagecontinue enabled\MessageBreak%
- (maybe by default):\MessageBreak%
+\ifpagesLTS@pagecontinue
+ \PackageNoteNoLine{pageslts}{Option pagecontinue enabled (maybe by default):\MessageBreak%
The pageslts package will continue the page numbering,\MessageBreak%
when the same page numbering scheme is used twice.\MessageBreak%
If you do not want this, call pageslts with option\MessageBreak%
- pagecontinue=false (or use \string\setcounter{page}=1).\MessageBreak%
- }
+ pagecontinue=false (or use \string\setcounter{page}=1)}
\else
-% \end{macrocode}
-%
-% \pagebreak
-%
-% \begin{macrocode}
- \PackageWarningNoLine{pageslts}{Option pagecontinue is false:\MessageBreak%
+ \PackageNoteNoLine{pageslts}{Option pagecontinue is false:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
pagecontinue was set to false.\MessageBreak%
If you want the page numbers to be continued,\MessageBreak%
when the same page numbering scheme is used twice,\MessageBreak%
please call pageslts with option pagecontinue=true,\MessageBreak%
otherwise the page number is reset to one each time\MessageBreak%
- the page numbering scheme is changed.\MessageBreak%
- For details please see the documentation%
- }
+ the page numbering scheme is changed}
\fi
% \end{macrocode}
%
+% \newpage
% The page number printed in \texttt{alph} or in \texttt{Alph}
-% page numbering scheme had to be $>0$ and \nolinebreak{$<27$.}\ %
+% page numbering scheme had to be $>0$ and \mbox{$<27$.}\ %
% Now the \xpackage{alphalph} package allows to extend the
% numbering scheme (not only for pages). Because some users
% prefer aa, ab, ac, ad,\ldots\ and some aa, bb, cc, dd,\ldots,
% both schemes can be chosen via the options.
% The \texttt{fnsymbol} page numbering scheme was restricted to values
-% $>0$ and \nolinebreak{$<10$.}\ The \xpackage{alphalph} package allows
+% $>0$ and \mbox{$<10$.}\ The \xpackage{alphalph} package allows
% to extend this page numbering scheme, too. Option \texttt{fnsymbolmult}
% can be chosen with the \xpackage{pageslts} package.
% If no extension is wished (or another extension is wished
@@ -2382,17 +1980,12 @@ a package with output \linebreak
% |fnsymbolmult=false|.
%
% \begin{macrocode}
-\def\pagesLTS@ab{ab}
-\def\pagesLTS@bb{bb}
-\def\pagesLTS@ABi{AB}
-\def\pagesLTS@BBi{BB}
-
\ifx\pagesLTS@alphMult\pagesLTS@ab%
\else
\ifx\pagesLTS@alphMult\pagesLTS@bb%
\else
\ifx\pagesLTS@alphMult\pagesLTS@zero%
- \PackageWarningNoLine{pageslts}{%
+ \PackageNoteNoLine{pageslts}{%
Option alphMult=0 found:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
alphMult was set to 0 (zero).\MessageBreak%
@@ -2401,17 +1994,13 @@ a package with output \linebreak
For automatic continuation, please use the\MessageBreak%
alphalph package and call pageslts\MessageBreak%
with option alphMult=ab (for aa, ab, ac, ad,...) or\MessageBreak%
- with option alphMult=bb (for aa, bb, cc, dd,...).\MessageBreak%
- For details please see the documentation!%
- }
+ with option alphMult=bb (for aa, bb, cc, dd,...)}
\else
\PackageError{pageslts}{Unknown option value}{%
The pageslts package was used with option\MessageBreak%
- alphMult= \pagesLTS@alphMult . Only values\MessageBreak%
- ab, bb, and 0 (zero) are valid.\MessageBreak%
- The default ab is set.\MessageBreak%
- For details please see the documentation!%
- }
+ alphMult=\meaning\pagesLTS@alphMult .\MessageBreak%
+ Only values 'ab', 'bb', and '0' (zero) are valid.\MessageBreak%
+ Now the default 'ab' is being set.}
\setkeys{pagesLTS}{alphMult=ab}
\fi
\fi
@@ -2422,7 +2011,7 @@ a package with output \linebreak
\ifx\pagesLTS@AlphMulti\pagesLTS@BBi%
\else
\ifx\pagesLTS@AlphMulti\pagesLTS@zero%
- \PackageWarningNoLine{pageslts}{%
+ \PackageNoteNoLine{pageslts}{%
Option AlphMulti=0 found:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
AlphMulti was set to 0 (zero).\MessageBreak%
@@ -2431,17 +2020,13 @@ a package with output \linebreak
For automatic continuation, please use the\MessageBreak%
alphalph package and call pageslts\MessageBreak%
with option AlphMulti=AB (for AA, AB, AC, AD,...) or\MessageBreak%
- with option AlphMulti=BB (for AA, BB, CC, DD,...).\MessageBreak%
- For details please see the documentation!%
- }
+ with option AlphMulti=BB (for AA, BB, CC, DD,...)}
\else
\PackageError{pageslts}{Unknown option value}{%
The pageslts package was used with option\MessageBreak%
- AlphMulti= \pagesLTS@AlphMulti . Only values\MessageBreak%
- AB, BB, and 0 (zero) are valid.\MessageBreak%
- The default AB is set.\MessageBreak%
- For details please see the documentation!%
- }
+ AlphMulti=\meaning\pagesLTS@AlphMulti .\MessageBreak%
+ Only values 'AB', 'BB', and '0' (zero) are valid.\MessageBreak%
+ The default 'AB' is set.}
\setkeys{pagesLTS}{AlphMulti=AB}
\fi
\fi
@@ -2453,17 +2038,9 @@ a package with output \linebreak
% the \xpackage{alphalph} package is required.
%
% \begin{macrocode}
-\ifx\pagesLTS@alphMult\pagesLTS@zero% \relax
-\else \RequirePackage{alphalph}[2011/05/13]% v2.4
-\fi
-
-\ifx\pagesLTS@AlphMulti\pagesLTS@zero% \relax
-\else \RequirePackage{alphalph}[2011/05/13]% v2.4
-\fi
-
-\ifpagesLTS@fnsymbolmult%
- \RequirePackage{alphalph}[2011/05/13]% v2.4
-\fi
+\ifx\pagesLTS@alphMult\pagesLTS@zero\else\RequirePackage{alphalph}[2019/12/09]\fi
+\ifx\pagesLTS@AlphMulti\pagesLTS@zero\else\RequirePackage{alphalph}[2019/12/09]\fi
+\ifpagesLTS@fnsymbolmult\RequirePackage{alphalph}[2019/12/09]\fi
% \end{macrocode}
%
@@ -2471,26 +2048,22 @@ a package with output \linebreak
% choice of an extension by \xpackage{pageslts} or not.
%
% \begin{macrocode}
-\ifpagesLTS@romanMult%
- \PackageInfo{pageslts}{Option romanMult enabled\MessageBreak%
- (maybe by default):\MessageBreak%
+\ifpagesLTS@romanMult
+ \PackageNoteNoLine{pageslts}{Option romanMult enabled (maybe by default):\MessageBreak%
The pageslts package will extend the page numbering\MessageBreak%
of the roman scheme below i with\MessageBreak%
0, -i, -ii, -iii, -iv,...\MessageBreak%
If you do not want this, call pageslts with option\MessageBreak%
- romanMult=false.\MessageBreak%
- }
+ romanMult=false}
\else
- \PackageWarningNoLine{pageslts}{Option romanMult is set to false:\MessageBreak%
- The pageslts package was used, but the option\MessageBreak%
- romanMult was set to false.\MessageBreak%
- If you want the page numbering of the roman scheme\MessageBreak%
- to be extended below i,\MessageBreak%
- please call pageslts with option romanMult=true,\MessageBreak%
- otherwise zero and negative page numbers of the\MessageBreak%
- roman scheme will need to be defined otherwise.\MessageBreak%
- For details please see the documentation!\MessageBreak%
- }
+ \PackageNoteNoLine{pageslts}{Option romanMult is set to false:\MessageBreak%
+ The pageslts package was used, but the option\MessageBreak%
+ romanMult was set to false.\MessageBreak%
+ If you want the page numbering of the roman scheme\MessageBreak%
+ to be extended below i,\MessageBreak%
+ please call pageslts with option romanMult=true,\MessageBreak%
+ otherwise zero and negative page numbers of the\MessageBreak%
+ roman scheme will need to be defined otherwise}
\fi
% \end{macrocode}
@@ -2498,26 +2071,22 @@ a package with output \linebreak
% Same for the Roman page numbering scheme.
%
% \begin{macrocode}
-\ifpagesLTS@RomanMulti%
- \PackageInfo{pageslts}{Option RomanMulti enabled\MessageBreak%
- (maybe by default):\MessageBreak%
+\ifpagesLTS@RomanMulti
+ \PackageNoteNoLine{pageslts}{Option RomanMulti enabled (maybe by default):\MessageBreak%
The pageslts package will extend the page numbering\MessageBreak%
of the Roman scheme below I with\MessageBreak%
0, -I, -II, -III, -IV,...\MessageBreak%
If you do not want this, call pageslts with option\MessageBreak%
- RomanMulti=false.\MessageBreak%
- }
+ RomanMulti=false}
\else
- \PackageWarningNoLine{pageslts}{Option RomanMulti is set to false:\MessageBreak%
+ \PackageNoteNoLine{pageslts}{Option RomanMulti is set to false:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
RomanMulti was set to false.\MessageBreak%
If you want the page numbering of the Roman scheme\MessageBreak%
to be extended below i,\MessageBreak%
please call pageslts with option RomanMulti=true,\MessageBreak%
otherwise zero and negative page numbers of the\MessageBreak%
- Roman scheme will need to be defined otherwise.\MessageBreak%
- For details please see the documentation!\MessageBreak%
- }
+ Roman scheme will need to be defined otherwise}
\fi
% \end{macrocode}
@@ -2526,17 +2095,15 @@ a package with output \linebreak
% just the choice of a extension by \xpackage{pageslts} or not.
%
% \begin{macrocode}
-\ifpagesLTS@fnsymbolmult%
- \PackageInfo{pageslts}{Option fnsymbolmult enabled\MessageBreak%
- (maybe by default):\MessageBreak%
+\ifpagesLTS@fnsymbolmult
+ \PackageNoteNoLine{pageslts}{Option fnsymbolmult enabled (maybe by default):\MessageBreak%
The pageslts package will extend the page numbering\MessageBreak%
of the footnotesymbol scheme using the alphalph\MessageBreak%
package.\MessageBreak%
If you do not want this, call pageslts with option\MessageBreak%
- fnsymbolmult=false.\MessageBreak%
- }
+ fnsymbolmult=false}
\else
- \PackageWarningNoLine{pageslts}{%
+ \PackageNoteNoLine{pageslts}{%
Option fnsymbolmult is set to false:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
fnsymbolmult was set to false.\MessageBreak%
@@ -2544,9 +2111,7 @@ a package with output \linebreak
scheme to be extended using the alphalph package,\MessageBreak%
please call pageslts with option fnsymbolmult=true,\MessageBreak%
otherwise page numbers of the footnotesymbol scheme\MessageBreak%
- greater than nine will need to be defined otherwise.\MessageBreak%
- For details please see the documentation!\MessageBreak%
- }
+ greater than nine will need to be defined otherwise}
\fi
% \end{macrocode}
@@ -2565,7 +2130,9 @@ a package with output \linebreak
\def\lastpageref{\lastpagereftxt}
\def\pagesLTS@undolable{none}
\def\pncmissing{0}
-\def\pagesLTS@SK{0}
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
\def\pagesLTS@messageNPN{%
The pageslts package was used, but\MessageBreak%
\string\pagenumbering \MessageBreak%
@@ -2583,57 +2150,11 @@ a package with output \linebreak
% \end{macrocode}
%
-% It is checked whether writing to files is allowed.
-% The \xpackage{pageslts} package cannot be used without that!
-% Some packages (e.\,g. \xpackage{tikz} and \xpackage{selectp}) sometimes prevent
-% the output to the \xfile{aux} file. In that case a warning or an error message
-% is issued. This is no problem as long as there is/was another compilation run
-% where the labels can/could be processed via the \xfile{aux} file.\\
-% If it is allowed to write to the \xfile{aux} file, we define
-% |\pagesLTS@loaded| as |p@gesLTSnotlo@ded| for the next compilation run.
-%
-% \begin{macrocode}
-\AtBeginDocument{%
- \if@filesw%
-% \end{macrocode}
-%
-% \noindent then |\relax|.\newline
-% When writing to files is not allowed, nothing can be done.
-% But when the labels were already processed via the \xfile{aux} file,
-% nothing needs to be done (if enough compilation runs have been done before).
-%
-% \begin{macrocode}
- \else%
- \@ifpackageloaded{tikz}{%
- \PackageWarning{pageslts}%
- {It was not allowed to write to an\MessageBreak%
- .aux file. This package does not work without access\MessageBreak%
- to an .aux file.\MessageBreak%
- It is OK if the .aux file was already updated\MessageBreak%
- by a previouse compiler run\MessageBreak%
- and would not have changed anyway.\MessageBreak%
- }%
- }{\PackageError{pageslts}{No writing to auxiliary file allowed}%
- {It was not allowed to write to an .aux file.\MessageBreak%
- This package does not work without access to an .aux file.\MessageBreak%
- Press Ctrl+Z to exit.\MessageBreak%
- But it is OK if the .aux file was already updated\MessageBreak%
- by previouse compiler runs\MessageBreak%
- and would not have changed anyway.\MessageBreak%
- (In that case just press Enter or Return\MessageBreak%
- to continue the compilation.)\MessageBreak%
- }%
- }%
- \fi%
- }
-
-% \end{macrocode}
-%
% \begin{macro}{\pagenumbering}
-% \indent \qquad To keep the original meaning of |\pagenumbering|:
+% To keep the original meaning of |\pagenumbering|:
%
% \begin{macrocode}
-\LetLtxMacro{\OrigPagenumbering}{\pagenumbering}
+\NewCommandCopy{\OrigPagenumbering}{\pagenumbering}
% \end{macrocode}
% \end{macro}
@@ -2646,18 +2167,17 @@ a package with output \linebreak
\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS@pnc}}
% \end{macrocode}
%
-% The counter |pagesLTS.pagenr| is for saving the total page
-% number of the last page in the \xfile{.aux} file.
+% The counter |pagesLTS.pagenr| is for saving into the \xfile{.aux} file
+% the total page number of the last page.
%
% \begin{macrocode}
\newcounter{pagesLTS.pagenr}
+\setcounter{pagesLTS.pagenr}{1}
% \end{macrocode}
%
-% While generally
-% |\pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}|
-% is used, for the beginning of the document
-% |pagesLTS.current.local.0| is predefined.
-% (A~|\pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}|
+% While generally |\pagesLTS@providecounter{pagesLTS.current.local.\pagesLTS@pnc}|
+% is used, for the beginning of the document |pagesLTS.current.local.0| is predefined.
+% (A~|\pagesLTS@providecounter{pagesLTS.current.local.\pagesLTS@pnc}|
% could be used for this, too, but we know that |pagesLTS.current.local.0|
% was not defined, so we can just do the definition here.)
% And the first local page gets the number one.
@@ -2671,9 +2191,21 @@ a package with output \linebreak
%
% \begin{macrocode}
\newcounter{pagesLTS.pnc.0}
+% \end{macrocode}
+%
+% Also a scratch counter is defined, |\pagesLTSlastpage| and |\pagesLTSlastpageHy| are predefined
+% \mbox{(e.\,g.}\ for computations in the first compilation run),
+% and the obsolete |\pagesLTS.lastpage| points to the new |\pagesLTSlastpage|.
+%
+% \begin{macrocode}
+\newcounter{pagesLTS.tmpcounter}
+\def\pagesLTSlastpage{1}
+\def\pagesLTSlastpageHy{1}
+\def\pagesLTS.lastpage{\pagesLTSlastpage}
% \end{macrocode}
%
+% \newpage
% \phantomsection
% \begin{macro}{\xroman}\label{xroman}
% When |\roman{...}| is used with a value $<1$, \LaTeX\ just ignores this
@@ -2713,8 +2245,6 @@ a package with output \linebreak
% \end{macrocode}
% \end{macro}
%
-% \pagebreak
-%
% \begin{macro}{\XRoman}
% |\XRoman| does the same for uppercase |\Roman| numbers.
% |-\uppercase{\romannumeral\number-\arabic{#1}}| cannot be used,
@@ -2726,21 +2256,16 @@ a package with output \linebreak
% |\def\@Roman#1{\expandafter\@slowromancap\romannumeral #1@}|,\\
% and use |\@slowromancap|, which is a fully expandable macro,
% to do the trick for this:
-%
-% \noindent \textquotedblleft
% \begin{quote}
-%\begin{verbatim}
-%\def\@slowromancap#1{\ifx @#1% then terminate
-%\else
-%\if i#1I\else\if v#1V\else\if x#1X\else\if l#1L\else\if
-%c#1C\else\if d#1D\else \if m#1M\else#1\fi\fi\fi\fi\fi\fi\fi
-%\expandafter\@slowromancap
-%\fi
-%}
-%\end{verbatim}
+% \textquotedblleft |\def\@slowromancap#1{\ifx @#1% then terminate|\newline%
+% \hphantom{\textquotedblleft}|\else|\newline%
+% \hphantom{\textquotedblleft}|\if i#1I\else\if v#1V\else\if x#1X\else\if l#1L\else\if|\newline%
+% \hphantom{\textquotedblleft}|c#1C\else\if d#1D\else \if m#1M\else#1\fi\fi\fi\fi\fi\fi\fi|\newline%
+% \hphantom{\textquotedblleft}|\expandafter\@slowromancap|\newline%
+% \hphantom{\textquotedblleft}|\fi|\newline%
+% \hphantom{\textquotedblleft}|}|\textquotedblright{} %
+% (2021/11/08 Version v1.1n \LaTeX{} Kernel File~21: ltcounts.dtx Counters and Lengths).
% \end{quote}
-% \textquotedblright{} (1998/05/16 Version v1.1g LaTeX Kernel File~m
-% ltcounts.dtx 105 Counters and Lengths).
%
% \begin{macrocode}
\newcommand{\XRoman}[1]{%
@@ -2758,19 +2283,7 @@ a package with output \linebreak
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\XXRoman}
-% In older versions |\XXRoman| was used. For compatibility, it is forwarded to |\XRoman|
-% and an error message is given.
-%
-% \begin{macrocode}
-\newcommand{\XXRoman}[1]{\XRoman{#1}%
- \PackageError{pageslts}{Old command \string\XXRoman\space found}{Replaced by \string\XRoman.}%
- }
-
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\pagesLTS@ifcounter}
+% \begin{macro}{\pagesLTS@providecounter}
% We provide a way to create counters like
% \begin{itemize}
% \item[-] \DescribeMacro{pagesLTS.pnc. page numbering scheme }
@@ -2782,8 +2295,7 @@ a package with output \linebreak
% \end{itemize}
% for all page numbering schemes, even those not supported
% by the current original |\pagenumbering|
-% (1994/05/19 v1.1a LaTeX Kernel File w ltpageno.dtx 52 Page Numbering),
-% which is\\
+% (2020/12/05 Version v1.1a LaTeX Kernel File~33 ltpageno.dtx Page Numbering), which is
% \begin{quote}
%\begin{verbatim}
%\countdef\c@page=0 \c@page=1
@@ -2795,8 +2307,26 @@ a package with output \linebreak
% \end{quote}
%
% \begin{macrocode}
-\newcommand{\pagesLTS@ifcounter}[1]{%
- \@ifundefined{c@#1}{\newcounter{#1}}{\relax}%
+\newcommand{\pagesLTS@providecounter}[1]{\@ifundefined{c@#1}{\newcounter{#1}}{}}
+% \end{macrocode}
+%
+% The command |\pagesLTS@ifcounter| is obsolete, but if a document was compiled
+% using an older version of the \xpackage{pageslts} package,
+% the command will still be in the \xfile{.aux} file.
+% (Following code will be removed in some further version.)
+%
+% \begin{macrocode}
+\NewCommandCopy{\pagesLTS@ifcounter}{\pagesLTS@providecounter}
+\AddToHook{begindocument}{%
+% \end{macrocode}
+%
+% This hook is executed after the \xfile{.aux} file has been read,
+% so there should be no following |\pagesLTS@ifcounter|.
+%
+% \begin{macrocode}
+ \AddToHookWithArguments{cmd/pagesLTS@ifcounter/before}{%
+ \PackageError{pageslts}{Old command \string\pagesLTS@ifcounter\space used}{Replace by \string\pagesLTS@providecounter.}%
+ }%
}
% \end{macrocode}
@@ -2809,7 +2339,7 @@ a package with output \linebreak
%
% \begin{macrocode}
\newcommand{\lastpages}[2]{%
- \pagesLTS@ifcounter{pagesLTS.#1.#2.local.cnt}%
+ \pagesLTS@providecounter{pagesLTS.#1.#2.local.cnt}%
\arabic{pagesLTS.#1.#2.local.cnt}%
}
@@ -2824,7 +2354,7 @@ a package with output \linebreak
\addtocounter{page}{+1}%
% \end{macrocode}
%
-% \noindent |\addtocounter{page}{+1}| because |\pagesLTS@putlabel| includes an\\
+% |\addtocounter{page}{+1}| because |\pagesLTS@putlabel| includes an\\
% |\addtocounter{page}{-1}|, which is not necessary here.\\
% Into the \xfile{.aux} file something like\\
% |\newlabel{pagesLTS.Roman}{{}{VIII}{}{page.VIII}{}}|\\
@@ -2832,55 +2362,56 @@ a package with output \linebreak
% links to |page.VIII|.
%
% \begin{macrocode}
- \pagesLTS@putlabel{pagesLTS.#1}{\thepage}{1}
- \addtocounter{page}{-1}%
- \ifx\pagesLTS@pnc\pagesLTS@zero% \relax
+ \pagesLTS@putlabel{pagesLTS.#1}{\thepage}{1}%
% \end{macrocode}
%
-% i.\,e. if the current page numbering scheme is
-% \textquotedblleft 0\textquotedblright, i.\,e. before the first
-% |\pagenumbering{...}| command, do nothing,
+% |\addtocounter{page}{-1}| is skipped, because another |\pagesLTS@putlabel| follows.
+%
+% \begin{macrocode}
+ \ifx\pagesLTS@pnc\pagesLTS@zero%
+% \end{macrocode}
+%
+% i.\,e.\ if the current page numbering scheme is \textquotedblleft 0\textquotedblright,
+% i.\,e.\ before the first |\pagenumbering{...}| command, do nothing,
%
% \begin{macrocode}
\else%
- \addtocounter{page}{+1}%
- \pagesLTS@putlabel{pagesLTS.#1.local}{\theCurrentPageLocal}{1}
% \end{macrocode}
%
% otherwise write into the \xfile{.aux} file something like\\
-% |\newlabel{pagesLTS.arabic.local}{{}{5}{}{page.8}{}}|,\\
-% thus |\lastpageref{pagesLTS.arabic.local}| prints |5| and
-% links to |page.8|. Here (and in the example file) it is not
-% \textquotedblleft print |8| and link to |page.8|\textquotedblright ,
-% because |\addtocounter{page}{3}| has been used, thus the page with
-% \textquotedblleft number\textquotedblright{} (name) |8| is the
-% \textbf{fifth} $(=8-3)$ page.
+% |\newlabel{pagesLTS.arabic.local}{{}{6}{}{page.9}{}}|,\\
+% thus |\lastpageref{pagesLTS.arabic.local}| prints |6| and links to |page.9|.\\
+%
+% |\addtocounter{page}{+1}| is skipped, because we skipped the |\addtocounter{page}{-1}| above.
+%
+% \begin{macrocode}
+ \pagesLTS@putlabel{pagesLTS.#1.local}{\theCurrentPageLocal}{1}%
+% \end{macrocode}
+%
+% |\addtocounter{page}{-1}| immediately after the |\pagesLTS@putlabel| is skipped,
+% because we do that outside of the |\ifx \else \fi|.
%
% \begin{macrocode}
- \addtocounter{page}{-1}%
\fi%
+ \addtocounter{page}{-1}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\erroralphalph}
-% \indent |\erroralphalph| extends the
-% \textquotedblleft numbers\textquotedblright{} of counters
-% to zero and negative values for representations usually
-% not supporting this: |\alphalph|, |\AlphAlph|, and
-% |\fnsymbolmult| of the \xpackage{alphalph} package.\\
+% |\erroralphalph| extends the \textquotedblleft numbers\textquotedblright\ of
+% counters to zero and negative values for representations usually not supporting this:
+% |\alphalph|, |\AlphAlph|, and |\fnsymbolmult| of the \xpackage{alphalph} package.\\
% |\alph|, |\Alph|, and |\fnsymbol| would not support
-% \textquotedblleft numbers\textquotedblright{} below one.\\
+% \textquotedblleft numbers\textquotedblright\ below one.\\
% |\arabic| already supports negative numbers and zero.\\
-% |\roman| and |\Roman| support neither negative numbers
-% nor zero, but are expanded in this package
-% (|\xroman| and |\XRoman|), see page~\pageref{xroman}.\\
-%
+% |\roman| and |\Roman| support neither negative numbers nor zero, but are expanded
+% in this package (|\xroman| and |\XRoman|), see page~\pageref{xroman}.
% \begin{macrocode}
-%% The following code is from Heiko Oberdiek [2010/04/18], %%
-%% expanding his alphalph package as of 2010/04/18, v2.3. (Thanks!) %%
+%% The following code is from Heiko Oberdiek [2010/04/18], %%
+%% expanding his alphalph package as of 2010/04/18, v2.3. (Thanks!) %%
\newcommand*{\erroralphalph}[2]{%
\ifnum\value{#2}>0%
#1{\value{#2}}%
@@ -2892,15 +2423,16 @@ a package with output \linebreak
\fi%
\fi%
}
-%% End of code from Heiko Oberdiek %%
-%% Check and Error/Warning messages have been moved to \EveryShipout, %%
-%% because messages inside e.g. the \pageref command can cause trouble. %%
+%% End of code from Heiko Oberdiek %%
+%% Check and Error/Warning messages have been moved to hook "shipout/foreground" %%
+%% because messages inside e.g. the \pageref command can cause trouble. %%
% \end{macrocode}
% \end{macro}
%
+% \newpage
% \begin{macro}{\expandPagenumbering}
-% \indent Here the |\erroralphalph| command is called with the
+% Here the |\erroralphalph| command is called with the
% appropriate arguments for each page numbering scheme.
%
% \begin{macrocode}
@@ -2908,7 +2440,7 @@ a package with output \linebreak
\newcommand{\expandPagenumbering}[1]{%
\let\Origthepage\thepage%
\def\pagesLTS@tmpC{arabic}%
- \ifx\pagesLTS@pnc\pagesLTS@tmpC% \relax
+ \ifx\pagesLTS@pnc\pagesLTS@tmpC%
% \end{macrocode}
%
% |\arabic| already supports negative numbers and zero
@@ -2957,17 +2489,19 @@ a package with output \linebreak
% \begin{macrocode}
\ifx\pagesLTS@alphMult\pagesLTS@ab%
\renewcommand*{\thepage}{\erroralphalph{\alphalph}{page}}%
- \else \ifx\pagesLTS@alphMult\pagesLTS@bb%
- \renewcommand*{\thepage}{\erroralphalph{\alphMult}{page}}%
- \fi%
+ \else%
+ \ifx\pagesLTS@alphMult\pagesLTS@bb%
+ \renewcommand*{\thepage}{\erroralphalph{\alphMult}{page}}%
+ \fi%
\fi%
\else%
\ifx\pagesLTS@pnc\pagesLTS@Alph%
\ifx\pagesLTS@AlphMulti\pagesLTS@ABi%
\renewcommand*{\thepage}{\erroralphalph{\AlphAlph}{page}}%
- \else \ifx\pagesLTS@AlphMulti\pagesLTS@BBi%
- \renewcommand*{\thepage}{\erroralphalph{\AlphMult}{page}}%
- \fi%
+ \else%
+ \ifx\pagesLTS@AlphMulti\pagesLTS@BBi%
+ \renewcommand*{\thepage}{\erroralphalph{\AlphMult}{page}}%
+ \fi%
\fi%
\else%
\ifx\pagesLTS@pnc\pagesLTS@fns%
@@ -2984,17 +2518,17 @@ a package with output \linebreak
%
% If the used page numbering scheme has not been recognized by the
% \xpackage{pageslts} package so far, we can do nothing, and problems
-% might result.\\
+% might result.
%
% \begin{macrocode}
\PackageError{pageslts}{unknown page numbering scheme}{%
The pageslts package encountered the unknown\MessageBreak%
page numbering scheme\MessageBreak%
- `#1'. \MessageBreak%
+ \meaning#1. \MessageBreak%
If this is no typing mistake, it might work\MessageBreak%
- or it might not work.\MessageBreak%
\@ehc%
- }
+ }%
\fi%
\fi%
\fi%
@@ -3008,33 +2542,33 @@ a package with output \linebreak
% \end{macro}
%
% \begin{macro}{\pagenumbering}
-% \indent Now for the \textbf{new} version of the |\pagenumbering| command:
+% Now for the \textbf{new} version of the |\pagenumbering| command:
%
% \begin{macrocode}
\renewcommand{\pagenumbering}[1]{%
% \end{macrocode}
%
-% If the current page numbering scheme, |\pagesLTS@pnc|, or the
-% requested page numbering scheme, |#1|, is |\pagesLTS@fns|,
-% i.\,e. \texttt{fnsymbol}, the counter\texttt{pagesLTS.fnsymbol.local}
+% If the current page numbering scheme, |\pagesLTS@pnc|,
+% or the requested page numbering scheme, |#1|, is |\pagesLTS@fns|,
+% \mbox{i.\,e.} \texttt{fnsymbol}, the counter\texttt{pagesLTS.fnsymbol.local}
% is needed. If it does not exists yet, it is created here.
%
% \begin{macrocode}
\edef\pagesLTS@tmpA{#1}%
\ifx\pagesLTS@pnc\pagesLTS@fns%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.local}%
\fi%
\ifx\pagesLTS@tmpA\pagesLTS@fns%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.local}%
\fi%
% \end{macrocode}
%
-% If the current page numbering scheme, |\pagesLTS@pnc|, and the
-% requested page numbering scheme, |#1|, is the same one, nothing
-% further is done, otherwise the real action begins.
+% If the current page numbering scheme, |\pagesLTS@pnc|,
+% and the requested page numbering scheme, |#1|, is the same one,
+% nothing further is done, otherwise the real action begins.
%
% \begin{macrocode}
- \ifx\pagesLTS@pnc\pagesLTS@tmpA% \relax
+ \ifx\pagesLTS@pnc\pagesLTS@tmpA%
\else%
% \end{macrocode}
%
@@ -3053,10 +2587,8 @@ a package with output \linebreak
% \end{macrocode}
%
% For the case that the page numbering scheme is or will be split,
-% like e.\,g. the Roman one in the |pageslts-example.tex|, a counter
-% like
-% |pagesLTS.Roman.1.local.count|
-% (or |pagesLTS.Roman.2.local.count|,
+% like e.\,g. the Roman one in the |pageslts-example.tex|, a~counter like
+% |pagesLTS.Roman.1.local.count| (or |pagesLTS.Roman.2.local.count|,
% |pagesLTS.Roman.3.local.count|,\ldots ) is introduced and set to the
% number of the local page.
%
@@ -3066,24 +2598,17 @@ a package with output \linebreak
\value{pagesLTS.current.local.\pagesLTS@pnc}}%
% \end{macrocode}
%
-% If the page numbering scheme is \xpackage{fnsymbol},
-% and if it \textit{was} used before,
+% If the page numbering scheme is \xpackage{fnsymbol}, and if it \textit{was} used before,
% from said counter the number of pages of the preceding uses
% of the same page numbering scheme, |pagesLTS.\pagesLTS@pnc.done|,
-% is subtracted (same as for the other schemes, see below). Instead of introducing a new
-% counter (which can be problematic, when the number of available counters is limited),
-% we borrow the \texttt{pagesLTS.pnc.0} counter, i.\,e. we save its value to |\pagesLTS@tmpa|,
-% (ab)use the counter, and then set it back to its former value as saved in |\pagesLTS@tmpa|.
+% is subtracted (same as for the other schemes, see below).
%
% \begin{macrocode}
\ifx\pagesLTS@pnc\pagesLTS@fns%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \mathchardef\pagesLTS@tmpa=\arabic{pagesLTS.pnc.0}%
- \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \addtocounter{pagesLTS.pnc.0}{-1}%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS@pnc}-1\relax}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
- -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
- \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpa}%
+ -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
\fi%
% \end{macrocode}
%
@@ -3110,21 +2635,16 @@ a package with output \linebreak
% If the page numbering scheme \textit{was} used before,
% from said counter the number of pages of the preceding uses
% of the same page numbering scheme, |pagesLTS.\pagesLTS@pnc.done|,
-% is subtracted. Instead of introducing a new
-% counter (which can be problematic, when the number of available counters is limited),
-% we again borrow the \texttt{pagesLTS.pnc.0} counter (see above).
+% is subtracted.
%
% \begin{macrocode}
\else%
- \mathchardef\pagesLTS@tmpa=\arabic{pagesLTS.pnc.0}%
- \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \addtocounter{pagesLTS.pnc.0}{-1}%
- \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.done}%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS@pnc}-1\relax}%
+ \pagesLTS@providecounter{pagesLTS.\pagesLTS@pnc.done}%
\addtocounter{pagesLTS.\pagesLTS@pnc.done}{%
- \value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
+ \value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
-\value{pagesLTS.\pagesLTS@pnc.done}}%
- \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpa}%
\fi%
% \end{macrocode}
%
@@ -3135,7 +2655,7 @@ a package with output \linebreak
% \begin{macrocode}
\if@filesw%
\immediate\write\@auxout{\string
- \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}%
+ \pagesLTS@providecounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}%
\fi%
\edef\pagesLTS@tmpB{\arabic{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}}%
\if@filesw%
@@ -3151,7 +2671,7 @@ a package with output \linebreak
% numbering scheme is continued later.
%
% \begin{macrocode}
- \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.double.\pagesLTS@pnc}%
\setcounter{pagesLTS.double.\pagesLTS@pnc}{\value{page}}%
% \end{macrocode}
%
@@ -3162,9 +2682,8 @@ a package with output \linebreak
\addtocounter{page}{+1}%
% \end{macrocode}
%
-% The page numbering scheme |\pagesLTS@pnc| is now set to
-% the new one, given by the user as argument with the
-% |\pagenumbering{...}| command:
+% The page numbering scheme |\pagesLTS@pnc| is now set to the new one,
+% given by the user as argument with the |\pagenumbering{...}| command:
%
% \begin{macrocode}
\xdef\pagesLTS@pnc{#1}%
@@ -3176,16 +2695,13 @@ a package with output \linebreak
\OrigPagenumbering{#1}%
% \end{macrocode}
%
-% If a page numbering scheme not known by the original
-% |\pagenumbering{...}| command is used, an error will
-% arise here - but maybe without error message.\\
+% If a page numbering scheme not known by the original |\pagenumbering{...}| command is used,
+% an error will arise here - but maybe without error message.\\
%
-% If page numbering schem |\alph|, |\Alph|, or |\fnsymbol| is used,
-% \xpackage{pageslts} extends the page numbers according to
-% the given options, using the \xpackage{alphalph} package.
-% |\arabic| does not need any expansion.
-% |\roman| and |\Roman| at least receive a definition for
-% zero.
+% If page numbering scheme |\alph|, |\Alph|, or |\fnsymbol| is used,
+% \xpackage{pageslts} extends the page numbers according to the given options,
+% using the \xpackage{alphalph} package. |\arabic| does not need any expansion.
+% |\roman| and |\Roman| at least receive a definition for zero.
%
% \begin{macrocode}
\expandPagenumbering{#1}%
@@ -3194,30 +2710,27 @@ a package with output \linebreak
% Counters like |pagesLTS.pnc.Roman| are introduced:
%
% \begin{macrocode}
- \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.pnc.\pagesLTS@pnc}%
% \end{macrocode}
%
-% The saved number of times this page numbering scheme was used
-% is increased by one:
+% The saved number of times, this page numbering scheme was used, is increased by one:
%
% \begin{macrocode}
\addtocounter{pagesLTS.pnc.\pagesLTS@pnc}{1}%
% \end{macrocode}
%
-% \indent Now defining the counter |pagesLTS.double.\pagesLTS@pnc|,
-% if it did not exist already, adding~1, because this is
-% the first page of it (or another one, if the scheme is
-% continued):
+% Now defining the counter |pagesLTS.double.\pagesLTS@pnc|,
+% if it did not exist already, adding~1, because this is the first page of it
+% (or another one, if the scheme is continued):
%
% \begin{macrocode}
- \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.double.\pagesLTS@pnc}%
\addtocounter{pagesLTS.double.\pagesLTS@pnc}{1}%
% \end{macrocode}
%
-% The page number is continued, if the option |pagecontinue=false|
-% is \textbf{not} set, otherwise it is reset to one. Note that neither
-% the local nor the current counter are reset, as they contain
-% the real \textit{values} and not the \textit{names} of the pages.
+% The page number is continued, if the option |pagecontinue=false| is \textbf{not} set,
+% otherwise it is reset to one. Note that neither the local nor the current counter are reset,
+% as they contain the real \textit{values} and not the \textit{names} of the pages.
%
% \begin{macrocode}
\ifpagesLTS@pagecontinue%
@@ -3227,18 +2740,16 @@ a package with output \linebreak
\fi%
% \end{macrocode}
%
-% If it does not exist already, the counter
-% |pagesLTS.current.local.\pagesLTS@pnc|
-% (e.\,g. |pagesLTS.current.local.Roman|) is created.
+% If it does not exist already, the counter |pagesLTS.current.local.\pagesLTS@pnc|
+% \mbox{(e.\,g.} |pagesLTS.current.local.Roman|) is created.
%
% \begin{macrocode}
- \pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.current.local.\pagesLTS@pnc}%
% \end{macrocode}
%
% If |pagesLTS.double.\pagesLTS@pnc| of the current page numbering
-% scheme is equal to one, this is the first page of this page
-% numbering scheme. Then |pagesLTS.current.local.\pagesLTS@pnc|
-% (which was zero) is set to one.
+% scheme is equal to one, this is the first page of this page numbering scheme.
+% Then |pagesLTS.current.local.\pagesLTS@pnc| (which was zero) is set to one.
%
% \begin{macrocode}
\ifnum \value{pagesLTS.double.\pagesLTS@pnc}=1%
@@ -3246,64 +2757,58 @@ a package with output \linebreak
\fi%
% \end{macrocode}
%
-% Otherwise, i.\,e. if |\value{CurrentPage}| is not |>1|,
-% i.\,e. before the first page has shiped out:
+% Otherwise, i.\,e.\ if |\value{CurrentPage}| is not |>1|,
+% i.\,e.~before the first page has shiped out:
%
% \begin{macrocode}
- \else%
- %% before the first page has shipped out
+ \else%% before the first page has shipped out
% \end{macrocode}
%
-% The current page numbering scheme is defined by the
-% argument of |\pagenumbering{...}|, which the user gave:
+% The current page numbering scheme is defined by the argument of
+% |\pagenumbering{...}|, which the user gave:
%
% \begin{macrocode}
\xdef\pagesLTS@pnc{#1}%
% \end{macrocode}
%
-% \noindent and the page numbering scheme set by the original
-% page numbering command
-% (1994/05/19 v1.1a LaTeX Kernel File w ltpageno.dtx 52 Page Numbering),
-% which resets the page number to one,
-% but at the first page continuation does not make sense).
+% and the page numbering scheme set by the original page numbering command
+% (2020/12/05 Version v1.1a LaTeX Kernel File~33 ltpageno.dtx Page Numbering),
+% which resets the page number to one, but at the first page continuation does not make sense).
% Well, nearly the original page numbering command:
% |\OrigPagenumbering{\pagesLTS@pnc}| does not work,
-% so we \textquotedblleft expand\textquotedblright{} the
-% |\OrigPagenumbering| command:
+% so we \textquotedblleft expand\textquotedblright{} the |\OrigPagenumbering| command:
%
% \begin{macrocode}
\global\c@page \@ne\relax%
\global\def\thepage{\csname \expandafter @\pagesLTS@pnc \endcsname \c@page}%
% \end{macrocode}
%
-% If a page numbering scheme is used, which is not known by
-% \LaTeX , an error might arise here -- but maybe without error message.\\
+% If a page numbering scheme is used, which is not known by \LaTeX,
+% an error might arise here -- but maybe without error message.\\
%
% If page numbering scheme |\alph|, |\Alph|, or |\fnsymbol| is used,
-% \xpackage{pageslts} extends the page numbers according to
-% the given options, using the \xpackage{alphalph} package.
-% |\arabic| does not need any expansion.
-% |\roman| and |\Roman| at least receive a definition for
-% zero.
+% \xpackage{pageslts} extends the page numbers according to the given options,
+% using the \xpackage{alphalph} package. |\arabic| does not need any expansion.
+% |\roman| and |\Roman| at least receive a definition for zero.
%
% \begin{macrocode}
- \expandPagenumbering{#1}
+ \expandPagenumbering{#1}%
% \end{macrocode}
%
% We are at the first page, so the page counters are set to one:
%
% \begin{macrocode}
- \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.pnc.\pagesLTS@pnc}%
\setcounter{pagesLTS.pnc.\pagesLTS@pnc}{1}%
- \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.double.\pagesLTS@pnc}%
\setcounter{pagesLTS.double.\pagesLTS@pnc}{1}%
- \pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.current.local.\pagesLTS@pnc}%
\setcounter{pagesLTS.current.local.\pagesLTS@pnc}{1}%
\fi%
% \end{macrocode}
%
% Whether |\pagenumbering{...}| is called in the preamble,
-% |\AtBeginDocument|, right after |\begin{document}|,
+% in the |begindocument| hooks, right after |\begin{document}|,
% or somewhere in the document, we want to remember
% \textit{whether} it was called at all:
%
@@ -3324,19 +2829,18 @@ a package with output \linebreak
%
% \begin{macro}{\lastpageref*}
% If \xpackage{hyperref} is used, but (some) references to some last page shall
-% not be hyperlinked, a command |\lastpageref*| (analogous to |\pageref*|) is
-% needed. Therefore we define (analogous to |\HyPsd@pageref| from
-% the \xpackage{hyperref} package by \textsc{Heiko Oberdiek})
+% not be hyperlinked, a~command |\lastpageref*| (analogous to |\pageref*|)
+% is needed. Therefore we define (analogous to |\HyPsd@pageref| from
+% the \xpackage{hyperref} package
%
% \begin{macrocode}
-%% analogous to \HyPsd@pageref from the hyperref package by Heiko Oberdiek:
+%% analogous to \HyPsd@pageref from the hyperref package:
\def\lastpagereftxt#1{\pagesLTS@@pageref#1*\END}
% \end{macrocode}
%
-% Macro |\pagesLTSpageref| checks, whether a star is present (analogous to
-% |\HyPsd@@pageref| again from the \xpackage{hyperref} package
-% of \textsc{Heiko Oberdiek}):
+% Macro |\pagesLTSpageref| checks, whether a star is present
+% (analogous to |\HyPsd@@pageref| again from the \xpackage{hyperref} package):
%
% \begin{macrocode}
\def\pagesLTS@@pageref#1*#2\END{%
@@ -3354,9 +2858,9 @@ a package with output \linebreak
% \end{macro}
%
% \phantomsection
-% \begin{macro}{\lastpagereftext} \label{lastpagereftextlabel}
-% \indent When |\lastpageref| is used somewhere inside the \texttt{txt} (text),
-% i.\,e. not at the last page, it is defined as |\lastpagereftxt| (see above).
+% \begin{macro}{\lastpagereftext}\label{lastpagereftextlabel}%
+% When |\lastpageref| is used somewhere inside the \texttt{txt} (text),
+% i.\,e.~not at the last page, it is defined as |\lastpagereftxt| (see above).
% When the page numbering scheme is \xpackage{fnsymbol}, and the \xpackage{hyperref}
% package has been loaded, a hyperref instead of a label is used for the reference
% to |pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}|.
@@ -3368,16 +2872,16 @@ a package with output \linebreak
\def\pagesLTS@tmpA{#1}%
\def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
\ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
- \ltx@ifpackageloaded{hyperref}{%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.local}%
+ \IfPackageLoadedTF{hyperref}{%
\href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
{\arabic{pagesLTS.fnsymbol.local}}%
% \end{macrocode}
%
% When the page numbering scheme is \xpackage{fnsymbol}, but the \xpackage{hyperref} package
% has \textit{not} been loaded, just the arabic number of the
-% \texttt{pagesLTS.fnsymbol.local} counter is given (because there will be
-% no hyperlink anyway).
+% \texttt{pagesLTS.fnsymbol.local} counter is given
+% (because there will be no hyperlink anyway).
%
% \begin{macrocode}
}{\arabic{pagesLTS.fnsymbol.local}}%
@@ -3409,7 +2913,7 @@ a package with output \linebreak
\def\pagesLTS@tmpA{#1}%
\def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
\ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.local}%
\arabic{pagesLTS.fnsymbol.local}%
\else%
% \end{macrocode}
@@ -3417,7 +2921,7 @@ a package with output \linebreak
% There is no |\pageref*| without \xpackage{hyperref}.
%
% \begin{macrocode}
- \ltx@ifpackageloaded{hyperref}{\pageref*{#1}}{\pageref{#1}}%
+ \IfPackageLoadedTF{hyperref}{\pageref*{#1}}{\pageref{#1}}%
\fi%
\let\pagesLTS@tmpA\undefined%
\let\pagesLTS@tmpB\undefined%
@@ -3426,141 +2930,6 @@ a package with output \linebreak
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\lastpagerefend}
-% \indent When the \xpackage{hyperref} package is used and the page numbering scheme
-% of the last page is \xpackage{fnsymbol}, |\lastpageref| is defined as
-% |\lastpagerefend|.
-% Hyperrefs instead of labels are used for the reference to
-% \xpackage{fnsymbol} pages (including the last one).\\
-%
-% Again it must be discriminated between unstarred form and starred form:
-%
-% \begin{macrocode}
-\def\lastpagerefend#1{\pagesLTS@@pagerefend#1*\END}
-
-\def\pagesLTS@@pagerefend#1*#2\END{%
- \ifx\\#2\\% no star
- \pagesLTS@@@pagerefend{#1}%
- \else% star
- \expandafter\pagesLTS@@@pagerefendstar%
- \fi%
-}
-
-\def\pagesLTS@@@pagerefend#1{\l@stpagerefend{#1}}
-\def\pagesLTS@@@pagerefendstar#1{\l@stpagerefendstar{#1}}
-
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\l@stpagerefend}
-% The unstarred form (i.\,e. with hyperlinks, if \xpackage{hyperref} is loaded,
-% otherwise without hyperlinks):
-%
-% \begin{macrocode}
-\newcommand{\l@stpagerefend}[1]{%
- \def\pagesLTS@tmpA{#1}%
- \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
- {\arabic{pagesLTS.fnsymbol.local}}%
- }{\arabic{pagesLTS.fnsymbol.local}}%
- \else%
- \def\pagesLTS@tmpB{pagesLTS.fnsymbol}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
- {\pagesLTS.lastpage}%
- }{\pageref{pagesLTS.fnsymbol}}%
- \else%
- \def\pagesLTS@tmpB{LastPage}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\pagesLTS@eso}%
- {\pagesLTS.lastpage}%
- }{\pageref{LastPage}}%
- \else%
- \def\pagesLTS@tmpB{VeryLastPage}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
- {\pagesLTS.lastpage}%
- }{\pageref{VeryLastPage}}%
- \else%
- \def\pagesLTS@tmpB{LastPages}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
- {\arabic{pagesLTS.pagenr}}%
- }{\pageref{LastPages}}%
- \else%
- \pageref{#1}%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
-% \end{macrocode}
-%
-% We do not need the temporary definitions any more.
-%
-% \begin{macrocode}
- \let\pagesLTS@tmpA\undefined%
- \let\pagesLTS@tmpB\undefined%
- }
-
-% \end{macrocode}
-% \end{macro}
-%
-% \pagebreak
-%
-% \begin{macro}{\l@stpagerefendstar}%
-% And the starred form, without hyperlinks, even if \xpackage{hyperref} is loaded,
-% otherwise (i.\,e. without loaded \xpackage{hyperref}) this command is not called:
-%
-% \begin{macrocode}
-\newcommand{\l@stpagerefendstar}[1]{%
- \def\pagesLTS@tmpA{#1}%
- \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
- \arabic{pagesLTS.fnsymbol.local}%
- \else%
- \def\pagesLTS@tmpB{pagesLTS.fnsymbol}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{\pageref*{pagesLTS.fnsymbol}}{%
- \pageref{pagesLTS.fnsymbol}}%
- \else%
- \def\pagesLTS@tmpB{LastPage}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{\pageref*{LastPage}}{\pageref{LastPage}}%
- \else%
- \def\pagesLTS@tmpB{VeryLastPage}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{\pageref*{VeryLastPage}}{%
- \pageref{VeryLastPage}}%
- \else%
- \def\pagesLTS@tmpB{LastPages}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{\pageref*{LastPages}}{\pageref{LastPages}}%
- \else%
- \ltx@ifpackageloaded{hyperref}{\pageref*{#1}}{\pageref{#1}}%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \let\pagesLTS@tmpA\undefined%
- \let\pagesLTS@tmpB\undefined%
- }
-
-% \end{macrocode}
-% \end{macro}
-%
-% \pagebreak
-%
% \begin{macro}{\overrideLTSlabel}
% |\overridelabel| from the \xpackage{undolabl} package just |\undonewlabel|s
% a~label and places a new |\label{#1}|, but we need to place a
@@ -3568,15 +2937,13 @@ a package with output \linebreak
% (but somewhat similar to) |\overridelabel|:
%
% \begin{macrocode}
-% somewhat analogous to \overridelabel from the undolabl package:
\newcommand\overrideLTSlabel[2]{%
- \@bsphack
+ \@bsphack%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \edef\pagesLTStmpA{#1}%
- \edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}%
- \ifx\pagesLTStmpA\pagesLTStmpB%
- \immediate\write\@auxout{\string\undonewlabel{#1}}%
- \@overriddenmessage s{#1}%
+ \edef\pagesLTS@tmpC{#1}%
+ \edef\pagesLTS@tmpD{pagesLTS.\pagesLTS@pnc.local}%
+ \ifx\pagesLTS@tmpC\pagesLTS@tmpD%
+ \immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
\fi%
\fi%
\pagesLTS@putlabel{#1}{#2}{0}%
@@ -3586,103 +2953,66 @@ a package with output \linebreak
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@pagesLTS@Prelim@EveryShipout}
-% \indent Because we cannot make references to pages with \xpackage{fnsymbol}
-% page \textquotedblleft numbers\textquotedblright{} manually
-% with \xpackage{hyperref}, we use \nolinebreak{|\phantomsection|\,s} and
-% refer to one of those. But because we do not know how many
-% \nolinebreak{|\phantomsection|\,s} and \nolinebreak{|\section*|\,s}
-% are introduced by the user (or other packages;
-% cf.~\LaTeX~bug~2298: knowing level of |section*|,
-% \ \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=open&keyword=&pr=latex%2F2298&search=}),
-% we cannot refer to the last one as we did with the pages.
-%
-% \begin{macrocode}
-\newcommand{\@pagesLTS@Prelim@EveryShipout}{%
-%% The following code is from the prelim2e package %%
-%% [2009/05/29 v1.3] by Martin Schr\"{o}der (Thanks!): %%
- \bgroup
- \dimen\z@=\wd\@cclv
- \dimen\@ne=\ht\@cclv
- \dimen\tw@=\dp\@cclv
- \dimen\thr@@=\dimen1
- \advance\dimen\thr@@ by \dimen\tw@
- \global\setbox\@cclv\vbox to \dimen\thr@@{%
- \hb@xt@\dimen\z@{%
- \box\@cclv%
- \hss%
- }%
- \vbox to \z@{%
- \hb@xt@\dimen\z@{%
- \let\protect\relax
-%% Code not from prelim2e package: %%
-% \end{macrocode}
+% \begin{macro}{\pagesLTS@EveryShipout}
+% Because we cannot make references to pages with \xpackage{fnsymbol}
+% page \textquotedblleft numbers\textquotedblright{} manually with \xpackage{hyperref},
+% we use \nolinebreak{|\phantomsection|\,s} and refer to one of those.
+% But because we do not know how many \nolinebreak{|\phantomsection|\,s} and
+% \nolinebreak{|\section*|\,s} are introduced by the user (or other packages;
+% cf.~\LaTeX~bug~2298: knowing level of |section*|,\ %
+% \url{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2298&introduction=yes&state=open}),
+% we cannot refer to the last one as we did with the pages.\\
%
% Therefore each page with \xpackage{fnsymbol} page
-% \textquotedblleft number\textquotedblright{} receives a
-% |\phantomsection| and a label, which includes a number increased
-% by one for each page. This is done for
-% |pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}|
-% as well as
+% \textquotedblleft number\textquotedblright{} receives a |\phantomsection| and a label,
+% which includes a number increased by one for each page. This is done for
+% |pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}| as well as
% |pagesLTS.fnsymbol|, |pagesLTS.\pagesLTS@pnc|, and
% |pagesLTS.\pagesLTS@pnc.local|.\\
-% In case an older label already existed, it is overwritten by an
-% |\overridelabel| command.
-%
-% \begin{macrocode}
- \ifx\pagesLTS@pnc\pagesLTS@fns%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.cont}%
- \addtocounter{pagesLTS.fnsymbol.cont}{1}%
- \ltx@ifpackageloaded{hyperref}{%
- \phantomsection%
- \hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}%
- }{}%
- \ifnum \pagesLTS@esov=\pagesLTS@zero%
- \label{pagesLTS.fnsymbol}%
- \else%
- \overridelabel{pagesLTS.fnsymbol}%
- \fi%
- \else%
- \ltx@ifpackageloaded{hyperref}{\phantomsection}{}%
- \if@filesw%
- \overridelabel{pagesLTS.\pagesLTS@pnc}%
+% In case an older label already existed, it is overwritten by an |\overridelabel| command.
+%
+% \begin{macrocode}
+\newcommand{\pagesLTS@EveryShipout}{%
+ \begingroup%
+ \ifx\pagesLTS@pnc\pagesLTS@fns%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.cont}%
+ \addtocounter{pagesLTS.fnsymbol.cont}{1}%
+ \IfPackageLoadedT{hyperref}{\phantomsection%
+ \hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}%
+ }%
+ \ifnum \pagesLTS@esov=\pagesLTS@zero%
+ \label{pagesLTS.fnsymbol}%
+ \else%
+ \overridelabel{pagesLTS.fnsymbol}%
+ \fi%
+ \else%
+ \IfPackageLoadedT{hyperref}{\phantomsection}%
+ \if@filesw%
+ \overridelabel{pagesLTS.\pagesLTS@pnc}%
% \end{macrocode}
%
% We need to go forward one page (and later backward again), because
% |\overrideLTSlabel| calls a |\pagesLTS@putlabel|, and that one uses
-% |\addtocounter{page}{-1}...\addtocounter{page}{+1}|, which is not
-% needed here.
+% |\addtocounter{page}{-1}...\addtocounter{page}{+1}|, which is not needed here.
%
% \begin{macrocode}
- \addtocounter{page}{+1}%
- \overrideLTSlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}%
- \addtocounter{page}{-1}%
- \fi%
- \fi%
-%% Code from prelim2e package again: %%
- }%
- \vss%
- }%
- \vss%
- }%
- \wd\@cclv=\dimen\z@
- \ht\@cclv=\dimen\@ne
- \dp\@cclv=\dimen\tw@
- \egroup
-%% End of code from the prelim2e package. %%
+ \addtocounter{page}{+1}%
+ \overrideLTSlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}%
+ \addtocounter{page}{-1}%
+ \fi%
+ \fi%
+ \endgroup%
}
% \end{macrocode}
% \end{macro}
%
-% \pagebreak
-%
-% \begin{macro}{\EveryShipout}
-% \indent At the end of each shipout, the following commands are executed:
+% \begin{macro}{\AddToHook{shipout/foreground}}
+% At the end of each shipout, the following commands are executed:
%
% \begin{macrocode}
-\EveryShipout{%
- \ifnum\value{page}>0% \relax
+\AddToHook{shipout/foreground}{%
+ \ifnum\value{page}>0%
\else%
\ifnum\value{page}=0%
\PackageWarning{pageslts}{%
@@ -3704,10 +3034,10 @@ a package with output \linebreak
this will lead to a counter overflow.\MessageBreak%
}%
\else%
- \PackageError{pageslts}{%
+ \PackageError{pageslts}{Counter page has no recognized value}{%
Counter `page' does not have a recognized value:\MessageBreak%
`\the\value{page}'\MessageBreak%
- \@ehd \MessageBreak%
+ \@ehd\MessageBreak%
}%
\fi%
\fi%
@@ -3717,7 +3047,7 @@ a package with output \linebreak
% If the |CurrentPage| is equal to one, this is the first shipout.
%
% \begin{macrocode}
- \ifnum \value{CurrentPage}=1% This is the first shipout!
+ \ifnum \value{CurrentPage}=1%
% \end{macrocode}
%
% We check whether some page numbering scheme was defined by
@@ -3730,37 +3060,35 @@ a package with output \linebreak
% If it was not defined (i.\,e. |\pagesLTS@called| is zero),
% the user should be informed, that a |\pagenumbering{...}|
% is missing behind |\begin{document}|.
-% Of course, it is possible that some package did some
-% pages of output with |\AtBeginDocument|. In that case,
+% Of course, it is possible that some package did some pages of output using
+% the |begindocument/end| hook. In that case,
% one |\pagenumbering{...}| before |\begin{document}| and
% one |\pagenumbering{...}| (with the same argument, of course!)
% behind |\begin{document}| could help somewhat. When |\PackageError|
% was used here, the error message was not written to the screen and
% the \xfile{.log}-file, but into the document. Therefore we just make
-% a note to give the error message later (|\AtEndDocument|). At that
-% time unfortunately most of the document has already been compiled
-% (or did not compile due to this error), but I do not know how to
-% change that.
+% a note to give the error message later (|\AddToHook{enddocument/afterlastpage}|).
+% At that time unfortunately most of the document has already been compiled
+% (or did not compile due to this error), but I do not know how to change that.
%
% \begin{macrocode}
- \global\def\pncmissing{1}%
+ \gdef\pncmissing{1}%
% \end{macrocode}
%
% We save the current value of the page,
%
% \begin{macrocode}
- \mathchardef\pagesLTS@tmpD=\arabic{page}%
+ \setcounter{pagesLTS.tmpcounter}{\value{page}}%
% \end{macrocode}
%
-% determine the current page numbering scheme,
+% determine the current page numbering scheme,\newpage
%
% \begin{macrocode}
-%% Code from Andres L\"{o}h, Universiteit Utrecht (NL) %%
+%% Code from Andres L\"{o}h, Universiteit Utrecht (NL) %%
\def\extract#1{\expandafter\extract@ #1\END}%
\def\extract@#1\csname @#2\endcsname#3\END{#2}%
\edef\pagesLTS@tmpQ{\extract\thepage}%
-%% End of code from Andres L\"{o}h %%
- \let\pagesLTS@tmpP\pagesLTS@tmpQ%
+%% End of code from Andres L\"{o}h %%
% \end{macrocode}
%
% set the current page numbering scheme to~0
@@ -3774,20 +3102,19 @@ a package with output \linebreak
% page numbering scheme as argument:
%
% \begin{macrocode}
- \pagenumbering{\pagesLTS@tmpP}%
+ \pagenumbering{\pagesLTS@tmpQ}%
% \end{macrocode}
%
-% This resets the page to one (if option |pagecontinue=false|
-% was chosen), but because we do not start a new page numbering
-% scheme here but manifest a page numbering scheme, which
-% the user forgot to define, the page number should not have
-% been reset to one. (This is the first page, but maybe the user
-% wants it to have page number 2001?) Therefore we revert this here
-% and set the page number to its value, which was saved before the
-% |\pagenumbering| command.
+% This resets the page to one (if option |pagecontinue=false| was chosen),
+% but because we do not start a new page numbering scheme here
+% but manifest a page numbering scheme, which the user forgot to define,
+% the page number should not have been reset to one. (This is the first page,
+% but maybe the user wants it to have page number 2024?)
+% Therefore we revert this here and set the page number to its value,
+% which was saved before the |\pagenumbering| command.
%
% \begin{macrocode}
- \setcounter{page}{\pagesLTS@tmpD}%
+ \setcounter{page}{\value{pagesLTS.tmpcounter}}%
\fi%
% \end{macrocode}
%
@@ -3798,41 +3125,37 @@ a package with output \linebreak
\fi%
% \end{macrocode}
%
-% If the current page numbering scheme |\pagesLTS@pnc| is
-% |\pagesLTS@fns| (which is defined as \texttt{fnsymbol}),
-% the label is set by \linebreak
-% |\@pagesLTS@Prelim@EveryShipout| (see just above),
-% and |\pagesLTS@esov| is set to the (real) number (not the name) of
-% this page numbering scheme, |\arabic{pagesLTS.fnsymbol.cont}|.\\
+% If the current page numbering scheme |\pagesLTS@pnc| is |\pagesLTS@fns|
+% (which is defined as \texttt{fnsymbol}), the label is set by \linebreak
+% |\pagesLTS@EveryShipout| (see just above),
+% and |\pagesLTS@esov| is set to the (real) number (not the name)
+% of this page numbering scheme, |\arabic{pagesLTS.fnsymbol.cont}|.\\
% When no more pages with \xpackage{fnsymbol} page
% \textquotedblleft number\textquotedblright{} are shipped out,
% the value remains fixed and we have our reference to the last page
% of the \xpackage{fnsymbol} page numbering range.
-% (At least we will have that reference after some more work,
-% see below).
+% (At least we will have that reference after some more work, see below).
%
% \begin{macrocode}
\ifx\pagesLTS@pnc\pagesLTS@fns%
- \@pagesLTS@Prelim@EveryShipout%
- \gdef\pagesLTS@esov{\arabic{pagesLTS.fnsymbol.cont}}%
+ \pagesLTS@EveryShipout%
+ \xdef\pagesLTS@esov{\arabic{pagesLTS.fnsymbol.cont}}%
% \end{macrocode}
%
-% When another page numbering scheme was reused (in the example file
-% \xpackage{Roman}), we also need to apply\\
-% |\@pagesLTS@Prelim@EveryShipout|,
+% When another page numbering scheme was reused (in the example file \xpackage{Roman}),
+% we also need to apply |\pagesLTS@EveryShipout|,
% because otherwise we would get multiply defined labels.
%
% \begin{macrocode}
\else%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \@pagesLTS@Prelim@EveryShipout%
+ \pagesLTS@EveryShipout%
\fi%
\fi%
% \end{macrocode}
%
% The |CurrentPage| as well as the |pagesLTS.current.local.\pagesLTS@pnc|
-% are advanced by one (because one page was shipped out and the next is
-% about to begin).
+% are advanced by one (because one page was shipped out and the next is about to begin).
%
% \begin{macrocode}
\addtocounter{CurrentPage}{1}%
@@ -3842,83 +3165,92 @@ a package with output \linebreak
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\pagesLTS@putlabelhyper}
-% \indent Here the labels are set, if the \xpackage{hyperref} package
-% was loaded. Simply using |\label| would not work, because labels
-% wait for the output routines to work, and there may not be any
-% more invocations of the output routines. To force the write out
-% we need to do an |\immediate| write.
+% We use some code from the \xpackage{lastpage} package:
+%
+% \begin{macro}{\protected@iwrite}
+% We need an |\immediate\protected@write|. Just |\immediate\write| had led to errors,
+% for example when packages like \xpackage{babel-greek} re-defined |\roman|.
%
% \begin{macrocode}
-\newcommand{\pagesLTS@putlabelhyper}[2]{%
- \ifHy@pageanchor \relax%
- \else%
+%% Code provided by Prof. Enrico Gregorio at https://tex.stackexchange.com/a/542425
+\long\def\protected@iwrite#1#2#3{%
+ \begingroup%
+ #2%
+ \let\protect\@unexpandable@protect%
+ \edef\reserved@a{\immediate\write#1{#3}}%
+ \reserved@a%
+ \endgroup%
+ \if@nobreak\ifvmode\nobreak\fi\fi%
+ }
+
% \end{macrocode}
+% \end{macro}
%
-% If the \xpackage{hyperref} package is used, but pageanchors are disabled,
-% the hyperlinking will not work.
-%
+% \begin{macro}{\pagesLTS@makeHy}
+% Just once we need the page from |\@currentHpage| without any \mbox{\textquotedblleft |page.|\textquotedblright}
+% (|\pagesLTS@makeHy| is identical to |\lastpage@makeHy| except of the used namings):
+% \begin{macrocode}
+\newcommand{\pagesLTS@makeHy}{%
+ \gdef\pagesLTS@Hy{}%
+ \IfPackageLoadedT{hyperref}{%
+ \ifHy@pageanchor%
+% \end{macrocode}
+% |\gdef\pagesLTS@Hy{}|, but that was already done at the beginning of this command.
+% \begin{macrocode}
+ \xdef\pagesLTS@Hptest{Doc-Start}%
+ \ifx\pagesLTS@Hptest\@currentHpage\relax%
+ \gdef\pagesLTS@Hy{\@currentHpage}%
+ \else%
+ \edef\pagesLTS@Hptest{\@currentHpage}%
+ \ifx\pagesLTS@Hptest\empty\relax%
+% \end{macrocode}
+% then |\gdef\pagesLTS@Hy{}|, but that was already done at the beginning of this command.
% \begin{macrocode}
- \PackageError{pagesLTS}{hyperref option pageanchor disabled}{%
- The \string\lastpageref{#1} link doesn't work\MessageBreak%
- using hyperref with disabled option `pageanchor'.\MessageBreak%
+ \else%
+% \end{macrocode}
+% |\@currentHpage| should be |page.<some number>|, |\pagesLTS@rmpage| removes the
+% \mbox{\textquotedblleft |page.|\textquotedblright .}\\
+% Next compilation run, |\pagesLTSlastpageHy| gets defined via the \xfile{aux} file.
+% If we arrived at this place, but the definition is still empty,
+% then |\@currentHpage| has some unexpected content.
+% \begin{macrocode}
+ \gdef\pagesLTS@Hy{\pagesLTS@rmpage{\@currentHpage}}%
+ \ifx\pagesLTSlastpageHy\empty\relax%
+ \PackageWarningNoLine{pageslts}{%
+ \string\@currentHpage\space is\MessageBreak%
+ \meaning\@currentHpage\MessageBreak%
+ not beginning with "page.",\MessageBreak%
+ \string\pagesLTSlastpageHy\space is now let empty.}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
}%
- \fi
+ }%
+
% \end{macrocode}
+% \end{macro}
%
-% If use of the \xfile{.aux}-file is allowed, the label for
-% \texttt{LastPage} is written into that file, the page
-% reference depending on the options, which where set for
-% the \xpackage{hyperref} package.
-%
-% \begin{macrocode}
-%% The following code is from the hyperref package %%
-%% [2010/04/17 v6.80x; newer versions are available] %%
-%% by Heiko Oberdiek (Big Thanks!). %%
- \if@filesw
- \begingroup
- \let\@number\@firstofone
- \ifHy@pageanchor
- \ifHy@hypertexnames
- \ifHy@plainpages
- \def\Hy@temp{\arabic{page}}%
- \else
- \Hy@unicodefalse
-%% Code not from hyperref package: %%
-%% The following lines are modified from the hyperref package. %%
-%% Without the modification, after the first shipout "PD1" is %%
-%% inserted each time |\pdfstringdef\Hy@temp{\thepage}| is %%
-%% executed (if |fnsymbol| is not used). %%
- \ifnum \value{CurrentPage}=1%
- \ifx\pagesLTS@pnc\pagesLTS@fns%
- \pdfstringdef\Hy@temp{\thepage}%
- \else%
- \def\Hy@temp{\thepage}%
- \fi%
- \else%
- \pdfstringdef\Hy@temp{\thepage}%
- \fi%
-%% Code from hyperref package again: %%
- \fi
- \else
- \def\Hy@temp{\the\Hy@pagecounter}%
- \fi
- \fi
-%% End of code from the hyperref package. %%
-%% (The following four lines are modified %%
-%% from the hyperref package.) %%
- \immediate\write\@auxout{\string
- \newlabel{#1}{{}{#2}{}{\ifHy@pageanchor page.\Hy@temp\fi}{}}}%
- \endgroup%
- \fi%
- }
+% \begin{macro}{\pagesLTS@rmpage}
+% |\pagesLTS@rmpage| removes the \mbox{\textquotedblleft |page.|\textquotedblright.}
+%
+% \begin{macrocode}
+%% Code provided by David Carlisle at https://tex.stackexchange.com/a/721877
+\def\pagesLTS@rmpage#1{%
+ \expandafter\xpagesLTS@rmpage\expanded{#1}\xpagesLTS@rmpage page.%
+ \xpagesLTS@rmpage\xxpagesLTS@rmpage{#1}}
+\def\xpagesLTS@rmpage #1page.#2\xpagesLTS@rmpage#3\xxpagesLTS@rmpage#4{%
+ \if$\detokenize{#1}$#2%\else#4
+ \fi}
% \end{macrocode}
+% |\else#4| means, that it did not start with |page.|, and whatever it is,
+% we cannot use this |#4| for |\pagesLTS@Hy|.
% \end{macro}
%
% \phantomsection
% \begin{macro}{\pagesLTS@putlabel}\label{pagesLTSputlabel}
-% \indent Since the page has been put out, we are on the page after
+% Since the page has been put out, we are on the page after
% that page. We therefore subtract one from the page counter.
%
% \begin{macrocode}
@@ -3928,76 +3260,114 @@ a package with output \linebreak
%
% When the \xpackage{showkeys} package has been loaded in \texttt{draft} mode,
% in the margin for each label a box is displayed with the name of the label.
-% \xpackage{showkeys} accomplishes this by redefining |\label|, but
-% \xpackage{pageslts} does not use |\label|, but writes directly to the
+% \xpackage{showkeys} accomplishes this by redefining |\label|,
+% but \xpackage{pageslts} does not use |\label|, but writes directly to the
% {\nobreak |\jobname|\xfile{.aux}-}\allowbreak file, and this is generally done
% \emph{after} the according page has shipped out, therefore no box can be placed
% on the \emph{preceding} page. At least \xpackage{pageslts} gives a warning, that
% \xpackage{showkeys} cannot present the respective label.
%
% \begin{macrocode}
- \ifx\pagesLTS@SK\pagesLTS@one\relax%
- \message{^^J}%
- \message{Package pageslts Warning: Package showkeys without option final loaded,}%
- \ifnum\value{pagesLTS.pagenr}<1%
- \message{(pageslts) but label #1 on page \thepage\space(about \theCurrentPage)}%
- \else%
- \message{(pageslts) but label #1 on page \thepage\space(about \theCurrentPage\space of \arabic{pagesLTS.pagenr})}%
- \fi%
- \message{(pageslts) cannot be shown, because pageslts does not use \string\label,}%
- \message{(pageslts) but writes directly to the \jobname.aux file. ^^J}%
- \fi%
+ \IfPackageLoadedT{showkeys}{%
+ \IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \ifnum\value{pagesLTS.pagenr}<1%
+ \PackageWarningNoLine{pageslts}{%
+ Package showkeys without option final loaded,\MessageBreak%
+ but label #1 on page \thepage\space(about \theCurrentPage)\MessageBreak%
+ cannot be shown, because pageslts does not use \string\label,\MessageBreak%
+ but writes directly to the \jobname.aux file}%
+ \else%
+ \PackageWarningNoLine{pageslts}{%
+ Package showkeys without option final loaded,\MessageBreak%
+ but label #1 on page \thepage\space(about \theCurrentPage\space of \arabic{pagesLTS.pagenr})\MessageBreak%
+ cannot be shown, because pageslts does not use \string\label,\MessageBreak%
+ but writes directly to the \jobname.aux file}%
+ \fi%
+ }%
+ }%
+ \IfPackageLoadedTF{hyperref}{%
% \end{macrocode}
%
-% If the \xpackage{hyperref} package is used, the format of the labels is somewhat longer.
+% Here the labels are set, if the \xpackage{hyperref} package
+% was loaded. Simply using |\label| would not work, because labels
+% wait for the output routines to work, and there may not be any
+% more invocations of the output routines. To force the write out
+% we need to do an |\immediate| write (|\protected@iwrite|).
%
% \begin{macrocode}
- \ltx@ifpackageloaded{hyperref}{\pagesLTS@putlabelhyper{#1}{#2}}{% else
+ \ifHy@pageanchor\else%
% \end{macrocode}
%
-% \pagebreak
+% If the \xpackage{hyperref} package is used, but pageanchors are disabled,
+% the hyperlinking will not work.
%
-% If the \xpackage{hyperref} package is not used, there will be no hyperlinks,
-% and the label is written in the way of the old \xpackage{lastpage} package.
-% But we must remember to undo the label first, if it already exists.
+% \begin{macrocode}
+ \PackageWarningNoLine{pagesLTS}{%
+ The \string\lastpageref{#1} link does not work\MessageBreak%
+ using hyperref with disabled option `pageanchor'.\MessageBreak%
+ Better enable `pageanchor' or use\MessageBreak%
+ \string\lastpageref*{...} (not generating a link)%
+ }%
+ \fi%
+% \end{macrocode}
+%
+% If use of the \xfile{.aux}-file is allowed, the label for \texttt{LastPage}
+% is written into that file, the page reference depending on the options,
+% which where set for the \xpackage{hyperref} package.
%
% \begin{macrocode}
\if@filesw%
- \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2%
+ \begingroup%
+ \protected@iwrite\@auxout{}{\string\newlabel{#1}{%
+ {\@currentlabel}{#2}{\@currentlabelname}%
+ {\IfPackageLoadedTF{hyperref}{\ifHy@pageanchor\@currentHpage\fi%
+ }{\@currentHref}}%
+ {\@kernel@reserved@label@data}}%
+ }%
+ \endgroup%
+ \fi%
+ }{%
% \end{macrocode}
%
-% When the \xpackage{nameref} package is used, |\newlabel| needs five instead of two arguments:
+% If the \xpackage{hyperref} package is not used, there will be no hyperlinks,
+% and the label is written in the way of the \xpackage{lastpage} package.
+% But we must remember to undo the label first, if it already exists.
%
% \begin{macrocode}
- \ltx@ifpackageloaded{nameref}{%
- \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}{}{}{}}}}{% else
- \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}}}}%
+ \if@filesw%
+ \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2%
+ \protected@iwrite\@auxout{}{\string\newlabel{#1}{%
+ {\@currentlabel}{#2}{\@currentlabelname}%
+ {\@currentHref}{\@kernel@reserved@label@data}}%
+ }%
\else%
- \edef\pagesLTStmpA{#1}%
- \edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}%
- \ifx\pagesLTStmpA\pagesLTStmpB%
- \edef\pagesLTStmpA{#3}%
- \ifx\pagesLTStmpA\pagesLTS@one%
+ \edef\pagesLTS@tmpC{#1}%
+ \edef\pagesLTS@tmpD{pagesLTS.\pagesLTS@pnc.local}%
+ \ifx\pagesLTS@tmpC\pagesLTS@tmpD%
+ \edef\pagesLTS@tmpC{#3}%
+ \ifx\pagesLTS@tmpC\pagesLTS@one%
% \end{macrocode}
%
-% Only when the third argument of |\pagesLTS@putlabel| is $1$,
-% we do need to undo the label. Otherwise there is no label to
-% undo, and the \xpackage{undolabl} package would give an error.
+% Only when the third argument of |\pagesLTS@putlabel| is $1$, we do need to undo the label.
+% Otherwise there is no label to undo, and the \xpackage{undolabl} package would give an error.
%
% \begin{macrocode}
\immediate\write\@auxout{\string\undonewlabel{#1}}%
\fi%
\fi%
- \ltx@ifpackageloaded{nameref}{%
- \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}{}{}{}}}}{% else
- \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}}}}%
+% \end{macrocode}
+% \newpage
+% \begin{macrocode}
+ \protected@iwrite\@auxout{}{\string\newlabel{#1}{%
+ {\@currentlabel}{#2}{\@currentlabelname}%
+ {\@currentHref}{\@kernel@reserved@label@data}}%
+ }%
\fi%
\fi%
- }%
+ }%
% \end{macrocode}
%
-% After the writeout we restore the page number again,
-% since there might be other things still to be done.
+% After the writeout we restore the page number again, since there might be other things still to be done.
%
% \begin{macrocode}
\addtocounter{page}{+1}%
@@ -4006,10 +3376,8 @@ a package with output \linebreak
% \end{macrocode}
% \end{macro}
%
-% \pagebreak
-%
% \begin{macro}{\pagesLTS@putlabels}
-% \indent |\pagesLTS@putlabels| is nearly identical to |\pagesLTS@putlabelV|:
+% |\pagesLTS@putlabels| writes labels and calls |\pagesLTS@putlabel{LastPages}{\theCurrentPage}{1}|.
%
% \begin{macrocode}
\newcommand{\pagesLTS@putlabels}{%
@@ -4018,26 +3386,23 @@ a package with output \linebreak
\addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{-1}%
% \end{macrocode}
%
-% If |\pagenumbering{...}| has not been used,
-% |\pagesLTS@pnc| is still zero ($0$, |\pagesLTS@zero|),
+% If |\pagenumbering{...}| has not been used, |\pagesLTS@pnc| is still zero ($0$, |\pagesLTS@zero|),
% and the according warning message is given.
%
% \begin{macrocode}
\ifx\pagesLTS@pnc\pagesLTS@zero%
- \PackageWarning{pagesLTS}{No page numbering scheme found:\MessageBreak%
- \pagesLTS@messageNPN }%
+ \PackageWarningNoLine{pagesLTS}{No page numbering scheme found:\MessageBreak%
+ \pagesLTS@messageNPN}%
% \end{macrocode}
%
-% \noindent otherwise the numbered label is written,
-% and if the page numbering scheme was not used before,
-% the unnumbered label is written, too.
-%
+% otherwise the numbered label is written, and
+% if the page numbering scheme was not used before, also the unnumbered label is written.
%
% \begin{macrocode}
\else%
\pagesLTS@writelabel{\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}}%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2%
- \ifx\pagesLTS@pnc\pagesLTS@fns% \relax
+ \ifx\pagesLTS@pnc\pagesLTS@fns%
\else%
\pagesLTS@writelabel{\pagesLTS@pnc}%
\fi%
@@ -4045,24 +3410,22 @@ a package with output \linebreak
\fi%
% \end{macrocode}
%
-% \noindent Before the label for the \texttt{LastPages} can be put,
-% we must advance one page again, because |\pagesLTS@putlabel| itself
-% goes back one page (and at its end forward again).
+% Before the label for the \texttt{LastPages} can be put, we must advance one page again,
+% because |\pagesLTS@putlabel| itself goes back one page (and at its end forward again).
%
% \begin{macrocode}
\addtocounter{page}{+1}%
\pagesLTS@putlabel{LastPages}{\theCurrentPage}{1}%
% \end{macrocode}
%
-% \noindent Here should follow a\\
+% \newpage
+% Here should follow a\\
% |\addtocounter{page}{-1}|,\\
% but we have to remember to increase the page counters again,
-% which were decreased at the start of this |\pagesLTS@putlabels|
-% command, and that would include\\
+% which were decreased at the start of this |\pagesLTS@putlabels| command, and that would include\\
% |\addtocounter{page}{+1}|,\\
-% therefore this two lines cancel each other and
-% therefore just can be skipped. But the other counters have to
-% be increased:
+% therefore these two lines cancel each other and therefore they just can be skipped.
+% But the other counters have to be increased again:
%
% \begin{macrocode}
\addtocounter{CurrentPage}{+1}%
@@ -4072,251 +3435,137 @@ a package with output \linebreak
% \end{macrocode}
% \end{macro}
%
-% \pagebreak
-%
-% \begin{macro}{\AtBeginDocument}
-% \indent |\AtBeginDocument| we write into the \xfile{aux} file regarding
-% the double loading of the package.
-% Then it is checked whether the \texttt{endfloat}
-% package has been loaded, whether it is newer than March 1992 (i.\,e. at least
-% April 1992 v2.0), in which case it is compatible with this
-% \xpackage{pageslts} package.\\
-% If it is even newer than 2011/12/24, it is the recent version
-% (as of the time of last revision of this documentation:
-% 2011/12/25 v2.5d).
-%
+% \begin{macro}{\AddToHook{begindocument/end}}
% \begin{macrocode}
-\AtBeginDocument{%
- \if@filesw%
- \immediate\write\@auxout{\string\gdef\string\pagesLTS@loaded{p@gesLTSnotlo@ded}}%
- \fi%
- \@ifpackageloaded{endfloat}%
- {\@ifpackagelater{endfloat}{1992/03/31}% April 1992 v2.0
- {\@ifpackagelater{endfloat}{2011/12/24}{% 2011/12/25 v2.5d
- \relax}%
+\AddToHook{begindocument/end}{%
% \end{macrocode}
%
-% If it is compatible, but not the recent version, a warning is given:
+% Checking, whether \xpackage{lastpage} and \xpackage{pageslts} have \emph{both} been loaded.
%
% \begin{macrocode}
- {\PackageWarningNoLine{pageslts}{Old endfloat package detected:\MessageBreak%
- There is a newer version of the endfloat package available.\MessageBreak%
- Please consider updating your version.\MessageBreak%
- The pageslts package might be incompatible with\MessageBreak%
- your current endfloat package.\MessageBreak%
- }%
- }%
+ \IfPackageLoadedT{lastpage}{%
+ \PackageInfo{pageslts}{Packages lastpage and pageslts used}{%
+ Are you sure that you want to load both packages?\MessageBreak%
+ Typ <return> to continue or X <return> to quit.}%
+ }%
% \end{macrocode}
%
-% If it is so very old, that it is not compatible,
-% an Error message is given:
+% It is checked whether the \xpackage{hyperref} package, if loaded, is recent enough:
%
% \begin{macrocode}
- }{\PackageError{pageslts}{Incompatible, very old endfloat package detected.}%
- {The very old version 2.0 (and earlier) of the\MessageBreak%
- endfloat package actually redefined the \string\enddocument ,\MessageBreak%
- and so interfered drastically with the LaTeX2e commands\MessageBreak%
- which make use of \string\AtEndDocument .\MessageBreak%
- Newer versions of the endfloat package exists\MessageBreak%
- (at least: v2.5d as of 2011/12/25)\MessageBreak%
- in modern documentation form,\MessageBreak%
- which should be available from CTAN.\MessageBreak%
- Please update your endfloat package\MessageBreak%
- for use with the pageslts package.\MessageBreak %
- }%
- }%
- }{}%
-% \end{macrocode}
-%
-% \pagebreak
-%
-% It is checked whether the old \xpackage{lastpage} package has been loaded.\\
-% (If it has been loaded indeed, the |\lastpage@putlabel| is
-% \textquotedblleft killed\textquotedblright ,
-% see subsection~\ref{ssec:lastpage}.)
-%
-% \begin{macrocode}
- \@ifpackageloaded{lastpage}%
- {\@ifpackagelater{lastpage}{2010/07/28}% 2010/07/29 v1.2a
- {\@ifpackagelater{lastpage}{2013/01/27}% 2013/01/28 v1.2l
- {\PackageWarning{pageslts}{lastpage package detected.\MessageBreak%
- With pageslts package in use, lastpage has no function.\MessageBreak%
- Just remove the lastpage package from your document.\MessageBreak%
- }%
- }{%
- \PackageWarning{pageslts}{Old lastpage package detected.\MessageBreak%
- With pageslts package in use, lastpage has no function.\MessageBreak%
- Just remove the lastpage package from your document.\MessageBreak%
- At least update it!\MessageBreak%
- }%
- }%
- }{%
- \PackageWarning{pageslts}{Incompatible package lastpage detected:\MessageBreak%
- Package pageslts was loaded, but also an old\MessageBreak%
- version of the lastpage package.\MessageBreak%
- pageslts has all functionality of the lastpage\MessageBreak%
- package (and more), so just remove the lastpage\MessageBreak%
- package from your document.\MessageBreak%
- (At least update it!)\MessageBreak%
- pageslts will now ''kill'' the lastpage@putlabel\MessageBreak%
- command of the lastpage package.\MessageBreak%
- }%
- \gdef\lastpage@putlabel{\relax}%
- }%
- }{}%
+ \IfPackageLoadedTF{hyperref}{%
+ \IfPackageAtLeastTF{hyperref}{2024-10-30}{}{%
+ \PackageError{pageslts}{hyperref package version too old}{%
+ required version: 2024-10-30 v7.01k or newer, found version:\MessageBreak%
+ \csname ver@hyperref.sty\endcsname.}}%
+ }{\PackageNoteNoLine{pageslts}{Package hyperref not loaded.\MessageBreak%
+ pageslts would support hyperref.\MessageBreak%
+ The page references will NOT be hyperlinked}%
+ }%
% \end{macrocode}
%
% Further it is checked whether the \xpackage{alphalph} package has been loaded.
-% If that is the case, the commands are defined accordingly.\\
-%
-% \begin{macrocode}
- \ltx@ifpackageloaded{alphalph}%
- {\newalphalph{\AlphMult}[mult]{\@Alph}{26}%
- \newalphalph{\alphMult}[mult]{\@alph}{26}%
- \newalphalph{\fnsymbolmult}[mult]{\@fnsymbol}{5}%
- }{}%
-% \end{macrocode}
-%
-% \pagebreak
-%
-% Further it is checked whether the \xpackage{hyperref} package has been loaded:
+% If that is the case, the commands are defined accordingly.
%
% \begin{macrocode}
- \ltx@ifpackageloaded{hyperref}{%
+ \IfPackageLoadedT{alphalph}{%
+ \newalphalph{\AlphMult}[mult]{\@Alph}{26}%
+ \newalphalph{\alphMult}[mult]{\@alph}{26}%
+ \newalphalph{\fnsymbolmult}[mult]{\@fnsymbol}{5}%
+ }%
% \end{macrocode}
%
-% and whether the \xpackage{pdfpages} package is loaded:
+% It is checked whether writing to files is allowed.
+% The \xpackage{pageslts} package cannot be used without that!
+% Some packages (e.\,g. \xpackage{tikz} and \xpackage{selectp}) sometimes prevent
+% the output to the \xfile{aux} file. In that case a warning or an error message
+% is issued. This is no problem as long as there is/was another compilation run
+% where the labels can/could be processed via the \xfile{aux} file.\\
%
% \begin{macrocode}
- \@ifpackageloaded{pdfpages}%
- {\PackageWarningNoLine{pageslts}{Package pdfpages detected.\MessageBreak%
- Using hyperref with pdfpages can cause problems. See\MessageBreak%
- https://www.ctan.org/pkg/pax\MessageBreak%
- for the Pdf Annotations eXtractor, pax%
- }%
- }{% \relax
+ \if@filesw%
+ \else%
+ \IfPackageLoadedTF{tikz}{%
+ \PackageWarning{pageslts}%
+ {It was not allowed to write to an\MessageBreak%
+ .aux file. This package does not work without access\MessageBreak%
+ to an .aux file.\MessageBreak%
+ It is OK if the .aux file was already updated\MessageBreak%
+ by a previouse compiler run\MessageBreak%
+ and would not have changed anyway.\MessageBreak%
+ }%
+ }{\PackageError{pageslts}{No writing to auxiliary file allowed}%
+ {It was not allowed to write to an .aux file.\MessageBreak%
+ This package does not work without access to an .aux file.\MessageBreak%
+ Press Ctrl+Z to exit.\MessageBreak%
+ But it is OK if the .aux file was already updated\MessageBreak%
+ by previouse compiler runs\MessageBreak%
+ and would not have changed anyway.\MessageBreak%
+ (In that case just press Enter or Return\MessageBreak%
+ to continue the compilation.)\MessageBreak%
}%
-% \end{macrocode}
-%
-% The \xpackage{undolabl} package has been updated and now uses |\undonewlabel| with only
-% one argument.
-%
-% \begin{macrocode}
- \@ifpackageloaded{undolabl}%
- {\@ifpackagelater{undolabl}{2010/07/14}% 2010/07/15 v1.0d
- {\@ifpackagelater{undolabl}{2015/03/29}% 2015/03/29 v1.0l
- {% recent version as of the time of last revision of this package: OK
- }{% old, but not obsolete version
- \PackageWarningNoLine{pageslts}{Old version of undolabl package used.\MessageBreak%
- See https://www.ctan.org/pkg/undolabl\MessageBreak%
- for a new version.\MessageBreak%
- }%
- }
- }{\PackageError{pageslts}{Incompatible, obsolete version of undolabl package used.}{%
- See https://www.ctan.org/pkg/undolabl\MessageBreak%
- for a new version.\MessageBreak%
- Type X <return> to quit.\MessageBreak%
- }%
- }
- }{\PackageError{pageslts}{Package undolabl missing}{%
- Package undolabl not found.\MessageBreak%
- The pageslts package needs the undolabl package.\MessageBreak%
- See https://www.ctan.org/pkg/undolabl\MessageBreak%
- Type X <return> to quit.\MessageBreak%
- }%
- }
-% \end{macrocode}
-%
-% \pagebreak
-%
-% Additionally a version check of the available \xpackage{hyperref}
-% package is performed and if need be a warning is issued:
-%
-% \begin{macrocode}
- \@ifpackagelater{hyperref}{2012/11/05}{% 2012/11/06 v6.83m
- \relax}{%
- \PackageWarningNoLine{pageslts}{Old hyperref package detected:\MessageBreak%
- There is a newer version of the\MessageBreak%
- hyperref package available:\MessageBreak%
- https://www.ctan.org/pkg/hyperref\MessageBreak%
- Please consider updating your version.\MessageBreak%
- }%
}%
- %% pageslts supports the use of the package hyperref by
- %% Heiko Oberdiek (hyperref version 2012/11/06 v6.83m).
- %% pageslts may work with earlier versions of this packages,
- %% but this was not tested.
- }{%
+ \fi%
+ }
+
% \end{macrocode}
+% \end{macro}
%
-% If no \xpackage{hyperref} package in use is detected, a warning is issued, too:
+% If a version of the \xpackage{undolabl} package before 2010/07/15~v1.0d
+% has been used~-- your fault, we do not check for this anymore.
%
-% \begin{macrocode}
- \PackageWarning{pageslts}{Package hyperref NOT detected.\MessageBreak%
- pageslts would support hyperref. The page references\MessageBreak%
- will NOT be hyperlinked!\MessageBreak }%
- }%
-% \end{macrocode}
-%
-% If the \xpackage{showkeys} package has been loaded in \texttt{draft} mode,
-% warnings about missing label boxes will be issued (see p.~\pageref{pagesLTSputlabel}),
-% but because it cannot be checked for \xpackage{showkeys} after |\AtBeginDocument|,
-% the check must be done here and the result remembered.
+% We do check whether \xpackage{showkeys} has been loaded (\emph{before} \xpackage{pageslts}!)
+% in a mode to show the labels:
%
% \begin{macrocode}
- \ltx@ifpackageloaded{showkeys}{%
- \@ifpackagewith{showkeys}{final}{}{\gdef\pagesLTS@SK{1}}}{% else \relax
+\def\pagesLTS@skld{0}
+\IfPackageLoadedT{showkeys}{%
+ \IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \def\pagesLTS@skld{1}%
}%
- }
+ }%
% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\AtEndDocument}
-% \indent |\AtEndDocument| the check is repeated. If \xpackage{showkeys} was
-% loaded after the check performed before, an error message is issued.
+% \begin{macro}{\AddToHook{enddocument/afterlastpage}}
+% |\AddToHook{enddocument/afterlastpage}| it is checked
+% whether the \xpackage{showkeys} package was loaded after the check performed before,
+% in which case an error message is issued.
%
% \begin{macrocode}
-\AtEndDocument{%
- \ltx@ifpackageloaded{showkeys}{%
- \ifx\pagesLTS@SK\pagesLTS@one\relax%
- \else%
- \providecommand*\pagesLTS@sklf[1]{}%
- \ifx\showkeyslabelformat\pagesLTS@sklf\relax%
+\AddToHook{enddocument/afterlastpage}{%
+ \IfPackageLoadedT{showkeys}{%
+ \IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \ifx\pagesLTS@skld\pagesLTS@one\relax%
\else%
\PackageError{pageslts}{Package showkeys loaded after pageslts}{%
The showkeys package with option "final" has been loaded\MessageBreak%
after the pageslts package.\MessageBreak%
Please first load showkeys and then pageslts}%
\fi%
- \fi%
- }{% else no showcase, \relax
- }%
+ }%
+ }%
% \end{macrocode}
%
% We also give the error message about the missing (i.\,e.~not found)
-% page numbering scheme, which could not be given in |\EveryShipout|.
+% page numbering scheme, which could not be given in hook |shipout/foreground|.
%
% \begin{macrocode}
\ifx\pncmissing\pagesLTS@one\relax%
- \PackageError{pageslts}{pagenumbering scheme missing}{\pagesLTS@messageNPN }%
+ \PackageError{pageslts}{pagenumbering scheme missing}{\pagesLTS@messageNPN}%
\fi%
% \end{macrocode}
%
-% Then we put in a |\message| to show, in what order things (which were called)
-% are done (see subsection~\ref{ssec:aed}).
+% Then we put in an |info| to show, in what order things (which were called) are done.
%
% \begin{macrocode}
- \message{^^J%
- AED: pageslts setting LastPage ^^J}%
+ \PackageInfo{pageslts}{enddocument/afterlastpage (AED): pageslts setting LastPage}%
% \end{macrocode}
%
-% After this we issue a |\clearpage| to put out all floats,
-% which are still floating, remember the page number (if |fnsymbol|),
+% After this we remember the page number (if |fnsymbol|),
% and after that we place the \texttt{LastPage} label.
%
% \begin{macrocode}
- \clearpage%
\ifx\pagesLTS@pnc\pagesLTS@fns%
\def\pagesLTS@tmpA{\arabic{pagesLTS.fnsymbol.local}}%
\ifnum \pagesLTS@eso=\pagesLTS@tmpA%
@@ -4335,86 +3584,49 @@ a package with output \linebreak
%
% \begin{macrocode}
\let\pagesLTS@tmpA\undefined%
- }
-
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\AfterLastShipout}
-% \indent |\AfterLastShipout| is a command from \textsc{Heiko Oberdiek's}
-% \texttt{atveryend} package (see above).
-%
-% \begin{macrocode}
-\AfterLastShipout{%
-% \end{macrocode}
-%
-% If writing to the \xfile{.aux} file is allowed:
-%
-% \begin{macrocode}
- \if@filesw%
% \end{macrocode}
%
% The number of pages with the \xpackage{fnsymbol} page numbering scheme,
% |\pagesLTS@esov|, is saved via the \xfile{.aux} file (if it is not zero):
%
% \begin{macrocode}
- \ifx\pagesLTS@esov\pagesLTS@zero%
+ \if@filesw%
+ \ifx\pagesLTS@esov\pagesLTS@zero\relax%
\else%
- \immediate\write\@auxout{\string
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}}%
- \immediate\write\@auxout{\string
- \setcounter{pagesLTS.fnsymbol.local}{\pagesLTS@esov}}%
+ \immediate\write\@auxout{\string\pagesLTS@providecounter{pagesLTS.fnsymbol.local}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.fnsymbol.local}{\pagesLTS@esov}}%
\fi%
-% \end{macrocode}
-%
-% If the \xpackage{hyperref} package is in use, and the page numbering scheme
-% of the last page is \xpackage{fnsymbol}, everything is quite more complicated.
-% Therefore |\lastpageref| is switched from simple |\lastpagereftxt|
-% to the more difficult |\lastpagerefend|.
-%
-% \begin{macrocode}
- \ltx@ifpackageloaded{hyperref}{%
- \ifx\pagesLTS@pnc\pagesLTS@fns%
- \immediate\write\@auxout{\string
- \gdef\string\lastpageref{\string\lastpagerefend}}%
- \fi%
- }{}%
\fi%
% \end{macrocode}
%
-% At the call of a |\pagenumbering{...}| command, everything
-% for a split page numbering scheme is organized. For the last
-% page numbering scheme, there is no |\pagenumbering{...}| command
+% At the call of a |\pagenumbering{...}| command, everything for a split page numbering scheme
+% is organized. For the last page numbering scheme, there is no |\pagenumbering{...}| command
% at the end, so we need to handle this here:
%
% \begin{macrocode}
- \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}%
+ \pagesLTS@providecounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}%
\setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
\value{pagesLTS.current.local.\pagesLTS@pnc}}%
% \end{macrocode}
%
-% And we are one page after the last one (|\AfterLastShipout|!),
-% so we go back one page. (We again borrow the \texttt{pagesLTS.pnc.0} counter for the computations
-% instead of defining yet another one.)
+% And we are one page after the last one (hook |enddocument/afterlastpage|!), so we go back one page.
%
% \begin{macrocode}
- \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{-1}
+ \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{-1}%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \mathchardef\pagesLTS@tmpD=\arabic{pagesLTS.pnc.0}%
- \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \@tempcnta=\value{pagesLTS.pnc.0}\relax%
+ \setcounter{pagesLTS.tmpcounter}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
+ \@tempcnta=\value{pagesLTS.tmpcounter}\relax%
\loop%
\ifnum\@tempcnta>1\relax%
- \addtocounter{pagesLTS.pnc.0}{-1}%
+ \addtocounter{pagesLTS.tmpcounter}{-1}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
- -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
- \@tempcnta=\value{pagesLTS.pnc.0}\relax%
+ -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
+ \@tempcnta=\value{pagesLTS.tmpcounter}\relax%
\repeat%
- \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpD}%
\fi%
\if@filesw%
\immediate\write\@auxout{\string
- \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}%
+ \pagesLTS@providecounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}%
\edef\pagesLTS@tmpA{\arabic{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}}%
\immediate\write\@auxout{\string
\setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}{\pagesLTS@tmpA}}%
@@ -4422,90 +3634,46 @@ a package with output \linebreak
\fi%
% \end{macrocode}
%
-% We need to save (via the \xfile{.aux} file) the page name |\thepage| and
-% the page number |\arabic{CurrentPage}| of the last page,
+% We need to save (via the \xfile{.aux} file) the page name |\thepage|
+% and the page number |\arabic{CurrentPage}| of the last page,
% in case the last page has \xpackage{fnsymbol} page numbering scheme.
%
% \begin{macrocode}
\addtocounter{page}{-1}%
- \edef\pagesLTS@tmpA{\thepage}%
+ \def\pagesLTS@tmpA{\thepage}%
\if@filesw%
- \immediate\write\@auxout{\string
- \gdef\string\pagesLTS.lastpage{\pagesLTS@tmpA}}%
+ \protected@iwrite\@auxout{}{\string\gdef\string\pagesLTSlastpage{\pagesLTS@tmpA}}%
+ \pagesLTS@makeHy|%
+ \protected@iwrite\@auxout{}{\string\gdef\string\pagesLTSlastpageHy{\pagesLTS@Hy}}%
\fi%
\addtocounter{page}{+1}%
\addtocounter{CurrentPage}{-1}%
\edef\pagesLTS@tmpB{\arabic{CurrentPage}}%
\if@filesw%
- \immediate\write\@auxout{\string
- \setcounter{pagesLTS.pagenr}{\pagesLTS@tmpB}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.pagenr}{\pagesLTS@tmpB}}%
\fi%
\addtocounter{CurrentPage}{+1}%
% \end{macrocode}
%
-% The \texttt{VeryLastPage} label is set here, and when
-% |\lastpageref{VeryLastPage}| instead of |\lastpageref{LastPage}| is used,
-% it should really point to the last page.
-% |LastPage| and |VeryLastPage| should be identical,
-% unless a package was active with output |\AtEndDocument|
-% \textit{after} the \xpackage{pageslts} package.
+% The \texttt{VeryLastPage} label is set here. Before the introduction of the hook mechanism in the kernel,
+% |\lastpageref{VeryLastPage}| could point to a later page then |\lastpageref{LastPage}|.
+% |LastPage| and |VeryLastPage| should now be identical, but for backward compatibility we keep both.
%
% \begin{macrocode}
- \message{^^J%
- AED: pageslts setting VeryLastPage via AfterLastShipout ^^J}%
+ \PackageInfo{pageslts}{enddocument/afterlastpage (AED): pageslts setting VeryLastPage}%
\pagesLTS@putlabel{VeryLastPage}{\thepage}{1}%
% \end{macrocode}
%
-% The \texttt{LastPages} label is set here, and
-% |\lastpageref{LastPages}| gives the total number of pages
-% and points to the (very) last page.
+% The \texttt{LastPages} label is set here, and |\lastpageref{LastPages}| gives
+% the total number of pages and points to the last page.
%
% \begin{macrocode}
- \message{^^J%
- AED: pageslts setting LastPages via AfterLastShipout ^^J}%
+ \PackageInfo{pageslts}{enddocument/afterlastpage (AED): pageslts setting LastPages}%
\pagesLTS@putlabels%
- \typeout{^^J}%
\ifodd\pagesLTS@tmpB%
- \@PackageInfoNoLine{pageslts}{Total number of pages is odd}%
+ \PackageNoteNoLine{pageslts}{Total number of pages is odd}%
\else%
- \@PackageInfoNoLine{pageslts}{Total number of pages is even}%
- \fi%
- \typeout{^^J}%
-% \end{macrocode}
-%
-% We do not need the temporary definitions any more.
-%
-% \begin{macrocode}
- \let\pagesLTS@tmpA\undefined%
- \let\pagesLTS@tmpB\undefined%
- }
-
-% \end{macrocode}
-% \end{macro}
-%
-% \pagebreak
-%
-% \begin{macro}{\AtEndAfterFileList}
-% \indent |\AtEndAfterFileList{...}| is even later:
-% \begin{quote}
-% \textquotedblleft After the .aux file closing and reading \LaTeX{} prints the
-% file list if requested by |\listfiles|. Then this hook is executed.\textquotedblright
-% \end{quote}
-% (\xpackage{atveryend} package of \textsc{Heiko Oberdiek}, v1.7 as of 2011/04/23,
-% newer version available.) Here it is used for a rerun hint.\\
-% For example if the page numbering scheme of the last page of the
-% \textsf{pageslts-example.tex} file is changed to |fnsymbol| and two runs
-% of \pdfLaTeX{} are done, \pdfLaTeX{} will be happy and will not complain
-% about changed labels. But indeed, a \textit{third} run is necessary
-% and indicated by the warning message below.
-%
-% \begin{macrocode}
-\AtEndAfterFileList{%
- \ifx\pagesLTS@rerun\pagesLTS@one%
- \PackageWarningNoLine{pageslts}{%
- Label(s) may have changed.\MessageBreak%
- Rerun to get cross-references right%
- }%
+ \PackageNoteNoLine{pageslts}{Total number of pages is even}%
\fi%
}
@@ -4513,7 +3681,7 @@ a package with output \linebreak
% \end{macro}
%
% \begin{macro}{\frontmatter}
-% \indent |\frontmatter| often contains |\pagenumbering|, but for some unknown reason
+% |\frontmatter| often contains |\pagenumbering|, but for some unknown reason
% there are problems when another |\pagenumbering| with different page numbering scheme
% has been used before on the same page. (This would not make any sense anyway,
% because one page can only have one page numbering scheme.) This problem does not
@@ -4521,61 +3689,26 @@ a package with output \linebreak
% Thus we need to check whether |\frontmatter| has been defined,
% whether it changes the page numbering scheme, and whether the page numbering scheme
% before |\frontmatter| was initiated at the same page.
-% \end{macro}
-%
-% We need an |\ifundefined|, which neither requires \eTeX{} nor
-% defines the command, which is to be tested, to |\relax| (in which case
-% it would be no longer undefined for further tests). For this we use
-% code from \textsc{Markus Kohm} similar to his |\scr@ifundefinedorrelax| from %
-% \xpackage{scrbase.sty} of the KOMA script bundle,
-% but without the necessarity to use \eTeX :
+% With the hook mechanism it does not matter whether the command to be patched is defined.
%
% \begin{macrocode}
-\newcommand{\pagesLTS@ifundefinedorrelax}[1]{%
- % Modified Markus Kohm code for use without e-TeX
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1\endcsname\relax%
- \expandafter\ifx\csname #1\endcsname\relax%
- \expandafter\expandafter\expandafter\@firstoftwo
- \else%
- \expandafter\expandafter\expandafter\@secondoftwo
- \fi%
- \else%
- \expandafter\@firstoftwo
- \fi%
+\AddToHook{cmd/frontmatter/before}{%
+ \xdef\pagesLTS@FMBpncn{\pagesLTS@pnc}%
+ \xdef\pagesLTS@FMBpncp{\arabic{pagesLTS.current.local.\pagesLTS@pnc}}%
}
-\pagesLTS@ifundefinedorrelax{frontmatter}{% \relax
-}{% else
- \ltx@GlobalPrependToMacro{\frontmatter}{\pagesLTS@prefrontmatter}%
- \ltx@GlobalAppendToMacro{\frontmatter}{\pagesLTS@postfrontmatter}%
- }
-
% \end{macrocode}
%
-% \begin{macro}{\pagesLTS@prefrontmatter}
-%
-% At the beginning of the real (i.e. unchanged) |\frontmatter| (FMB), we remember the
+% At the beginning of the |\frontmatter| (FMB), we remember the
% current (c) page numbering (pn) scheme: its name (n) and page number (p).
% |\pagesLTS@FMBpncp| would be |1| if the according |\pagenumbering| command
% was used on the same page at the |\frontmatter|.
%
-% \begin{macrocode}
-\newcommand{\pagesLTS@prefrontmatter}{%
- \xdef\pagesLTS@FMBpncn{\pagesLTS@pnc}%
- \xdef\pagesLTS@FMBpncp{\arabic{pagesLTS.current.local.\pagesLTS@pnc}}%
- }
-
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\pagesLTS@postfrontmatter}
-%
-% The named checks are performed and in case of the named problem an error message
-% is given. Any idea how to automatically solve this issue?
+% At the end of the |\frontmatter| the named checks are performed
+% and in case of the named problem an error message is given.
%
% \begin{macrocode}
-\newcommand{\pagesLTS@postfrontmatter}{%
+\AddToHook{cmd/frontmatter/after}{%
\xdef\pagesLTS@FMEpncn{\pagesLTS@pnc}%
\ifx\pagesLTS@FMBpncn\pagesLTS@FMEpncn%
\else%
@@ -4583,205 +3716,140 @@ a package with output \linebreak
\else%
\ifx\pagesLTS@FMBpncp\pagesLTS@one%
\PackageError{pageslts}{\string\pagenumbering\space before \string\frontmatter}{%
- Do not use \string\pagenumbering{\pagesLTS@FMBpncn} before \string\frontmatter \MessageBreak%
+ Do not use \string\pagenumbering{\pagesLTS@FMBpncn} before \string\frontmatter\MessageBreak%
on the same page!\MessageBreak%
- \string\frontmatter\space (re)defines the page numbering scheme to \pagesLTS@FMEpncn , \MessageBreak%
+ \string\frontmatter\space (re)defines the page numbering scheme to \pagesLTS@FMEpncn ,\MessageBreak%
thus earlier use of \string\pagenumbering{\pagesLTS@FMBpncn} on the same page is useless anyway.}%
\fi%
\fi%
\fi%
-}
+ }
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\AddToHook{enddocument/info}}
+% The hook |enddocument/info| is even later:
+% \begin{quote}
+% \textquotedblleft This hook is meant to receive code that write final information messages
+% to the terminal. It follows immediately after the previous hook\textquotedblright
+% \end{quote}
+% (Frank Mittelbach (2024-06-26): \LaTeX's hook management, lthooks-code.pdf, p.~27)
+% |enddocument/afteraux|. Here it is used for a rerun hint.\\
+% For example if the page numbering scheme of the last page of the
+% \textsf{pageslts-example.tex} file is changed to |fnsymbol| and two runs
+% of \pdfLaTeX{} are done, \pdfLaTeX{} will be happy and will not complain
+% about changed labels. But indeed, a \emph{third} run is necessary
+% and indicated by the warning message below.
+%
+% \begin{macrocode}
+\AddToHook{enddocument/info}{%
+ \ifx\pagesLTS@rerun\pagesLTS@one%
+ \PackageWarningNoLine{pageslts}{Label(s) may have changed.\MessageBreak%
+ Rerun to get cross-references right}%
+ \fi%
+ }
+
+% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
%</package>
% \end{macrocode}
%
% \newpage
+% \setlength{\parindent}{\the\ltsindent}
%
% \section{Installation}
%
% \subsection{Downloads\label{ss:Downloads}}
%
-% Everything is available at \url{https://www.ctan.org},
+% Everything is available at \url{https://CTAN.org},
% but may need additional packages themselves.\\
%
% \DescribeMacro{pageslts.dtx}
-% For unpacking the |thumbs.dtx| file and constructing the documentation it is required:
+% For unpacking the |pageslts.dtx| file and constructing the documentation it is required:
% \begin{description}
-% \item[-] \TeX Format \LaTeXe{}: \url{https://www.CTAN.org}
+% \item[-] \TeX Format \LaTeXe{} 2024-06-01: \url{https://CTAN.org}
%
-% \item[-] document class \xclass{ltxdoc}, 2015-03-26, 2.0w, \url{https://www.ctan.org/pkg/ltxdoc}
+% \item[-] document class \xclass{ltxdoc}, 2024/02/08, v2.1j, \url{https://ctan.org/pkg/ltxdoc}
%
-% \item[-] package \xpackage{holtxdoc}, 2012/03/21, v0.24, \url{https://www.ctan.org/pkg/holtxdoc}
+% \item[-] package \xpackage{holtxdoc}, 2019/12/09, v0.30, \url{https://ctan.org/pkg/holtxdoc}
%
-% \item[-] package \xpackage{hypdoc}, 2011/08/19, v1.11, \url{https://www.ctan.org/pkg/hypdoc}
+% \item[-] package \xpackage{hypdoc}, 2023-10-26, v1.19, \url{https://ctan.org/pkg/hypdoc}
%
-% \item[-] package \xpackage{geometry}, 2010/09/12, v5.6, \url{https://www.ctan.org/pkg/geometry}
+% \item[-] package \xpackage{geometry}, 2020/01/02, v5.9, \url{https://ctan.org/pkg/geometry}
%
-% \item[-] package \xpackage{ulem}, 2012/05/18, no version number given, \url{https://www.ctan.org/pkg/ulem}
+% \item[-] package \xpackage{ulem}, 2019-11-18, no version number given, \url{https://ctan.org/pkg/ulem}
% \end{description}
%
% \DescribeMacro{pageslts.sty}
-% The |pageslts.sty| for \LaTeXe{} (i.\,e. all documents using
-% the \xpackage{pageslts} package) requires:
+% The |pageslts.sty| for \LaTeXe{} (i.\,e.\ all documents using the \xpackage{pageslts} package) requires:
% \begin{description}
-% \item[-] \TeX{} Format \LaTeXe{}, \url{https://www.CTAN.org}
-%
-% \item[-] package \xpackage{atveryend}, 2011/06/30, v1.8, \url{https://www.ctan.org/pkg/atveryend}
-%
-% \item[-] package \xpackage{everyshi}, 2001/05/15, v3.00, \url{https://www.ctan.org/pkg/everyshi}
+% \item[-] \TeX{} Format \LaTeXe{} 2024-06-01, \url{https://CTAN.org}
%
-% \item[-] package \xpackage{kvoptions}, 2011/06/30, v3.11, \url{https://www.ctan.org/pkg/kvoptions}
+% \item[-] package \xpackage{undolabl}, 2023-02-14, v1.0m, \url{https://ctan.org/pkg/undolabl}
%
-% \item[-] package \xpackage{letltxmacro}, 2010/09/02, v1.4, \url{https://www.ctan.org/pkg/letltxmacro}
+% \item[-] package \xpackage{kvoptions}, 2022-06-15, v3.15, \url{https://ctan.org/pkg/kvoptions}
%
-% \item[-] package \xpackage{ltxcmds}, 2011/11/09, v1.22, \url{https://www.ctan.org/pkg/ltxcmds}
-%
-% \item[-] package \xpackage{rerunfilecheck}, 2011/04/15, v1.7, \url{https://www.ctan.org/pkg/rerunfilecheck}
-%
-% \item[-] package \xpackage{undolabl}, 2015/03/29, v1.0l, \url{https://www.ctan.org/pkg/undolabl}\\
+% \item[-] if any of the options |alphMult|, |AlphMulti|, or |fnsymbolmult| is used:
+% package \xpackage{alphalph}, 2019/12/09, v2.6, \url{https://ctan.org/pkg/alphalph}
% \end{description}
%
% \DescribeMacro{pageslts-example.tex}
-% The |pageslts-example.tex| requires the same files as all
-% documents using the \xpackage{pageslts} package, and additionally:
+% The |pageslts-example.tex| requires the same files as all documents using the
+% \xpackage{pageslts} package, and additionally:
% \begin{description}
-% \item[-] class \textsf{article}, 2014/09/29, v1.4h, from \textsf{classes.dtx}: \url{https://www.ctan.org/pkg/classes}
+% \item[-] class \textsf{article}, 2024/02/08, v1.4n, from \textsf{classes.dtx}: \url{https://ctan.org/pkg/classes}
%
-% \item[-] package \xpackage{alphalph}, 2011/05/13, v2.4, \url{https://www.ctan.org/pkg/alphalph}
+% \item[-] package \xpackage{alphalph}, 2019/12/09, v2.6, \url{https://ctan.org/pkg/alphalph}
%
-% \item[-] package \xpackage{lipsum}, 2014/07/27, v1.3, \url{https://www.ctan.org/pkg/lipsum}
+% \item[-] package \xpackage{lipsum}, 2021-09-20, v2.7, \url{https://ctan.org/pkg/lipsum}
%
-% \item[-] package \xpackage{showkeys}, 2014/10/28, v3.17, \url{https://www.ctan.org/pkg/showkeys}
+% \item[-] package \xpackage{showkeys}, 2024/05/23, v3.21, \url{https://ctan.org/pkg/showkeys}
%
-% \item[-] package \xpackage{hyperref}, 2012/11/06, v6.83m, \url{https://www.ctan.org/pkg/hyperref}
+% \item[-] package \xpackage{hyperref}, 2024-10-30, v7.01k, \url{https://ctan.org/pkg/hyperref}
%
-% \item[-] package \xpackage{pageslts}, 2015/12/21, v1.2f, \url{https://www.ctan.org/pkg/pageslts}\\
+% \item[-] package \xpackage{pageslts}, 2024-11-20, v2.0a, \url{https://ctan.org/pkg/pageslts}\\
% (Well, it is the example file for this package, and because you are reading the
% documentation for the \xpackage{pageslts} package, it can be assumed that you already
% have some version of it~-- is it the current one?)
% \end{description}
%
-% \pagebreak
-%
-% \DescribeMacro{papermas}
-% The \xpackage{papermas} package is not required, but requires itself the
-% the \xpackage{pageslts} package and can be considered as kind of add-on:
-% \begin{description}
-% \item[-] package \xpackage{papermas}, 2011/08/22, v1.0h, \url{https://www.ctan.org/pkg/papermas}
-% \end{description}
-%
-% \DescribeMacro{endfloat}
-% The \xpackage{endfloat} package is not required, but because
-% the \xpackage{pageslts} package is incompatibel with very old versions
-% of the \xpackage{endfloat} package (see subsection~\ref{sec:endfloat}),
-% here the recent one is listed:
-% \begin{description}
-% \item[-] package \xpackage{endfloat}, 2011/12/25, v2.5d, \url{https://www.ctan.org/pkg/endfloat}
-% \end{description}
-%
-% \DescribeMacro{prelim2e}
-% The \xpackage{prelim2e} package is not required either, but because
-% |Prelim@EveryShipout| code was taken from that package, it is listed, too:
-% \begin{description}
-% \item[-] package \xpackage{prelim2e}, 2009/05/29, v1.3, \url{https://www.ctan.org/pkg/prelim2e}
-% \end{description}
-%
-% \DescribeMacro{fancyhdr}
-% \DescribeMacro{nccfancyhdr}
-% Neither \xpackage{fancyhdr} nor \xpackage{nccfancyhdr} package is required
-% (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}, \url{https://www.ctan.org/pkg/fancyhdr}
-%
-% \item[-] package \xpackage{nccfancyhdr}, \url{https://www.ctan.org/pkg/nccfancyhdr}
-% \end{description}
-%
-% \DescribeMacro{lastpage}
-% \DescribeMacro{totpages}
-% \DescribeMacro{totcount}
-% \DescribeMacro{nofm}
-% \DescribeMacro{count1to}
-% \DescribeMacro{zref}
-% As possible alternatives in section \ref{sec:Alternatives} there are listed
-% \begin{description}
-% \item[-] package \xpackage{lastpage}, 2015/03/29, v1.2m, \url{https://www.ctan.org/pkg/lastpage}
-%
-% \item[-] package \xpackage{totpages}, 2005/09/19, v2.00, \url{https://www.ctan.org/pkg/totpages}
-%
-% \item[-] package \xpackage{totcount}, 2011/01/25, v1.2, \url{https://www.ctan.org/pkg/totcount}
-%
-% \item[-] package \xpackage{nofm}, 1991/02/25, without version number,
-% \url{http://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},
-% does not work with e.\,g. \xpackage{hyperref}
-%
-% \item[-] package \xpackage{count1to}, 2009/05/24, v2.1, \url{https://www.ctan.org/pkg/count1to}
-%
-% \item[-] package \xpackage{zref}, 2012/04/04, v2.24, \url{https://www.ctan.org/pkg/zref}
-% \end{description}
-%
-% \DescribeMacro{Oberdiek}
-% \DescribeMacro{alphalph}
-% \DescribeMacro{atveryend}
-% \DescribeMacro{holtxdoc}
-% \DescribeMacro{letltxmacro}
-% \DescribeMacro{ltxcmds}
-% \DescribeMacro{kvoptions}
-% \DescribeMacro{rerunfilecheck}
-% \DescribeMacro{zref}
-% All packages of \textsc{Heiko Oberdiek's} bundle `oberdiek'
-% (especially \xpackage{alphalph}, \xpackage{atveryend}, \xpackage{holtxdoc}, \xpackage{letltxmacro},
-% \xpackage{ltxcmds}, \xpackage{kvoptions}, \xpackage{rerunfilecheck}, and \xpackage{zref})
-% are also available in a TDS compliant ZIP archive:\\
-% \url{http://mirrors.ctan.org/install/macros/latex/contrib/oberdiek.tds.zip}.\\
-% It is probably best to download and use this, because the packages in there
-% are quite probably both recent and compatible among themselves.
-%
-% \DescribeMacro{hyperref}
-% \noindent \xpackage{hyperref} is not included in that bundle and needs to be
-% downloaded separately,\\
-% \url{http://mirrors.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.
-%
-% \DescribeMacro{M\"{u}nch}
-% A hyperlinked list of my (other) packages can be found at
-% \url{https://www.ctan.org/author/muench-hm}.
+% \DescribeMacro{Münch}
+% A hyperlinked list of my (other) packages can be found at \url{https://ctan.org/author/muench-hm}.
%
% \subsection{Package, unpacking TDS}
-% \paragraph{Package.} This package is available on \url{CTAN.org}.
+% \paragraph{Package.} This package is available on \url{https://CTAN.org}.
% \begin{description}
-% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/pageslts/pageslts.dtx}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/pageslts/pageslts.dtx}]\hspace*{0.1cm} \\
% The source file.
-% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/pageslts/pageslts.pdf}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/pageslts/pageslts.pdf}]\hspace*{0.1cm} \\
% The documentation.
-% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/pageslts/pageslts-example.pdf}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/pageslts/pageslts-example.pdf}]\hspace*{0.1cm} \\
% The compiled example file, as it should look like.
-% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/pageslts/README}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/pageslts/README}]\hspace*{0.1cm} \\
% The README file.
% \end{description}
-% There is also a |thumbs.tds.zip| available:
+% There is also a |pageslts.tds.zip| available:
% \begin{description}
-% \item[\url{http://mirror.ctan.org/install/macros/latex/contrib/pageslts.tds.zip}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/install/macros/latex/contrib/pageslts.tds.zip}]\hspace*{0.1cm} \\
% Everything in TDS compliant, compiled format.
% \end{description}
% which additionally contains\\
% \begin{tabular}{ll}
-% pageslts.ins & The installation file.\\
-% pageslts.drv & The driver to generate the documentation.\\
-% pageslts.sty & The \xext{sty}le file.\\
+% pageslts.ins & The \texttt{ins}tallation file.\\
+% pageslts.drv & The \mbox{\texttt{dr}i\texttt{v}er} to generate the documentation.\\
+% pageslts.sty & The \texttt{sty}le file.\\
% pageslts-example.tex & The example file.%
% \end{tabular}
%
% \bigskip
%
-% \noindent For required other packages see the preceding subsection.
+% \noindent For required other packages please see the preceding subsection.
%
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
% \docstrip{} archive. The files are extracted by running the
-% \xfile{.dtx} through \plainTeX :
+% \xext{.dtx} through \plainTeX :
% \begin{quote}
% \verb|tex pageslts.dtx|
% \end{quote}
@@ -4865,13 +3933,11 @@ a package with output \linebreak
% place, see the documentation of \docstrip.
%
% \subsection{Refresh file name databases}
-%
-% If your \TeX~distribution (\teTeX, \mikTeX,\dots) relies on file name
-% databases, you must refresh these. For example, \teTeX\ users run
-% \verb|texhash| or \verb|mktexlsr|.
+% If your \TeX~distribution (\TeX\,Live, \mikTeX, \dots) relies on
+% file name databases, you must refresh these. For example, \TeX\,Live\ users
+% run \verb|texhash| or \verb|mktexlsr|.
%
% \subsection{Some details for the interested}
-%
% \paragraph{Unpacking with \LaTeX.}
% The \xfile{.dtx} chooses its action depending on the format:
% \begin{description}
@@ -4889,7 +3955,7 @@ a package with output \linebreak
%
% \paragraph{Generating the documentation.\label{GenDoc}}
% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
-% the documentation. The process can be configured by the
+% the documentation. The process can be configured by a
% configuration file \xfile{ltxdoc.cfg}. For instance, put the following
% line into this file, if you want to have A4 as paper format:
% \begin{quote}
@@ -4910,44 +3976,34 @@ a package with output \linebreak
% \end{quote}
%
% \subsection{Compiling the example}
-%
% The example file, \textsf{pageslts-example.tex}, can be compiled via\\
% \indent |latex pageslts-example.tex|\\
% or (recommended)\\
% \indent |pdflatex pageslts-example.tex|\\
-% and will need \textit{at least} (!) three compiler runs to get
-% all references right.
+% and will need \textit{at least} (!) three compiler runs to get all references right.
%
% \pagebreak
%
% \section{Acknowledgements}
-%
-% I (H.-Martin M\"{u}nch) would like to thank \textsc{Jeffrey P. Goldberg}
-% for inventing the \xpackage{lastpage} package. This package first started
-% as a revision of the \xpackage{lastpage} package, but it became obvious
-% that a replacement was needed to accomplish what this package does.
+% I (\textsc{H.-Martin Münch}) would like to thank
+% \textsc{Jeffrey P. Goldberg} (jeffrey+news at goldmark dot org) for
+% inventing the \xpackage{lastpage} package. This \xpackage{pageslts} package
+% first started as a revision of the \xpackage{lastpage} package, but a replacement
+% was deemed necessary to accomplish what this package does.
% Further I would like to thank \textsc{Heiko Oberdiek} for providing the
% |\erroralphalph| command as well as a~lot~(!) of useful packages
% (from which I also got everything I know about creating a file in
-% \xfile{dtx} format, ok, say it: copying), \textsc{Martin Schr\"{o}der}
-% for his \xpackage{prelim2e} package, from which I got the
-% |Prelim@EveryShipout| code, \textsc{Ulrich Diez} for his code for the
-% \xpackage{undolabl} package, which allows overwriting of labels,
-% \textsc{Andres L\"{o}h} for the code to determine the current page
-% numbering scheme, and the \Newsgroup{comp.text.tex} and
-% \Newsgroup{de.comp.text.tex} newsgroups for their help in all things \TeX{}.
-% For bug reports I thank Micha\l{} Herman, kwikwi, Joshua Ellis,
-% and Dr. Clea F. Rees. For telling me how to fix a bug
+% \xfile{dtx} format, OK, say it: copying), \textsc{Ulrich Diez} for his code for the
+% \xpackage{undolabl} package, which allows overwriting of labels, and
+% \textsc{Andres Löh} for the code to determine the current page numbering scheme.
+% For bug reports I thank \textsc{Micha\l{} Herman}, \textsc{kwikwi}, \textsc{Joshua Ellis},
+% and \textsc{Dr.~Clea F. Rees}. For telling me how to fix a bug
% (and for all his shared whisdom at \url{https://tex.stackexchange.com})
-% thanks go to Prof. Enrico Gregorio.
+% thanks go to \textsc{Prof.~Enrico Gregorio}.
%
% \phantomsection
% \begin{History}\label{History}
-%
-% Some old versions have been archived at
-% \url{http://ctanhg.scharrer-online.de/pkg/pageslts.html}.
-%
-% \begin{Version}{1994/06/17, \xpackage{lastpage}}
+% \begin{Version}{1994/06/17, \xpackage{lastpage}}
% \item \xpackage{lastpage} v0.99a: First shot by \textsc{Jeffrey P. Goldberg}.
% \end{Version}
% \begin{Version}{1994/06/25, \xpackage{lastpage}}
@@ -4972,9 +4028,9 @@ a package with output \linebreak
% and then \xpackage{hyperref} and \xpackage{revtex} even redefine |\lastpage@putlabel|.
% \end{Version}
% \begin{Version}{2010/02/18, \xpackage{lastpage}}
-% \item \xpackage{lastpage} v1.1: Proposed |LastPages| label by H.-Martin M\"{u}nch
+% \item \xpackage{lastpage} v1.1: Proposed |LastPages| label by H.-Martin Münch
% on \Newsgroup{comp.text.tex}, see e.\,g.
-% \url{http://groups.google.com/group/comp.text.tex/msg/4407493da9c747f0?dmode=source};
+% \url{https://groups.google.com/group/comp.text.tex/msg/4407493da9c747f0?dmode=source};
% now available in this \xpackage{pageslts} package.
% \end{Version}
% \begin{Version}{2010/05/15 v1.0 \xpackage{pagesLTS}}
@@ -4991,7 +4047,7 @@ a package with output \linebreak
% \item Replacement of |\filedate|, |-version|, |-name|,\ldots{} because
% of \LaTeX~bug 2705:\\
% Synopsis: Possible problem with |\fileversion| and |\filedate|\\
-% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=anything&keyword=lastpage&pr=latex%2F2705&search=}
+% \url{https://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=anything&keyword=lastpage&pr=latex%2F2705&search=}
% \item \xpackage{alphalph} support included.
% \item Page numbering extension |\erroralph| by \textsc{Heiko Oberdiek} included.
% \item (Page-) Numbering extension for |roman| and |Roman| numbers included.
@@ -5007,55 +4063,46 @@ a package with output \linebreak
% \begin{Version}{2010/06/01 v1.1(a) \xpackage{pagesLTS}}
% \item Abstract changed: Negative \texttt{roman} and \texttt{Roman} page
% numbers are now possible.
-% \item Some references to other packages have been updated.
% \item Several typing mistakes have been corrected~-
% both in the \xfile{sty}le file as well as in this documentation.
% \end{Version}
% \begin{Version}{2010/06/03 v1.1b \xpackage{pagesLTS}}
% \item Corrected a bug in |\XXRoman|, where |\roman| instead of |\Roman| had been used.
% \item New \xpackage{papermas} package mentioned.
-% \item Several changes in the documentation and the Readme file.
% \end{Version}
% \begin{Version}{2010/06/24 v1.1c \xpackage{pagesLTS}}
% \item \xpackage{holtxdoc} warning in \xfile{drv} updated.
% \item Removed CRLF line endings from the \xfile{dtx} file.
% \item Corrected the location of the package at CTAN.
-% (In this version \xfile{TDS} was still missing due to packaging error.)
+% (In this version \xfile{TDS} was still missing due to a packaging error.)
% \item Corrected Message format in pagesLTS.\xfile{ins}.
-% \item Updates to the documentation.
% \end{Version}
% \begin{Version}{2010/07/15 v1.1d \xpackage{pagesLTS}}
% \item Added the |\@ifclassloaded{revtex4}| code for |\lastpage@putlabel| (changed to
-% |\pagesLTS@putlabelhyper|) from the \xpackage{hyperref} package \textbf{as comment}~-
-% what is the meaning of that code?
+% |\pagesLTS@putlabelhyper|) from the \xpackage{hyperref} package \textbf{as comment}.
% \item In the documentation added the explanation of the occurence of multiply definitions
% of the |LastPage| label with \xpackage{lastpage}, \xpackage{pagesLTS}, \xpackage{hyperref}
% package (in that order).
% \item Updated to (then) new version of \xpackage{undolabl} package [2010/07/15] v1.0d,
% which uses |\undonewlabel| with only one instead of two arguments.
-% \item Added a warning message, if \xpackage{hyperref} \textit{and} \xpackage{pdfpages} are \textit{both} used.
-% (Should not \xpackage{hyperref} give this warning?)
-% \item Updates to the documentation.
+% \item Added a warning message, if \xpackage{hyperref} \textit{and} \xpackage{pdfpages} were \textit{both} used.
% \end{Version}
% \begin{Version}{2010/07/29 v1.1e \xpackage{pagesLTS}}
% \item Removed \xpackage{lastpage209.sty}, because it is now contained
% in the \xpackage{lastpage}\xfile{.dtx}\ file, v\,$\geq 1.2$a.
% \item Removed the |\@ifclassloaded{revtex4}| code for |\lastpage@putlabel|.
% \item Handling of \xpackage{lastpage} package adapted to updated version~1.2(a).
-% \item Corrected error in \xpackage{lastpage} code [1994/07/20 v0.1b] given in \ref{History}~History.
+% \item Corrected error in \xpackage{lastpage} code [1994/07/20 v0.1b].
% \item Version handling for \xpackage{undolabl} package updated.
% \item Included a |\CheckSum|.
-% \item Some minor details.
% \end{Version}
% \begin{Version}{2010/08/08 v1.1f \xpackage{pagesLTS}}
% \item Version 1.1e had a bug: AlphAlph was replaced by alphalph (because that package is named like this),
% but this was done also in commands and definitions~- now reverted.
-% \item Updates to the documentation.
% \end{Version}
% \begin{Version}{2010/08/12 v1.1g \xpackage{pagesLTS}}
% \item Now the rerun warning is given \textit{after} e.\,g. the |\listfiles|,
-% increasing the chance of the user to read it (trick found in
-% \textsc{Harald Harders'} \xpackage{fnbreak} package, thanks!).
+% increasing the chance of the user to read it.
% \end{Version}
% \begin{Version}{2010/08/23 v1.1h \xpackage{pagesLTS}}
% \item Renamed |\XXRoman| to |\XRoman|.
@@ -5065,7 +4112,6 @@ a package with output \linebreak
% \item Without use of the \xpackage{hyperref} package, labels of type
% \texttt{pagesLTS.}\meta{page numbering scheme}\texttt{.local}
% became multiply defined. Now an |\undolabl| was inserted.
-% \item Diverse details.
% \end{Version}
% \begin{Version}{2010/08/25 v1.1i \xpackage{pagesLTS}}
% \item Bug fix: \textsf{tcilatex} defines the |\hyperref| command, therefore
@@ -5083,9 +4129,7 @@ a package with output \linebreak
% \item When no \texttt{fnsymbol} pagenumbering scheme is used, the respective
% counters are not defined, saving three counters.
% \item Moved the package from \texttt{.../latex/muench/pagesLTS/...} to
-% \texttt{.../latex/pagesLTS/...}.\\
-% (Please make sure that the old version of the \xpackage{pagesLTS} package
-% was properly uninstalled from your system.)
+% \texttt{.../latex/pagesLTS/...}.
% \end{Version}
% \begin{Version}{2010/09/27 v1.1l \xpackage{pagesLTS}}
% \item Bug fix: |\PackageError{pagesLTS}{pagenumbering missing}{\pagesLTS@messageNPN }|
@@ -5105,11 +4149,8 @@ a package with output \linebreak
% \xpackage{showkeys} package.)
% \item Bug fix: In some situations a rerun warning was given even if no rerun
% was necessary.
-% \item The recent version of the Adobe Reader \sout{\ is}\uwave{\ was} X (10.0.0)
-% (instead of 9.3.3). Its handling of special page numbers was improved.
% \item The option \texttt{alphMult}\ \ is now set to \texttt{ab} by default.
% \item The option \texttt{AlphMulti}\ is now set to \texttt{AB} by default.
-% \item Some details.
% \end{Version}
% \begin{Version}{2011/03/16 v1.1n \xpackage{pagesLTS}}
% \item Bug fix: Handling of option |pagecontinue=false| changed.
@@ -5128,7 +4169,7 @@ a package with output \linebreak
% \end{Version}
% \begin{Version}{2011/03/17 v1.1o \xpackage{pagesLTS}}
% \item Documentation and ReadMe bug fix: This \xpackage{pagesLTS} package is located at
-% \url{https://www.ctan.org/pkg/pageslts} instead of \ldots /pagesLTS/.
+% \url{https://ctan.org/pkg/pageslts} instead of \ldots /pagesLTS/.
% \item There is a new (possible) alternative package, \xpackage{totcount},
% see section~\ref{sec:Alternatives}.
% \item Bug fix: There was a reference to \xpackage{lastpage} 1994/07/20, v0.1b,
@@ -5140,11 +4181,10 @@ a package with output \linebreak
% Added checking against double loading as \xpackage{pagesLTS} and \xpackage{pageslts}.
% \item The \xpackage{holtxdoc} package was fixed (recent: 2011/02/04, v0.21), therefore
% the warning in \xfile{drv} could be removed.
-% \item |\AtEndAfterFileList| from the \uwave{then} new version of the \xpackage{atveryend} package,
+% \item |\AtEndAfterFileList| from the (then) new version of the \xpackage{atveryend} package,
% 2011/04/23, v1.7, by \textsc{Heiko Oberdiek}, is now used for the rerun hint
% instead of appending to |\@dofilelist|.
-% \item Now defining $2$: |\def\pagesLTS@two{2}| (for example for the
-% \xpackage{thumbs} package) and $3$: |\def\pagesLTS@three{3}|.
+% \item Now defining $2$: |\def\pagesLTS@two{2}| and $3$: |\def\pagesLTS@three{3}|.
% \item Replaced |\texttt{\textbackslash|\ldots|}| by
% \textbar \textbackslash \ldots \textbar{} in the \xfile{dtx} and by
% |\verb|\textbar \textbackslash \ldots \textbar{} in the example (where possible).
@@ -5160,8 +4200,9 @@ a package with output \linebreak
% \item The \xpackage{nameref} package redefines |\label| to have five arguments
% instead of two, therefore |\newlabel{LastPage}{{}{\thepage}{}{}{}}| instead of
% |\newlabel{LastPage}{{}{\thepage}}| must be used.
-% (Bug reported at \url{http://tex.stackexchange.com/q/95541/6865},
-% thanks to Micha\l{} Herman!) Fixed.
+% (Bug reported at \url{https://tex.stackexchange.com/q/95541/6865},
+% thanks to Micha\l{} Herman!) Fixed. [Later in the kernel \textit{all} labels
+% got defined to have five arguments.]
% \item Updates to a lot of details, also in the documentation.
% \end{Version}
% \begin{Version}{2014/01/19 v1.2c}
@@ -5172,26 +4213,24 @@ a package with output \linebreak
% for checking (even \emph{after} |\AtBeginDocument|)
% whether a package has been loaded.
% \item Bug: incompatibility with \xpackage{lineno} because of a mistake
-% in the redefined |\pagenumbering|, fixed. (Bug reported by kwikwi, thanks!)
+% in the redefined |\pagenumbering|, fixed. (Bug reported by \textsc{kwikwi}, thanks!)
% \item Bug: When |\pagenumbering| preceded |\frontmatter| on the same page
% but with different argument than the |\pagenumbering|, which was inside
% |\frontmatter|, then some labelling got mixed up.
-% (Also this bug reported by kwikwi, thanks!) While this is not fixed automatically,
+% (Also this bug reported by \textsc{kwikwi}, thanks!) While this is not fixed automatically,
% now an appropriate error message is given. (Two different page numbering schemes
% on the same page make no sense anyway.)
-% \item Updates of minor details.
% \end{Version}
% \begin{Version}{2015/08/02 v1.2d}
% \item Updated to \TeX{} Live 2015 (for compiling the documentation and example)
% and installed the available updates. Therefore I can no longer test
-% whether \xpackage{thumbs} works with earlier versions of \LaTeX .
-% (It probably does, but there is no guarantee.)
+% whether \xpackage{pageslts} works with earlier versions of \LaTeX .
% \item A |ifundefinedorrelax| similar to the one from \xpackage{scrbase.sty}
% of the KOMA script bundle as 2013/12/19 v3.12 is used now,
% without the need for \eTeX .
% \item New versions of Adobe Reader and of some packages have become available.
% \item Changed the message (type) to be displayed if writing to files is disallowed
-% (as pointed out by Joshua Ellis, thanks!).
+% (as pointed out by \textsc{Joshua Ellis}, thanks!).
% \item Updates to several details, also in the documentation.
% \end{Version}
% \begin{Version}{2015/08/17 v1.2e}
@@ -5206,22 +4245,25 @@ a package with output \linebreak
% the question), I would have fixed it earlier, of course.
% \item Changed minor details like fixing urls in the manual.
% \end{Version}
+% \begin{Version}{2024-11-20 v2.0a}
+% \item Kernel-updates broke the package, the package was repaired and updated
+% to the new kernel-code; ports from \xpackage{lastpage}.
+% \item Removed |\unit|.
+% \item Removed |\XXRoman| (deprecated at least since 2015).
+% \item Removed code from/need for packages \xpackage{prelim2e}, \xpackage{ltxcmds},
+% \xpackage{atveryend}, \xpackage{etoolbox}, \xpackage{everyshi},
+% \xpackage{letltxmacro}, and \xpackage{rerunfilecheck}.
+% \item Removed checks for available \eTeX, \xpackage{endfloats} package from 1992,
+% \xpackage{pagesLTS} package from 2011, \xpackage{hyperref} from 2015 etc.
+% \item Renamed |\pagesLTS@ifcounter| to |\pagesLTS@providecounter|.
+% \item Renamed |\pagesLTS.lastpage| to |\pagesLTSlastpage|.
+% \end{Version}
% \end{History}
-%
% \bigskip
%
-% When you find a mistake or have a suggestion for an improvement of this package,
+% \noindent 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.)
-%
-% \bigskip
-%
-% Note: \textsf{Y} is not missing in the following index, but no command beginning
-% with this letter has been used in this \xpackage{pageslts} package.
-%
-% \pagebreak
-%
+% (Please see BUG REPORTS in the README.)\newpage
% \PrintIndex
-%
% \Finale
\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/pageslts/pageslts.ins b/Master/texmf-dist/source/latex/pageslts/pageslts.ins
index dff8f11c592..6b182aa6166 100644
--- a/Master/texmf-dist/source/latex/pageslts/pageslts.ins
+++ b/Master/texmf-dist/source/latex/pageslts/pageslts.ins
@@ -9,10 +9,11 @@
%% This is a generated file.
%%
%% Project: pageslts
-%% Version: 2015/12/21 v1.2f
+%% Version: 2024-11-20 v2.0a
+%% Info: Variants of last page labels
%%
-%% Copyright (C) 2010 - 2015 by
-%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+%% 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.
%%
%% IMPORTANT NOTICE:
@@ -32,20 +33,15 @@
%% see the change in the page numbering scheme and will make mistakes.
%% The package takes options.
%%
-%% The usual disclaimer applies:
-%% If it doesn't work right that's your problem.
-%% (Nevertheless, send an e-mail to the maintainer
-%% when you find an error in this package.)
-%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
-%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
+%% LaTeX version 2005-12-01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
@@ -53,7 +49,7 @@
%%
%% This package first started as a revision of the lastpage
%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org),
-%% but it became obvious that a replacement was needed.
+%% but I thought a replacement was needed.
%%
%% This work consists of the main source file pageslts.dtx,
%% the README, and the derived files
@@ -62,15 +58,15 @@
%% pageslts-example.tex, pageslts-example.pdf.
%%
%% In memoriam
-%% Claudia Simone Barth + 1996/01/30
-%% Tommy Muench + 2014/01/02
-%% Hans-Klaus Muench + 2014/08/24
+%% Claudia Simone Barth + 1996-01-30
+%% Tommy Muench + 2014-01-02
+%% Hans-Klaus Muench + 2014-08-24
%%
\input docstrip.tex
-\Msg{*********************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: pageslts 2015/12/21 v1.2f Refers to special pages' numbers/names (HMM)}
-\Msg{*********************************************************************************}
+\Msg{**********************************************************************************}
+\Msg{* Installation *}
+\Msg{* Package: pageslts 2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)*}
+\Msg{**********************************************************************************}
\keepsilent
\askforoverwritefalse
@@ -81,10 +77,11 @@
This is a generated file.
Project: pageslts
-Version: 2015/12/21 v1.2f
+Version: 2024-11-20 v2.0a
+Info: Variants of last page labels
-Copyright (C) 2010 - 2015 by
- H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+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.
IMPORTANT NOTICE:
@@ -104,20 +101,15 @@ of backslash pagenumbering, but in that case this package does not
see the change in the page numbering scheme and will make mistakes.
The package takes options.
-The usual disclaimer applies:
-If it doesn't work right that's your problem.
-(Nevertheless, send an e-mail to the maintainer
- when you find an error in this package.)
-
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3c of this license or (at your option) any later
version. This version of this license is in
- http://www.latex-project.org/lppl/lppl-1-3c.txt
+ https://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
- http://www.latex-project.org/lppl.txt
+ https://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of
-LaTeX version 2005/12/01 or later.
+LaTeX version 2005-12-01 or later.
This work has the LPPL maintenance status "maintained".
@@ -125,7 +117,7 @@ The Current Maintainer of this work is H.-Martin Muench.
This package first started as a revision of the lastpage
package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org),
-but it became obvious that a replacement was needed.
+but I thought a replacement was needed.
This work consists of the main source file pageslts.dtx,
the README, and the derived files
@@ -134,9 +126,9 @@ the README, and the derived files
pageslts-example.tex, pageslts-example.pdf.
In memoriam
- Claudia Simone Barth + 1996/01/30
- Tommy Muench + 2014/01/02
- Hans-Klaus Muench + 2014/08/24
+ Claudia Simone Barth + 1996-01-30
+ Tommy Muench + 2014-01-02
+ Hans-Klaus Muench + 2014-08-24
\endpreamble
\let\MetaPrefix\DoubleperCent
diff --git a/Master/texmf-dist/tex/latex/pageslts/pageslts.sty b/Master/texmf-dist/tex/latex/pageslts/pageslts.sty
index 47897b3b710..9fd5ea86481 100644
--- a/Master/texmf-dist/tex/latex/pageslts/pageslts.sty
+++ b/Master/texmf-dist/tex/latex/pageslts/pageslts.sty
@@ -9,10 +9,11 @@
%% This is a generated file.
%%
%% Project: pageslts
-%% Version: 2015/12/21 v1.2f
+%% Version: 2024-11-20 v2.0a
+%% Info: Variants of last page labels
%%
-%% Copyright (C) 2010 - 2015 by
-%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+%% 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.
%%
%% IMPORTANT NOTICE:
@@ -32,20 +33,15 @@
%% see the change in the page numbering scheme and will make mistakes.
%% The package takes options.
%%
-%% The usual disclaimer applies:
-%% If it doesn't work right that's your problem.
-%% (Nevertheless, send an e-mail to the maintainer
-%% when you find an error in this package.)
-%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
-%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
+%% LaTeX version 2005-12-01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
@@ -53,7 +49,7 @@
%%
%% This package first started as a revision of the lastpage
%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org),
-%% but it became obvious that a replacement was needed.
+%% but I thought a replacement was needed.
%%
%% This work consists of the main source file pageslts.dtx,
%% the README, and the derived files
@@ -62,13 +58,12 @@
%% pageslts-example.tex, pageslts-example.pdf.
%%
%% In memoriam
-%% Claudia Simone Barth + 1996/01/30
-%% Tommy Muench + 2014/01/02
-%% Hans-Klaus Muench + 2014/08/24
+%% Claudia Simone Barth + 1996-01-30
+%% Tommy Muench + 2014-01-02
+%% Hans-Klaus Muench + 2014-08-24
%%
-\NeedsTeXFormat{LaTeX2e}[2015/01/01]
-\ProvidesPackage{pageslts}[2015/12/21 v1.2f
- Refers to special pages' numbers/names (HMM)]
+\NeedsTeXFormat{LaTeX2e}[2024-06-01]
+\ProvidesPackage{pageslts}[2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)]
%% Allows for things like\\
%% |Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
@@ -82,125 +77,59 @@
%% to get\\
%% 'Page d (57; local: 4) of ii(2) + XX(20) + *(1) + 30(30) + e(5) + C(3) = 61 pages.'.
-\@ifpackageloaded{pagesLTS}{%
- \def\pagesLTS@doubleload{p@gesLTSlo@ded}
- \ifx\pagesLTS@loaded\pagesLTS@doubleload%
- \PackageError{pageslts}{Requested pagesLTS instead of pageslts}{%
- You have requested package `pagesLTS'. This package is now named `pageslts'.\MessageBreak%
- Requesting `pagesLTS' as well as `pageslts' leads to loading the same package\MessageBreak%
- twice (and results in errors). Loading of `pageslts' will therefore be\MessageBreak%
- abandoned now. To fix this problem, please look in the \jobname.log file for\MessageBreak%
- LaTeX Warning: You have requested package `pagesLTS',\MessageBreak%
- \space \space \space \space \space \space \space \space \space \space \space \space \space%
- \space \space but the package provides `pageslts'.\MessageBreak%
- and change the package call in the calling style/document.\MessageBreak%
- If a style file made the mistake, please inform its maintainer and/or the\MessageBreak%
- maintainer of the pageslts package about it (after making sure you have\MessageBreak%
- the recent version of that style file).\MessageBreak%
- Thank you and sorry for the inconvenience!\MessageBreak%
- }
- \endinput
- \fi
- }{% \relax
- }
-
-\gdef\pagesLTS@loaded{p@gesLTSlo@ded}
-
-\RequirePackage{ltxcmds}[2011/11/09]% v1.22
-\RequirePackage{atveryend}[2011/06/30]% v1.8
-\AtBeginDocument{%
- %% https://tex.stackexchange.com/a/45654/6865
- %% and https://tex.stackexchange.com/q/261445/6865
- \def\pagesLTS@etb{etoolbox.sty}%
- \let\pagesLTS@ave\@empty%
- \@for\@pageslts@currname:=\@filelist\do{%
- \ifx\@pageslts@currname\pagesLTS@etb\relax%
- \def\pagesLTS@ave{atveryend.sty}%
- \fi%
- \ifx\@pageslts@currname\pagesLTS@ave%
- \@ifpackagelater{atveryend}{2015/08/01}{%\relax
- \PackageInfo{pageslts}{etoolbox package loaded before atveryend package\MessageBreak%
- With atveryend version 1.8 of 2011/06/30 this caused a problem,\MessageBreak%
- which is probably solved in the new version used here.\MessageBreak%
- To play it safe, you could load the atveryend package\MessageBreak%
- before the etoolbox package.\MessageBreak%
- }%
- }{% else
- \PackageError{pageslts}{etoolbox package loaded before atveryend package}{%
- You can use both packages, but when etoolbox is loaded before atveryend,\MessageBreak%
- atveryend no longer detects \string\enddocument\space\MessageBreak%
- and hook "AtVeryVeryEnd" is not executed.\MessageBreak%
- Just load the atveryend package before the etoolbox package!\MessageBreak%
- }%
- }%
- \fi%
- }%
- }
-
-\RequirePackage{everyshi}[2001/05/15]% v3.00
-\RequirePackage{letltxmacro}[2010/09/02]% v1.4
-\RequirePackage{kvoptions}[2011/06/30]% v3.11
-\RequirePackage{undolabl}[2015/03/29]% v1.0l
-\RequirePackage{rerunfilecheck}[2011/04/15]% v1.7
-%% pageslts package uses Prelim@EveryShipout code from the
-%% prelim2e package [2009/05/29 v1.3] by Martin Schr\"{o}der, thanks!
-
-%% pageslts may work with earlier versions of LaTeX2e and those packages,
-%% but this was not tested. Please consider updating your LaTeX
-%% and packages to the most recent version (if they are not already
-%% the most recent version).
-%% The recent version of the endfloat package is v2.5d as of 2011/12/25.
-%% The pageslts package is not fully compatible with version 2.0
-%% (and earlier) of the endfloat package, because those versions
-%% redefined the \enddocument command.
+\RequirePackage{undolabl}[2023-02-14]
+\RequirePackage{kvoptions}[2022-06-15]
\SetupKeyvalOptions{family = pagesLTS,prefix = pagesLTS@}
-\DeclareBoolOption[true]{pagecontinue}% \pagesLTS@pagecontinue
\DeclareStringOption[ab]{alphMult}
\DeclareStringOption[AB]{AlphMulti}
\DeclareBoolOption[true]{romanMult}
\DeclareBoolOption[true]{RomanMulti}
\DeclareBoolOption[true]{fnsymbolmult}
+\DeclareBoolOption[true]{pagecontinue}
\ProcessKeyvalOptions*
+\@ifl@t@r\fmtversion{2024-06-01}{}{
+ \PackageError{pageslts}{LaTeX format 2024-06-01 or newer needed}{%
+ Needed LaTeX format version: 2024-06-01 or newer.\MessageBreak%
+ Found\space\space LaTeX format version: \fmtversion.\MessageBreak%
+ Please update your TeX distribution!\MessageBreak%
+ Loading of pageslts package is aborted.}
+ \expandafter\endinput}
+
\def\pagesLTS@zero{0}
\def\pagesLTS@one{1}
\def\pagesLTS@two{2}
\def\pagesLTS@three{3}
+\def\pagesLTS@ab{ab}
+\def\pagesLTS@bb{bb}
+\def\pagesLTS@ABi{AB}
+\def\pagesLTS@BBi{BB}
-\ifpagesLTS@pagecontinue%
- \PackageInfo{pageslts}{Option pagecontinue enabled\MessageBreak%
- (maybe by default):\MessageBreak%
+\ifpagesLTS@pagecontinue
+ \PackageNoteNoLine{pageslts}{Option pagecontinue enabled (maybe by default):\MessageBreak%
The pageslts package will continue the page numbering,\MessageBreak%
when the same page numbering scheme is used twice.\MessageBreak%
If you do not want this, call pageslts with option\MessageBreak%
- pagecontinue=false (or use \string\setcounter{page}=1).\MessageBreak%
- }
+ pagecontinue=false (or use \string\setcounter{page}=1)}
\else
- \PackageWarningNoLine{pageslts}{Option pagecontinue is false:\MessageBreak%
+ \PackageNoteNoLine{pageslts}{Option pagecontinue is false:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
pagecontinue was set to false.\MessageBreak%
If you want the page numbers to be continued,\MessageBreak%
when the same page numbering scheme is used twice,\MessageBreak%
please call pageslts with option pagecontinue=true,\MessageBreak%
otherwise the page number is reset to one each time\MessageBreak%
- the page numbering scheme is changed.\MessageBreak%
- For details please see the documentation%
- }
+ the page numbering scheme is changed}
\fi
-\def\pagesLTS@ab{ab}
-\def\pagesLTS@bb{bb}
-\def\pagesLTS@ABi{AB}
-\def\pagesLTS@BBi{BB}
-
\ifx\pagesLTS@alphMult\pagesLTS@ab%
\else
\ifx\pagesLTS@alphMult\pagesLTS@bb%
\else
\ifx\pagesLTS@alphMult\pagesLTS@zero%
- \PackageWarningNoLine{pageslts}{%
+ \PackageNoteNoLine{pageslts}{%
Option alphMult=0 found:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
alphMult was set to 0 (zero).\MessageBreak%
@@ -209,17 +138,13 @@
For automatic continuation, please use the\MessageBreak%
alphalph package and call pageslts\MessageBreak%
with option alphMult=ab (for aa, ab, ac, ad,...) or\MessageBreak%
- with option alphMult=bb (for aa, bb, cc, dd,...).\MessageBreak%
- For details please see the documentation!%
- }
+ with option alphMult=bb (for aa, bb, cc, dd,...)}
\else
\PackageError{pageslts}{Unknown option value}{%
The pageslts package was used with option\MessageBreak%
- alphMult= \pagesLTS@alphMult . Only values\MessageBreak%
- ab, bb, and 0 (zero) are valid.\MessageBreak%
- The default ab is set.\MessageBreak%
- For details please see the documentation!%
- }
+ alphMult=\meaning\pagesLTS@alphMult .\MessageBreak%
+ Only values 'ab', 'bb', and '0' (zero) are valid.\MessageBreak%
+ Now the default 'ab' is being set.}
\setkeys{pagesLTS}{alphMult=ab}
\fi
\fi
@@ -230,7 +155,7 @@
\ifx\pagesLTS@AlphMulti\pagesLTS@BBi%
\else
\ifx\pagesLTS@AlphMulti\pagesLTS@zero%
- \PackageWarningNoLine{pageslts}{%
+ \PackageNoteNoLine{pageslts}{%
Option AlphMulti=0 found:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
AlphMulti was set to 0 (zero).\MessageBreak%
@@ -239,89 +164,67 @@
For automatic continuation, please use the\MessageBreak%
alphalph package and call pageslts\MessageBreak%
with option AlphMulti=AB (for AA, AB, AC, AD,...) or\MessageBreak%
- with option AlphMulti=BB (for AA, BB, CC, DD,...).\MessageBreak%
- For details please see the documentation!%
- }
+ with option AlphMulti=BB (for AA, BB, CC, DD,...)}
\else
\PackageError{pageslts}{Unknown option value}{%
The pageslts package was used with option\MessageBreak%
- AlphMulti= \pagesLTS@AlphMulti . Only values\MessageBreak%
- AB, BB, and 0 (zero) are valid.\MessageBreak%
- The default AB is set.\MessageBreak%
- For details please see the documentation!%
- }
+ AlphMulti=\meaning\pagesLTS@AlphMulti .\MessageBreak%
+ Only values 'AB', 'BB', and '0' (zero) are valid.\MessageBreak%
+ The default 'AB' is set.}
\setkeys{pagesLTS}{AlphMulti=AB}
\fi
\fi
\fi
-\ifx\pagesLTS@alphMult\pagesLTS@zero% \relax
-\else \RequirePackage{alphalph}[2011/05/13]% v2.4
-\fi
-
-\ifx\pagesLTS@AlphMulti\pagesLTS@zero% \relax
-\else \RequirePackage{alphalph}[2011/05/13]% v2.4
-\fi
-
-\ifpagesLTS@fnsymbolmult%
- \RequirePackage{alphalph}[2011/05/13]% v2.4
-\fi
+\ifx\pagesLTS@alphMult\pagesLTS@zero\else\RequirePackage{alphalph}[2019/12/09]\fi
+\ifx\pagesLTS@AlphMulti\pagesLTS@zero\else\RequirePackage{alphalph}[2019/12/09]\fi
+\ifpagesLTS@fnsymbolmult\RequirePackage{alphalph}[2019/12/09]\fi
-\ifpagesLTS@romanMult%
- \PackageInfo{pageslts}{Option romanMult enabled\MessageBreak%
- (maybe by default):\MessageBreak%
+\ifpagesLTS@romanMult
+ \PackageNoteNoLine{pageslts}{Option romanMult enabled (maybe by default):\MessageBreak%
The pageslts package will extend the page numbering\MessageBreak%
of the roman scheme below i with\MessageBreak%
0, -i, -ii, -iii, -iv,...\MessageBreak%
If you do not want this, call pageslts with option\MessageBreak%
- romanMult=false.\MessageBreak%
- }
+ romanMult=false}
\else
- \PackageWarningNoLine{pageslts}{Option romanMult is set to false:\MessageBreak%
- The pageslts package was used, but the option\MessageBreak%
- romanMult was set to false.\MessageBreak%
- If you want the page numbering of the roman scheme\MessageBreak%
- to be extended below i,\MessageBreak%
- please call pageslts with option romanMult=true,\MessageBreak%
- otherwise zero and negative page numbers of the\MessageBreak%
- roman scheme will need to be defined otherwise.\MessageBreak%
- For details please see the documentation!\MessageBreak%
- }
+ \PackageNoteNoLine{pageslts}{Option romanMult is set to false:\MessageBreak%
+ The pageslts package was used, but the option\MessageBreak%
+ romanMult was set to false.\MessageBreak%
+ If you want the page numbering of the roman scheme\MessageBreak%
+ to be extended below i,\MessageBreak%
+ please call pageslts with option romanMult=true,\MessageBreak%
+ otherwise zero and negative page numbers of the\MessageBreak%
+ roman scheme will need to be defined otherwise}
\fi
-\ifpagesLTS@RomanMulti%
- \PackageInfo{pageslts}{Option RomanMulti enabled\MessageBreak%
- (maybe by default):\MessageBreak%
+\ifpagesLTS@RomanMulti
+ \PackageNoteNoLine{pageslts}{Option RomanMulti enabled (maybe by default):\MessageBreak%
The pageslts package will extend the page numbering\MessageBreak%
of the Roman scheme below I with\MessageBreak%
0, -I, -II, -III, -IV,...\MessageBreak%
If you do not want this, call pageslts with option\MessageBreak%
- RomanMulti=false.\MessageBreak%
- }
+ RomanMulti=false}
\else
- \PackageWarningNoLine{pageslts}{Option RomanMulti is set to false:\MessageBreak%
+ \PackageNoteNoLine{pageslts}{Option RomanMulti is set to false:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
RomanMulti was set to false.\MessageBreak%
If you want the page numbering of the Roman scheme\MessageBreak%
to be extended below i,\MessageBreak%
please call pageslts with option RomanMulti=true,\MessageBreak%
otherwise zero and negative page numbers of the\MessageBreak%
- Roman scheme will need to be defined otherwise.\MessageBreak%
- For details please see the documentation!\MessageBreak%
- }
+ Roman scheme will need to be defined otherwise}
\fi
-\ifpagesLTS@fnsymbolmult%
- \PackageInfo{pageslts}{Option fnsymbolmult enabled\MessageBreak%
- (maybe by default):\MessageBreak%
+\ifpagesLTS@fnsymbolmult
+ \PackageNoteNoLine{pageslts}{Option fnsymbolmult enabled (maybe by default):\MessageBreak%
The pageslts package will extend the page numbering\MessageBreak%
of the footnotesymbol scheme using the alphalph\MessageBreak%
package.\MessageBreak%
If you do not want this, call pageslts with option\MessageBreak%
- fnsymbolmult=false.\MessageBreak%
- }
+ fnsymbolmult=false}
\else
- \PackageWarningNoLine{pageslts}{%
+ \PackageNoteNoLine{pageslts}{%
Option fnsymbolmult is set to false:\MessageBreak%
The pageslts package was used, but the option\MessageBreak%
fnsymbolmult was set to false.\MessageBreak%
@@ -329,9 +232,7 @@
scheme to be extended using the alphalph package,\MessageBreak%
please call pageslts with option fnsymbolmult=true,\MessageBreak%
otherwise page numbers of the footnotesymbol scheme\MessageBreak%
- greater than nine will need to be defined otherwise.\MessageBreak%
- For details please see the documentation!\MessageBreak%
- }
+ greater than nine will need to be defined otherwise}
\fi
\def\pagesLTS@pnc{0}
@@ -345,7 +246,6 @@
\def\lastpageref{\lastpagereftxt}
\def\pagesLTS@undolable{none}
\def\pncmissing{0}
-\def\pagesLTS@SK{0}
\def\pagesLTS@messageNPN{%
The pageslts package was used, but\MessageBreak%
\string\pagenumbering \MessageBreak%
@@ -361,41 +261,20 @@
right.\MessageBreak%
}
-\AtBeginDocument{%
- \if@filesw%
- \else%
- \@ifpackageloaded{tikz}{%
- \PackageWarning{pageslts}%
- {It was not allowed to write to an\MessageBreak%
- .aux file. This package does not work without access\MessageBreak%
- to an .aux file.\MessageBreak%
- It is OK if the .aux file was already updated\MessageBreak%
- by a previouse compiler run\MessageBreak%
- and would not have changed anyway.\MessageBreak%
- }%
- }{\PackageError{pageslts}{No writing to auxiliary file allowed}%
- {It was not allowed to write to an .aux file.\MessageBreak%
- This package does not work without access to an .aux file.\MessageBreak%
- Press Ctrl+Z to exit.\MessageBreak%
- But it is OK if the .aux file was already updated\MessageBreak%
- by previouse compiler runs\MessageBreak%
- and would not have changed anyway.\MessageBreak%
- (In that case just press Enter or Return\MessageBreak%
- to continue the compilation.)\MessageBreak%
- }%
- }%
- \fi%
- }
-
-\LetLtxMacro{\OrigPagenumbering}{\pagenumbering}
+\NewCommandCopy{\OrigPagenumbering}{\pagenumbering}
\newcounter{CurrentPage}
\setcounter{CurrentPage}{1}
\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS@pnc}}
\newcounter{pagesLTS.pagenr}
+\setcounter{pagesLTS.pagenr}{1}
\newcounter{pagesLTS.current.local.0}
\setcounter{pagesLTS.current.local.0}{1}
\newcounter{pagesLTS.pnc.0}
+\newcounter{pagesLTS.tmpcounter}
+\def\pagesLTSlastpage{1}
+\def\pagesLTSlastpageHy{1}
+\def\pagesLTS.lastpage{\pagesLTSlastpage}
\newcommand{\xroman}[1]{%
\ifnum\value{#1}>0%
@@ -421,34 +300,32 @@
\fi%
}
-\newcommand{\XXRoman}[1]{\XRoman{#1}%
- \PackageError{pageslts}{Old command \string\XXRoman\space found}{Replaced by \string\XRoman.}%
- }
-
-\newcommand{\pagesLTS@ifcounter}[1]{%
- \@ifundefined{c@#1}{\newcounter{#1}}{\relax}%
+\newcommand{\pagesLTS@providecounter}[1]{\@ifundefined{c@#1}{\newcounter{#1}}{}}
+\NewCommandCopy{\pagesLTS@ifcounter}{\pagesLTS@providecounter}
+\AddToHook{begindocument}{%
+ \AddToHookWithArguments{cmd/pagesLTS@ifcounter/before}{%
+ \PackageError{pageslts}{Old command \string\pagesLTS@ifcounter\space used}{Replace by \string\pagesLTS@providecounter.}%
+ }%
}
\newcommand{\lastpages}[2]{%
- \pagesLTS@ifcounter{pagesLTS.#1.#2.local.cnt}%
+ \pagesLTS@providecounter{pagesLTS.#1.#2.local.cnt}%
\arabic{pagesLTS.#1.#2.local.cnt}%
}
\newcommand{\pagesLTS@writelabel}[1]{%
\addtocounter{page}{+1}%
- \pagesLTS@putlabel{pagesLTS.#1}{\thepage}{1}
- \addtocounter{page}{-1}%
- \ifx\pagesLTS@pnc\pagesLTS@zero% \relax
+ \pagesLTS@putlabel{pagesLTS.#1}{\thepage}{1}%
+ \ifx\pagesLTS@pnc\pagesLTS@zero%
\else%
- \addtocounter{page}{+1}%
- \pagesLTS@putlabel{pagesLTS.#1.local}{\theCurrentPageLocal}{1}
- \addtocounter{page}{-1}%
+ \pagesLTS@putlabel{pagesLTS.#1.local}{\theCurrentPageLocal}{1}%
\fi%
+ \addtocounter{page}{-1}%
}
-%% The following code is from Heiko Oberdiek [2010/04/18], %%
-%% expanding his alphalph package as of 2010/04/18, v2.3. (Thanks!) %%
+%% The following code is from Heiko Oberdiek [2010/04/18], %%
+%% expanding his alphalph package as of 2010/04/18, v2.3. (Thanks!) %%
\newcommand*{\erroralphalph}[2]{%
\ifnum\value{#2}>0%
#1{\value{#2}}%
@@ -460,15 +337,15 @@
\fi%
\fi%
}
-%% End of code from Heiko Oberdiek %%
-%% Check and Error/Warning messages have been moved to \EveryShipout, %%
-%% because messages inside e.g. the \pageref command can cause trouble. %%
+%% End of code from Heiko Oberdiek %%
+%% Check and Error/Warning messages have been moved to hook "shipout/foreground" %%
+%% because messages inside e.g. the \pageref command can cause trouble. %%
\newcommand{\expandPagenumbering}[1]{%
\let\Origthepage\thepage%
\def\pagesLTS@tmpC{arabic}%
- \ifx\pagesLTS@pnc\pagesLTS@tmpC% \relax
+ \ifx\pagesLTS@pnc\pagesLTS@tmpC%
\else%
\def\pagesLTS@tmpC{roman}%
\ifx\pagesLTS@pnc\pagesLTS@tmpC%
@@ -485,17 +362,19 @@
\ifx\pagesLTS@pnc\pagesLTS@alph%
\ifx\pagesLTS@alphMult\pagesLTS@ab%
\renewcommand*{\thepage}{\erroralphalph{\alphalph}{page}}%
- \else \ifx\pagesLTS@alphMult\pagesLTS@bb%
- \renewcommand*{\thepage}{\erroralphalph{\alphMult}{page}}%
- \fi%
+ \else%
+ \ifx\pagesLTS@alphMult\pagesLTS@bb%
+ \renewcommand*{\thepage}{\erroralphalph{\alphMult}{page}}%
+ \fi%
\fi%
\else%
\ifx\pagesLTS@pnc\pagesLTS@Alph%
\ifx\pagesLTS@AlphMulti\pagesLTS@ABi%
\renewcommand*{\thepage}{\erroralphalph{\AlphAlph}{page}}%
- \else \ifx\pagesLTS@AlphMulti\pagesLTS@BBi%
- \renewcommand*{\thepage}{\erroralphalph{\AlphMult}{page}}%
- \fi%
+ \else%
+ \ifx\pagesLTS@AlphMulti\pagesLTS@BBi%
+ \renewcommand*{\thepage}{\erroralphalph{\AlphMult}{page}}%
+ \fi%
\fi%
\else%
\ifx\pagesLTS@pnc\pagesLTS@fns%
@@ -506,11 +385,11 @@
\PackageError{pageslts}{unknown page numbering scheme}{%
The pageslts package encountered the unknown\MessageBreak%
page numbering scheme\MessageBreak%
- `#1'. \MessageBreak%
+ \meaning#1. \MessageBreak%
If this is no typing mistake, it might work\MessageBreak%
- or it might not work.\MessageBreak%
\@ehc%
- }
+ }%
\fi%
\fi%
\fi%
@@ -523,12 +402,12 @@
\renewcommand{\pagenumbering}[1]{%
\edef\pagesLTS@tmpA{#1}%
\ifx\pagesLTS@pnc\pagesLTS@fns%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.local}%
\fi%
\ifx\pagesLTS@tmpA\pagesLTS@fns%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.local}%
\fi%
- \ifx\pagesLTS@pnc\pagesLTS@tmpA% \relax
+ \ifx\pagesLTS@pnc\pagesLTS@tmpA%
\else%
\ifnum \value{CurrentPage}>1%
\addtocounter{page}{-1}%
@@ -538,31 +417,25 @@
\value{pagesLTS.current.local.\pagesLTS@pnc}}%
\ifx\pagesLTS@pnc\pagesLTS@fns%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \mathchardef\pagesLTS@tmpa=\arabic{pagesLTS.pnc.0}%
- \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \addtocounter{pagesLTS.pnc.0}{-1}%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS@pnc}-1\relax}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
- -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
- \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpa}%
+ -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
\fi%
\else%
\pagesLTS@writelabel{\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}}%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2%
\pagesLTS@writelabel{\pagesLTS@pnc}%
\else%
- \mathchardef\pagesLTS@tmpa=\arabic{pagesLTS.pnc.0}%
- \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \addtocounter{pagesLTS.pnc.0}{-1}%
- \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.done}%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS@pnc}-1\relax}%
+ \pagesLTS@providecounter{pagesLTS.\pagesLTS@pnc.done}%
\addtocounter{pagesLTS.\pagesLTS@pnc.done}{%
- \value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
+ \value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
-\value{pagesLTS.\pagesLTS@pnc.done}}%
- \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpa}%
\fi%
\if@filesw%
\immediate\write\@auxout{\string
- \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}%
+ \pagesLTS@providecounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}%
\fi%
\edef\pagesLTS@tmpB{\arabic{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}}%
\if@filesw%
@@ -570,37 +443,36 @@
\setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}{\pagesLTS@tmpB}}%
\fi%
\fi%
- \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.double.\pagesLTS@pnc}%
\setcounter{pagesLTS.double.\pagesLTS@pnc}{\value{page}}%
\addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{+1}%
\addtocounter{page}{+1}%
\xdef\pagesLTS@pnc{#1}%
\OrigPagenumbering{#1}%
\expandPagenumbering{#1}%
- \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.pnc.\pagesLTS@pnc}%
\addtocounter{pagesLTS.pnc.\pagesLTS@pnc}{1}%
- \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.double.\pagesLTS@pnc}%
\addtocounter{pagesLTS.double.\pagesLTS@pnc}{1}%
\ifpagesLTS@pagecontinue%
\setcounter{page}{\value{pagesLTS.double.\pagesLTS@pnc}}%
\else%
\setcounter{page}{1}%
\fi%
- \pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.current.local.\pagesLTS@pnc}%
\ifnum \value{pagesLTS.double.\pagesLTS@pnc}=1%
\setcounter{pagesLTS.current.local.\pagesLTS@pnc}{1}%
\fi%
- \else%
- %% before the first page has shipped out
+ \else%% before the first page has shipped out
\xdef\pagesLTS@pnc{#1}%
\global\c@page \@ne\relax%
\global\def\thepage{\csname \expandafter @\pagesLTS@pnc \endcsname \c@page}%
- \expandPagenumbering{#1}
- \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}%
+ \expandPagenumbering{#1}%
+ \pagesLTS@providecounter{pagesLTS.pnc.\pagesLTS@pnc}%
\setcounter{pagesLTS.pnc.\pagesLTS@pnc}{1}%
- \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.double.\pagesLTS@pnc}%
\setcounter{pagesLTS.double.\pagesLTS@pnc}{1}%
- \pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}%
+ \pagesLTS@providecounter{pagesLTS.current.local.\pagesLTS@pnc}%
\setcounter{pagesLTS.current.local.\pagesLTS@pnc}{1}%
\fi%
\gdef\pagesLTS@called{1}%
@@ -609,7 +481,7 @@
\let\pagesLTS@tmpB\undefined%
}
-%% analogous to \HyPsd@pageref from the hyperref package by Heiko Oberdiek:
+%% analogous to \HyPsd@pageref from the hyperref package:
\def\lastpagereftxt#1{\pagesLTS@@pageref#1*\END}
\def\pagesLTS@@pageref#1*#2\END{%
@@ -627,8 +499,8 @@
\def\pagesLTS@tmpA{#1}%
\def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
\ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
- \ltx@ifpackageloaded{hyperref}{%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.local}%
+ \IfPackageLoadedTF{hyperref}{%
\href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
{\arabic{pagesLTS.fnsymbol.local}}%
}{\arabic{pagesLTS.fnsymbol.local}}%
@@ -643,180 +515,55 @@
\def\pagesLTS@tmpA{#1}%
\def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
\ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.local}%
\arabic{pagesLTS.fnsymbol.local}%
\else%
- \ltx@ifpackageloaded{hyperref}{\pageref*{#1}}{\pageref{#1}}%
- \fi%
- \let\pagesLTS@tmpA\undefined%
- \let\pagesLTS@tmpB\undefined%
- }
-
-\def\lastpagerefend#1{\pagesLTS@@pagerefend#1*\END}
-
-\def\pagesLTS@@pagerefend#1*#2\END{%
- \ifx\\#2\\% no star
- \pagesLTS@@@pagerefend{#1}%
- \else% star
- \expandafter\pagesLTS@@@pagerefendstar%
- \fi%
-}
-
-\def\pagesLTS@@@pagerefend#1{\l@stpagerefend{#1}}
-\def\pagesLTS@@@pagerefendstar#1{\l@stpagerefendstar{#1}}
-
-\newcommand{\l@stpagerefend}[1]{%
- \def\pagesLTS@tmpA{#1}%
- \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
- {\arabic{pagesLTS.fnsymbol.local}}%
- }{\arabic{pagesLTS.fnsymbol.local}}%
- \else%
- \def\pagesLTS@tmpB{pagesLTS.fnsymbol}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
- {\pagesLTS.lastpage}%
- }{\pageref{pagesLTS.fnsymbol}}%
- \else%
- \def\pagesLTS@tmpB{LastPage}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\pagesLTS@eso}%
- {\pagesLTS.lastpage}%
- }{\pageref{LastPage}}%
- \else%
- \def\pagesLTS@tmpB{VeryLastPage}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
- {\pagesLTS.lastpage}%
- }{\pageref{VeryLastPage}}%
- \else%
- \def\pagesLTS@tmpB{LastPages}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{%
- \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}%
- {\arabic{pagesLTS.pagenr}}%
- }{\pageref{LastPages}}%
- \else%
- \pageref{#1}%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \let\pagesLTS@tmpA\undefined%
- \let\pagesLTS@tmpB\undefined%
- }
-
-\newcommand{\l@stpagerefendstar}[1]{%
- \def\pagesLTS@tmpA{#1}%
- \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}%
- \arabic{pagesLTS.fnsymbol.local}%
- \else%
- \def\pagesLTS@tmpB{pagesLTS.fnsymbol}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{\pageref*{pagesLTS.fnsymbol}}{%
- \pageref{pagesLTS.fnsymbol}}%
- \else%
- \def\pagesLTS@tmpB{LastPage}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{\pageref*{LastPage}}{\pageref{LastPage}}%
- \else%
- \def\pagesLTS@tmpB{VeryLastPage}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{\pageref*{VeryLastPage}}{%
- \pageref{VeryLastPage}}%
- \else%
- \def\pagesLTS@tmpB{LastPages}%
- \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
- \ltx@ifpackageloaded{hyperref}{\pageref*{LastPages}}{\pageref{LastPages}}%
- \else%
- \ltx@ifpackageloaded{hyperref}{\pageref*{#1}}{\pageref{#1}}%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
+ \IfPackageLoadedTF{hyperref}{\pageref*{#1}}{\pageref{#1}}%
\fi%
\let\pagesLTS@tmpA\undefined%
\let\pagesLTS@tmpB\undefined%
}
\newcommand\overrideLTSlabel[2]{%
- \@bsphack
+ \@bsphack%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \edef\pagesLTStmpA{#1}%
- \edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}%
- \ifx\pagesLTStmpA\pagesLTStmpB%
- \immediate\write\@auxout{\string\undonewlabel{#1}}%
- \@overriddenmessage s{#1}%
+ \edef\pagesLTS@tmpC{#1}%
+ \edef\pagesLTS@tmpD{pagesLTS.\pagesLTS@pnc.local}%
+ \ifx\pagesLTS@tmpC\pagesLTS@tmpD%
+ \immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
\fi%
\fi%
\pagesLTS@putlabel{#1}{#2}{0}%
\@esphack%
}
-\newcommand{\@pagesLTS@Prelim@EveryShipout}{%
-%% The following code is from the prelim2e package %%
-%% [2009/05/29 v1.3] by Martin Schr\"{o}der (Thanks!): %%
- \bgroup
- \dimen\z@=\wd\@cclv
- \dimen\@ne=\ht\@cclv
- \dimen\tw@=\dp\@cclv
- \dimen\thr@@=\dimen1
- \advance\dimen\thr@@ by \dimen\tw@
- \global\setbox\@cclv\vbox to \dimen\thr@@{%
- \hb@xt@\dimen\z@{%
- \box\@cclv%
- \hss%
+\newcommand{\pagesLTS@EveryShipout}{%
+ \begingroup%
+ \ifx\pagesLTS@pnc\pagesLTS@fns%
+ \pagesLTS@providecounter{pagesLTS.fnsymbol.cont}%
+ \addtocounter{pagesLTS.fnsymbol.cont}{1}%
+ \IfPackageLoadedT{hyperref}{\phantomsection%
+ \hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}%
}%
- \vbox to \z@{%
- \hb@xt@\dimen\z@{%
- \let\protect\relax
-%% Code not from prelim2e package: %%
- \ifx\pagesLTS@pnc\pagesLTS@fns%
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.cont}%
- \addtocounter{pagesLTS.fnsymbol.cont}{1}%
- \ltx@ifpackageloaded{hyperref}{%
- \phantomsection%
- \hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}%
- }{}%
- \ifnum \pagesLTS@esov=\pagesLTS@zero%
- \label{pagesLTS.fnsymbol}%
- \else%
- \overridelabel{pagesLTS.fnsymbol}%
- \fi%
- \else%
- \ltx@ifpackageloaded{hyperref}{\phantomsection}{}%
- \if@filesw%
- \overridelabel{pagesLTS.\pagesLTS@pnc}%
- \addtocounter{page}{+1}%
- \overrideLTSlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}%
- \addtocounter{page}{-1}%
- \fi%
- \fi%
-%% Code from prelim2e package again: %%
- }%
- \vss%
- }%
- \vss%
- }%
- \wd\@cclv=\dimen\z@
- \ht\@cclv=\dimen\@ne
- \dp\@cclv=\dimen\tw@
- \egroup
-%% End of code from the prelim2e package. %%
+ \ifnum \pagesLTS@esov=\pagesLTS@zero%
+ \label{pagesLTS.fnsymbol}%
+ \else%
+ \overridelabel{pagesLTS.fnsymbol}%
+ \fi%
+ \else%
+ \IfPackageLoadedT{hyperref}{\phantomsection}%
+ \if@filesw%
+ \overridelabel{pagesLTS.\pagesLTS@pnc}%
+ \addtocounter{page}{+1}%
+ \overrideLTSlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}%
+ \addtocounter{page}{-1}%
+ \fi%
+ \fi%
+ \endgroup%
}
-\EveryShipout{%
- \ifnum\value{page}>0% \relax
+\AddToHook{shipout/foreground}{%
+ \ifnum\value{page}>0%
\else%
\ifnum\value{page}=0%
\PackageWarning{pageslts}{%
@@ -838,125 +585,146 @@
this will lead to a counter overflow.\MessageBreak%
}%
\else%
- \PackageError{pageslts}{%
+ \PackageError{pageslts}{Counter page has no recognized value}{%
Counter `page' does not have a recognized value:\MessageBreak%
`\the\value{page}'\MessageBreak%
- \@ehd \MessageBreak%
+ \@ehd\MessageBreak%
}%
\fi%
\fi%
\fi%
- \ifnum \value{CurrentPage}=1% This is the first shipout!
+ \ifnum \value{CurrentPage}=1%
\ifx\pagesLTS@called\pagesLTS@zero%
- \global\def\pncmissing{1}%
- \mathchardef\pagesLTS@tmpD=\arabic{page}%
-%% Code from Andres L\"{o}h, Universiteit Utrecht (NL) %%
+ \gdef\pncmissing{1}%
+ \setcounter{pagesLTS.tmpcounter}{\value{page}}%
+%% Code from Andres L\"{o}h, Universiteit Utrecht (NL) %%
\def\extract#1{\expandafter\extract@ #1\END}%
\def\extract@#1\csname @#2\endcsname#3\END{#2}%
\edef\pagesLTS@tmpQ{\extract\thepage}%
-%% End of code from Andres L\"{o}h %%
- \let\pagesLTS@tmpP\pagesLTS@tmpQ%
+%% End of code from Andres L\"{o}h %%
\def\pagesLTS@pnc{0}%
- \pagenumbering{\pagesLTS@tmpP}%
- \setcounter{page}{\pagesLTS@tmpD}%
+ \pagenumbering{\pagesLTS@tmpQ}%
+ \setcounter{page}{\value{pagesLTS.tmpcounter}}%
\fi%
\pagesLTS@writelabel{0}%
\fi%
\ifx\pagesLTS@pnc\pagesLTS@fns%
- \@pagesLTS@Prelim@EveryShipout%
- \gdef\pagesLTS@esov{\arabic{pagesLTS.fnsymbol.cont}}%
+ \pagesLTS@EveryShipout%
+ \xdef\pagesLTS@esov{\arabic{pagesLTS.fnsymbol.cont}}%
\else%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \@pagesLTS@Prelim@EveryShipout%
+ \pagesLTS@EveryShipout%
\fi%
\fi%
\addtocounter{CurrentPage}{1}%
\addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{1}%
}
-\newcommand{\pagesLTS@putlabelhyper}[2]{%
- \ifHy@pageanchor \relax%
- \else%
- \PackageError{pagesLTS}{hyperref option pageanchor disabled}{%
- The \string\lastpageref{#1} link doesn't work\MessageBreak%
- using hyperref with disabled option `pageanchor'.\MessageBreak%
- }%
- \fi
-%% The following code is from the hyperref package %%
-%% [2010/04/17 v6.80x; newer versions are available] %%
-%% by Heiko Oberdiek (Big Thanks!). %%
- \if@filesw
- \begingroup
- \let\@number\@firstofone
- \ifHy@pageanchor
- \ifHy@hypertexnames
- \ifHy@plainpages
- \def\Hy@temp{\arabic{page}}%
- \else
- \Hy@unicodefalse
-%% Code not from hyperref package: %%
-%% The following lines are modified from the hyperref package. %%
-%% Without the modification, after the first shipout "PD1" is %%
-%% inserted each time |\pdfstringdef\Hy@temp{\thepage}| is %%
-%% executed (if |fnsymbol| is not used). %%
- \ifnum \value{CurrentPage}=1%
- \ifx\pagesLTS@pnc\pagesLTS@fns%
- \pdfstringdef\Hy@temp{\thepage}%
- \else%
- \def\Hy@temp{\thepage}%
- \fi%
- \else%
- \pdfstringdef\Hy@temp{\thepage}%
- \fi%
-%% Code from hyperref package again: %%
- \fi
- \else
- \def\Hy@temp{\the\Hy@pagecounter}%
- \fi
- \fi
-%% End of code from the hyperref package. %%
-%% (The following four lines are modified %%
-%% from the hyperref package.) %%
- \immediate\write\@auxout{\string
- \newlabel{#1}{{}{#2}{}{\ifHy@pageanchor page.\Hy@temp\fi}{}}}%
- \endgroup%
- \fi%
+%% Code provided by Prof. Enrico Gregorio at https://tex.stackexchange.com/a/542425
+\long\def\protected@iwrite#1#2#3{%
+ \begingroup%
+ #2%
+ \let\protect\@unexpandable@protect%
+ \edef\reserved@a{\immediate\write#1{#3}}%
+ \reserved@a%
+ \endgroup%
+ \if@nobreak\ifvmode\nobreak\fi\fi%
}
+\newcommand{\pagesLTS@makeHy}{%
+ \gdef\pagesLTS@Hy{}%
+ \IfPackageLoadedT{hyperref}{%
+ \ifHy@pageanchor%
+ \xdef\pagesLTS@Hptest{Doc-Start}%
+ \ifx\pagesLTS@Hptest\@currentHpage\relax%
+ \gdef\pagesLTS@Hy{\@currentHpage}%
+ \else%
+ \edef\pagesLTS@Hptest{\@currentHpage}%
+ \ifx\pagesLTS@Hptest\empty\relax%
+ \else%
+ \gdef\pagesLTS@Hy{\pagesLTS@rmpage{\@currentHpage}}%
+ \ifx\pagesLTSlastpageHy\empty\relax%
+ \PackageWarningNoLine{pageslts}{%
+ \string\@currentHpage\space is\MessageBreak%
+ \meaning\@currentHpage\MessageBreak%
+ not beginning with "page.",\MessageBreak%
+ \string\pagesLTSlastpageHy\space is now let empty.}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ }%
+ }%
+
+%% Code provided by David Carlisle at https://tex.stackexchange.com/a/721877
+\def\pagesLTS@rmpage#1{%
+ \expandafter\xpagesLTS@rmpage\expanded{#1}\xpagesLTS@rmpage page.%
+ \xpagesLTS@rmpage\xxpagesLTS@rmpage{#1}}
+\def\xpagesLTS@rmpage #1page.#2\xpagesLTS@rmpage#3\xxpagesLTS@rmpage#4{%
+ \if$\detokenize{#1}$#2%\else#4
+ \fi}
+
\newcommand{\pagesLTS@putlabel}[3]{%
\addtocounter{page}{-1}%
- \ifx\pagesLTS@SK\pagesLTS@one\relax%
- \message{^^J}%
- \message{Package pageslts Warning: Package showkeys without option final loaded,}%
- \ifnum\value{pagesLTS.pagenr}<1%
- \message{(pageslts) but label #1 on page \thepage\space(about \theCurrentPage)}%
- \else%
- \message{(pageslts) but label #1 on page \thepage\space(about \theCurrentPage\space of \arabic{pagesLTS.pagenr})}%
+ \IfPackageLoadedT{showkeys}{%
+ \IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \ifnum\value{pagesLTS.pagenr}<1%
+ \PackageWarningNoLine{pageslts}{%
+ Package showkeys without option final loaded,\MessageBreak%
+ but label #1 on page \thepage\space(about \theCurrentPage)\MessageBreak%
+ cannot be shown, because pageslts does not use \string\label,\MessageBreak%
+ but writes directly to the \jobname.aux file}%
+ \else%
+ \PackageWarningNoLine{pageslts}{%
+ Package showkeys without option final loaded,\MessageBreak%
+ but label #1 on page \thepage\space(about \theCurrentPage\space of \arabic{pagesLTS.pagenr})\MessageBreak%
+ cannot be shown, because pageslts does not use \string\label,\MessageBreak%
+ but writes directly to the \jobname.aux file}%
+ \fi%
+ }%
+ }%
+ \IfPackageLoadedTF{hyperref}{%
+ \ifHy@pageanchor\else%
+ \PackageWarningNoLine{pagesLTS}{%
+ The \string\lastpageref{#1} link does not work\MessageBreak%
+ using hyperref with disabled option `pageanchor'.\MessageBreak%
+ Better enable `pageanchor' or use\MessageBreak%
+ \string\lastpageref*{...} (not generating a link)%
+ }%
\fi%
- \message{(pageslts) cannot be shown, because pageslts does not use \string\label,}%
- \message{(pageslts) but writes directly to the \jobname.aux file. ^^J}%
- \fi%
- \ltx@ifpackageloaded{hyperref}{\pagesLTS@putlabelhyper{#1}{#2}}{% else
+ \if@filesw%
+ \begingroup%
+ \protected@iwrite\@auxout{}{\string\newlabel{#1}{%
+ {\@currentlabel}{#2}{\@currentlabelname}%
+ {\IfPackageLoadedTF{hyperref}{\ifHy@pageanchor\@currentHpage\fi%
+ }{\@currentHref}}%
+ {\@kernel@reserved@label@data}}%
+ }%
+ \endgroup%
+ \fi%
+ }{%
\if@filesw%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2%
- \ltx@ifpackageloaded{nameref}{%
- \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}{}{}{}}}}{% else
- \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}}}}%
+ \protected@iwrite\@auxout{}{\string\newlabel{#1}{%
+ {\@currentlabel}{#2}{\@currentlabelname}%
+ {\@currentHref}{\@kernel@reserved@label@data}}%
+ }%
\else%
- \edef\pagesLTStmpA{#1}%
- \edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}%
- \ifx\pagesLTStmpA\pagesLTStmpB%
- \edef\pagesLTStmpA{#3}%
- \ifx\pagesLTStmpA\pagesLTS@one%
+ \edef\pagesLTS@tmpC{#1}%
+ \edef\pagesLTS@tmpD{pagesLTS.\pagesLTS@pnc.local}%
+ \ifx\pagesLTS@tmpC\pagesLTS@tmpD%
+ \edef\pagesLTS@tmpC{#3}%
+ \ifx\pagesLTS@tmpC\pagesLTS@one%
\immediate\write\@auxout{\string\undonewlabel{#1}}%
\fi%
\fi%
- \ltx@ifpackageloaded{nameref}{%
- \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}{}{}{}}}}{% else
- \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}}}}%
+ \protected@iwrite\@auxout{}{\string\newlabel{#1}{%
+ {\@currentlabel}{#2}{\@currentlabelname}%
+ {\@currentHref}{\@kernel@reserved@label@data}}%
+ }%
\fi%
\fi%
- }%
+ }%
\addtocounter{page}{+1}%
}
@@ -965,12 +733,12 @@
\addtocounter{CurrentPage}{-1}%
\addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{-1}%
\ifx\pagesLTS@pnc\pagesLTS@zero%
- \PackageWarning{pagesLTS}{No page numbering scheme found:\MessageBreak%
- \pagesLTS@messageNPN }%
+ \PackageWarningNoLine{pagesLTS}{No page numbering scheme found:\MessageBreak%
+ \pagesLTS@messageNPN}%
\else%
\pagesLTS@writelabel{\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}}%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2%
- \ifx\pagesLTS@pnc\pagesLTS@fns% \relax
+ \ifx\pagesLTS@pnc\pagesLTS@fns%
\else%
\pagesLTS@writelabel{\pagesLTS@pnc}%
\fi%
@@ -982,144 +750,74 @@
\addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{1}%
}
-\AtBeginDocument{%
+\AddToHook{begindocument/end}{%
+ \IfPackageLoadedT{lastpage}{%
+ \PackageInfo{pageslts}{Packages lastpage and pageslts used}{%
+ Are you sure that you want to load both packages?\MessageBreak%
+ Typ <return> to continue or X <return> to quit.}%
+ }%
+ \IfPackageLoadedTF{hyperref}{%
+ \IfPackageAtLeastTF{hyperref}{2024-10-30}{}{%
+ \PackageError{pageslts}{hyperref package version too old}{%
+ required version: 2024-10-30 v7.01k or newer, found version:\MessageBreak%
+ \csname ver@hyperref.sty\endcsname.}}%
+ }{\PackageNoteNoLine{pageslts}{Package hyperref not loaded.\MessageBreak%
+ pageslts would support hyperref.\MessageBreak%
+ The page references will NOT be hyperlinked}%
+ }%
+ \IfPackageLoadedT{alphalph}{%
+ \newalphalph{\AlphMult}[mult]{\@Alph}{26}%
+ \newalphalph{\alphMult}[mult]{\@alph}{26}%
+ \newalphalph{\fnsymbolmult}[mult]{\@fnsymbol}{5}%
+ }%
\if@filesw%
- \immediate\write\@auxout{\string\gdef\string\pagesLTS@loaded{p@gesLTSnotlo@ded}}%
- \fi%
- \@ifpackageloaded{endfloat}%
- {\@ifpackagelater{endfloat}{1992/03/31}% April 1992 v2.0
- {\@ifpackagelater{endfloat}{2011/12/24}{% 2011/12/25 v2.5d
- \relax}%
- {\PackageWarningNoLine{pageslts}{Old endfloat package detected:\MessageBreak%
- There is a newer version of the endfloat package available.\MessageBreak%
- Please consider updating your version.\MessageBreak%
- The pageslts package might be incompatible with\MessageBreak%
- your current endfloat package.\MessageBreak%
- }%
- }%
- }{\PackageError{pageslts}{Incompatible, very old endfloat package detected.}%
- {The very old version 2.0 (and earlier) of the\MessageBreak%
- endfloat package actually redefined the \string\enddocument ,\MessageBreak%
- and so interfered drastically with the LaTeX2e commands\MessageBreak%
- which make use of \string\AtEndDocument .\MessageBreak%
- Newer versions of the endfloat package exists\MessageBreak%
- (at least: v2.5d as of 2011/12/25)\MessageBreak%
- in modern documentation form,\MessageBreak%
- which should be available from CTAN.\MessageBreak%
- Please update your endfloat package\MessageBreak%
- for use with the pageslts package.\MessageBreak %
- }%
- }%
- }{}%
- \@ifpackageloaded{lastpage}%
- {\@ifpackagelater{lastpage}{2010/07/28}% 2010/07/29 v1.2a
- {\@ifpackagelater{lastpage}{2013/01/27}% 2013/01/28 v1.2l
- {\PackageWarning{pageslts}{lastpage package detected.\MessageBreak%
- With pageslts package in use, lastpage has no function.\MessageBreak%
- Just remove the lastpage package from your document.\MessageBreak%
- }%
- }{%
- \PackageWarning{pageslts}{Old lastpage package detected.\MessageBreak%
- With pageslts package in use, lastpage has no function.\MessageBreak%
- Just remove the lastpage package from your document.\MessageBreak%
- At least update it!\MessageBreak%
- }%
- }%
- }{%
- \PackageWarning{pageslts}{Incompatible package lastpage detected:\MessageBreak%
- Package pageslts was loaded, but also an old\MessageBreak%
- version of the lastpage package.\MessageBreak%
- pageslts has all functionality of the lastpage\MessageBreak%
- package (and more), so just remove the lastpage\MessageBreak%
- package from your document.\MessageBreak%
- (At least update it!)\MessageBreak%
- pageslts will now ''kill'' the lastpage@putlabel\MessageBreak%
- command of the lastpage package.\MessageBreak%
- }%
- \gdef\lastpage@putlabel{\relax}%
- }%
- }{}%
- \ltx@ifpackageloaded{alphalph}%
- {\newalphalph{\AlphMult}[mult]{\@Alph}{26}%
- \newalphalph{\alphMult}[mult]{\@alph}{26}%
- \newalphalph{\fnsymbolmult}[mult]{\@fnsymbol}{5}%
- }{}%
- \ltx@ifpackageloaded{hyperref}{%
- \@ifpackageloaded{pdfpages}%
- {\PackageWarningNoLine{pageslts}{Package pdfpages detected.\MessageBreak%
- Using hyperref with pdfpages can cause problems. See\MessageBreak%
- https://www.ctan.org/pkg/pax\MessageBreak%
- for the Pdf Annotations eXtractor, pax%
- }%
- }{% \relax
+ \else%
+ \IfPackageLoadedTF{tikz}{%
+ \PackageWarning{pageslts}%
+ {It was not allowed to write to an\MessageBreak%
+ .aux file. This package does not work without access\MessageBreak%
+ to an .aux file.\MessageBreak%
+ It is OK if the .aux file was already updated\MessageBreak%
+ by a previouse compiler run\MessageBreak%
+ and would not have changed anyway.\MessageBreak%
+ }%
+ }{\PackageError{pageslts}{No writing to auxiliary file allowed}%
+ {It was not allowed to write to an .aux file.\MessageBreak%
+ This package does not work without access to an .aux file.\MessageBreak%
+ Press Ctrl+Z to exit.\MessageBreak%
+ But it is OK if the .aux file was already updated\MessageBreak%
+ by previouse compiler runs\MessageBreak%
+ and would not have changed anyway.\MessageBreak%
+ (In that case just press Enter or Return\MessageBreak%
+ to continue the compilation.)\MessageBreak%
}%
- \@ifpackageloaded{undolabl}%
- {\@ifpackagelater{undolabl}{2010/07/14}% 2010/07/15 v1.0d
- {\@ifpackagelater{undolabl}{2015/03/29}% 2015/03/29 v1.0l
- {% recent version as of the time of last revision of this package: OK
- }{% old, but not obsolete version
- \PackageWarningNoLine{pageslts}{Old version of undolabl package used.\MessageBreak%
- See https://www.ctan.org/pkg/undolabl\MessageBreak%
- for a new version.\MessageBreak%
- }%
- }
- }{\PackageError{pageslts}{Incompatible, obsolete version of undolabl package used.}{%
- See https://www.ctan.org/pkg/undolabl\MessageBreak%
- for a new version.\MessageBreak%
- Type X <return> to quit.\MessageBreak%
- }%
- }
- }{\PackageError{pageslts}{Package undolabl missing}{%
- Package undolabl not found.\MessageBreak%
- The pageslts package needs the undolabl package.\MessageBreak%
- See https://www.ctan.org/pkg/undolabl\MessageBreak%
- Type X <return> to quit.\MessageBreak%
- }%
- }
- \@ifpackagelater{hyperref}{2012/11/05}{% 2012/11/06 v6.83m
- \relax}{%
- \PackageWarningNoLine{pageslts}{Old hyperref package detected:\MessageBreak%
- There is a newer version of the\MessageBreak%
- hyperref package available:\MessageBreak%
- https://www.ctan.org/pkg/hyperref\MessageBreak%
- Please consider updating your version.\MessageBreak%
- }%
- }%
- %% pageslts supports the use of the package hyperref by
- %% Heiko Oberdiek (hyperref version 2012/11/06 v6.83m).
- %% pageslts may work with earlier versions of this packages,
- %% but this was not tested.
- }{%
- \PackageWarning{pageslts}{Package hyperref NOT detected.\MessageBreak%
- pageslts would support hyperref. The page references\MessageBreak%
- will NOT be hyperlinked!\MessageBreak }%
}%
- \ltx@ifpackageloaded{showkeys}{%
- \@ifpackagewith{showkeys}{final}{}{\gdef\pagesLTS@SK{1}}}{% else \relax
- }%
+ \fi%
}
-\AtEndDocument{%
- \ltx@ifpackageloaded{showkeys}{%
- \ifx\pagesLTS@SK\pagesLTS@one\relax%
- \else%
- \providecommand*\pagesLTS@sklf[1]{}%
- \ifx\showkeyslabelformat\pagesLTS@sklf\relax%
+\def\pagesLTS@skld{0}
+\IfPackageLoadedT{showkeys}{%
+ \IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \def\pagesLTS@skld{1}%
+ }%
+ }%
+
+\AddToHook{enddocument/afterlastpage}{%
+ \IfPackageLoadedT{showkeys}{%
+ \IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \ifx\pagesLTS@skld\pagesLTS@one\relax%
\else%
\PackageError{pageslts}{Package showkeys loaded after pageslts}{%
The showkeys package with option "final" has been loaded\MessageBreak%
after the pageslts package.\MessageBreak%
Please first load showkeys and then pageslts}%
\fi%
- \fi%
- }{% else no showcase, \relax
- }%
+ }%
+ }%
\ifx\pncmissing\pagesLTS@one\relax%
- \PackageError{pageslts}{pagenumbering scheme missing}{\pagesLTS@messageNPN }%
+ \PackageError{pageslts}{pagenumbering scheme missing}{\pagesLTS@messageNPN}%
\fi%
- \message{^^J%
- AED: pageslts setting LastPage ^^J}%
- \clearpage%
+ \PackageInfo{pageslts}{enddocument/afterlastpage (AED): pageslts setting LastPage}%
\ifx\pagesLTS@pnc\pagesLTS@fns%
\def\pagesLTS@tmpA{\arabic{pagesLTS.fnsymbol.local}}%
\ifnum \pagesLTS@eso=\pagesLTS@tmpA%
@@ -1133,115 +831,67 @@
\fi%
\pagesLTS@putlabel{LastPage}{\thepage}{1}%
\let\pagesLTS@tmpA\undefined%
- }
-
-\AfterLastShipout{%
\if@filesw%
- \ifx\pagesLTS@esov\pagesLTS@zero%
+ \ifx\pagesLTS@esov\pagesLTS@zero\relax%
\else%
- \immediate\write\@auxout{\string
- \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}}%
- \immediate\write\@auxout{\string
- \setcounter{pagesLTS.fnsymbol.local}{\pagesLTS@esov}}%
+ \immediate\write\@auxout{\string\pagesLTS@providecounter{pagesLTS.fnsymbol.local}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.fnsymbol.local}{\pagesLTS@esov}}%
\fi%
- \ltx@ifpackageloaded{hyperref}{%
- \ifx\pagesLTS@pnc\pagesLTS@fns%
- \immediate\write\@auxout{\string
- \gdef\string\lastpageref{\string\lastpagerefend}}%
- \fi%
- }{}%
\fi%
- \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}%
+ \pagesLTS@providecounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}%
\setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
\value{pagesLTS.current.local.\pagesLTS@pnc}}%
- \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{-1}
+ \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{-1}%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \mathchardef\pagesLTS@tmpD=\arabic{pagesLTS.pnc.0}%
- \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \@tempcnta=\value{pagesLTS.pnc.0}\relax%
+ \setcounter{pagesLTS.tmpcounter}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
+ \@tempcnta=\value{pagesLTS.tmpcounter}\relax%
\loop%
\ifnum\@tempcnta>1\relax%
- \addtocounter{pagesLTS.pnc.0}{-1}%
+ \addtocounter{pagesLTS.tmpcounter}{-1}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
- -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
- \@tempcnta=\value{pagesLTS.pnc.0}\relax%
+ -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
+ \@tempcnta=\value{pagesLTS.tmpcounter}\relax%
\repeat%
- \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpD}%
\fi%
\if@filesw%
\immediate\write\@auxout{\string
- \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}%
+ \pagesLTS@providecounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}%
\edef\pagesLTS@tmpA{\arabic{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}}%
\immediate\write\@auxout{\string
\setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}{\pagesLTS@tmpA}}%
\let\pagesLTS@tmpA\undefined%
\fi%
\addtocounter{page}{-1}%
- \edef\pagesLTS@tmpA{\thepage}%
+ \def\pagesLTS@tmpA{\thepage}%
\if@filesw%
- \immediate\write\@auxout{\string
- \gdef\string\pagesLTS.lastpage{\pagesLTS@tmpA}}%
+ \protected@iwrite\@auxout{}{\string\gdef\string\pagesLTSlastpage{\pagesLTS@tmpA}}%
+ \pagesLTS@makeHy|%
+ \protected@iwrite\@auxout{}{\string\gdef\string\pagesLTSlastpageHy{\pagesLTS@Hy}}%
\fi%
\addtocounter{page}{+1}%
\addtocounter{CurrentPage}{-1}%
\edef\pagesLTS@tmpB{\arabic{CurrentPage}}%
\if@filesw%
- \immediate\write\@auxout{\string
- \setcounter{pagesLTS.pagenr}{\pagesLTS@tmpB}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.pagenr}{\pagesLTS@tmpB}}%
\fi%
\addtocounter{CurrentPage}{+1}%
- \message{^^J%
- AED: pageslts setting VeryLastPage via AfterLastShipout ^^J}%
+ \PackageInfo{pageslts}{enddocument/afterlastpage (AED): pageslts setting VeryLastPage}%
\pagesLTS@putlabel{VeryLastPage}{\thepage}{1}%
- \message{^^J%
- AED: pageslts setting LastPages via AfterLastShipout ^^J}%
+ \PackageInfo{pageslts}{enddocument/afterlastpage (AED): pageslts setting LastPages}%
\pagesLTS@putlabels%
- \typeout{^^J}%
\ifodd\pagesLTS@tmpB%
- \@PackageInfoNoLine{pageslts}{Total number of pages is odd}%
- \else%
- \@PackageInfoNoLine{pageslts}{Total number of pages is even}%
- \fi%
- \typeout{^^J}%
- \let\pagesLTS@tmpA\undefined%
- \let\pagesLTS@tmpB\undefined%
- }
-
-\AtEndAfterFileList{%
- \ifx\pagesLTS@rerun\pagesLTS@one%
- \PackageWarningNoLine{pageslts}{%
- Label(s) may have changed.\MessageBreak%
- Rerun to get cross-references right%
- }%
- \fi%
- }
-
-\newcommand{\pagesLTS@ifundefinedorrelax}[1]{%
- % Modified Markus Kohm code for use without e-TeX
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname #1\endcsname\relax%
- \expandafter\ifx\csname #1\endcsname\relax%
- \expandafter\expandafter\expandafter\@firstoftwo
- \else%
- \expandafter\expandafter\expandafter\@secondoftwo
- \fi%
+ \PackageNoteNoLine{pageslts}{Total number of pages is odd}%
\else%
- \expandafter\@firstoftwo
+ \PackageNoteNoLine{pageslts}{Total number of pages is even}%
\fi%
}
-\pagesLTS@ifundefinedorrelax{frontmatter}{% \relax
-}{% else
- \ltx@GlobalPrependToMacro{\frontmatter}{\pagesLTS@prefrontmatter}%
- \ltx@GlobalAppendToMacro{\frontmatter}{\pagesLTS@postfrontmatter}%
- }
-
-\newcommand{\pagesLTS@prefrontmatter}{%
+\AddToHook{cmd/frontmatter/before}{%
\xdef\pagesLTS@FMBpncn{\pagesLTS@pnc}%
\xdef\pagesLTS@FMBpncp{\arabic{pagesLTS.current.local.\pagesLTS@pnc}}%
}
-\newcommand{\pagesLTS@postfrontmatter}{%
+\AddToHook{cmd/frontmatter/after}{%
\xdef\pagesLTS@FMEpncn{\pagesLTS@pnc}%
\ifx\pagesLTS@FMBpncn\pagesLTS@FMEpncn%
\else%
@@ -1249,14 +899,21 @@
\else%
\ifx\pagesLTS@FMBpncp\pagesLTS@one%
\PackageError{pageslts}{\string\pagenumbering\space before \string\frontmatter}{%
- Do not use \string\pagenumbering{\pagesLTS@FMBpncn} before \string\frontmatter \MessageBreak%
+ Do not use \string\pagenumbering{\pagesLTS@FMBpncn} before \string\frontmatter\MessageBreak%
on the same page!\MessageBreak%
- \string\frontmatter\space (re)defines the page numbering scheme to \pagesLTS@FMEpncn , \MessageBreak%
+ \string\frontmatter\space (re)defines the page numbering scheme to \pagesLTS@FMEpncn ,\MessageBreak%
thus earlier use of \string\pagenumbering{\pagesLTS@FMBpncn} on the same page is useless anyway.}%
\fi%
\fi%
\fi%
-}
+ }
+
+\AddToHook{enddocument/info}{%
+ \ifx\pagesLTS@rerun\pagesLTS@one%
+ \PackageWarningNoLine{pageslts}{Label(s) may have changed.\MessageBreak%
+ Rerun to get cross-references right}%
+ \fi%
+ }
\endinput
%%