texlive[73065] Master/texmf-dist: pageslts (7dec24)
commits+karl at tug.org
commits+karl at tug.org
Sat Dec 7 22:06:46 CET 2024
Revision: 73065
https://tug.org/svn/texlive?view=revision&revision=73065
Author: karl
Date: 2024-12-07 22:06:46 +0100 (Sat, 07 Dec 2024)
Log Message:
-----------
pageslts (7dec24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/pageslts/README
trunk/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf
trunk/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex
trunk/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf
trunk/Master/texmf-dist/source/latex/pageslts/pageslts.drv
trunk/Master/texmf-dist/source/latex/pageslts/pageslts.dtx
trunk/Master/texmf-dist/source/latex/pageslts/pageslts.ins
trunk/Master/texmf-dist/tex/latex/pageslts/pageslts.sty
Modified: trunk/Master/texmf-dist/doc/latex/pageslts/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pageslts/README 2024-12-07 21:06:32 UTC (rev 73064)
+++ trunk/Master/texmf-dist/doc/latex/pageslts/README 2024-12-07 21:06:46 UTC (rev 73065)
@@ -1,4 +1,4 @@
-README for pageslts package, 2024-11-20, v2.0a
+README for pageslts package, 2024-12-07, v2.0b
TABLE OF CONTENTS
@@ -27,14 +27,18 @@
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
-last page of each page numbering scheme a label
+case the label LastPages is introduced. Additionally,
+at the last page of each page numbering scheme a label
pagesLTS.<numbering scheme> is placed, where
-<numbering scheme> 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
+<numbering scheme> is e.g. arabic, roman, Roman, alph,
+Alph, gobble, or silly (requiring the sillypage package).
+For fnsymbol, gobble, and silly please use
+\lastpageref{pagesLTS.fnsymbol},
+\lastpageref{pagesLTS.gobble}, \lastpageref{pagesLTS.silly}
+instead of \pageref{pagesLTS.fnsymbol},
+\pageref{pagesLTS.gobble}, \pageref{pagesLTS.silly}.
+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
@@ -41,18 +45,18 @@
\thepage, which gives only the page 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
+\thepage and \theCurrentPageLocal are different e.g. when
\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
are provided for special cases.
-The alphalph package is supported, i. e. page numbers alph
+The alphalph package is supported, i.e. page numbers alph
or Alph > 26 and fnyambol > 9 can be used (with according
options set). Even zero and negative page numbers can be
-used with arabic, alph, Alph, roman, Roman, and fnsymbol
-page numbering (with alphalph package and according
-options).
+used with arabic, alph, Alph, roman, Roman, fnsymbol,
+and gobble page numbering (with alphalph package and
+according options).
\pageref* and \pageref*, for using hyperref but suppressing
links, are supported.
@@ -75,7 +79,8 @@
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 manual (pageslts.pdf),
+the example (pageslts-example.tex),
the compiled example (pageslts-example.pdf),
driver (pageslts.drv), pageslts.dtx,
installation file (pageslts.ins),
@@ -139,10 +144,11 @@
The pageslts.sty for LaTeX2e (i.e. all documents using the
pageslts package) requires:
- 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
+- package undolabl, 2024-12-05, v1.0n,
+ https://ctan.org/pkg/undolabl
+- 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:
@@ -151,10 +157,11 @@
- 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?)
+- package pageslts, 2024-12-06, v2.0b, 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).
@@ -167,15 +174,15 @@
5 PACKAGE COMPATIBILITY
=======================
-* 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.
+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 _*ANCIENT*_ versions of undolabl or
+lastpage or turnthepage and so on.
+It requires a recent version of the undolabl package
+(>= 2024-12-05, v1.0n)!
-* The romanbarpagenumber and pageslts package currently are
- not yet compatible.
-
6 AUTHOR/MAINTAINER
=====================
@@ -212,5 +219,5 @@
8 KNOWN PROBLEMS
================
-* except those already mentioned above: none,
- but see chapter 3 of the documentation
\ No newline at end of file
+except those already mentioned under point 5 above: none,
+but see chapter 3 of the documentation.
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/pageslts/pageslts-example.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex 2024-12-07 21:06:32 UTC (rev 73064)
+++ trunk/Master/texmf-dist/doc/latex/pageslts/pageslts-example.tex 2024-12-07 21:06:46 UTC (rev 73065)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: pageslts
-%% Version: 2024-11-20 v2.0a
+%% Version: 2024-12-07 v2.0b
%% Info: Variants of last page labels
%%
%% Copyright (C) 2010 - 2024 by
@@ -26,6 +26,9 @@
%% * Alph - Uppercase letters: A, B, C, D,...
%% * fnsymbol - Footnote symbols: *, ^^e2^^80^^a0 (ddagger), ^^e2^^80^^a1 (dddagger),
%% ^^c2^^a7 (mathsection),...
+%% * silly - from sillypage package
+%% * gobble - gobbles the page numbers;
+%% maybe backslash thispagestyle{empty} is more useful?
%% ). The command backslash pagenumbering is renewed, but no change
%% should be visible to the output text, because only labels are added.
%% backslash OrigPagenumbering can be used to get the original meaning
@@ -66,23 +69,24 @@
\usepackage{lipsum}[2021-09-20]% v2.7
\usepackage[draft]{showkeys}[2024/05/23]% v3.21
%% Use final instead of draft to hide the keys. %%
-\PassOptionsToPackage{hyperref}{pdfpagelabels=true,hyperindex=false}
-\usepackage{hyperref}[2024-10-30]% v7.01k
-\hypersetup{%
- extension=pdf,%
+\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-10-30]% v7.01k
+\makeatletter
+\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX
+ \hypersetup{extension=pdf,%
plainpages=false,%
pdflang={en},%
pdftitle={pageslts package example},%
- pdfauthor={Hans-Martin Muench},%
+ pdfauthor={H.-Martin Muench},%
pdfsubject={Example for the pageslts package},%
- pdfkeywords={LaTeX, pageslts, H.-Martin Muench},%
+ pdfkeywords={LaTeX, pageslts},%
pdfview=Fit,%
pdfstartview=Fit,%
pdfpagelayout=SinglePage,%
bookmarksopen=true%
-}
+}}{\usepackage{url}[2013/09/16]}% v3.4
+\makeatother
\usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,%
- romanMult=true,RomanMulti=true]{pageslts}[2024-11-20]% v2.0a
+ romanMult=true,RomanMulti=true]{pageslts}[2024-12-07]% v2.0b
%% These are the default options. %%
\makeatletter
@@ -89,10 +93,23 @@
\renewcommand{\@evenfoot}%
{Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
\lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + %
- \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + %
+ \ifpagesLTS at pagecontinue%
+ \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) %
+ \else%
+ \{\lastpageref{pagesLTS.Roman.1}%
+ +\lastpageref{pagesLTS.Roman.2}%
+ +\lastpageref{pagesLTS.Roman.3}%
+ (\lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax)\} %
+ \fi + %
\lastpageref{pagesLTS.arabic}(\lastpageref{pagesLTS.arabic.local}) + %
\lastpageref{pagesLTS.fnsymbol}(\lastpageref{pagesLTS.fnsymbol.local}) + %
\lastpageref{pagesLTS.alph}(\lastpageref{pagesLTS.alph.local}) + %
+ \lastpageref{pagesLTS.gobble}(\lastpageref{pagesLTS.gobble.local}) + %
\lastpageref{pagesLTS.Alph}(\lastpageref{pagesLTS.Alph.local}) = %
\lastpageref{LastPages} pages.%
}
@@ -100,357 +117,470 @@
\def\pagesLTSexampleArabic{3}
\def\pagesLTSexamplealph{23}
\makeatother
-
+\setlength{\parindent}{0pt}
\listfiles
-
\begin{document}
\pagenumbering{roman}
%% Note the first \pagenumbering immediately behind \begin{document}! %%
%%\addtocounter{page}{-2} %%
-
\section*{Example for pageslts}
\addcontentsline{toc}{section}{Example for pageslts}
\markboth{Example for pageslts}{Example for pageslts}
-This example demonstrates the most common uses of package\\
-\textsf{pageslts}, v2.0a as of 2024-11-20 (HMM);\\
-\url{https://ctan.org/pkg/pageslts}.\\
+This example demonstrates the most common uses of package\newline
+\textsf{pageslts}, v2.0b as of 2024-12-07 (HMM);\newline
+\url{https://ctan.org/pkg/pageslts}.\bigskip
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\linebreak ones). -- For more details please see the documentation!\\
+(the default\linebreak ones).~-- For more details please see the documentation!\bigskip
\label{keys} To hide the \pageref{keys}{\qquad } use option
\texttt{final} instead of \texttt{draft} with the \textsf{showkeys}
package (or remove the package call from the preamble of
-this document).\\
+this document).\bigskip
\textbf{Hyperlinks or not:} If the \textsf{hyperref} package is loaded,
-the references are also hyperlinked:\\
+the references are also hyperlinked:\bigskip
\smallskip
Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
\lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + %
-\lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + %
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) %
+\else%
+ \{\lastpageref{pagesLTS.Roman.1}%
+ +\lastpageref{pagesLTS.Roman.2}%
+ +\lastpageref{pagesLTS.Roman.3}%
+ (\lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax)\} %
+\fi + %
+\makeatother%
\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.\\
+\lastpageref{LastPages} pages.\bigskip
If the \textsf{hyperref} package is loaded, but the hyperlinks of the
references shall be suppressed, \verb|\pageref*{...}|
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}) + %
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ \lastpageref*{pagesLTS.Roman}(\lastpageref*{pagesLTS.Roman.local}) %
+\else%
+ \{\lastpageref*{pagesLTS.Roman.1}%
+ +\lastpageref*{pagesLTS.Roman.2}%
+ +\lastpageref*{pagesLTS.Roman.3}%
+ (\lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax)\} %
+\fi + %
+\makeatother%
\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.\\
+\lastpageref*{LastPages} pages.\bigskip
\textbf{Trademarks} appear throughout this example 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.\\
+usage is to the benefit of the trademark owner.\bigskip
-\textbf{Tip}: Use \textit{logical page numbers}
-for the display of the pdf (in Adobe Reader Continuos Release 2024.004.20272:\\
+\textbf{Tip}: Use \textit{logical page numbers} for the display of the pdf
+(in Adobe Reader Continuos Release 2024.004.20272:\newline
Edit $>$ Preferences $>$ Categories: Page Display $>$
-Page Content and Information: Use logical page numbers)!\\
+Page Content and Information: Use logical page numbers)!\bigskip
You want negative page numbers? Not only arabic, but even roman,
-Roman, alph, Alph or fnsymbol ones? No problem, e.\,g. just give a\\
+Roman, alph, Alph or fnsymbol ones? No problem, e.\,g.~just give a\newline
\verb|\addtocounter{page}{|-\textit{some number}\verb|}| in the
source code of this example file (or uncomment the prepared line)!
-
-\pagebreak
-
+\newpage
\tableofcontents
-
-\newpage
-
-\pagenumbering{roman}
+\newpage%
+\makeatletter%
+\def\pagesLTS at tmpC{roman}%
+\ifx\pagesLTS at pnc\pagesLTS at tmpC%
+\else\pagenumbering{roman}%
%% in case the page numbering is changed before,
%% otherwise pagesLTS.current.local.roman on this page would be undefined
-
+\fi%
+\makeatother%
\section{roman}
-\noindent (\texttt{roman} page numbering was started before,
+(\texttt{roman} page numbering was started before,
because the page numbering scheme was needed to start at
-the first page, of course.)\\
+the first page, of course.)\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first\linebreak page):~\theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first\linebreak page):~\theCurrentPage \bigskip
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
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)):
+\theCurrentPageLocal\newline
You can get also this in other formats, too:
\roman{pagesLTS.current.local.roman}, \Roman{pagesLTS.current.local.roman},
\arabic{pagesLTS.current.local.roman}, \fnsymbol{pagesLTS.current.local.roman},
\alph{pagesLTS.current.local.roman}, \Alph{pagesLTS.current.local.roman},
but probably it only makes sense if page numbering scheme and format are
-the same, e.\,g.\\
-\verb|\Roman{pagesLTS.current.local.Roman}|\\
+the same, e.\,g.\newline
+\verb|\Roman{pagesLTS.current.local.Roman}|\newline
or \verb|\Alph{pagesLTS.current.local.Alph}|. \verb|\arabic{...}| could
make sense even if combined with another page numbering scheme.
-And this is exactly what \verb|\theCurrentPageLocal| does:\\
-\nolinebreak{\verb|\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS at pnc}}|.}\\
+And this is exactly what \verb|\theCurrentPageLocal| does:\newline
+\nolinebreak{\verb|\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS at pnc}}|.}\bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
When the option \texttt{pagecontinue=false} is used with the
\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
-point to the same page as before, but this will have a lower number.\\
-The \verb|\lastpageref{pagesLTS.Roman.local}| will not change,
-because the number of pages does not change (only the page numbers).\\
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\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.)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\newline
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
-
-\lipsum[1-3]
-
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
\newpage
-
\pagenumbering{Roman}
-
\section{Roman\label{Roman}}
\subsection{Common Roman page numbering}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage\bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage\bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.
+\pagebreak
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
-\lipsum[1-4]
-
\newpage
-
\subsection{Last page of first Roman sector}
\verb|\lastpageref{pagesLTS.Roman}| does \textbf{not}
-refer to this page (but there: \lastpageref{pagesLTS.Roman}),
-because the option \texttt{pagecontinue=true}
-was chosen. When a reference to this page is wanted,\\
-\verb|\lastpageref{pagesLTS.Roman.1}| can be used: \lastpageref{pagesLTS.Roman.1}.\\
+refer to this page (but there: \lastpageref{pagesLTS.Roman}).
+When a reference to this page is wanted,\newline
+\verb|\lastpageref{pagesLTS.Roman.1}| can be used: \lastpageref{pagesLTS.Roman.1}.\bigskip
-\bigskip
There are \lastpages{Roman}{1}~pages (\verb|\lastpages{Roman}{1}|)
-in this first Roman sector.\\
+in this first Roman sector.\newline
The Roman page numbering scheme is continued later in section~\ref{Roman2})!
\newpage
-
\pagenumbering{arabic}
-
\section{arabic}
-
\subsection{Standard page numbering}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.
+\pagebreak
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
-\lipsum[1-4]
\newpage
-
+\thispagestyle{empty}
\subsection[Empty page style]{Also an empty page style is no problem %
for the current or total page count}
\bigskip
-\thispagestyle{empty}
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
-
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\newline
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.
+\pagebreak
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
-\lipsum[1-4]
-
\newpage
-
\subsection[addtocounter, setcounter]{Neither %
\texttt{\textbackslash addtocounter\{page\}} nor %
\texttt{\textbackslash setcounter\{page\}} is a problem for the %
@@ -457,27 +587,23 @@
current or total page numbers}
(Here is an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}|
-in the source code.)\\
-\addtocounter{page}{\pagesLTSexampleArabic}
+in the source code.)
+\addtocounter{page}{\pagesLTSexampleArabic}\bigskip
-\noindent The page (from \verb|\thepage| command): \thepage \\
+The page (from \verb|\thepage| command): \thepage \bigskip
-\noindent Current page (from \verb|\theCurrentPage|\ %
-command), i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (from \verb|\theCurrentPage|\ %
+command), i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (from \verb|\theCurrentPageLocal|\ %
-command), i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal\\
+CurrentPageLocal (from \verb|\theCurrentPageLocal|\ %
+command), i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last page's number (LastPages): \lastpageref{LastPages}{\hskip3em }
-(= total number of pages)\\
+Last page's number (LastPages): \lastpageref{LastPages}{\hskip3em }
+(= total number of pages)
-\lipsum[1-7]
-
\newpage
-
\pagenumbering{fnsymbol}
-
\section{fnsymbol}
Without option \texttt{fnsymbolmult=true} of the \textsf{pageslts} package
@@ -505,128 +631,264 @@
\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+For testing purposes, try:
-\noindent The page (\verb|\thepage|): \thepage \\
+\begin{small}
+\begin{verbatim}
+\documentclass{article}
+\usepackage[plainpages=false,pageanchor=true,pdfpagelabels=true]{hyperref}
+\usepackage{pageslts}
+\pagenumbering{fnsymbol}
+\begin{document}
+First page.\newpage
+\verb|\lastpageref{pagesLTS.0} | \lastpageref{pagesLTS.0} \par
+\verb|\lastpageref{pagesLTS.0.local} | \lastpageref{pagesLTS.0.local} \par
+\verb|\lastpageref{LastPage} | \lastpageref{LastPage} \par
+\verb|\lastpageref{VeryLastPage} | \lastpageref{VeryLastPage} \par
+\verb|\lastpageref{pagesLTS.fnsymbol.1} | \lastpageref{pagesLTS.fnsymbol.1} \par
+\verb|\lastpageref{pagesLTS.fnsymbol.1.local} | \lastpageref{pagesLTS.fnsymbol.1.local} \par
+\verb|\lastpageref{pagesLTS.fnsymbol} | \lastpageref{pagesLTS.fnsymbol} \par
+\verb|\lastpageref{pagesLTS.fnsymbol.local} | \lastpageref{pagesLTS.fnsymbol.local} \par
+\verb|\lastpageref{LastPages} | \lastpageref{LastPages} \par
+\verb|\pagesLTSlastpage | \pagesLTSlastpage
+\newpage
+Last page.
+\end{document}
+\end{verbatim}
+\end{small}
+\newpage
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
+
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
+
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)\bigskip
-\lipsum[1-60]
+\lipsum[1-58]
\newpage
-
\pagenumbering{Roman}
-
\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},
+The page number starts with \textquotedblleft I\textquotedblright{} again for
+option just \texttt{pagecontinue=false}, but for option \texttt{pagecontinue=true},
or with option just \texttt{pagecontinue}, or even just
-\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}).
+\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}
+the page numbers are continued.
+
This package remembered the
-\arabic{pagesLTS.double.Roman}-1,
+$\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 .\\
+\textquotedblleft\Roman{pagesLTS.double.Roman}\textquotedblright{} in
+case of option \texttt{pagecontinue}.\newline
If you want to start with \textquotedblleft I\textquotedblright{} all
over again, you will have two pages with the same name,
but nevertheless you can do this by using option \texttt{pagecontinue=false}
-or a \verb|\setcounter{page}{1}|\ here (not demonstrated in this example file).\\
+or a \verb|\setcounter{page}{1}|\ here (not demonstrated in this example file).\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+There was the question: \textquotedblleft With option \verb|pagecontinue=false|,
+how do I get the number of pages in each number block (e.\,g.~in the first Roman section,
+second Roman section, third Roman section) with just one command?\textquotedblright
+\begin{verbatim}
+\makeatletter%
+\theCurrentPageLocal~of~\lastpageref*{%
+pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local}%
+\makeatother%
+\end{verbatim}
+provides this. Here: %
+\makeatletter%
+\theCurrentPageLocal~of~%
+\lastpageref*{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local}\newline%
+\makeatother%
+for \verb|pagecontinue=true| is \verb|4 of 8| (including %
+\makeatletter%
+$\the\numexpr\csname c at pagesLTS.double.Roman\endcsname -1\relax$ %
+from the first Roman section,
+$\the\csname c at pagesLTS.double.Roman\endcsname\relax
+ =\the\numexpr\csname c at pagesLTS.double.Roman\endcsname -1\relax% first section
++1% first page of this second section
+$, $\the\numexpr\csname c at pagesLTS.double.Roman\endcsname -1+%
+\csname c at pagesLTS.Roman.2.local.cnt\endcsname\relax%
+=\the\numexpr\csname c at pagesLTS.double.Roman\endcsname -1\relax+%
+\the\numexpr\csname c at pagesLTS.Roman.2.local.cnt\endcsname\relax$)\newline
+\makeatother%
+and for \verb|pagecontinue=false| is \verb|1 of 5| .\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+\verb|pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local| is:
+\begin{description}
+\item[-] \verb|pagesLTS| just identifies this counter to belong to the pageslts package.
+\item[-] \verb|\pagesLTS at pnc| is the Current Page Numbering scheme, i.\,e.~here it would be \verb|Roman|.
+\item[-] \verb|\arabic{pagesLTS.pnc.\pagesLTS at pnc}| is the value of counter\newline
+ \verb|pagesLTS.pnc.\pagesLTS at pnc| printed in arabic numbers (1, 2, 3, ...) -- see below.
+\item[-] \verb|local|: Local there are 5 pages with Roman numbering in this example, globally there are
+ $3+5+4=12$~pages with Roman numbering in this example, and the local numbers are wanted.
+\end{description}
+The counter \verb|pagesLTS.pnc.\pagesLTS at pnc| gives the number of the\newline
+\verb|\pagesLTS at pnc| page numbering scheme currently used, i.\,e.~we have consecutivly\newpage
+\begin{verbatim}
+pagesLTS.pnc.roman = 1
+pagesLTS.pnc.Roman = 1
+pagesLTS.pnc.arabic = 1
+pagesLTS.pnc.fnsymbol = 1
+pagesLTS.pnc.Roman = 2
+pagesLTS.pnc.alph = 1
+pagesLTS.pnc.Roman = 3
+pagesLTS.pnc.Alph = 1
+\end{verbatim}
+So, \verb|pagesLTS.pnc.Roman| changes from $1$ to $2$ automatically
+when doing the second \verb|\pagenumbering{Roman}|,
+and changes from $2$ to $3$ for the third\newline
+\verb|\pagenumbering{Roman}|.\bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
+
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
+
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\newline
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)\bigskip
\lipsum[1-6]
@@ -633,75 +895,110 @@
\newpage
\verb|\lastpageref{pagesLTS.Roman}| does \textbf{not}
-refer to this page (but there: \lastpageref{pagesLTS.Roman}),
-because the option \texttt{pagecontinue=true}
-was chosen. When a reference to this page is wanted,\\
-\verb|\lastpageref{pagesLTS.Roman.2}| can be used: \lastpageref{pagesLTS.Roman.2}.\\
+refer to this page (but there: \lastpageref{pagesLTS.Roman})
+for option \texttt{pagecontinue=true}. When a reference to this page is wanted,\newline
+\verb|\lastpageref{pagesLTS.Roman.2}| can be used: \lastpageref{pagesLTS.Roman.2}.\newline
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
-\bigskip
There are \lastpages{Roman}{2}~pages (\verb|\lastpages{Roman}{2}|) in this
-second Roman sector.\\
+second Roman sector.\newline
The Roman page numbering scheme is continued later in section~\ref{Roman3})!
\newpage
-
\pagenumbering{alph}
-
\section{alph\label{alph}}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
-\lipsum[1-4]
-
\newpage
Without option \texttt{alphMult=ab} of the \textsf{pageslts} (and the help of the
@@ -716,9 +1013,9 @@
\end{verbatim}
\end{quote}
Now the page numbers are continued aa, ab, ac,\ldots\ (aa, bb, cc,\ldots\ is
-also possible, see the \textsf{pageslts} documentation).\\
-To demonstrate this, we add a\\
-\verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}|\\
+also possible, see the \textsf{pageslts} documentation).\newline
+To demonstrate this, we add a\newline
+\verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}|\newline
in the source code here.
\addtocounter{page}{\pagesLTSexamplealph}
@@ -728,153 +1025,258 @@
\lipsum[1-18]
\newpage
-
\pagenumbering{Roman}
-
\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 starts with \textquotedblleft I\textquotedblright{} again for
+option just \texttt{pagecontinue=false}, but for option \texttt{pagecontinue=true},
or with option just \texttt{pagecontinue}, or even just
-\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}).
+\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}
+the page numbers are continued.
+
This package remembered the
-\arabic{pagesLTS.double.Roman}-1,
+$\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 .\\
+already done in%
+\begin{description}
+\item[-] for \texttt{pagecontinue=false}: the preceding Roman sector,
+\item[-] for \texttt{pagecontinue=true}: all Roman sectors,
+\end{description}%
+and therefore continues with the appropriate page in case of option \texttt{pagecontinue}.\newline
If you want to start with \textquotedblleft I\textquotedblright{} all
-over again, you will have (at least) two pages with the same name,
-but nevertheless you can do this by using option
-\texttt{pagecontinue=false} instead of \texttt{pagecontinue=true}
-(not demonstrated here).\\
+over again, you will have two pages with the same name,
+but nevertheless you can do this by using option \texttt{pagecontinue=false}
+or a \verb|\setcounter{page}{1}|\ here (not demonstrated in this example file).\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
-
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
+\newpage
\lipsum[1-3]
-
\newpage
-\lastpageref{pagesLTS.Roman}
-(\verb|\lastpageref{pagesLTS.Roman}|)
-\textbf{does} refers to this page, because the option
-\texttt{pagecontinue=true} was chosen. Also\\
-\verb|\lastpageref{pagesLTS.Roman.3}| can be used: \lastpageref{pagesLTS.Roman.3}.\\
+\lastpageref{pagesLTS.Roman} (\verb|\lastpageref{pagesLTS.Roman}|)
+\textbf{does} refers to this page.\newline
+Also \verb|\lastpageref{pagesLTS.Roman.3}|
+give the right name of the page, but if \verb|pagecontinue=false| was chosen,
+it might point to another page with the same name!
+\lastpageref{pagesLTS.Roman.3}.\bigskip
\bigskip
There are \lastpages{Roman}{3}~pages (\verb|\lastpages{Roman}{3}|) in this
-third Roman sector.\\
+third Roman sector.
\newpage
+\pagenumbering{gobble}
+\section{gobble}
+Well. You can use \verb|gobble| as page numbering scheme. It gobbles the page numbers,
+i.\,e.~there is no page number. Maybe \verb|\thispagestyle{empty}| is more useful?
+Do not expect to be able to make working references to pages without page number,
+and do expect to get
+\begin{verbatim}
+pdfTeX warning (ext4): destination with the same identifier
+(name{page.}) has been already used, duplicate ignored
+<to be read again>
+\end{verbatim}
+
+The page (\verb|\thepage|): \thepage{} (There is a nothing between two spaces there.)\bigskip
+
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
+
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
+
+There are \lastpageref*{pagesLTS.gobble.local} pages with gobbled numbers (i.\,e.~without numbers).
+
+\bigskip
+
+For testing purposes, try:
+
+\begin{small}
+\begin{verbatim}
+\documentclass{article}
+\usepackage[plainpages=false,pageanchor=true,pdfpagelabels=true]{hyperref}
+\usepackage{pageslts}
+\pagenumbering{gobble}
+\begin{document}
+First page.\newpage
+\verb|\lastpageref{pagesLTS.0} | \lastpageref{pagesLTS.0} \par
+\verb|\lastpageref{pagesLTS.0.local} | \lastpageref{pagesLTS.0.local} \par
+\verb|\lastpageref{LastPage} | \lastpageref{LastPage} \par
+\verb|\lastpageref{VeryLastPage} | \lastpageref{VeryLastPage} \par
+\verb|\lastpageref{pagesLTS.gobble.1} | \lastpageref{pagesLTS.gobble.1} \par
+\verb|\lastpageref{pagesLTS.gobble.1.local} | \lastpageref{pagesLTS.gobble.1.local} \par
+\verb|\lastpageref{pagesLTS.gobble} | \lastpageref{pagesLTS.gobble} \par
+\verb|\lastpageref{pagesLTS.gobble.local} | \lastpageref{pagesLTS.gobble.local} \par
+\verb|\lastpageref{LastPages} | \lastpageref{LastPages} \par
+\verb|\pagesLTSlastpage | \pagesLTSlastpage
+\newpage
+Last page.
+\end{document}
+\end{verbatim}
+\end{small}
+\newpage
+
\pagenumbering{Alph}
-
\section{Alph}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\newline
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
+\newpage
-\lipsum[1-3]
-
-\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
@@ -887,62 +1289,142 @@
\end{verbatim}
\end{quote}
Now the page numbers are continued AA, AB, AC,\ldots\ (AA, BB, CC,\ldots\ is
-also possible, see the \textsf{pageslts} documentation).\\
+also possible, see the \textsf{pageslts} documentation).\newline
This is not demonstrated here, but see section~\ref{alph}.
+\newpage
+\section{silly}
+The sillypage package, \url{https://ctan.org/pkg/sillypage}, provides the
+page\-numbering scheme \verb|silly|, which is not demonstrated here
+but works with the pageslts package, i.\,e.~the references
+all show the right (page) number and link to the right page.\bigskip
+
+This is \textbf{not} demonstrated here (discussing gobbled page numbers
+is silly enough), but for testing purposes, try:
+
+\begin{small}
+\begin{verbatim}
+\documentclass{article}
+\usepackage[plainpages=false,pageanchor=true,pdfpagelabels=true]{hyperref}
+\usepackage{pageslts}
+\usepackage{sillypage}
+\pagenumbering{silly}
+\begin{document}
+First page.\newpage
+\verb|\lastpageref{pagesLTS.0} | \lastpageref{pagesLTS.0} \par
+\verb|\lastpageref{pagesLTS.0.local} | \lastpageref{pagesLTS.0.local} \par
+\verb|\lastpageref{LastPage} | \lastpageref{LastPage} \par
+\verb|\lastpageref{VeryLastPage} | \lastpageref{VeryLastPage} \par
+\verb|\lastpageref{pagesLTS.silly.1} | \lastpageref{pagesLTS.silly.1} \par
+\verb|\lastpageref{pagesLTS.silly.1.local} | \lastpageref{pagesLTS.silly.1.local} \par
+\verb|\lastpageref{pagesLTS.silly} | \lastpageref{pagesLTS.silly} \par
+\verb|\lastpageref{pagesLTS.silly.local} | \lastpageref{pagesLTS.silly.local} \par
+\verb|\lastpageref{LastPages} | \lastpageref{LastPages} \par
+\verb|\pagesLTSlastpage | \pagesLTSlastpage
\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage : Last page.
+\end{document}
+\end{verbatim}
+\end{small}
+\newpage
\section{The End}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last gobble page (pagesLTS.gobble: \lastpageref{pagesLTS.gobble}{\hskip4em }
+Yes, there is neither page number nor link, because everything got gobbled.
+(There is \lastpageref*{pagesLTS.gobble.local} page with gobbled number (i.\,e.~without number).)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Silly page numbers are possible but were not demonstrated in this example.
+\newpage
+
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
+
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)
\end{document}
\endinput
Modified: trunk/Master/texmf-dist/doc/latex/pageslts/pageslts.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/pageslts/pageslts.drv
===================================================================
--- trunk/Master/texmf-dist/source/latex/pageslts/pageslts.drv 2024-12-07 21:06:32 UTC (rev 73064)
+++ trunk/Master/texmf-dist/source/latex/pageslts/pageslts.drv 2024-12-07 21:06:46 UTC (rev 73065)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: pageslts
-%% Version: 2024-11-20 v2.0a
+%% Version: 2024-12-07 v2.0b
%% Info: Variants of last page labels
%%
%% Copyright (C) 2010 - 2024 by
@@ -26,6 +26,9 @@
%% * Alph - Uppercase letters: A, B, C, D,...
%% * fnsymbol - Footnote symbols: *, ^^e2^^80^^a0 (ddagger), ^^e2^^80^^a1 (dddagger),
%% ^^c2^^a7 (mathsection),...
+%% * silly - from sillypage package
+%% * gobble - gobbles the page numbers;
+%% maybe backslash thispagestyle{empty} is more useful?
%% ). The command backslash pagenumbering is renewed, but no change
%% should be visible to the output text, because only labels are added.
%% backslash OrigPagenumbering can be used to get the original meaning
@@ -64,7 +67,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2022-11-01]
\ProvidesFile{pageslts.drv}%
- [2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)]
+ [2024-12-07 v2.0b 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)
Modified: trunk/Master/texmf-dist/source/latex/pageslts/pageslts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pageslts/pageslts.dtx 2024-12-07 21:06:32 UTC (rev 73064)
+++ trunk/Master/texmf-dist/source/latex/pageslts/pageslts.dtx 2024-12-07 21:06:46 UTC (rev 73065)
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: pageslts.dtx
-% Version: 2024-11-20 v2.0a
+% Version: 2024-12-07 v2.0b
% Info: Variants of last page labels
%
% Copyright © 2010 - 2024 by
@@ -54,7 +54,7 @@
\input docstrip.tex
\Msg{**********************************************************************************}
\Msg{* Installation *}
-\Msg{* Package: pageslts 2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)*}
+\Msg{* Package: pageslts 2024-12-07 v2.0b Refers to special pages' numbers/names (HMM)*}
\Msg{**********************************************************************************}
\keepsilent
@@ -66,7 +66,7 @@
This is a generated file.
Project: pageslts
-Version: 2024-11-20 v2.0a
+Version: 2024-12-07 v2.0b
Info: Variants of last page labels
Copyright (C) 2010 - 2024 by
@@ -83,6 +83,9 @@
* Alph - Uppercase letters: A, B, C, D,...
* fnsymbol - Footnote symbols: *, † (ddagger), ‡ (dddagger),
§ (mathsection),...
+ * silly - from sillypage package
+ * gobble - gobbles the page numbers;
+ maybe backslash thispagestyle{empty} is more useful?
). The command backslash pagenumbering is renewed, but no change
should be visible to the output text, because only labels are added.
backslash OrigPagenumbering can be used to get the original meaning
@@ -173,7 +176,7 @@
%<*driver>
\NeedsTeXFormat{LaTeX2e}[2022-11-01]
\ProvidesFile{pageslts.drv}%
- [2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)]
+ [2024-12-07 v2.0b 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)
@@ -221,7 +224,7 @@
% }%^^A
% \expandafter\endgroup\x
%
-% \DoNotIndex{\ ,\",\,,\\,\@Alph,\@alph,\@bsphack,\@ehc,\@ehd,\@esphack,\@ifundefined,\@ne,%
+% \DoNotIndex{\ ,\",\,,\\,\-,\@Alph,\@alph,\@bsphack,\@ehc,\@ehd,\@esphack,\@ifundefined,\@ne,%
% \@currentlabel,\@currentlabelname,\@evenfoot,\@fnsymbol,\@gobble,\@ifl at t@r,%
% \@kernel at reserved@label at data,\@oddfoot,\@tempcnta,\addcontentsline,\addtocounter,\AfterLastShipout,%
% \Alph,\alph,\alphalph,\AlphAlph,\AlphMult,\alphMult,\AlphMulti,\arabic,\AtEndDocument,\baselineskip,%
@@ -229,20 +232,18 @@
% \empty,\END,\end,\endcsname,\ensuremath,\expanded,\extract,\extract@,\fmtversion,%
% \fnsymbol,\fnsymbolmult,\frontmatter,\gdef,\href,\hskip,\hypersetup,\hypertarget,\HyPsd at pageref,%
% \if,\if at filesw,\if at 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 at tmpA,\pagesLTS at tmpB,\pagesLTS at tmpC,\pagesLTS at tmpD,\pagesLTS at tmpQ,\PassOptionsToPackage,%
+% \IfPackageAtLeastTF,\IfPackageAtLeastF,\@ifpackageloaded,\IfPackageLoadedT,\IfPackageLoadedF,%
+% \IfPackageLoadedTF,\IfPackageLoadedWithOptionsF,\immediate,\item,\jobname,\label,\LaTeX,\ldots,%
+% \linebreak,\lipsum,\listfiles,\loop,\makeatletter,\makeatother,\MessageBreak,\markboth,\mathparagraph,%
+% \mathsection,\mbox,\meaning,\newcommand,\newline,\newpage,\NeedsTeXFormat,\NewCommandCopy,\newcounter,%
+% \newlabel,\nobreak,\noindent,\nolinebreak,\number,\numexpr,\options,\PackageError,\PackageInfo,%
+% \PackageNoteNoLine,\PackageWarning,\PackageWarningNoLine,\pagebreak,\pageref,%
+% \pagesLTS at tmpA,\pagesLTS at tmpB,\pagesLTS at tmpC,\pagesLTS at tmpD,\pagesLTS at tmpQ,\par,\parindent,%
% \phantomsection,\ProvidesPackage,\protect,\qquad,\ref,\renewcommand,\repeat,\RequirePackage,%
-% \section,\setcounter,\smallskip,\space,\subsection,%
+% \section,\setcounter,\setlength,\smallskip,\space,\subsection,%
% \tableofcontents,\textbackslash,\textbf,\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt,%
-% \the,\thepage,\thispagestyle,\undefined,\url,\usepackage,\value,\verb,%
-% \xpagesLTS at rmpage,\xxpagesLTS at rmpage,%
-% \c at page,\DeclareBoolOption,\DeclareStringOption,\ProcessKeyvalOptions,\setkeys,\SetupKeyvalOptions%
-% }
+% \texorpdfstring,\textasteriskcentered,\the,\thepage,\thispagestyle,\undefined,\url,\usepackage,%
+% \value,\verb,\xpagesLTS at rmpage,\xxpagesLTS at rmpage,\SetKeys}
%
% \newlength\ltsindent
% \setlength{\ltsindent}{\parindent}
@@ -250,7 +251,7 @@
% \renewcommand{\indent}{\hspace*{\ltsindent}}
%
% \title{The \xpackage{pageslts} package}
-% \date{2024-11-20 v2.0a}
+% \date{2024-12-07 v2.0b}
% \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}}
%
% \maketitle
@@ -285,32 +286,38 @@
% |\setcounter{page}{|\ldots|}| were used.
% 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 alph or Alph $>26$ and fnsymbol $>9$
+% Further labels are provided for special cases.\par
+%
+% The \xpackage{alphalph} package is supported,
+% i.\,e.~page numbers alph or Alph $>26$ and fnsymbol $>9$
% can be used (with according options set). Even zero
% and negative page numbers can be used with \texttt{arabic},
% \texttt{alph}, \texttt{Alph}, \texttt{roman}, \texttt{Roman},
% and \texttt{fnsymbol} page numbering (with \xpackage{alphalph} package
-% and according options).\\
+% and according options).\par
+%
% |\pageref*| and |\lastpageref*|, for using \xpackage{hyperref}
-% but suppressing links, are supported.
+% but suppressing links, are supported. -- The name of the \xpackage{pageslts} package
+% refers to \textbf{L}ast, \textbf{T}otal, and page numbering \textbf{S}chemes pages.
+% \xpackage{pagesLTS} was a former name of this package.
% \end{abstract}
%
-% 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),\\
+% Right after |\begin{document}| a |\pagenumbering{|\ldots|}| should be called~--
+% with the appropriate argument out of e.\,g.\newline
+% arabic (Arabic numerals: 1, 2, 3, 4,\ldots),\newline
% roman (Lowercase Roman numerals: i, ii, iii, iv,\ldots),
-% Roman (Uppercase Roman numerals: I, II, III, IV,\ldots),\\
+% Roman (Uppercase Roman numerals: I, II, III, IV,\ldots),\newline
% alph (Lowercase letters: a, b, c, d,\ldots),
-% Alph (Uppercase letters: A, B, C, D,\ldots),\\
-% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots).\\
+% Alph (Uppercase letters: A, B, C, D,\ldots),\newline
+% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots),\newline
+% gobble (Maybe \verb|\thispagestyle{empty}| is more useful?),\newline
+% silly (from the \href{https://ctan.org/pkg/sillypage}{\xpackage{sillypage} package}).\bigskip
%
% This package first started as a revision of the
% \xpackage{lastpage} package of \textbf{Jeffrey P. Goldberg} (Thanks!),
% 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.\\
+% \xpackage{lastpage} now does what it is supposed to do.\bigskip
%
% 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.
@@ -340,35 +347,37 @@
% 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.
+% 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.\\
+% Further labels are provided for special cases.\bigskip
%
-% The \xpackage{alphalph} package is supported, i.\,e.\ page numbers \texttt{alph} or \texttt{Alph} $>26$
+% 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.\\
+% and \texttt{Roman} pages, too.\bigskip
%
-% 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),\\
+% Right after |\begin{document}| a |\pagenumbering{|\ldots|}| should be called~--
+% with the appropriate argument out of e.\,g.\newline
+% arabic (Arabic numerals: 1, 2, 3, 4,\ldots),\newline
% roman (Lowercase Roman numerals: i, ii, iii, iv,\ldots),
-% Roman (Uppercase Roman numerals: I, II, III, IV,\ldots),\\
+% Roman (Uppercase Roman numerals: I, II, III, IV,\ldots),\newline
% alph (Lowercase letters: a, b, c, d,\ldots),
-% Alph (Uppercase letters: A, B, C, D,\ldots),\\
-% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots).\\
+% Alph (Uppercase letters: A, B, C, D,\ldots),\newline
+% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots),\newline
+% gobble (Maybe \verb|\thispagestyle{empty}| is more useful?),\newline
+% silly (from the \href{https://ctan.org/pkg/sillypage}{\xpackage{sillypage} package}).\bigskip
%
% 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
%
% \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.\\
+% the usage is to the benefit of the trademark owner.\bigskip
%
% \phantomsection
% \DescribeMacro{logical page numbers}\label{logical page numbers}
@@ -375,7 +384,7 @@
% \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 Continuos Release 2024.004.20272 enable:\\
+% \item [-] In Adobe Reader Continuos Release 2024.004.20272 enable:\newline
% Edit $>$ Preferences $>$ Categories: Page Display $>$
% Page Content and Information: Use logical page numbers
%
@@ -384,11 +393,9 @@
% The display will be e.\,g.\ \mbox{\textquotedblleft 7 (7 of 9)\textquotedblright ,}
% or, in case of Roman instead of arabic numbers,
% \mbox{\textquotedblleft VII (7 of 9)\textquotedblright ,} and when different
-% page numbers are used (see below) e.\,g. arabic after 10~Roman pages:
+% page numbers are used (see below) e.\,g.~arabic after 10~Roman pages:
% \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.
+% Please try this with the compiled \xpackage{pageslts-example} file!
%
% \section{Usage}
% Just load the package by placing
@@ -397,7 +404,7 @@
% \end{quote}
% 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})!\\
+% right behind |\begin{document}| (see subsubsection~\ref{sss:nopnc})!\bigskip
%
% 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
@@ -407,7 +414,7 @@
% (most times with |\pageref{...}|, but more save with |\lastpageref{...}|).
% 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.\\
+% redefinitions of the page headings and footings to get a reference to the last page.\bigskip
%
% \DescribeMacro{\pageref*}
% \DescribeMacro{\lastpageref*}
@@ -420,12 +427,12 @@
%
% \subsubsection{pagecontinue\label{sss:pagecontinue}}
% \DescribeMacro{pagecontinue}
-% When option \texttt{pagecontinue=false} is \textbf{not} given (i.\,e.\ \texttt{pagecontinue}
+% 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.\\
+% Roman ones again in the backmatter, the last ones will start with VI instead of~I again.\bigskip
%
% 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,
@@ -453,18 +460,18 @@
% 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}
+% continuations), but instead only gives an error:\pagebreak
+% \begin{verbatim}
+% 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{verbatim}
% 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.\\
+% \textquotedblleft numbers\textquotedblright\ are possible.\newline
% Nevertheless, some \TeX\ capacity will be exceeded well before the
-% $2\,147\,483\,647^{\textnormal{th}}$ page.\\
+% $2\,147\,483\,647^{\textnormal{th}}$ page.\bigskip
%
% \DescribeMacro{alphMult}
% The string option \texttt{alphMult} takes three values: |ab|, |bb|, |0|:
@@ -474,9 +481,9 @@
% \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|\\
+% to define the page \textquotedblleft numbers\textquotedblright\ after~z and before~a.\newline
+% (But if the user does not do anything at all, the\newline
+% \ |LaTeX Error: Counter too large|\newline
% will appear again.)
% \end{description}
%
@@ -488,9 +495,9 @@
% \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|\\
+% to define the page \textquotedblleft numbers\textquotedblright\ after~Z and before~A.\newline
+% (But if the user does not do anything at all, the\newline
+% \ |LaTeX Error: Counter too large|\newline
% will appear again.)
% \end{description}
%
@@ -504,16 +511,16 @@
% \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.\\
+% Compile the \textsf{pageslts-example.tex} and see the resulting \xfile{pdf} file.\bigskip
%
% Before \ensuremath{*} (page~1) the page \textquotedblleft numbers\textquotedblright\ are
% continued with 0, \ensuremath{-*}, \ensuremath{-\dagger},\ldots, \ensuremath{-\mathparagraph},
-% \ensuremath{-**}, \ensuremath{-\dagger\dagger},\ldots\\
+% \ensuremath{-**}, \ensuremath{-\dagger\dagger},\ldots\newline
% 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|\\
+% the\newline
+% \ |LaTeX Error: Counter too large|\newline
% will appear again.)
%
% \subsubsection{romanMult, RomanMulti\label{sss:romanMult}}
@@ -521,7 +528,7 @@
% \DescribeMacro{RomanMulti}
% 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.\\
+% i.\,e.~0, -i, -ii, -iii, -iv,\ldots\ and 0, -I, -II, -III, -IV,\ldots, respectively.\newline
% 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}
@@ -538,19 +545,19 @@
% \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 (and chances for
-% successful placing of all labels are much higher; \nolinebreak{cf.~subsubsection~\ref{sss:once}).}\\
+% successful placing of all labels are much higher; \nolinebreak{cf.~subsubsection~\ref{sss:once}).}\bigskip
%
% \DescribeMacro{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.\\
+% package and the |fnsymbol| page numbering scheme. This should work now.\bigskip
%
% \DescribeMacro{VeryLastPage}
% |\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.\\
+% as well as \texttt{VeryLastPage} point to the last page indeed.\bigskip
%
% \DescribeMacro{LastPages}
% \DescribeMacro{page number}
@@ -563,7 +570,7 @@
% \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.)\\
+% |pagecontinue|). This is done by |\setcounter{page}{1}|, thus this is ignored, too.)\bigskip
%
% \DescribeMacro{totpages}
% |\pageref{totpages}| of the \xpackage{totpages} package is similar to
@@ -570,10 +577,10 @@
% |\lastpageref{LastPages}|, but while the target for
% |\pageref{totpages}| is placed |\AtEndDocument|, the target for
% |\lastpageref{LastPages}| is placed in the hook |enddocument/afterlastpage|,
-% therefore |\lastpageref{LastPages}| is safer to really get the total page number.\\
+% therefore |\lastpageref{LastPages}| is safer to really get the total page number.\bigskip
%
% \DescribeMacro{\@abspage at last}
-% Nowadays the kernel provides |\@abspage at last|, which contains the number of pages.\\
+% Nowadays the kernel provides |\@abspage at last|, which contains the number of pages.\bigskip
%
% \DescribeMacro{\theCurrentPage}
% |\theCurrentPage| gives the current total/absolute page, in contrast to |\thepage|,
@@ -583,22 +590,22 @@
% \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).\\
+% to get the value in Roman page numbering scheme (e.\,g.~VIII for~8).\bigskip
%
% \phantomsection
% \DescribeMacro{\theCurrentPageLocal}
% |\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.\\
+% are different e.\,g.~when |\addtocounter{page}{...}| or |\setcounter{page}{...}| were used.\newline
% |\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\\
+% e.\,g.~|\Roman{pagesLTS.current.local.Roman}| or\newline
% |\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 at pnc}}|.\\
+% another page numbering scheme. And this is exactly what |\theCurrentPageLocal| does:\newline
+% |\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS at pnc}}|.\bigskip
%
% \DescribeMacro{pagesLTS. page numbering scheme . number }
% If you want to refer to the last page of the first, second,\ldots\ use of a
@@ -605,7 +612,7 @@
% 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}.\\
+% page~\pageref{pagesLTS.pnscheme.nr}.\bigskip
%
% \DescribeMacro{\lastpageref}
% In former times for pages with the \texttt{fnsymbol} page numbering scheme,
@@ -622,10 +629,10 @@
% 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!\\
+% |\pagenumbering{...}| at the beginning of your document!\newline
% 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}|.~--\\
+% \xpackage{pageslts} package does not know about this without |\pagenumbering{arabic}|.~--\newline
% 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).
@@ -637,7 +644,7 @@
% (and chances for successful placing of all labels are much higher).
%
% \subsubsection{If \texttt{\textbackslash pagenumbering\{\ldots \}} is used more than once}
-% Everything from the preceding subsubsections applies and additionally the following:\\
+% Everything from the preceding subsubsections applies and additionally the following:\bigskip
%
% 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!
@@ -645,12 +652,13 @@
% \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).\\
+% total number of pages).\bigskip
+%
% \DescribeMacro{LastPages}
% 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}.\\
+% \texttt{VeryLastPage}.\pagebreak
%
% \DescribeMacro{pagesLTS.arabic}
% \DescribeMacro{pagesLTS.roman}
@@ -658,16 +666,20 @@
% \DescribeMacro{pagesLTS.alph}
% \DescribeMacro{pagesLTS.Alph}
% \DescribeMacro{pagesLTS.fnsymbol}
+% \DescribeMacro{pagesLTS.silly}
+% \DescribeMacro{pagesLTS.gobble}
% 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,\mbox{\ldots .}\\
+% Alph, fnsymbol, silly, gobble,\mbox{\ldots .}\newline
% Additional page numbering schemes are unknown for \xpackage{pageslts},
-% see \autoref{sec:unknown} \nameref{sec:unknown}.\\
+% see \autoref{sec:unknown} \nameref{sec:unknown}.
+% \vspace{5\baselineskip}
%
% \subsubsection{If the same \texttt{\textbackslash pagenumbering\{\ldots \}}\ %
% scheme is used more than once\label{sss:twice}}
-% Everything from the preceding subsubsections applies and additionally the following:\\
+% Everything from the preceding subsubsections applies and additionally the following:\bigskip
+%
% \DescribeMacro{pagecontinue}
% 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
@@ -674,7 +686,7 @@
% 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.\\
+% It is even possible to use a~page numbering scheme more than twice.\bigskip
%
% \phantomsection
% \DescribeMacro{pagesLTS. page numbering scheme . number }\label{pagesLTS.pnscheme.nr}
@@ -681,46 +693,49 @@
% 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.\\
+% where |<number>| is the occurrence of the page numbering scheme.\bigskip
%
-% 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}}| \\
+% If you want to refer to the first page of a page numbering scheme,
+% just place a label there, e.\,g.
+% \begin{verbatim}
+%\pagenumbering{Roman}
+%\section{Section title\label{RomanSection}}
+%\end{verbatim}
% (You know where you use |\pagenumbering{...}| and this is the \xpackage{pageslts} package,
-% not the \xpackage{firstpage} package).\\
+% not the \xpackage{firstpage} package).\bigskip
%
% When you want to give the number of pages of each \textquotedblleft sector\textquotedblright\ of
-% the page numbering scheme, you can use\\
+% the page numbering scheme, you can use\newline
% \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}|.\\
+% |\lastpages{<page numbering scheme>}{<number>}|,\newline
+% where |<page numbering scheme>| is e.\,g.~Roman, arabic,\ldots\ and |<number>| the
+% \textquotedblleft sector\textquotedblright{} number, e.\,g.~|\lastpages{Roman}{2}|.\newline
% (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:\\
+% Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}\newline
+% There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
% \lastpages{Roman}{1}~pages in the first Roman sector
-% (\pageref{Roman} -- \lastpageref{pagesLTS.Roman.1}),\\
+% (\pageref{Roman} -- \lastpageref{pagesLTS.Roman.1}),\newline
% \lastpages{Roman}{2}~pages in the second Roman sector
-% (\pageref{Roman2} -- \lastpageref{pagesLTS.Roman.2}), and\\
+% (\pageref{Roman2} -- \lastpageref{pagesLTS.Roman.2}), and\newline
% \lastpages{Roman}{3}~pages in the third Roman sector
-% (\pageref{Roman3} -- \lastpageref{pagesLTS.Roman.3}.\\
-% \end{verbatim}
-% to get
-% \begin{quote}
-% Last Roman page (pagesLTS.Roman): VIII\\
-% There are 8 pages with Roman numbers:\\
-% 3 pages in the first Roman sector (I -- III),\\
-% 4 pages in the second Roman sector (IV -- VII), and\\
-% 3 pages in the third Roman sector (VIII -- X).\\
+% (\pageref{Roman3} -- \lastpageref{pagesLTS.Roman.3}.
+% \end{verbatim}%
+% to get%
+% \begin{quote}%
+% Last Roman page (pagesLTS.Roman): VIII\newline
+% There are 8 pages with Roman numbers:\newline
+% 3 pages in the first Roman sector (I -- III),\newline
+% 4 pages in the second Roman sector (IV -- VII), and\newline
+% 3 pages in the third Roman sector (VIII -- X).
% \end{quote}
-% (see e.\,g.~the compiled \textsf{pageslts-example} file).\\
+% (see e.\,g.~the compiled \textsf{pageslts-example} file).\bigskip
%
% 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.\\
+% or for another page numbering scheme) want to reset the page number,
+% just say |\setcounter{page}{1}| there.\bigskip
%
% In your document the code
% \begin{verbatim}
@@ -732,15 +747,15 @@
% \renewcommand{\@oddfoot}{\@evenfoot}
% \makeatother
%\end{verbatim}
-% creates footers like\\
+% creates footers like\bigskip
%
-% \textquotedblleft\mbox{\textsl{DRAFT \today}\hspace{1cm}page V (5) of VII + 35 = 42 pages}\textquotedblright\\
+% \textquotedblleft\mbox{\textsl{DRAFT \today}\hspace{1cm}page V (5) of VII + 35 = 42 pages}\textquotedblright\bigskip
%
-% or\\
+% or\bigskip
%
-% \textquotedblleft\mbox{\textsl{DRAFT \today}\hspace{1cm}page 10 (17) of VII + 35 = 42 pages}\textquotedblright\\
+% \textquotedblleft\mbox{\textsl{DRAFT \today}\hspace{1cm}page 10 (17) of VII + 35 = 42 pages}\textquotedblright\bigskip
%
-% in the compiled document (cf.~the \texttt{pageslts-example} file).\\
+% in the compiled document (cf.~the \texttt{pageslts-example} file).\bigskip
%
% Code like
% \begin{verbatim}
@@ -751,10 +766,10 @@
% \begin{quote}
% This book has X+85 pages (95 pages in total).
% \end{quote}
-% (when using the \xpackage{hyperref} package, the references are even hyperlinked).\\
+% (when using the \xpackage{hyperref} package, the references are even hyperlinked).\bigskip
%
% If |\addtocounter{page}{...}| or |\setcounter{page}{...}| have been used, the local version of
-% \texttt{CurrentPage} can be used, |\theCurrentPageLocal|, see subsection~\ref{CurrentPageLocal}.\\
+% \texttt{CurrentPage} can be used, |\theCurrentPageLocal|, see subsection~\ref{CurrentPageLocal}.\bigskip
%
% \subsection{\xpackage{papermas}(s) package\label{ss:papermas}}
% There is a kind of an add-on to this package, the \xpackage{papermas} package,
@@ -785,9 +800,9 @@
% 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\\
+% a~label named |LastPage| is provided. Thus |\usepackage{lastpage}| can be replaced by\newline
% |\usepackage[pagecontinue=false,alphMult=0,AlphMulti=0,fnsymbolmult=false,romanMult=false,RomanMulti=false%|%
-% \linebreak{}| ]{pageslts}|,\\
+% \linebreak{}| ]{pageslts}|,\newline
% if the behaviour of the \xpackage{lastpage} package should be simulated.
% It is also possible to load both packages (if recent versions are used).
%
@@ -803,7 +818,7 @@
% |\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).\\
+% you should check everything double (at least).\newline
% 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
@@ -833,7 +848,7 @@
% \texttt{MAX} = \texttt{2147483647}
% \end{quote}
% \textquotedblright\ (\xpackage{alphalph} package manual, 2019/12/09, v2.6,
-% first table, p.~2).\\
+% first table, p.~2).\newline
% Please see subsubsections~\ref{sss:alphalph} and \ref{sss:romanMult} for
% instructions how to overcome these limitations -- except \mbox{$\pm$MAX:}
% When this is exceeded via
@@ -850,7 +865,7 @@
% 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.\\
+% give $-2147483647$, $-2147483646$ and so on.\newline
% 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).
@@ -857,40 +872,71 @@
% \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 your system has,
-% here is a list of some possible 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
+% your system has (e.\,g.~\TeX, \LaTeX2e, $\varepsilon$-\TeX{}, \LaTeX-format as recent
+% as 2024-06-01 or newer), here is a list of some possible alternatives:
% \begin{description}
-% \item[-]\DescribeMacro{LaTeX kernel}
-% The recent \LaTeX{} kernel already writes something like |\gdef \@abspage at 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{LaTeX-kernel}
+% The number of pages is nowadays available via |\@abspage at last|,
+% |\thetotalpages|, and |\PreviousTotalPages| from the kernel,
+% but when more than one page numbering scheme is used
+% (for example pages I~to X and then 1~to 10, thus number of pages
+% \hbox{\textquotedblleft 20\textquotedblright ,} but name of the last page
+% \hbox{\textquotedblleft 10\textquotedblright ),}
+% or when or the fnsymbol page numbering scheme is used, or another package
+% has output after this package, or the page numbers exceed a certain range,
+% there might be issues. (Is the total number of pages wanted? Or is the name
+% of the last page sought?)\newline
+% |\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{}.}\\
+% It includes versions for older \LaTeX-kernels and even for \mbox{\LaTeX2.09{}.}\newline
% \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}).\\
+% \texttt{LastPages}, but |\AtEndDocument| instead of hook |enddocument/afterlastpage|.
+% 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) (which can be achieved also with the \xpackage{papermas} package
+% (see \autoref{ss:papermas}).\newline
% \url{https://ctan.org/pkg/totpages}
%
+% \item[-]\DescribeMacro{totalcount}
+% The \xpackage{totalcount} package provides |\totalpages|.
+% If there are only arabic page numbers consecutively running from 1 to the last page,
+% this works. But for example
+%
+% \begin{quote}
+%\begin{verbatim}
+%\documentclass{article}
+%\usepackage[page]{totalcount}
+%\pagenumbering{Roman}
+%\begin{document}
+%\addtocounter{page}{49}
+%Page \thepage{} of \totalpages
+%\end{document}
+%\end{verbatim}
+% \end{quote}
+%
+% prints \textquotedblleft Page L of 50\textquotedblright,
+% where the number of pages is one (and no hyperlink is provided to the
+% last page even if \xpackage{hyperref} is used).\newline
+% \url{https://ctan.org/pkg/totalcount}
+%
% \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|.\\
+% by |\addtocounter|.\newline
% \url{https://ctan.org/pkg/totcount}
%
% \item[-]\DescribeMacro{nofm}
@@ -897,11 +943,11 @@
% \textquotedblleft There is a package \xpackage{nofm.sty} available, but some versions
% of it are defective, and most don't work with \xpackage{fancyhdr} because they take over
% the complete page layout.\textquotedblright{} (\textsc{Piet van Oostrum}:
-% Page layout in \LaTeX , March~2, 2004, section~16; fancyhdr.pdf)\\
-% \xpackage{nofm} as of 1991/02/25 (without version number), available at\\
-% \url{https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},\\
-% does not work with e.\,g. \xpackage{hyperref}, redefines |\enddocument|
-% as well as |\@oddhead|, |\@evenhead|, |\@oddfoot|, and |\@evenfoot|.\\
+% Page layout in \LaTeX , March~2, 2004, section~16; fancyhdr.pdf)\newline
+% \xpackage{nofm} as of 1991/02/25 (without version number), available at\newline
+% \url{https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},\newline
+% does not work with e.\,g.~\xpackage{hyperref}, redefines |\enddocument|
+% as well as |\@oddhead|, |\@evenhead|, |\@oddfoot|, and |\@evenfoot|.\newline
% If you know the (\url{https://CTAN.org}) location of a
% \textbf{working}~(!) version, please send me an e-mail, thanks!
%
@@ -910,19 +956,23 @@
% 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.\\
+% from the current package version.\newline
% \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).\\
+% system\textquotedblright\ (package manual, 2023-09-14).\newline
% \url{https://ctan.org/pkg/zref}
+%
+% \item[-]\DescribeMacro{memoir}
+% The \xpackage{memoir} \emph{class} provides |\thelastpage| (page number printed
+% on last page) and |\thelastsheet| (number of pages).
% \end{description}
%
% \bigskip
%
% \noindent (You programmed or found another alternative,
-% which is available at \url{https://CTAN.org}?\\
+% which is available at \url{https://CTAN.org}?\newline
% 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.)
% \newpage
@@ -934,23 +984,24 @@
\usepackage{lipsum}[2021-09-20]% v2.7
\usepackage[draft]{showkeys}[2024/05/23]% v3.21
%% Use final instead of draft to hide the keys. %%
-\PassOptionsToPackage{hyperref}{pdfpagelabels=true,hyperindex=false}
-\usepackage{hyperref}[2024-10-30]% v7.01k
-\hypersetup{%
- extension=pdf,%
+\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-10-30]% v7.01k
+\makeatletter
+\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX
+ \hypersetup{extension=pdf,%
plainpages=false,%
pdflang={en},%
pdftitle={pageslts package example},%
- pdfauthor={Hans-Martin Muench},%
+ pdfauthor={H.-Martin Muench},%
pdfsubject={Example for the pageslts package},%
- pdfkeywords={LaTeX, pageslts, H.-Martin Muench},%
+ pdfkeywords={LaTeX, pageslts},%
pdfview=Fit,%
pdfstartview=Fit,%
pdfpagelayout=SinglePage,%
bookmarksopen=true%
-}
+}}{\usepackage{url}[2013/09/16]}% v3.4
+\makeatother
\usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,%
- romanMult=true,RomanMulti=true]{pageslts}[2024-11-20]% v2.0a
+ romanMult=true,RomanMulti=true]{pageslts}[2024-12-07]% v2.0b
%% These are the default options. %%
\makeatletter
@@ -957,10 +1008,23 @@
\renewcommand{\@evenfoot}%
{Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
\lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + %
- \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + %
+ \ifpagesLTS at pagecontinue%
+ \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) %
+ \else%
+ \{\lastpageref{pagesLTS.Roman.1}%
+ +\lastpageref{pagesLTS.Roman.2}%
+ +\lastpageref{pagesLTS.Roman.3}%
+ (\lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax)\} %
+ \fi + %
\lastpageref{pagesLTS.arabic}(\lastpageref{pagesLTS.arabic.local}) + %
\lastpageref{pagesLTS.fnsymbol}(\lastpageref{pagesLTS.fnsymbol.local}) + %
\lastpageref{pagesLTS.alph}(\lastpageref{pagesLTS.alph.local}) + %
+ \lastpageref{pagesLTS.gobble}(\lastpageref{pagesLTS.gobble.local}) + %
\lastpageref{pagesLTS.Alph}(\lastpageref{pagesLTS.Alph.local}) = %
\lastpageref{LastPages} pages.%
}
@@ -968,373 +1032,470 @@
\def\pagesLTSexampleArabic{3}
\def\pagesLTSexamplealph{23}
\makeatother
-
+\setlength{\parindent}{0pt}
\listfiles
-
-% \end{macrocode}
-% \newpage
-% \begin{macrocode}
\begin{document}
\pagenumbering{roman}
%% Note the first \pagenumbering immediately behind \begin{document}! %%
%%\addtocounter{page}{-2} %%
-
\section*{Example for pageslts}
\addcontentsline{toc}{section}{Example for pageslts}
\markboth{Example for pageslts}{Example for pageslts}
-This example demonstrates the most common uses of package\\
-\textsf{pageslts}, v2.0a as of 2024-11-20 (HMM);\\
-\url{https://ctan.org/pkg/pageslts}.\\
+This example demonstrates the most common uses of package\newline
+\textsf{pageslts}, v2.0b as of 2024-12-07 (HMM);\newline
+\url{https://ctan.org/pkg/pageslts}.\bigskip
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\linebreak ones). -- For more details please see the documentation!\\
+(the default\linebreak ones).~-- For more details please see the documentation!\bigskip
\label{keys} To hide the \pageref{keys}{\qquad } use option
\texttt{final} instead of \texttt{draft} with the \textsf{showkeys}
package (or remove the package call from the preamble of
-this document).\\
+this document).\bigskip
\textbf{Hyperlinks or not:} If the \textsf{hyperref} package is loaded,
-the references are also hyperlinked:\\
+the references are also hyperlinked:\bigskip
\smallskip
Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
\lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + %
-\lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + %
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) %
+\else%
+ \{\lastpageref{pagesLTS.Roman.1}%
+ +\lastpageref{pagesLTS.Roman.2}%
+ +\lastpageref{pagesLTS.Roman.3}%
+ (\lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax)\} %
+\fi + %
+\makeatother%
\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.\\
+\lastpageref{LastPages} pages.\bigskip
If the \textsf{hyperref} package is loaded, but the hyperlinks of the
references shall be suppressed, \verb|\pageref*{...}|
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}) + %
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ \lastpageref*{pagesLTS.Roman}(\lastpageref*{pagesLTS.Roman.local}) %
+\else%
+ \{\lastpageref*{pagesLTS.Roman.1}%
+ +\lastpageref*{pagesLTS.Roman.2}%
+ +\lastpageref*{pagesLTS.Roman.3}%
+ (\lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax)\} %
+\fi + %
+\makeatother%
\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.\\
+\lastpageref*{LastPages} pages.\bigskip
-
\textbf{Trademarks} appear throughout this example 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.\\
+usage is to the benefit of the trademark owner.\bigskip
-\textbf{Tip}: Use \textit{logical page numbers}
-for the display of the pdf (in Adobe Reader Continuos Release 2024.004.20272:\\
+\textbf{Tip}: Use \textit{logical page numbers} for the display of the pdf
+(in Adobe Reader Continuos Release 2024.004.20272:\newline
Edit $>$ Preferences $>$ Categories: Page Display $>$
-Page Content and Information: Use logical page numbers)!\\
+Page Content and Information: Use logical page numbers)!\bigskip
You want negative page numbers? Not only arabic, but even roman,
-Roman, alph, Alph or fnsymbol ones? No problem, e.\,g. just give a\\
+Roman, alph, Alph or fnsymbol ones? No problem, e.\,g.~just give a\newline
\verb|\addtocounter{page}{|-\textit{some number}\verb|}| in the
source code of this example file (or uncomment the prepared line)!
-
-\pagebreak
-
+\newpage
\tableofcontents
-
-\newpage
-
-\pagenumbering{roman}
+\newpage%
+\makeatletter%
+\def\pagesLTS at tmpC{roman}%
+\ifx\pagesLTS at pnc\pagesLTS at tmpC%
+\else\pagenumbering{roman}%
%% in case the page numbering is changed before,
%% otherwise pagesLTS.current.local.roman on this page would be undefined
-
+\fi%
+\makeatother%
\section{roman}
-\noindent (\texttt{roman} page numbering was started before,
+(\texttt{roman} page numbering was started before,
because the page numbering scheme was needed to start at
-the first page, of course.)\\
+the first page, of course.)\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first\linebreak page):~\theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first\linebreak page):~\theCurrentPage \bigskip
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
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)):
+\theCurrentPageLocal\newline
You can get also this in other formats, too:
\roman{pagesLTS.current.local.roman}, \Roman{pagesLTS.current.local.roman},
\arabic{pagesLTS.current.local.roman}, \fnsymbol{pagesLTS.current.local.roman},
\alph{pagesLTS.current.local.roman}, \Alph{pagesLTS.current.local.roman},
but probably it only makes sense if page numbering scheme and format are
-the same, e.\,g.\\
-\verb|\Roman{pagesLTS.current.local.Roman}|\\
+the same, e.\,g.\newline
+\verb|\Roman{pagesLTS.current.local.Roman}|\newline
or \verb|\Alph{pagesLTS.current.local.Alph}|. \verb|\arabic{...}| could
make sense even if combined with another page numbering scheme.
-And this is exactly what \verb|\theCurrentPageLocal| does:\\
-\nolinebreak{\verb|\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS at pnc}}|.}\\
+And this is exactly what \verb|\theCurrentPageLocal| does:\newline
+\nolinebreak{\verb|\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS at pnc}}|.}\bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
When the option \texttt{pagecontinue=false} is used with the
\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
-point to the same page as before, but this will have a lower number.\\
-The \verb|\lastpageref{pagesLTS.Roman.local}| will not change,
-because the number of pages does not change (only the page numbers).\\
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\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.)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\newline
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
-
-\lipsum[1-3]
-
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
\newpage
-
\pagenumbering{Roman}
-
\section{Roman\label{Roman}}
\subsection{Common Roman page numbering}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage\bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage\bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.
+\pagebreak
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
-\lipsum[1-4]
-
\newpage
-
\subsection{Last page of first Roman sector}
\verb|\lastpageref{pagesLTS.Roman}| does \textbf{not}
-refer to this page (but there: \lastpageref{pagesLTS.Roman}),
-because the option \texttt{pagecontinue=true}
-was chosen. When a reference to this page is wanted,\\
-\verb|\lastpageref{pagesLTS.Roman.1}| can be used: \lastpageref{pagesLTS.Roman.1}.\\
+refer to this page (but there: \lastpageref{pagesLTS.Roman}).
+When a reference to this page is wanted,\newline
+\verb|\lastpageref{pagesLTS.Roman.1}| can be used: \lastpageref{pagesLTS.Roman.1}.\bigskip
-\bigskip
There are \lastpages{Roman}{1}~pages (\verb|\lastpages{Roman}{1}|)
-in this first Roman sector.\\
+in this first Roman sector.\newline
The Roman page numbering scheme is continued later in section~\ref{Roman2})!
\newpage
-
-% \end{macrocode}
-% \newpage
-% \begin{macrocode}
\pagenumbering{arabic}
-
\section{arabic}
-
\subsection{Standard page numbering}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-% \end{macrocode}
-% \newpage
-% \begin{macrocode}
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.
+\pagebreak
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
-\lipsum[1-4]
\newpage
-
+\thispagestyle{empty}
\subsection[Empty page style]{Also an empty page style is no problem %
for the current or total page count}
\bigskip
-\thispagestyle{empty}
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-% \end{macrocode}
-% \newpage
-% \begin{macrocode}
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
-
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\newline
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.
+\pagebreak
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
-\lipsum[1-4]
-
\newpage
-
\subsection[addtocounter, setcounter]{Neither %
\texttt{\textbackslash addtocounter\{page\}} nor %
\texttt{\textbackslash setcounter\{page\}} is a problem for the %
@@ -1341,27 +1502,23 @@
current or total page numbers}
(Here is an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}|
-in the source code.)\\
-\addtocounter{page}{\pagesLTSexampleArabic}
+in the source code.)
+\addtocounter{page}{\pagesLTSexampleArabic}\bigskip
-\noindent The page (from \verb|\thepage| command): \thepage \\
+The page (from \verb|\thepage| command): \thepage \bigskip
-\noindent Current page (from \verb|\theCurrentPage|\ %
-command), i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (from \verb|\theCurrentPage|\ %
+command), i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (from \verb|\theCurrentPageLocal|\ %
-command), i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal\\
+CurrentPageLocal (from \verb|\theCurrentPageLocal|\ %
+command), i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last page's number (LastPages): \lastpageref{LastPages}{\hskip3em }
-(= total number of pages)\\
+Last page's number (LastPages): \lastpageref{LastPages}{\hskip3em }
+(= total number of pages)
-\lipsum[1-7]
-
\newpage
-
\pagenumbering{fnsymbol}
-
\section{fnsymbol}
Without option \texttt{fnsymbolmult=true} of the \textsf{pageslts} package
@@ -1389,131 +1546,265 @@
\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
-\lastpageref{pagesLTS.0}\\
+For testing purposes, try:
-\noindent The page (\verb|\thepage|): \thepage \\
+\begin{small}
+\begin{verbatim}
+\documentclass{article}
+\usepackage[plainpages=false,pageanchor=true,pdfpagelabels=true]{hyperref}
+\usepackage{pageslts}
+\pagenumbering{fnsymbol}
+\begin{document}
+First page.\newpage
+\verb|\lastpageref{pagesLTS.0} | \lastpageref{pagesLTS.0} \par
+\verb|\lastpageref{pagesLTS.0.local} | \lastpageref{pagesLTS.0.local} \par
+\verb|\lastpageref{LastPage} | \lastpageref{LastPage} \par
+\verb|\lastpageref{VeryLastPage} | \lastpageref{VeryLastPage} \par
+\verb|\lastpageref{pagesLTS.fnsymbol.1} | \lastpageref{pagesLTS.fnsymbol.1} \par
+\verb|\lastpageref{pagesLTS.fnsymbol.1.local} | \lastpageref{pagesLTS.fnsymbol.1.local} \par
+\verb|\lastpageref{pagesLTS.fnsymbol} | \lastpageref{pagesLTS.fnsymbol} \par
+\verb|\lastpageref{pagesLTS.fnsymbol.local} | \lastpageref{pagesLTS.fnsymbol.local} \par
+\verb|\lastpageref{LastPages} | \lastpageref{LastPages} \par
+\verb|\pagesLTSlastpage | \pagesLTSlastpage
+\newpage
+Last page.
+\end{document}
+\end{verbatim}
+\end{small}
+\newpage
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+\lastpageref{pagesLTS.0}\bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
+
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
+
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)\bigskip
-\lipsum[1-60]
+\lipsum[1-58]
\newpage
-
\pagenumbering{Roman}
-
\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},
+The page number starts with \textquotedblleft I\textquotedblright{} again for
+option just \texttt{pagecontinue=false}, but for option \texttt{pagecontinue=true},
or with option just \texttt{pagecontinue}, or even just
-\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}).
+\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}
+the page numbers are continued.
+
This package remembered the
-\arabic{pagesLTS.double.Roman}-1,
+$\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 .\\
+\textquotedblleft\Roman{pagesLTS.double.Roman}\textquotedblright{} in
+case of option \texttt{pagecontinue}.\newline
If you want to start with \textquotedblleft I\textquotedblright{} all
over again, you will have two pages with the same name,
but nevertheless you can do this by using option \texttt{pagecontinue=false}
-or a \verb|\setcounter{page}{1}|\ here (not demonstrated in this example file).\\
+or a \verb|\setcounter{page}{1}|\ here (not demonstrated in this example file).\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+There was the question: \textquotedblleft With option \verb|pagecontinue=false|,
+how do I get the number of pages in each number block (e.\,g.~in the first Roman section,
+second Roman section, third Roman section) with just one command?\textquotedblright
+\begin{verbatim}
+\makeatletter%
+\theCurrentPageLocal~of~\lastpageref*{%
+pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local}%
+\makeatother%
+\end{verbatim}
+provides this. Here: %
+\makeatletter%
+\theCurrentPageLocal~of~%
+\lastpageref*{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local}\newline%
+\makeatother%
+for \verb|pagecontinue=true| is \verb|4 of 8| (including %
+\makeatletter%
+$\the\numexpr\csname c at pagesLTS.double.Roman\endcsname -1\relax$ %
+from the first Roman section,
+$\the\csname c at pagesLTS.double.Roman\endcsname\relax
+ =\the\numexpr\csname c at pagesLTS.double.Roman\endcsname -1\relax% first section
++1% first page of this second section
+$, $\the\numexpr\csname c at pagesLTS.double.Roman\endcsname -1+%
+\csname c at pagesLTS.Roman.2.local.cnt\endcsname\relax%
+=\the\numexpr\csname c at pagesLTS.double.Roman\endcsname -1\relax+%
+\the\numexpr\csname c at pagesLTS.Roman.2.local.cnt\endcsname\relax$)\newline
+\makeatother%
+and for \verb|pagecontinue=false| is \verb|1 of 5| .\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+\verb|pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local| is:
+\begin{description}
+\item[-] \verb|pagesLTS| just identifies this counter to belong to the pageslts package.
+\item[-] \verb|\pagesLTS at pnc| is the Current Page Numbering scheme, i.\,e.~here it would be \verb|Roman|.
+\item[-] \verb|\arabic{pagesLTS.pnc.\pagesLTS at pnc}| is the value of counter\newline
+ \verb|pagesLTS.pnc.\pagesLTS at pnc| printed in arabic numbers (1, 2, 3, ...) -- see below.
+\item[-] \verb|local|: Local there are 5 pages with Roman numbering in this example, globally there are
+ $3+5+4=12$~pages with Roman numbering in this example, and the local numbers are wanted.
+\end{description}
+The counter \verb|pagesLTS.pnc.\pagesLTS at pnc| gives the number of the\newline
+\verb|\pagesLTS at pnc| page numbering scheme currently used, i.\,e.~we have consecutivly\newpage
+\begin{verbatim}
+pagesLTS.pnc.roman = 1
+pagesLTS.pnc.Roman = 1
+pagesLTS.pnc.arabic = 1
+pagesLTS.pnc.fnsymbol = 1
+pagesLTS.pnc.Roman = 2
+pagesLTS.pnc.alph = 1
+pagesLTS.pnc.Roman = 3
+pagesLTS.pnc.Alph = 1
+\end{verbatim}
+So, \verb|pagesLTS.pnc.Roman| changes from $1$ to $2$ automatically
+when doing the second \verb|\pagenumbering{Roman}|,
+and changes from $2$ to $3$ for the third\newline
+\verb|\pagenumbering{Roman}|.\bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-% \end{macrocode}
-% \newpage
-% \begin{macrocode}
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
+
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
+
+
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
(\verb|\lastpageref{pagesLTS.fnsymbol}| -- never
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+\verb|\pageref{pagesLTS.fnsymbol}|!)\newline
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)\bigskip
\lipsum[1-6]
@@ -1520,78 +1811,110 @@
\newpage
\verb|\lastpageref{pagesLTS.Roman}| does \textbf{not}
-refer to this page (but there: \lastpageref{pagesLTS.Roman}),
-because the option \texttt{pagecontinue=true}
-was chosen. When a reference to this page is wanted,\\
-\verb|\lastpageref{pagesLTS.Roman.2}| can be used: \lastpageref{pagesLTS.Roman.2}.\\
+refer to this page (but there: \lastpageref{pagesLTS.Roman})
+for option \texttt{pagecontinue=true}. When a reference to this page is wanted,\newline
+\verb|\lastpageref{pagesLTS.Roman.2}| can be used: \lastpageref{pagesLTS.Roman.2}.\newline
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
-\bigskip
There are \lastpages{Roman}{2}~pages (\verb|\lastpages{Roman}{2}|) in this
-second Roman sector.\\
+second Roman sector.\newline
The Roman page numbering scheme is continued later in section~\ref{Roman3})!
\newpage
-
\pagenumbering{alph}
-
\section{alph\label{alph}}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-% \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}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
-\lipsum[1-4]
-
\newpage
Without option \texttt{alphMult=ab} of the \textsf{pageslts} (and the help of the
@@ -1606,9 +1929,9 @@
\end{verbatim}
\end{quote}
Now the page numbers are continued aa, ab, ac,\ldots\ (aa, bb, cc,\ldots\ is
-also possible, see the \textsf{pageslts} documentation).\\
-To demonstrate this, we add a\\
-\verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}|\\
+also possible, see the \textsf{pageslts} documentation).\newline
+To demonstrate this, we add a\newline
+\verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}|\newline
in the source code here.
\addtocounter{page}{\pagesLTSexamplealph}
@@ -1618,153 +1941,258 @@
\lipsum[1-18]
\newpage
-
\pagenumbering{Roman}
-
\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 starts with \textquotedblleft I\textquotedblright{} again for
+option just \texttt{pagecontinue=false}, but for option \texttt{pagecontinue=true},
or with option just \texttt{pagecontinue}, or even just
-\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}).
+\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}
+the page numbers are continued.
+
This package remembered the
-\arabic{pagesLTS.double.Roman}-1,
+$\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 .\\
+already done in%
+\begin{description}
+\item[-] for \texttt{pagecontinue=false}: the preceding Roman sector,
+\item[-] for \texttt{pagecontinue=true}: all Roman sectors,
+\end{description}%
+and therefore continues with the appropriate page in case of option \texttt{pagecontinue}.\newline
If you want to start with \textquotedblleft I\textquotedblright{} all
-over again, you will have (at least) two pages with the same name,
-but nevertheless you can do this by using option
-\texttt{pagecontinue=false} instead of \texttt{pagecontinue=true}
-(not demonstrated here).\\
+over again, you will have two pages with the same name,
+but nevertheless you can do this by using option \texttt{pagecontinue=false}
+or a \verb|\setcounter{page}{1}|\ here (not demonstrated in this example file).\bigskip
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
-
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
+\newpage
\lipsum[1-3]
-
\newpage
-\lastpageref{pagesLTS.Roman}
-(\verb|\lastpageref{pagesLTS.Roman}|)
-\textbf{does} refers to this page, because the option
-\texttt{pagecontinue=true} was chosen. Also\\
-\verb|\lastpageref{pagesLTS.Roman.3}| can be used: \lastpageref{pagesLTS.Roman.3}.\\
+\lastpageref{pagesLTS.Roman} (\verb|\lastpageref{pagesLTS.Roman}|)
+\textbf{does} refers to this page.\newline
+Also \verb|\lastpageref{pagesLTS.Roman.3}|
+give the right name of the page, but if \verb|pagecontinue=false| was chosen,
+it might point to another page with the same name!
+\lastpageref{pagesLTS.Roman.3}.\bigskip
\bigskip
There are \lastpages{Roman}{3}~pages (\verb|\lastpages{Roman}{3}|) in this
-third Roman sector.\\
+third Roman sector.
\newpage
+\pagenumbering{gobble}
+\section{gobble}
+Well. You can use \verb|gobble| as page numbering scheme. It gobbles the page numbers,
+i.\,e.~there is no page number. Maybe \verb|\thispagestyle{empty}| is more useful?
+Do not expect to be able to make working references to pages without page number,
+and do expect to get
+\begin{verbatim}
+pdfTeX warning (ext4): destination with the same identifier
+(name{page.}) has been already used, duplicate ignored
+<to be read again>
+\end{verbatim}
+
+The page (\verb|\thepage|): \thepage{} (There is a nothing between two spaces there.)\bigskip
+
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
+
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
+
+There are \lastpageref*{pagesLTS.gobble.local} pages with gobbled numbers (i.\,e.~without numbers).
+
+\bigskip
+
+For testing purposes, try:
+
+\begin{small}
+\begin{verbatim}
+\documentclass{article}
+\usepackage[plainpages=false,pageanchor=true,pdfpagelabels=true]{hyperref}
+\usepackage{pageslts}
+\pagenumbering{gobble}
+\begin{document}
+First page.\newpage
+\verb|\lastpageref{pagesLTS.0} | \lastpageref{pagesLTS.0} \par
+\verb|\lastpageref{pagesLTS.0.local} | \lastpageref{pagesLTS.0.local} \par
+\verb|\lastpageref{LastPage} | \lastpageref{LastPage} \par
+\verb|\lastpageref{VeryLastPage} | \lastpageref{VeryLastPage} \par
+\verb|\lastpageref{pagesLTS.gobble.1} | \lastpageref{pagesLTS.gobble.1} \par
+\verb|\lastpageref{pagesLTS.gobble.1.local} | \lastpageref{pagesLTS.gobble.1.local} \par
+\verb|\lastpageref{pagesLTS.gobble} | \lastpageref{pagesLTS.gobble} \par
+\verb|\lastpageref{pagesLTS.gobble.local} | \lastpageref{pagesLTS.gobble.local} \par
+\verb|\lastpageref{LastPages} | \lastpageref{LastPages} \par
+\verb|\pagesLTSlastpage | \pagesLTSlastpage
+\newpage
+Last page.
+\end{document}
+\end{verbatim}
+\end{small}
+\newpage
+
\pagenumbering{Alph}
-
\section{Alph}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
-(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\newline
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
-(=~total number of pages)\\
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+(=~total number of pages)
+\newpage
-\lipsum[1-3]
-
-\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
@@ -1777,65 +2205,142 @@
\end{verbatim}
\end{quote}
Now the page numbers are continued AA, AB, AC,\ldots\ (AA, BB, CC,\ldots\ is
-also possible, see the \textsf{pageslts} documentation).\\
+also possible, see the \textsf{pageslts} documentation).\newline
This is not demonstrated here, but see section~\ref{alph}.
+\newpage
+\section{silly}
+The sillypage package, \url{https://ctan.org/pkg/sillypage}, provides the
+page\-numbering scheme \verb|silly|, which is not demonstrated here
+but works with the pageslts package, i.\,e.~the references
+all show the right (page) number and link to the right page.\bigskip
+
+This is \textbf{not} demonstrated here (discussing gobbled page numbers
+is silly enough), but for testing purposes, try:
+
+\begin{small}
+\begin{verbatim}
+\documentclass{article}
+\usepackage[plainpages=false,pageanchor=true,pdfpagelabels=true]{hyperref}
+\usepackage{pageslts}
+\usepackage{sillypage}
+\pagenumbering{silly}
+\begin{document}
+First page.\newpage
+\verb|\lastpageref{pagesLTS.0} | \lastpageref{pagesLTS.0} \par
+\verb|\lastpageref{pagesLTS.0.local} | \lastpageref{pagesLTS.0.local} \par
+\verb|\lastpageref{LastPage} | \lastpageref{LastPage} \par
+\verb|\lastpageref{VeryLastPage} | \lastpageref{VeryLastPage} \par
+\verb|\lastpageref{pagesLTS.silly.1} | \lastpageref{pagesLTS.silly.1} \par
+\verb|\lastpageref{pagesLTS.silly.1.local} | \lastpageref{pagesLTS.silly.1.local} \par
+\verb|\lastpageref{pagesLTS.silly} | \lastpageref{pagesLTS.silly} \par
+\verb|\lastpageref{pagesLTS.silly.local} | \lastpageref{pagesLTS.silly.local} \par
+\verb|\lastpageref{LastPages} | \lastpageref{LastPages} \par
+\verb|\pagesLTSlastpage | \pagesLTSlastpage
\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage\newpage
+Page \theCurrentPage : Last page.
+\end{document}
+\end{verbatim}
+\end{small}
+\newpage
\section{The End}
-\noindent First page (\verb|\lastpageref{pagesLTS.0}|):
- \lastpageref{pagesLTS.0}\\
+First page (\verb|\lastpageref{pagesLTS.0}|):
+ \lastpageref{pagesLTS.0}\bigskip
-\noindent The page (\verb|\thepage|): \thepage \\
+The page (\verb|\thepage|): \thepage \bigskip
-\noindent Current page (\verb|\theCurrentPage|),
-i.\,e.\ counted continuously from the first page): \theCurrentPage \\
+Current page (\verb|\theCurrentPage|),
+i.\,e.~counted continuously from the first page): \theCurrentPage \bigskip
-\noindent CurrentPageLocal (\verb|\theCurrentPageLocal|),
-i.\,e.\ counted continuously from the first page of the
-current page numbering scheme): \theCurrentPageLocal \\
+CurrentPageLocal (\verb|\theCurrentPageLocal|),
+i.\,e.~counted continuously from the first page of the
+current page numbering scheme (if option pagecontinue=false: sector)): \theCurrentPageLocal \bigskip
-% \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.)\\
+Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em }
+(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\bigskip
-\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }
-(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\
+Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em }%
+\makeatletter%
+\ifpagesLTS at pagecontinue%
+ (There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\newline
+\else%
+ (There are %
+ \lastpages{Roman}{1}+\lastpages{Roman}{2}+\lastpages{Roman}{3}=%
+ \the\numexpr%
+ \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+ \relax~pages with Roman numbers:\newline
+\fi%
+\makeatother%
\lastpages{Roman}{1}~pages in the first Roman sector
-(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\
+(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\newline
\lastpages{Roman}{2}~pages in the second Roman sector
-(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\
+(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\newline
\lastpages{Roman}{3}~pages in the third Roman sector
-(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\
+(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).)\bigskip
-\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em }
+When the option \texttt{pagecontinue=false} is used with the
+\textsf{pageslts} package, the \verb|\lastpageref{pagesLTS.Roman}| will
+point to the same page as before, but this will have a lower number.
+And if that page number was also present in a preceding sector,
+the link will go to that page. (Several pages with the same number\ldots)\newline
+The \verb|\lastpageref{pagesLTS.Roman.local}| will refer only to the number
+of pages in the last sector. To get the total number of Roman pages, %
+\begin{verbatim}
+\the\numexpr \csname c at pagesLTS.Roman.1.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.2.local.cnt\endcsname%
+ +\csname c at pagesLTS.Roman.3.local.cnt\endcsname%
+\relax%
+\end{verbatim}%
+would be necessary.\bigskip
+
+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.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexampleArabic\verb|}| was used.)\bigskip
-\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\\
-(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\\
-\verb|\pageref{pagesLTS.fnsymbol}|!)\\
+Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol}\newline
+(better \verb|\lastpageref{pagesLTS.fnsymbol}| than just\newline
+\verb|\pageref{pagesLTS.fnsymbol}|!)\bigskip
-(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\
+(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\bigskip
-\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
+Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em }
(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers,
-because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\\
+because an \verb|\addtocounter{page}{|\pagesLTSexamplealph\verb|}| was used.)\bigskip
-\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
-(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\
+Last gobble page (pagesLTS.gobble: \lastpageref{pagesLTS.gobble}{\hskip4em }
+Yes, there is neither page number nor link, because everything got gobbled.
+(There is \lastpageref*{pagesLTS.gobble.local} page with gobbled number (i.\,e.~without number).)\bigskip
-\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\
+Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em }
+(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\bigskip
-\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\
+Silly page numbers are possible but were not demonstrated in this example.
+\newpage
+
+Last page's \textit{name} (LastPage): \lastpageref{LastPage}\bigskip
+
+Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\newline
(\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.)\\
+\verb|\AddToHook{enddocument/afterlastpage}| instead of formerly\newline
+\verb|\AtEndDocument| and \verb|\AfterLastShipout|, which were different.)\bigskip
-\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
+Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
(=~total number of pages)
\end{document}
%</example>
@@ -1845,7 +2350,7 @@
%
% \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.)\\
+% for printing the documentation in landscape format instead of portrait.)\bigskip
%
% 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.
@@ -1856,7 +2361,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2024-06-01]
-\ProvidesPackage{pageslts}[2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)]
+\ProvidesPackage{pageslts}[2024-12-07 v2.0b Refers to special pages' numbers/names (HMM)]
% \end{macrocode}
%
@@ -1863,7 +2368,7 @@
% A short description of the \xpackage{pageslts} package:
%
% \begin{macrocode}
-%% Allows for things like\\
+%% Allows for things like\par
%% |Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
%% \lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + %
%% \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + %
@@ -1871,40 +2376,48 @@
%% \lastpageref{pagesLTS.fnsymbol}(\lastpageref{pagesLTS.fnsymbol.local}) + %
%% \lastpageref{pagesLTS.alph}(\lastpageref{pagesLTS.alph.local}) + %
%% \lastpageref{pagesLTS.Alph}(\lastpageref{pagesLTS.Alph.local}) = %
-%% \lastpageref{LastPages} pages.|\\
-%% to get\\
+%% \lastpageref{LastPages} pages.|\par
+%% to get\par
%% 'Page d (57; local: 4) of ii(2) + XX(20) + *(1) + 30(30) + e(5) + C(3) = 61 pages.'.
% \end{macrocode}
%
-% 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).
+% For the handling of the options we use the kernel commands:
%
% \begin{macrocode}
-\RequirePackage{undolabl}[2023-02-14]
-% \end{macrocode}
-%
-% For the handling of the options we use the
-% \xpackage{kvoptions} package (see subsection~\ref{ss:Downloads}):
-%
-% \begin{macrocode}
-\RequirePackage{kvoptions}[2022-06-15]
+\DeclareKeys[pagesLTS]
+ {alphMult .store = \pagesLTS at alphMult ,
+ alphMult .usage = preamble ,
+ AlphMulti .store = \pagesLTS at AlphMulti ,
+ AlphMulti .usage = preamble ,
+ pagecontinue .if = pagesLTS at pagecontinue ,
+ pagecontinue .usage = load ,
+ romanMult .if = pagesLTS at romanMult ,
+ romanMult .usage = load ,
+ RomanMulti .if = pagesLTS at RomanMulti ,
+ RomanMulti .usage = load ,
+ fnsymbolmult .if = pagesLTS at fnsymbolmult ,
+ fnsymbolmult .usage = load ,
+ }
-\SetupKeyvalOptions{family = pagesLTS,prefix = pagesLTS@}
-\DeclareStringOption[ab]{alphMult}
-\DeclareStringOption[AB]{AlphMulti}
-\DeclareBoolOption[true]{romanMult}
-\DeclareBoolOption[true]{RomanMulti}
-\DeclareBoolOption[true]{fnsymbolmult}
-\DeclareBoolOption[true]{pagecontinue}
+\SetKeys[pagesLTS]{alphMult=ab,AlphMulti=AB,pagecontinue=true,romanMult=true,romanMult=true,RomanMulti=true,fnsymbolmult=true}
-\ProcessKeyvalOptions*
+\DeclareUnknownKeyHandler[pagesLTS]{%
+ \PackageError{pageslts}{Unknown option "\CurrentOption"}{%
+ LaTeX has been asked to set an option called\MessageBreak%
+ '#1' \if\relax\detokenize{#2}\relax\else with value '#2'\fi\MessageBreak%
+ but the package "pageslts" has not created an option with this name.\MessageBreak%
+ Try typing <return> to proceed.\MessageBreak%
+ If that doesn't work, type X <return> to quit.%
+ }%
+ }
+\ProcessKeyOptions[pagesLTS]
+
% \end{macrocode}
%
% This package really does not work with an old \LaTeX{} format
-% without hooks, or without \eTeX, or with a \xpackage{pagesLTS} package,
+% without hooks, or without \eTeX, or with a \xpackage{pagesLTS.sty} file,
% 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,
@@ -1911,16 +2424,32 @@
% we request a recent format and do not check for the rest.
%
% \begin{macrocode}
-\@ifl at 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.}
+\@ifl at 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}
%
+% 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}[2024-12-05]
+\IfPackageLoadedTF{undolabl}{\IfPackageAtLeastF{undolabl}{2024-12-05}{%
+ \PackageError{pageslts}{undolabl package version too old}{%
+ Required version: 2024-12-05 v1.0n or newer,\MessageBreak%
+ found version:\space\space\space\space\csname ver at undolabl.sty\endcsname.%
+}}}{\PackageError{pageslts}{undolabl package not loaded}{%
+ The undolabl package is required by pageslts but was not loaded.}%
+ }
+
+% \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.
@@ -1963,7 +2492,6 @@
% \end{macrocode}
%
-% \newpage
% The page number printed in \texttt{alph} or in \texttt{Alph}
% page numbering scheme had to be $>0$ and \mbox{$<27$.}\ %
% Now the \xpackage{alphalph} package allows to extend the
@@ -2001,7 +2529,7 @@
alphMult=\meaning\pagesLTS at alphMult .\MessageBreak%
Only values 'ab', 'bb', and '0' (zero) are valid.\MessageBreak%
Now the default 'ab' is being set.}
- \setkeys{pagesLTS}{alphMult=ab}
+ \SetKeys[pagesLTS]{alphMult=ab}
\fi
\fi
\fi
@@ -2027,7 +2555,7 @@
AlphMulti=\meaning\pagesLTS at AlphMulti .\MessageBreak%
Only values 'AB', 'BB', and '0' (zero) are valid.\MessageBreak%
The default 'AB' is set.}
- \setkeys{pagesLTS}{AlphMulti=AB}
+ \SetKeys[pagesLTS]{AlphMulti=AB}
\fi
\fi
\fi
@@ -2124,15 +2652,18 @@
\def\pagesLTS at fns{fnsymbol}
\def\pagesLTS at alph{alph}
\def\pagesLTS at Alph{Alph}
+\def\pagesLTS at gobble{gobble}
+\def\pagesLTS at silly{silly}
\def\pagesLTS at rerun{0}
-\def\pagesLTS at eso{0}
-\def\pagesLTS at esov{0}
+\def\pagesLTS at esoFs{0}
+\def\pagesLTS at esovFs{0}
+\def\pagesLTS at esoSy{0}
+\def\pagesLTS at esovSy{0}
+\def\pagesLTS at esoGbl{0}
+\def\pagesLTS at esovGbl{0}
\def\lastpageref{\lastpagereftxt}
\def\pagesLTS at undolable{none}
\def\pncmissing{0}
-% \end{macrocode}
-% \newpage
-% \begin{macrocode}
\def\pagesLTS at messageNPN{%
The pageslts package was used, but\MessageBreak%
\string\pagenumbering \MessageBreak%
@@ -2140,25 +2671,17 @@
(maybe earlier or later).\MessageBreak%
Please use \string\pagenumbering \MessageBreak%
(with an argument like arabic, roman, Roman,\MessageBreak%
- fnsymbol, alph, or Alph) at the beginning\MessageBreak%
- of your document! Otherwise your document\MessageBreak%
- will probably compile, but the pageslts\MessageBreak%
- package might not be able to get all labels\MessageBreak%
- for the references to the respective pages\MessageBreak%
- right.\MessageBreak%
+ fnsymbol, alph, Alph, gobble,\MessageBreak%
+ or silly (requiring sillypage package))\MessageBreak%
+ at the beginning of your document!\MessageBreak%
+ Otherwise your document will probably compile,\MessageBreak%
+ but the pageslts package might not be able\MessageBreak%
+ to get all labels for the references\MessageBreak%
+ to the respective pages right.\MessageBreak%
}
% \end{macrocode}
%
-% \begin{macro}{\pagenumbering}
-% To keep the original meaning of |\pagenumbering|:
-%
-% \begin{macrocode}
-\NewCommandCopy{\OrigPagenumbering}{\pagenumbering}
-
-% \end{macrocode}
-% \end{macro}
-%
% Defining some new counters (and doing related things):
%
% \begin{macrocode}
@@ -2205,7 +2728,6 @@
% \end{macrocode}
%
-% \newpage
% \phantomsection
% \begin{macro}{\xroman}\label{xroman}
% When |\roman{...}| is used with a value $<1$, \LaTeX\ just ignores this
@@ -2244,7 +2766,7 @@
% \end{macrocode}
% \end{macro}
-%
+% \newpage
% \begin{macro}{\XRoman}
% |\XRoman| does the same for uppercase |\Roman| numbers.
% |-\uppercase{\romannumeral\number-\arabic{#1}}| cannot be used,
@@ -2252,8 +2774,8 @@
% not |-VII|.\footnote{This does not matter for the print out,
% but for the display of the logical page numbers
% as well as the \xfile{.aux} file.} Therefore we have a look
-% at \LaTeX's own |\@Roman\FOOcounter|,\\
-% |\def\@Roman#1{\expandafter\@slowromancap\romannumeral #1@}|,\\
+% at \LaTeX's own |\@Roman\FOOcounter|,\newline
+% |\def\@Roman#1{\expandafter\@slowromancap\romannumeral #1@}|,\newline
% and use |\@slowromancap|, which is a fully expandable macro,
% to do the trick for this:
% \begin{quote}
@@ -2287,11 +2809,11 @@
% We provide a way to create counters like
% \begin{itemize}
% \item[-] \DescribeMacro{pagesLTS.pnc. page numbering scheme }
-% |pagesLTS.pnc.<page numbering scheme>|, e.\,g. |pagesLTS.pnc.Roman|,
+% |pagesLTS.pnc.<page numbering scheme>|, e.\,g.~|pagesLTS.pnc.Roman|,
% \item[-] \DescribeMacro{pagesLTS.double. page numbering scheme }
-% |pagesLTS.double.<page numbering scheme>|, e.\,g. |pagesLTS.double.Roman|,
+% |pagesLTS.double.<page numbering scheme>|, e.\,g.~|pagesLTS.double.Roman|,
% \item[-] \DescribeMacro{PageCurrentLocal. page numbering scheme }
-% |PageCurrentLocal.<page numbering scheme>|, e.\,g. |PageCurrentLocal.Roman|,
+% |PageCurrentLocal.<page numbering scheme>|, e.\,g.~|PageCurrentLocal.Roman|,
% \end{itemize}
% for all page numbering schemes, even those not supported
% by the current original |\pagenumbering|
@@ -2313,7 +2835,7 @@
% The command |\pagesLTS at 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.)
+% (Following code will be removed in some future version.)
%
% \begin{macrocode}
\NewCommandCopy{\pagesLTS at ifcounter}{\pagesLTS at providecounter}
@@ -2334,7 +2856,7 @@
%
% \begin{macro}{\lastpages}
% We provide a command to give the number of pages in a sector
-% of a split page numbering scheme (see page~\pageref{pagesLTS.pnscheme.nr},\\
+% of a split page numbering scheme (see page~\pageref{pagesLTS.pnscheme.nr},\newline
% |pagesLTS.<page numbering scheme>.<number>.local.cnt|):
%
% \begin{macrocode}
@@ -2354,10 +2876,10 @@
\addtocounter{page}{+1}%
% \end{macrocode}
%
-% |\addtocounter{page}{+1}| because |\pagesLTS at putlabel| includes an\\
-% |\addtocounter{page}{-1}|, which is not necessary here.\\
-% Into the \xfile{.aux} file something like\\
-% |\newlabel{pagesLTS.Roman}{{}{VIII}{}{page.VIII}{}}|\\
+% |\addtocounter{page}{+1}| because |\pagesLTS at putlabel| includes an\newline
+% |\addtocounter{page}{-1}|, which is not necessary here.\newline
+% Into the \xfile{.aux} file something like\newline
+% |\newlabel{pagesLTS.Roman}{{}{VIII}{}{page.VIII}{}}|\newline
% is written, thus |\lastpageref{pagesLTS.Roman}| prints |VIII| and
% links to |page.VIII|.
%
@@ -2371,16 +2893,16 @@
\ifx\pagesLTS at pnc\pagesLTS at zero%
% \end{macrocode}
%
-% i.\,e.\ if the current page numbering scheme is \textquotedblleft 0\textquotedblright,
-% i.\,e.\ before the first |\pagenumbering{...}| command, do nothing,
+% i.\,e.~if the current page numbering scheme is \textquotedblleft 0\textquotedblright,
+% i.\,e.~before the first |\pagenumbering{...}| command, do nothing,
%
% \begin{macrocode}
\else%
% \end{macrocode}
%
-% otherwise write into the \xfile{.aux} file something like\\
-% |\newlabel{pagesLTS.arabic.local}{{}{6}{}{page.9}{}}|,\\
-% thus |\lastpageref{pagesLTS.arabic.local}| prints |6| and links to |page.9|.\\
+% otherwise write into the \xfile{.aux} file something like\newline
+% |\newlabel{pagesLTS.arabic.local}{{}{6}{}{page.9}{}}|,\newline
+% thus |\lastpageref{pagesLTS.arabic.local}| prints |6| and links to |page.9|.\bigskip
%
% |\addtocounter{page}{+1}| is skipped, because we skipped the |\addtocounter{page}{-1}| above.
%
@@ -2402,10 +2924,10 @@
% \begin{macro}{\erroralphalph}
% |\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.\\
+% |\alphalph|, |\AlphAlph|, and |\fnsymbolmult| of the \xpackage{alphalph} package.\newline
% |\alph|, |\Alph|, and |\fnsymbol| would not support
-% \textquotedblleft numbers\textquotedblright\ below one.\\
-% |\arabic| already supports negative numbers and zero.\\
+% \textquotedblleft numbers\textquotedblright\ below one.\newline
+% |\arabic| already supports negative numbers and zero.\newline
% |\roman| and |\Roman| support neither negative numbers nor zero, but are expanded
% in this package (|\xroman| and |\XRoman|), see page~\pageref{xroman}.
% \begin{macrocode}
@@ -2466,15 +2988,23 @@
\else%
\def\pagesLTS at tmpC{Roman}%
\ifx\pagesLTS at pnc\pagesLTS at tmpC%
- \ifpagesLTS at RomanMulti%
% \end{macrocode}
%
% The same for |\Roman| page numbering, expanded by |\XRoman|
-% (see page~\pageref{xroman}).
+% (see page~\pageref{xroman}). When the \xpackage{romanbar} package
+% has been loaded, the page format is changed accordingly.
%
% \begin{macrocode}
- \renewcommand*{\thepage}{\XRoman{page}}%
- \fi%
+ \IfPackageLoadedTF{romanbarpagenumber}{%
+ \ifpagesLTS at RomanMulti%
+ \renewcommand*{\thepage}{\Roman at bar{\XRoman{page}}}%
+ \else%
+ \renewcommand*{\thepage}{\Roman at bar{page}}%
+ \fi%
+ }{\ifpagesLTS at RomanMulti%
+ \renewcommand*{\thepage}{\XRoman{page}}%
+ \fi%
+ }%
\else%
\ifx\pagesLTS at pnc\pagesLTS at alph%
% \end{macrocode}
@@ -2516,25 +3046,54 @@
\else%
% \end{macrocode}
%
+% For |silly| page numbers (from the \xpackage{sillypage} package),
+% |\thepage| is |\csname @silly\endcsname \c at page|, \mbox{i.\,e.}~|\@silly \c at page|
+% --~no change needed.
+%
+% \begin{macrocode}
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \else%
+% \end{macrocode}
+%
+% For |gobble| page numbers, |\thepage| is |\csname @gobble\endcsname \c at page|,
+% \mbox{i.\,e.}~|\@gobble \c at page| and |\@gobble| is \linebreak%
+% |\long\def \@gobble #1{}|, \mbox{i.\,e.}~|\thepage| is |{}|. This is OK,
+% but \xpackage{hyperref} does not create links when there is no linktext.
+% Thus we give |\null| as text for the page number, which prints as nothing
+% but makes \xpackage{hyperref} happy -- although not happy enough yet:
+% |\null| expands to |\hbox {}|, and \xpackage{hyperref} complains
+%\begin{verbatim}
+%Package hyperref Warning: Token not allowed in a PDF string (Unicode):
+%(hyperref) removing `\hbox' on input line <something>.
+%
+%Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
+%(hyperref) removing `\hbox' on input line <something>.
+%\end{verbatim}
+% To make \xpackage{hyperref} extra happy, we tell it to not use |\null| as
+% PDF string.
+%
+% \begin{macrocode}
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \IfPackageLoadedT{hyperref}{%
+ \renewcommand*{\thepage}{\texorpdfstring{\null}{{}}%
+ \csname @gobble\endcsname \c at page}}%
+ \else%
+% \end{macrocode}
+%
+%
% 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.
%
% \begin{macrocode}
- \PackageError{pageslts}{unknown page numbering scheme}{%
- The pageslts package encountered the unknown\MessageBreak%
- page numbering scheme\MessageBreak%
- \meaning#1. \MessageBreak%
- If this is no typing mistake, it might work\MessageBreak%
- - or it might not work.\MessageBreak%
- \@ehc%
- }%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
+ \PackageError{pageslts}{unknown page numbering scheme}{%
+ The pageslts package encountered the unknown\MessageBreak%
+ page numbering scheme\MessageBreak%
+ \meaning#1. \MessageBreak%
+ If this is no typing mistake, it might work\MessageBreak%
+ - or it might not work.\MessageBreak%
+ \@ehc}%
+ \fi\fi\fi\fi\fi\fi\fi\fi%
\let\pagesLTS at tmpC\undefined%
}
@@ -2542,6 +3101,13 @@
% \end{macro}
%
% \begin{macro}{\pagenumbering}
+% To keep the original meaning of |\pagenumbering|:
+%
+% \begin{macrocode}
+\NewCommandCopy{\OrigPagenumbering}{\pagenumbering}
+
+% \end{macrocode}
+%
% Now for the \textbf{new} version of the |\pagenumbering| command:
%
% \begin{macrocode}
@@ -2549,31 +3115,38 @@
% \end{macrocode}
%
% If the current page numbering scheme, |\pagesLTS at pnc|,
-% or the requested page numbering scheme, |#1|, is |\pagesLTS at fns|,
-% \mbox{i.\,e.} \texttt{fnsymbol}, the counter\texttt{pagesLTS.fnsymbol.local}
-% is needed. If it does not exists yet, it is created here.
+% and the requested page numbering scheme, |#1|, is the same one,
+% nothing is done, otherwise the real action begins.
%
% \begin{macrocode}
\edef\pagesLTS at tmpA{#1}%
- \ifx\pagesLTS at pnc\pagesLTS at fns%
- \pagesLTS at providecounter{pagesLTS.fnsymbol.local}%
- \fi%
- \ifx\pagesLTS at tmpA\pagesLTS at fns%
- \pagesLTS at providecounter{pagesLTS.fnsymbol.local}%
- \fi%
+ \ifx\pagesLTS at pnc\pagesLTS at tmpA%
+ \else%
% \end{macrocode}
%
-% If the current page numbering scheme, |\pagesLTS at pnc|,
-% and the requested page numbering scheme, |#1|, is the same one,
-% nothing further is done, otherwise the real action begins.
+% If the requested page numbering scheme, |#1|, is~|\pagesLTS at fns|,
+% \mbox{i.\,e.}~\texttt{fnsymbol}, the counter\texttt{pagesLTS.fnsymbol.local}
+% is needed. If it does not exists yet, it is created here.
+% Same for the |silly| and |gobble| page numbering schemes.
%
% \begin{macrocode}
- \ifx\pagesLTS at pnc\pagesLTS at tmpA%
- \else%
+ \ifx\pagesLTS at tmpA\pagesLTS at fns%
+ \pagesLTS at providecounter{pagesLTS.fnsymbol.local}%
+ \fi%
+ \ifx\pagesLTS at tmpA\pagesLTS at silly%
+ \IfPackageLoadedF{sillypage}{\PackageError{pageslts}{%
+ silly pagenumbering requested, sillypage package not loaded}{%
+ When using \string\pagenumbering{silly},\MessageBreak%
+ load the sillypage package.}}%
+ \pagesLTS at providecounter{pagesLTS.silly.local}%
+ \fi%
+ \ifx\pagesLTS at tmpA\pagesLTS at gobble%
+ \pagesLTS at providecounter{pagesLTS.gobble.local}%
+ \fi%
% \end{macrocode}
%
% The next code is executed, when we are at a page after the first one.
-% This distinction is done for two reasons:\\
+% This distinction is done for two reasons:\newline
% On the one hand, |\pagenumbering| could be called \textit{before}
% |\begin{document}| (where the current page should not be
% greater than one), and on the other hand we go one page back to
@@ -2581,13 +3154,13 @@
% there is no going backward.
%
% \begin{macrocode}
- \ifnum \value{CurrentPage}>1%
+ \ifnum\value{CurrentPage}>1%
\addtocounter{page}{-1}%
\addtocounter{pagesLTS.current.local.\pagesLTS at pnc}{-1}%
% \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
+% 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.
@@ -2598,58 +3171,75 @@
\value{pagesLTS.current.local.\pagesLTS at pnc}}%
% \end{macrocode}
%
-% If the page numbering scheme is \xpackage{fnsymbol}, and if it \textit{was} used before,
+% If the page numbering scheme is |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 at pnc.done|,
% is subtracted (same as for the other schemes, see below).
+% The same is done for the |silly| and |gobble| page numbers.
%
% \begin{macrocode}
\ifx\pagesLTS at pnc\pagesLTS at fns%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
\setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
\addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
-\value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
\fi%
-% \end{macrocode}
-%
-% If the page numbering scheme is \textit{not} \xpackage{fnsymbol},
-% a~numbered label is written:
-%
-% \begin{macrocode}
\else%
- \pagesLTS at writelabel{\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}}%
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
+ \addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
+ -\value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
+ \fi%
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
+ \addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
+ -\value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
+ \fi%
+ \else%
% \end{macrocode}
%
-% If the page numbering scheme was \textit{not} used before,
-%
-% \begin{macrocode}
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}<2%
-% \end{macrocode}
-%
+% If the page numbering scheme is
+% \textit{neither} |fnsymbol| \textit{nor} |silly| \textit{nor} |gobble|
+% and if the page numbering scheme was \textit{not} used before,
% an unnumbered label is also written:
%
% \begin{macrocode}
- \pagesLTS at writelabel{\pagesLTS at pnc}%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}<2%
+ \pagesLTS at writelabel{\pagesLTS at pnc}%
+ \fi%
+ \fi%
+ \fi%
% \end{macrocode}
%
-% If the page numbering scheme \textit{was} used before,
+% For all page numbering schemes: 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 at pnc.done|,
-% is subtracted.
+% is subtracted -- except if option |pagenumbering=false| has been chosen,
+% because then the pagenumbers are reset anyway.
%
% \begin{macrocode}
- \else%
- \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
- \pagesLTS at providecounter{pagesLTS.\pagesLTS at pnc.done}%
- \addtocounter{pagesLTS.\pagesLTS at pnc.done}{%
- \value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
- \addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
- -\value{pagesLTS.\pagesLTS at pnc.done}}%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \ifpagesLTS at pagecontinue%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
+ \pagesLTS at providecounter{pagesLTS.\pagesLTS at pnc.done}%
+ \addtocounter{pagesLTS.\pagesLTS at pnc.done}{%
+ \value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
+ \addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
+ -\value{pagesLTS.\pagesLTS at pnc.done}}%
+ \fi%
\fi%
% \end{macrocode}
%
-% The values are written to the \xfile{.aux} file
-% (if writing is allowed: |\if at filesw|),
+% A~numbered label is written:
+%
+% \begin{macrocode}
+ \pagesLTS at writelabel{\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}}%
+% \end{macrocode}
+%
+% The values are written to the \xfile{.aux} file (if writing is allowed: |\if at filesw|),
% because they must be available at the beginning of the document:
%
% \begin{macrocode}
@@ -2656,9 +3246,7 @@
\if at filesw%
\immediate\write\@auxout{\string
\pagesLTS at providecounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.cnt}}%
- \fi%
- \edef\pagesLTS at tmpB{\arabic{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}}%
- \if at filesw%
+ \edef\pagesLTS at tmpB{\arabic{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}}%
\immediate\write\@auxout{\string
\setcounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.cnt}{\pagesLTS at tmpB}}%
\fi%
@@ -2665,8 +3253,8 @@
\fi%
% \end{macrocode}
%
-% For further code for the case of \xpackage{fnsymbol} please see below
-% (|\lastpagereftext|, page~\pageref{lastpagereftextlabel}).\\
+% For further code for the case of |fnsymbol| please see below
+% (|\lastpagereftext|, page~\pageref{lastpagereftextlabel}).\newline
% The last page number is saved, in case the same page
% numbering scheme is continued later.
%
@@ -2689,6 +3277,16 @@
\xdef\pagesLTS at pnc{#1}%
% \end{macrocode}
%
+% If option |pagecontinue=false| was chosen, the local page count is reset to~1.
+%
+% \begin{macrocode}
+ \ifpagesLTS at pagecontinue%
+ \else%
+ \pagesLTS at providecounter{pagesLTS.current.local.\pagesLTS at pnc}%
+ \setcounter{pagesLTS.current.local.\pagesLTS at pnc}{1}%
+ \fi%
+% \end{macrocode}
+%
% The new page numbering scheme is now started for real:
%
% \begin{macrocode}
@@ -2696,7 +3294,7 @@
% \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.\\
+% an error will arise here - but maybe without error message.\bigskip
%
% If page numbering scheme |\alph|, |\Alph|, or |\fnsymbol| is used,
% \xpackage{pageslts} extends the page numbers according to the given options,
@@ -2752,39 +3350,51 @@
% Then |pagesLTS.current.local.\pagesLTS at pnc| (which was zero) is set to one.
%
% \begin{macrocode}
- \ifnum \value{pagesLTS.double.\pagesLTS at pnc}=1%
+ \ifnum\value{pagesLTS.double.\pagesLTS at pnc}=1%
\setcounter{pagesLTS.current.local.\pagesLTS at pnc}{1}%
\fi%
% \end{macrocode}
%
-% Otherwise, i.\,e.\ if |\value{CurrentPage}| is not |>1|,
+% Otherwise, i.\,e.~if |\value{CurrentPage}| is \mbox{not $>1$,}
% i.\,e.~before the first page has shiped out:
%
% \begin{macrocode}
- \else%% before the first page has shipped out
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at zero\relax%
+ \else%
% \end{macrocode}
%
-% The current page numbering scheme is defined by the argument of
-% |\pagenumbering{...}|, which the user gave:
+% |\pagenumbering{...}| has been called more than once before the end of the first page
+% (probably in the preamble). Let us reset the earlier |\pagenumbering|s, which
+% should not have any effect anyway:
%
% \begin{macrocode}
+ \PackageNoteNoLine{pageslts}{%
+ \string\pagenumbering\space used more than once before the end\MessageBreak%
+ of the first page, maybe in the preamble.\MessageBreak%
+ Resetting all unused page numbering schemes now}%
+ \setcounter{pagesLTS.pnc.\pagesLTS at pnc}{0}%
+ \setcounter{pagesLTS.double.\pagesLTS at pnc}{0}%
+ \setcounter{pagesLTS.current.local.\pagesLTS at pnc}{0}%
+ \fi%
+% \end{macrocode}
+%
+% The current page numbering scheme is defined by the argument of |\pagenumbering{...}|,
+% which the user gave:
+%
+% \begin{macrocode}
\xdef\pagesLTS at pnc{#1}%
% \end{macrocode}
%
-% 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 at pnc}| does not work,
-% so we \textquotedblleft expand\textquotedblright{} the |\OrigPagenumbering| command:
+% and the page numbering scheme set by the original page numbering command,
+% which resets the page number to one, but at the first page continuation does not make sense.
%
% \begin{macrocode}
- \global\c at page \@ne\relax%
- \global\def\thepage{\csname \expandafter @\pagesLTS at pnc \endcsname \c at page}%
+ \OrigPagenumbering{#1}%
% \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.\\
+% an error might arise here -- but maybe without error message.\bigskip
%
% If page numbering scheme |\alph|, |\Alph|, or |\fnsymbol| is used,
% \xpackage{pageslts} extends the page numbers according to the given options,
@@ -2861,11 +3471,11 @@
% \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}
+% When the page numbering scheme is |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}|.
% (And if the \texttt{pagesLTS.fnsymbol.local} counter did not exist yet,
-% it is created here.)\\
+% it is created here.)\bigskip
%
% \begin{macrocode}
\newcommand{\lastpagereftext}[1]{%
@@ -2878,7 +3488,7 @@
{\arabic{pagesLTS.fnsymbol.local}}%
% \end{macrocode}
%
-% When the page numbering scheme is \xpackage{fnsymbol}, but the \xpackage{hyperref} package
+% When the page numbering scheme is |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).
@@ -2885,13 +3495,41 @@
%
% \begin{macrocode}
}{\arabic{pagesLTS.fnsymbol.local}}%
+ \else%
% \end{macrocode}
%
+% Same for |silly| pagenumbering:
+%
+% \begin{macrocode}
+ \def\pagesLTS at tmpB{pagesLTS.silly.local}%
+ \ifx\pagesLTS at tmpA\pagesLTS at tmpB%
+ \pagesLTS at providecounter{pagesLTS.silly.local}%
+ \IfPackageLoadedTF{hyperref}{%
+ \href{\#pagesLTS.silly.local.\arabic{pagesLTS.silly.local}}%
+ {\arabic{pagesLTS.silly.local}}%
+ }{\arabic{pagesLTS.silly.local}}%
+% \end{macrocode}
+%
+% and for |gobble| pagenumbering:
+%
+% \begin{macrocode}
+ \else%
+ \def\pagesLTS at tmpB{pagesLTS.gobble.local}%
+ \ifx\pagesLTS at tmpA\pagesLTS at tmpB%
+ \pagesLTS at providecounter{pagesLTS.gobble.local}%
+ \IfPackageLoadedTF{hyperref}{%
+ \href{\#pagesLTS.gobble.local.\arabic{pagesLTS.gobble.local}}%
+ {\arabic{pagesLTS.gobble.local}}%
+ }{\arabic{pagesLTS.gobble.local}}%
+% \end{macrocode}
+%
% Otherwise just the common |\pageref| is applied:
%
% \begin{macrocode}
- \else%
- \pageref{#1}%
+ \else%
+ \pageref{#1}%
+ \fi%
+ \fi%
\fi%
% \end{macrocode}
%
@@ -2916,12 +3554,24 @@
\pagesLTS at providecounter{pagesLTS.fnsymbol.local}%
\arabic{pagesLTS.fnsymbol.local}%
\else%
+ \def\pagesLTS at tmpB{pagesLTS.silly.local}%
+ \ifx\pagesLTS at tmpA\pagesLTS at tmpB%
+ \pagesLTS at providecounter{pagesLTS.silly.local}%
+ \arabic{pagesLTS.silly.local}%
+ \else%
+ \def\pagesLTS at tmpB{pagesLTS.gobble.local}%
+ \ifx\pagesLTS at tmpA\pagesLTS at tmpB%
+ \pagesLTS at providecounter{pagesLTS.gobble.local}%
+ \arabic{pagesLTS.gobble.local}%
% \end{macrocode}
%
% There is no |\pageref*| without \xpackage{hyperref}.
%
% \begin{macrocode}
- \IfPackageLoadedTF{hyperref}{\pageref*{#1}}{\pageref{#1}}%
+ \else%
+ \IfPackageLoadedTF{hyperref}{\pageref*{#1}}{\pageref{#1}}%
+ \fi%
+ \fi%
\fi%
\let\pagesLTS at tmpA\undefined%
\let\pagesLTS at tmpB\undefined%
@@ -2939,14 +3589,29 @@
% \begin{macrocode}
\newcommand\overrideLTSlabel[2]{%
\@bsphack%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}>1%
- \edef\pagesLTS at tmpC{#1}%
- \edef\pagesLTS at tmpD{pagesLTS.\pagesLTS at pnc.local}%
- \ifx\pagesLTS at tmpC\pagesLTS at tmpD%
+ \if at filesw%
+ \edef\pagesLTS at tmpC{#1}%
+ \edef\pagesLTS at tmpD{pagesLTS.\pagesLTS at pnc.local}%
+ \ifx\pagesLTS at tmpC\pagesLTS at tmpD%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
+ \else%
+ \edef\pagesLTS at tmpD{fnsymbol}%
+ \ifx\pagesLTS at pnc\pagesLTS at tmpD%
\immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
+ \fi%
+ \edef\pagesLTS at tmpD{gobble}%
+ \ifx\pagesLTS at pnc\pagesLTS at tmpD%
+ \immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
+ \fi%
+ \edef\pagesLTS at tmpD{silly}%
+ \ifx\pagesLTS at pnc\pagesLTS at tmpD%
+ \immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
+ \fi%
\fi%
\fi%
\pagesLTS at putlabel{#1}{#2}{0}%
+ \fi%
\@esphack%
}
@@ -2954,21 +3619,21 @@
% \end{macro}
%
% \begin{macro}{\pagesLTS at EveryShipout}
-% Because we cannot make references to pages with \xpackage{fnsymbol}
-% page \textquotedblleft numbers\textquotedblright{} manually with \xpackage{hyperref},
+% Because we cannot make references to pages with |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.\\
+% we cannot refer to the last one as we did with the pages.\bigskip
%
-% 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
+% Therefore each page with |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
% |pagesLTS.fnsymbol|, |pagesLTS.\pagesLTS at pnc|, and
-% |pagesLTS.\pagesLTS at pnc.local|.\\
+% |pagesLTS.\pagesLTS at pnc.local|.\newline
% In case an older label already existed, it is overwritten by an |\overridelabel| command.
%
% \begin{macrocode}
@@ -2980,33 +3645,63 @@
\IfPackageLoadedT{hyperref}{\phantomsection%
\hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}%
}%
- \ifnum \pagesLTS at esov=\pagesLTS at zero%
- \label{pagesLTS.fnsymbol}%
+ \ifnum\pagesLTS at esovFs=\pagesLTS at zero%
+ \if at filesw\label{pagesLTS.fnsymbol}\fi%
+ \pagesLTS at putlabel{pagesLTS.fnsymbol.local}{\theCurrentPageLocal}{0}%
\else%
\overridelabel{pagesLTS.fnsymbol}%
+ \overrideLTSlabel{pagesLTS.fnsymbol.local}{\theCurrentPageLocal}%
\fi%
\else%
- \IfPackageLoadedT{hyperref}{\phantomsection}%
- \if at filesw%
- \overridelabel{pagesLTS.\pagesLTS at pnc}%
% \end{macrocode}
%
-% We need to go forward one page (and later backward again), because
-% |\overrideLTSlabel| calls a |\pagesLTS at putlabel|, and that one uses
-% |\addtocounter{page}{-1}...\addtocounter{page}{+1}|, which is not needed here.
+% Same with |silly| page \textquotedblleft numbers\textquotedblright :
%
% \begin{macrocode}
- \addtocounter{page}{+1}%
- \overrideLTSlabel{pagesLTS.\pagesLTS at pnc.local}{\theCurrentPageLocal}%
- \addtocounter{page}{-1}%
- \fi%
- \fi%
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \pagesLTS at providecounter{pagesLTS.silly.cont}%
+ \addtocounter{pagesLTS.silly.cont}{1}%
+ \IfPackageLoadedT{hyperref}{\phantomsection%
+ \hypertarget{pagesLTS.silly.local.\arabic{pagesLTS.silly.cont}}{}%
+ }%
+ \ifnum\pagesLTS at esovSy=\pagesLTS at zero%
+ \if at filesw\label{pagesLTS.silly}\fi%
+ \pagesLTS at putlabel{pagesLTS.silly.local}{\theCurrentPageLocal}{0}%
+ \else%
+ \overridelabel{pagesLTS.silly}%
+ \overrideLTSlabel{pagesLTS.silly.local}{\theCurrentPageLocal}%
+ \fi%
+ \else%
+% \end{macrocode}
+%
+% and with |gobble| page \textquotedblleft numbers\textquotedblright :
+%
+% \begin{macrocode}
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \pagesLTS at providecounter{pagesLTS.gobble.cont}%
+ \addtocounter{pagesLTS.gobble.cont}{1}%
+ \IfPackageLoadedT{hyperref}{\phantomsection%
+ \hypertarget{pagesLTS.gobble.local.\arabic{pagesLTS.gobble.cont}}{}%
+ }%
+ \ifnum\pagesLTS at esovGbl=\pagesLTS at zero%
+ \if at filesw\label{pagesLTS.gobble}\fi%
+ \pagesLTS at putlabel{pagesLTS.gobble.local}{\theCurrentPageLocal}{0}%
+ \else%
+ \overridelabel{pagesLTS.gobble}%
+ \overrideLTSlabel{pagesLTS.gobble.local}{\theCurrentPageLocal}%
+ \fi%
+ \else%
+ \IfPackageLoadedT{hyperref}{\phantomsection}%
+ \if at filesw%
+ \overridelabel{pagesLTS.\pagesLTS at pnc}%
+ \overrideLTSlabel{pagesLTS.\pagesLTS at pnc.local}{\theCurrentPageLocal}%
+ \fi\fi\fi\fi%
\endgroup%
}
% \end{macrocode}
% \end{macro}
-%
+% \newpage
% \begin{macro}{\AddToHook{shipout/foreground}}
% At the end of each shipout, the following commands are executed:
%
@@ -3047,7 +3742,7 @@
% If the |CurrentPage| is equal to one, this is the first shipout.
%
% \begin{macrocode}
- \ifnum \value{CurrentPage}=1%
+ \ifnum\value{CurrentPage}=1%
% \end{macrocode}
%
% We check whether some page numbering scheme was defined by
@@ -3081,7 +3776,7 @@
\setcounter{pagesLTS.tmpcounter}{\value{page}}%
% \end{macrocode}
%
-% determine the current page numbering scheme,\newpage
+% determine the current page numbering scheme,
%
% \begin{macrocode}
%% Code from Andres L\"{o}h, Universiteit Utrecht (NL) %%
@@ -3128,30 +3823,47 @@
% If the current page numbering scheme |\pagesLTS at pnc| is |\pagesLTS at fns|
% (which is defined as \texttt{fnsymbol}), the label is set by \linebreak
% |\pagesLTS at EveryShipout| (see just above),
-% and |\pagesLTS at 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
+% and |\pagesLTS at esovFs| is set to the (real) number (not the name)
+% of this page numbering scheme, |\arabic{pagesLTS.fnsymbol.cont}|.\newline
+% When no more pages with |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.
+% of the |fnsymbol| page numbering range.
% (At least we will have that reference after some more work, see below).
%
% \begin{macrocode}
\ifx\pagesLTS at pnc\pagesLTS at fns%
\pagesLTS at EveryShipout%
- \xdef\pagesLTS at esov{\arabic{pagesLTS.fnsymbol.cont}}%
+ \xdef\pagesLTS at esovFs{\arabic{pagesLTS.fnsymbol.cont}}%
+ \else%
% \end{macrocode}
%
+% Same for |silly| page \textquotedblleft number\textquotedblright :
+%
+% \begin{macrocode}
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \pagesLTS at EveryShipout%
+ \xdef\pagesLTS at esovSy{\arabic{pagesLTS.silly.cont}}%
+ \else%
+% \end{macrocode}
+%
+% and for |gobble| page \textquotedblleft number\textquotedblright :
+%
+% \begin{macrocode}
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \pagesLTS at EveryShipout%
+ \xdef\pagesLTS at esovGbl{\arabic{pagesLTS.gobble.cont}}%
+% \end{macrocode}
+%
% When another page numbering scheme was reused (in the example file \xpackage{Roman}),
% we also need to apply |\pagesLTS at EveryShipout|,
% because otherwise we would get multiply defined labels.
%
% \begin{macrocode}
- \else%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}>1%
- \pagesLTS at EveryShipout%
- \fi%
- \fi%
+ \else%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \pagesLTS at EveryShipout%
+ \fi\fi\fi\fi%
% \end{macrocode}
%
% The |CurrentPage| as well as the |pagesLTS.current.local.\pagesLTS at pnc|
@@ -3187,45 +3899,56 @@
% \end{macro}
%
% \begin{macro}{\pagesLTS at makeHy}
-% Just once we need the page from |\@currentHpage| without any \mbox{\textquotedblleft |page.|\textquotedblright}
-% (|\pagesLTS at makeHy| is identical to |\lastpage at makeHy| except of the used namings):
+% Just once we need the page from |\@currentHpage| without any
+% \mbox{\textquotedblleft |page.|\textquotedblright}
+% (|\pagesLTS at makeHy| is identical to |\lastpage at makeHy| except of the used namings
+% --~well, being identical depends on the versions of the packages):
% \begin{macrocode}
\newcommand{\pagesLTS at makeHy}{%
- \gdef\pagesLTS at Hy{}%
- \IfPackageLoadedT{hyperref}{%
- \ifHy at pageanchor%
% \end{macrocode}
-% |\gdef\pagesLTS at Hy{}|, but that was already done at the beginning of this command.
+% |\gdef\pagesLTS at Hy{}|, but that was already done before this command.
% \begin{macrocode}
- \xdef\pagesLTS at Hptest{Doc-Start}%
- \ifx\pagesLTS at Hptest\@currentHpage\relax%
- \gdef\pagesLTS at Hy{\@currentHpage}%
- \else%
- \edef\pagesLTS at Hptest{\@currentHpage}%
- \ifx\pagesLTS at Hptest\empty\relax%
+ \xdef\pagesLTS at Hptest{Doc-Start}%
+ \ifx\pagesLTS at Hptest\@currentHpage\relax%
+ \gdef\pagesLTS at Hy{\@currentHpage}%
+ \else%
+ \edef\pagesLTS at Hptest{\@currentHpage}%
+ \ifx\pagesLTS at Hptest\empty\relax%
% \end{macrocode}
-% then |\gdef\pagesLTS at Hy{}|, but that was already done at the beginning of this command.
+% then |\gdef\pagesLTS at Hy{}|, but that was already done before this command.
% \begin{macrocode}
+ \else%
+ \edef\pagesLTS at Hptest{page.}%
+ \ifx\@currentHpage\pagesLTS at Hptest\relax%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \PackageNoteNoLine{pageslts}{%
+ With gobbled page numbers "\string\@currentHpage "\MessageBreak%
+ is just "page." without number.\MessageBreak%
+ "\string\pagesLTSlastpageHy " is now let empty}%
\else%
+ \PackageWarningNoLine{pageslts}{%
+ \string\@currentHpage\space is just "page." without number.\MessageBreak%
+ \string\pagesLTSlastpageHy\space is now let empty}%
+ \fi%
% \end{macrocode}
+% then in both cases |\gdef\pagesLTS at Hy{}|, but that was already done before this command.
+% \begin{macrocode}
+ \else%
+% \end{macrocode}
% |\@currentHpage| should be |page.<some number>|, |\pagesLTS at rmpage| removes the
-% \mbox{\textquotedblleft |page.|\textquotedblright .}\\
+% \mbox{\textquotedblleft |page.|\textquotedblright .}\newline
% 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 at Hy{\pagesLTS at 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%
- }%
+ \gdef\pagesLTS at Hy{\pagesLTS at 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%
}%
% \end{macrocode}
@@ -3247,7 +3970,7 @@
% |\else#4| means, that it did not start with |page.|, and whatever it is,
% we cannot use this |#4| for |\pagesLTS at Hy|.
% \end{macro}
-%
+% \newpage
% \phantomsection
% \begin{macro}{\pagesLTS at putlabel}\label{pagesLTSputlabel}
% Since the page has been put out, we are on the page after
@@ -3310,7 +4033,7 @@
}%
\fi%
% \end{macrocode}
-%
+% \newpage
% 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.
@@ -3320,10 +4043,16 @@
\begingroup%
\protected at iwrite\@auxout{}{\string\newlabel{#1}{%
{\@currentlabel}{#2}{\@currentlabelname}%
- {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\@currentHpage\fi%
- }{\@currentHref}}%
- {\@kernel at reserved@label at data}}%
- }%
+ {\ifx\pagesLTS at pnc\pagesLTS at fns%
+ \@currentHref%
+ \else\ifx\pagesLTS at pnc\pagesLTS at silly%
+ \@currentHref%
+ \else\ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \@currentHref%
+ \else\ifHy at pageanchor\@currentHpage\fi%
+ \fi\fi\fi%
+ }%
+ {\@kernel at reserved@label at data}}}%
\endgroup%
\fi%
}{%
@@ -3335,7 +4064,7 @@
%
% \begin{macrocode}
\if at filesw%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}<2%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}<2%
\protected at iwrite\@auxout{}{\string\newlabel{#1}{%
{\@currentlabel}{#2}{\@currentlabelname}%
{\@currentHref}{\@kernel at reserved@label at data}}%
@@ -3355,9 +4084,6 @@
\immediate\write\@auxout{\string\undonewlabel{#1}}%
\fi%
\fi%
-% \end{macrocode}
-% \newpage
-% \begin{macrocode}
\protected at iwrite\@auxout{}{\string\newlabel{#1}{%
{\@currentlabel}{#2}{\@currentlabelname}%
{\@currentHref}{\@kernel at reserved@label at data}}%
@@ -3401,13 +4127,12 @@
% \begin{macrocode}
\else%
\pagesLTS at writelabel{\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}}%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}<2%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}<2%
\ifx\pagesLTS at pnc\pagesLTS at fns%
- \else%
- \pagesLTS at writelabel{\pagesLTS at pnc}%
- \fi%
- \fi%
- \fi%
+ \else\ifx\pagesLTS at pnc\pagesLTS at silly%
+ \else\ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \else\pagesLTS at writelabel{\pagesLTS at pnc}%
+ \fi\fi\fi\fi\fi%
% \end{macrocode}
%
% Before the label for the \texttt{LastPages} can be put, we must advance one page again,
@@ -3418,24 +4143,25 @@
\pagesLTS at putlabel{LastPages}{\theCurrentPage}{1}%
% \end{macrocode}
%
-% \newpage
-% Here should follow a\\
-% |\addtocounter{page}{-1}|,\\
+% Here should follow a\newline
+% |\addtocounter{page}{-1}|,\newline
% but we have to remember to increase the page counters again,
-% which were decreased at the start of this |\pagesLTS at putlabels| command, and that would include\\
-% |\addtocounter{page}{+1}|,\\
+% which were decreased at the start of this |\pagesLTS at putlabels| command,
+% and that would include\newline
+% |\addtocounter{page}{+1}|,\newline
% 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}%
- \addtocounter{pagesLTS.current.local.\pagesLTS at pnc}{1}%
+ \addtocounter{pagesLTS.current.local.\pagesLTS at pnc}{+1}%
}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\AddToHook{begindocument/end}}
+% \newpage
+% \begin{macro}{\AddToHook\{begindocument/end\}}
+% |\AddToHook{begindocument/end}{|\ldots |}|:
% \begin{macrocode}
\AddToHook{begindocument/end}{%
% \end{macrocode}
@@ -3444,9 +4170,8 @@
%
% \begin{macrocode}
\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.}%
+ \PackageNoteNoLine{pageslts}{Packages lastpage and pageslts used:\MessageBreak%
+ Are you sure that you want to load both packages?}%
}%
% \end{macrocode}
%
@@ -3454,10 +4179,11 @@
%
% \begin{macrocode}
\IfPackageLoadedTF{hyperref}{%
- \IfPackageAtLeastTF{hyperref}{2024-10-30}{}{%
+ \ProvideTextCommand{\textasteriskcentered}{PD1}{*}%
+ \IfPackageAtLeastF{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 at hyperref.sty\endcsname.}}%
+ Required version: 2024-10-30 v7.01k or newer,\MessageBreak%
+ found version:\space\space\space\space\csname ver at hyperref.sty\endcsname.}}%
}{\PackageNoteNoLine{pageslts}{Package hyperref not loaded.\MessageBreak%
pageslts would support hyperref.\MessageBreak%
The page references will NOT be hyperlinked}%
@@ -3477,10 +4203,10 @@
%
% 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
+% 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.\\
+% where the labels can/could be processed via the \xfile{aux} file.\bigskip
%
% \begin{macrocode}
\if at filesw%
@@ -3511,23 +4237,18 @@
% \end{macrocode}
% \end{macro}
%
-% 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.
-%
% We do check whether \xpackage{showkeys} has been loaded (\emph{before} \xpackage{pageslts}!)
% in a mode to show the labels:
%
% \begin{macrocode}
\def\pagesLTS at skld{0}
-\IfPackageLoadedT{showkeys}{%
- \IfPackageLoadedWithOptionsF{showkeys}{final}{%
- \def\pagesLTS at skld{1}%
- }%
+\IfPackageLoadedT{showkeys}{\IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \def\pagesLTS at skld{1}}%
}%
% \end{macrocode}
%
-% \begin{macro}{\AddToHook{enddocument/afterlastpage}}
+% \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.
@@ -3534,17 +4255,14 @@
%
% \begin{macrocode}
\AddToHook{enddocument/afterlastpage}{%
- \IfPackageLoadedT{showkeys}{%
- \IfPackageLoadedWithOptionsF{showkeys}{final}{%
- \ifx\pagesLTS at skld\pagesLTS at 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%
- }%
- }%
+ \IfPackageLoadedT{showkeys}{\IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \ifx\pagesLTS at skld\pagesLTS at 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}%
+ }%
% \end{macrocode}
%
% We also give the error message about the missing (i.\,e.~not found)
@@ -3562,21 +4280,42 @@
\PackageInfo{pageslts}{enddocument/afterlastpage (AED): pageslts setting LastPage}%
% \end{macrocode}
%
-% After this we remember the page number (if |fnsymbol|),
+% After this we remember the page number (if |fnsymbol| or |silly| or |gobble|),
% and after that we place the \texttt{LastPage} label.
%
% \begin{macrocode}
\ifx\pagesLTS at pnc\pagesLTS at fns%
\def\pagesLTS at tmpA{\arabic{pagesLTS.fnsymbol.local}}%
- \ifnum \pagesLTS at eso=\pagesLTS at tmpA%
+ \ifnum\pagesLTS at esoFs=\pagesLTS at tmpA%
\gdef\pagesLTS at rerun{0}%
\else%
\gdef\pagesLTS at rerun{1}%
\fi%
\if at filesw%
- \immediate\write\@auxout{\string\gdef\string\pagesLTS at eso{\pagesLTS at tmpA}}%
+ \immediate\write\@auxout{\string\gdef\string\pagesLTS at esoFs{\pagesLTS at tmpA}}%
\fi%
- \fi%
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \def\pagesLTS at tmpA{\arabic{pagesLTS.silly.local}}%
+ \ifnum\pagesLTS at esoSy=\pagesLTS at tmpA%
+ \gdef\pagesLTS at rerun{0}%
+ \else%
+ \gdef\pagesLTS at rerun{1}%
+ \fi%
+ \if at filesw%
+ \immediate\write\@auxout{\string\gdef\string\pagesLTS at esoSy{\pagesLTS at tmpA}}%
+ \fi%
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \def\pagesLTS at tmpA{\arabic{pagesLTS.gobble.local}}%
+ \ifnum\pagesLTS at esoGbl=\pagesLTS at tmpA%
+ \gdef\pagesLTS at rerun{0}%
+ \else%
+ \gdef\pagesLTS at rerun{1}%
+ \fi%
+ \if at filesw%
+ \immediate\write\@auxout{\string\gdef\string\pagesLTS at esoGbl{\pagesLTS at tmpA}}%
+ \fi\fi\fi\fi%
\pagesLTS at putlabel{LastPage}{\thepage}{1}%
% \end{macrocode}
%
@@ -3586,16 +4325,28 @@
\let\pagesLTS at tmpA\undefined%
% \end{macrocode}
%
-% The number of pages with the \xpackage{fnsymbol} page numbering scheme,
-% |\pagesLTS at esov|, is saved via the \xfile{.aux} file (if it is not zero):
+% The number of pages with the |fnsymbol| page numbering scheme,
+% |\pagesLTS at esovFs|, and the number of pages with the |silly| page numbering scheme,
+% |\pagesLTS at esovSy|, and the number of pages with the |gobble| page numbering scheme,
+% |\pagesLTS at esovGbl|, are saved via the \xfile{.aux} file (if it is not zero, respectively):
%
% \begin{macrocode}
\if at filesw%
- \ifx\pagesLTS at esov\pagesLTS at zero\relax%
+ \ifx\pagesLTS at esovFs\pagesLTS at zero\relax%
\else%
\immediate\write\@auxout{\string\pagesLTS at providecounter{pagesLTS.fnsymbol.local}}%
- \immediate\write\@auxout{\string\setcounter{pagesLTS.fnsymbol.local}{\pagesLTS at esov}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.fnsymbol.local}{\pagesLTS at esovFs}}%
\fi%
+ \ifx\pagesLTS at esovSy\pagesLTS at zero\relax%
+ \else%
+ \immediate\write\@auxout{\string\pagesLTS at providecounter{pagesLTS.silly.local}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.silly.local}{\pagesLTS at esovSy}}%
+ \fi%
+ \ifx\pagesLTS at esovGbl\pagesLTS at zero\relax%
+ \else%
+ \immediate\write\@auxout{\string\pagesLTS at providecounter{pagesLTS.gobble.local}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.gobble.local}{\pagesLTS at esovGbl}}%
+ \fi%
\fi%
% \end{macrocode}
%
@@ -3613,7 +4364,7 @@
%
% \begin{macrocode}
\addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{-1}%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
\setcounter{pagesLTS.tmpcounter}{\value{pagesLTS.pnc.\pagesLTS at pnc}}%
\@tempcnta=\value{pagesLTS.tmpcounter}\relax%
\loop%
@@ -3630,13 +4381,12 @@
\edef\pagesLTS at tmpA{\arabic{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}}%
\immediate\write\@auxout{\string
\setcounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.cnt}{\pagesLTS at tmpA}}%
- \let\pagesLTS at tmpA\undefined%
\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,
-% in case the last page has \xpackage{fnsymbol} page numbering scheme.
+% in case the last page has |fnsymbol| page numbering scheme.
%
% \begin{macrocode}
\addtocounter{page}{-1}%
@@ -3643,7 +4393,8 @@
\def\pagesLTS at tmpA{\thepage}%
\if at filesw%
\protected at iwrite\@auxout{}{\string\gdef\string\pagesLTSlastpage{\pagesLTS at tmpA}}%
- \pagesLTS at makeHy|%
+ \gdef\pagesLTS at Hy{}%
+ \IfPackageLoadedT{hyperref}{\ifHy at pageanchor\pagesLTS at makeHy\fi}%
\protected at iwrite\@auxout{}{\string\gdef\string\pagesLTSlastpageHy{\pagesLTS at Hy}}%
\fi%
\addtocounter{page}{+1}%
@@ -3715,11 +4466,12 @@
\ifx\pagesLTS at FMBpncn\pagesLTS at zero%
\else%
\ifx\pagesLTS at FMBpncp\pagesLTS at one%
- \PackageError{pageslts}{\string\pagenumbering\space before \string\frontmatter}{%
+ \PackageWarning{pageslts}{\string\pagenumbering\space before \string\frontmatter:\MessageBreak%
Do not use \string\pagenumbering{\pagesLTS at FMBpncn} before \string\frontmatter\MessageBreak%
on the same page!\MessageBreak%
\string\frontmatter\space (re)defines the page numbering scheme to \pagesLTS at FMEpncn ,\MessageBreak%
- thus earlier use of \string\pagenumbering{\pagesLTS at FMBpncn} on the same page is useless anyway.}%
+ thus earlier use of \string\pagenumbering{\pagesLTS at FMBpncn} %
+ on the same page is useless anyway\MessageBreak}%
\fi%
\fi%
\fi%
@@ -3728,7 +4480,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\AddToHook{enddocument/info}}
+% \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
@@ -3735,7 +4487,7 @@
% 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.\\
+% |enddocument/afteraux|. Here it is used for a rerun hint.\newline
% 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
@@ -3764,7 +4516,7 @@
% \subsection{Downloads\label{ss:Downloads}}
%
% Everything is available at \url{https://CTAN.org},
-% but may need additional packages themselves.\\
+% but may need additional packages themselves.\bigskip
%
% \DescribeMacro{pageslts.dtx}
% For unpacking the |pageslts.dtx| file and constructing the documentation it is required:
@@ -3783,7 +4535,8 @@
% \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{} $\geq$ 2024-06-01 (i.\,e.~all documents using the
+% \xpackage{pageslts} package) requires:
% \begin{description}
% \item[-] \TeX{} Format \LaTeXe{} 2024-06-01, \url{https://CTAN.org}
%
@@ -3792,7 +4545,10 @@
% \item[-] package \xpackage{kvoptions}, 2022-06-15, v3.15, \url{https://ctan.org/pkg/kvoptions}
%
% \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}
+% package \xpackage{alphalph}, 2019/12/09, v2.6,\newline \url{https://ctan.org/pkg/alphalph}
+%
+% \item[-] if |\pagenumbering{silly}| shall be used, the \xpackage{sillypage} package
+% must be loaded, 2023-07-23, v1.7,\newline \url{https://www.ctan.org/pkg/sillypage}
% \end{description}
%
% \DescribeMacro{pageslts-example.tex}
@@ -3809,7 +4565,7 @@
%
% \item[-] package \xpackage{hyperref}, 2024-10-30, v7.01k, \url{https://ctan.org/pkg/hyperref}
%
-% \item[-] package \xpackage{pageslts}, 2024-11-20, v2.0a, \url{https://ctan.org/pkg/pageslts}\\
+% \item[-] package \xpackage{pageslts}, 2024-12-07, v2.0b, \url{https://ctan.org/pkg/pageslts}\newline
% (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?)
@@ -3821,21 +4577,21 @@
% \subsection{Package, unpacking TDS}
% \paragraph{Package.} This package is available on \url{https://CTAN.org}.
% \begin{description}
-% \item[\url{https://mirror.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} \newline
% The source file.
-% \item[\url{https://mirror.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} \newline
% The documentation.
-% \item[\url{https://mirror.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} \newline
% The compiled example file, as it should look like.
-% \item[\url{https://mirror.ctan.org/macros/latex/contrib/pageslts/README}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/pageslts/README}]\hspace*{0.1cm} \newline
% The README file.
% \end{description}
% There is also a |pageslts.tds.zip| available:
% \begin{description}
-% \item[\url{https://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} \newline
% Everything in TDS compliant, compiled format.
% \end{description}
-% which additionally contains\\
+% which additionally contains\newline
% \begin{tabular}{ll}
% pageslts.ins & The \texttt{ins}tallation file.\\
% pageslts.drv & The \mbox{\texttt{dr}i\texttt{v}er} to generate the documentation.\\
@@ -3854,7 +4610,7 @@
% \verb|tex pageslts.dtx|
% \end{quote}
%
-% About generating the documentation see paragraph~\ref{GenDoc} below.\\
+% About generating the documentation see paragraph~\ref{GenDoc} below.\bigskip
%
% \paragraph{TDS.} Now the different files must be moved into
% the different directories in your installation TDS tree
@@ -3976,10 +4732,10 @@
% \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|\\
+% The example file, \textsf{pageslts-example.tex}, can be compiled via\newline
+% |latex pageslts-example.tex|\newline
+% or (recommended)\newline
+% |pdflatex pageslts-example.tex|\newline
% and will need \textit{at least} (!) three compiler runs to get all references right.
%
% \pagebreak
@@ -4010,8 +4766,9 @@
% \item \xpackage{lastpage} v0.1b: Last version number created by \textsc{Jeffrey P. Goldberg}.
% \end{Version}
% \begin{Version}{1994/07/20, \xpackage{lastpage}}
-% \item \xpackage{lastpage} v0.1b (again): Documentation updated by \textsc{Jeffrey P. Goldberg}.\\
-% The main source code of the \xpackage{lastpage} package 1994/07/20 v0.1b was:\\
+% \item \xpackage{lastpage} v0.1b (again): Documentation updated by
+% \textsc{Jeffrey P. Goldberg}.\newline
+% The main source code of the \xpackage{lastpage} package 1994/07/20 v0.1b was:\bigskip
% \begin{verbatim}
% \NeedsTeXFormat{LaTeX2e}[1994/06/01]
% \ProvidesPackage{lastpage}[1994/07/20 v0.1b
@@ -4039,14 +4796,14 @@
% for \texttt{VeryLastPage}; upgrade from \xpackage{fancyheadings} to
% \xpackage{fancyhdr} package, then removed the need for a \xpackage{fancyhdr}
% package at all.
-% \item Rewriting of the package, so as to work with the \xpackage{fnsymbol}
+% \item Rewriting of the package, so as to work with the |fnsymbol|
% page numbering scheme (even on the last page).
% \item Introduction of \xpackage{kvoptions} into this package.
% \item Check for incompatible \xpackage{endfloat} package.
% \item \xpackage{lastpage209.sty} for \LaTeX209 .
% \item Replacement of |\filedate|, |-version|, |-name|,\ldots{} because
-% of \LaTeX~bug 2705:\\
-% Synopsis: Possible problem with |\fileversion| and |\filedate|\\
+% of \LaTeX~bug 2705:\newline
+% Synopsis: Possible problem with |\fileversion| and |\filedate|\newline
% \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.
@@ -4101,7 +4858,7 @@
% but this was done also in commands and definitions~- now reverted.
% \end{Version}
% \begin{Version}{2010/08/12 v1.1g \xpackage{pagesLTS}}
-% \item Now the rerun warning is given \textit{after} e.\,g. the |\listfiles|,
+% \item Now the rerun warning is given \textit{after} e.\,g.~the |\listfiles|,
% increasing the chance of the user to read it.
% \end{Version}
% \begin{Version}{2010/08/23 v1.1h \xpackage{pagesLTS}}
@@ -4258,11 +5015,32 @@
% \item Renamed |\pagesLTS at ifcounter| to |\pagesLTS at providecounter|.
% \item Renamed |\pagesLTS.lastpage| to |\pagesLTSlastpage|.
% \end{Version}
+% \begin{Version}{2024-12-07 v2.0b}
+% \item Bug fix: |pagecontinue=false| did not reset everything always fully correct.
+% \item Instead of requiring the \xpackage{kvoptions} package, kernel commands are used.
+% \item Now compatible with the \xpackage{romanbarpagenumber} package,
+% even independent of loading order.
+% \item When more than one |\pagenumbering| command is given before the end of the first page
+% (maybe in the preamble), all but the last |\pagenumbering| are ignored
+% (as also \LaTeX{} would naturally do).
+% \item The saved |\OrigPagenumbering| is used in both places now
+% instead of the plain definition from the kernel,
+% so any change before the \xpackage{pageslts} package is taken into account.
+% \item Changed the \autoref{sec:Alternatives}: \nameref{sec:Alternatives},
+% mirroring the one from the current \xpackage{lastpage} package.
+% \item For cases when |\@currentHpage| is just |page.|, the warning text has been corrected.
+% \item Page numbering scheme |silly| (from \href{https://ctan.org/pkg/sillypage}{%
+% \xpackage{sillypage} package}) now works.
+% \item Page numbering scheme |gobble| now works. (Is that silly?!)
+% \item Added |\ProvideTextCommand{\textasteriskcentered}{PD1}{*}|.
+% \item Missing |\if at filesw \fi| added.
+% \item Recent \xpackage{undolabl} package ($\geq$ 2024-12-05 v1.0n) required!
+% \end{Version}
% \end{History}
% \bigskip
%
% \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 send an e-mail to the maintainer, thanks!\newline
% (Please see BUG REPORTS in the README.)\newpage
% \PrintIndex
% \Finale
Modified: trunk/Master/texmf-dist/source/latex/pageslts/pageslts.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/pageslts/pageslts.ins 2024-12-07 21:06:32 UTC (rev 73064)
+++ trunk/Master/texmf-dist/source/latex/pageslts/pageslts.ins 2024-12-07 21:06:46 UTC (rev 73065)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: pageslts
-%% Version: 2024-11-20 v2.0a
+%% Version: 2024-12-07 v2.0b
%% Info: Variants of last page labels
%%
%% Copyright (C) 2010 - 2024 by
@@ -26,6 +26,9 @@
%% * Alph - Uppercase letters: A, B, C, D,...
%% * fnsymbol - Footnote symbols: *, ^^e2^^80^^a0 (ddagger), ^^e2^^80^^a1 (dddagger),
%% ^^c2^^a7 (mathsection),...
+%% * silly - from sillypage package
+%% * gobble - gobbles the page numbers;
+%% maybe backslash thispagestyle{empty} is more useful?
%% ). The command backslash pagenumbering is renewed, but no change
%% should be visible to the output text, because only labels are added.
%% backslash OrigPagenumbering can be used to get the original meaning
@@ -65,7 +68,7 @@
\input docstrip.tex
\Msg{**********************************************************************************}
\Msg{* Installation *}
-\Msg{* Package: pageslts 2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)*}
+\Msg{* Package: pageslts 2024-12-07 v2.0b Refers to special pages' numbers/names (HMM)*}
\Msg{**********************************************************************************}
\keepsilent
@@ -77,7 +80,7 @@
This is a generated file.
Project: pageslts
-Version: 2024-11-20 v2.0a
+Version: 2024-12-07 v2.0b
Info: Variants of last page labels
Copyright (C) 2010 - 2024 by
@@ -94,6 +97,9 @@
* Alph - Uppercase letters: A, B, C, D,...
* fnsymbol - Footnote symbols: *, ^^e2^^80^^a0 (ddagger), ^^e2^^80^^a1 (dddagger),
^^c2^^a7 (mathsection),...
+ * silly - from sillypage package
+ * gobble - gobbles the page numbers;
+ maybe backslash thispagestyle{empty} is more useful?
). The command backslash pagenumbering is renewed, but no change
should be visible to the output text, because only labels are added.
backslash OrigPagenumbering can be used to get the original meaning
Modified: trunk/Master/texmf-dist/tex/latex/pageslts/pageslts.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pageslts/pageslts.sty 2024-12-07 21:06:32 UTC (rev 73064)
+++ trunk/Master/texmf-dist/tex/latex/pageslts/pageslts.sty 2024-12-07 21:06:46 UTC (rev 73065)
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: pageslts
-%% Version: 2024-11-20 v2.0a
+%% Version: 2024-12-07 v2.0b
%% Info: Variants of last page labels
%%
%% Copyright (C) 2010 - 2024 by
@@ -26,6 +26,9 @@
%% * Alph - Uppercase letters: A, B, C, D,...
%% * fnsymbol - Footnote symbols: *, ^^e2^^80^^a0 (ddagger), ^^e2^^80^^a1 (dddagger),
%% ^^c2^^a7 (mathsection),...
+%% * silly - from sillypage package
+%% * gobble - gobbles the page numbers;
+%% maybe backslash thispagestyle{empty} is more useful?
%% ). The command backslash pagenumbering is renewed, but no change
%% should be visible to the output text, because only labels are added.
%% backslash OrigPagenumbering can be used to get the original meaning
@@ -63,9 +66,9 @@
%% Hans-Klaus Muench + 2014-08-24
%%
\NeedsTeXFormat{LaTeX2e}[2024-06-01]
-\ProvidesPackage{pageslts}[2024-11-20 v2.0a Refers to special pages' numbers/names (HMM)]
+\ProvidesPackage{pageslts}[2024-12-07 v2.0b Refers to special pages' numbers/names (HMM)]
-%% Allows for things like\\
+%% Allows for things like\par
%% |Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of %
%% \lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + %
%% \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + %
@@ -73,31 +76,56 @@
%% \lastpageref{pagesLTS.fnsymbol}(\lastpageref{pagesLTS.fnsymbol.local}) + %
%% \lastpageref{pagesLTS.alph}(\lastpageref{pagesLTS.alph.local}) + %
%% \lastpageref{pagesLTS.Alph}(\lastpageref{pagesLTS.Alph.local}) = %
-%% \lastpageref{LastPages} pages.|\\
-%% to get\\
+%% \lastpageref{LastPages} pages.|\par
+%% to get\par
%% 'Page d (57; local: 4) of ii(2) + XX(20) + *(1) + 30(30) + e(5) + C(3) = 61 pages.'.
-\RequirePackage{undolabl}[2023-02-14]
-\RequirePackage{kvoptions}[2022-06-15]
+\DeclareKeys[pagesLTS]
+ {alphMult .store = \pagesLTS at alphMult ,
+ alphMult .usage = preamble ,
+ AlphMulti .store = \pagesLTS at AlphMulti ,
+ AlphMulti .usage = preamble ,
+ pagecontinue .if = pagesLTS at pagecontinue ,
+ pagecontinue .usage = load ,
+ romanMult .if = pagesLTS at romanMult ,
+ romanMult .usage = load ,
+ RomanMulti .if = pagesLTS at RomanMulti ,
+ RomanMulti .usage = load ,
+ fnsymbolmult .if = pagesLTS at fnsymbolmult ,
+ fnsymbolmult .usage = load ,
+ }
-\SetupKeyvalOptions{family = pagesLTS,prefix = pagesLTS@}
-\DeclareStringOption[ab]{alphMult}
-\DeclareStringOption[AB]{AlphMulti}
-\DeclareBoolOption[true]{romanMult}
-\DeclareBoolOption[true]{RomanMulti}
-\DeclareBoolOption[true]{fnsymbolmult}
-\DeclareBoolOption[true]{pagecontinue}
+\SetKeys[pagesLTS]{alphMult=ab,AlphMulti=AB,pagecontinue=true,romanMult=true,romanMult=true,RomanMulti=true,fnsymbolmult=true}
-\ProcessKeyvalOptions*
+\DeclareUnknownKeyHandler[pagesLTS]{%
+ \PackageError{pageslts}{Unknown option "\CurrentOption"}{%
+ LaTeX has been asked to set an option called\MessageBreak%
+ '#1' \if\relax\detokenize{#2}\relax\else with value '#2'\fi\MessageBreak%
+ but the package "pageslts" has not created an option with this name.\MessageBreak%
+ Try typing <return> to proceed.\MessageBreak%
+ If that doesn't work, type X <return> to quit.%
+ }%
+ }
-\@ifl at 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.}
+\ProcessKeyOptions[pagesLTS]
+
+\@ifl at 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}
+\RequirePackage{undolabl}[2024-12-05]
+\IfPackageLoadedTF{undolabl}{\IfPackageAtLeastF{undolabl}{2024-12-05}{%
+ \PackageError{pageslts}{undolabl package version too old}{%
+ Required version: 2024-12-05 v1.0n or newer,\MessageBreak%
+ found version:\space\space\space\space\csname ver at undolabl.sty\endcsname.%
+}}}{\PackageError{pageslts}{undolabl package not loaded}{%
+ The undolabl package is required by pageslts but was not loaded.}%
+ }
+
\def\pagesLTS at zero{0}
\def\pagesLTS at one{1}
\def\pagesLTS at two{2}
@@ -145,7 +173,7 @@
alphMult=\meaning\pagesLTS at alphMult .\MessageBreak%
Only values 'ab', 'bb', and '0' (zero) are valid.\MessageBreak%
Now the default 'ab' is being set.}
- \setkeys{pagesLTS}{alphMult=ab}
+ \SetKeys[pagesLTS]{alphMult=ab}
\fi
\fi
\fi
@@ -171,7 +199,7 @@
AlphMulti=\meaning\pagesLTS at AlphMulti .\MessageBreak%
Only values 'AB', 'BB', and '0' (zero) are valid.\MessageBreak%
The default 'AB' is set.}
- \setkeys{pagesLTS}{AlphMulti=AB}
+ \SetKeys[pagesLTS]{AlphMulti=AB}
\fi
\fi
\fi
@@ -240,9 +268,15 @@
\def\pagesLTS at fns{fnsymbol}
\def\pagesLTS at alph{alph}
\def\pagesLTS at Alph{Alph}
+\def\pagesLTS at gobble{gobble}
+\def\pagesLTS at silly{silly}
\def\pagesLTS at rerun{0}
-\def\pagesLTS at eso{0}
-\def\pagesLTS at esov{0}
+\def\pagesLTS at esoFs{0}
+\def\pagesLTS at esovFs{0}
+\def\pagesLTS at esoSy{0}
+\def\pagesLTS at esovSy{0}
+\def\pagesLTS at esoGbl{0}
+\def\pagesLTS at esovGbl{0}
\def\lastpageref{\lastpagereftxt}
\def\pagesLTS at undolable{none}
\def\pncmissing{0}
@@ -253,16 +287,15 @@
(maybe earlier or later).\MessageBreak%
Please use \string\pagenumbering \MessageBreak%
(with an argument like arabic, roman, Roman,\MessageBreak%
- fnsymbol, alph, or Alph) at the beginning\MessageBreak%
- of your document! Otherwise your document\MessageBreak%
- will probably compile, but the pageslts\MessageBreak%
- package might not be able to get all labels\MessageBreak%
- for the references to the respective pages\MessageBreak%
- right.\MessageBreak%
+ fnsymbol, alph, Alph, gobble,\MessageBreak%
+ or silly (requiring sillypage package))\MessageBreak%
+ at the beginning of your document!\MessageBreak%
+ Otherwise your document will probably compile,\MessageBreak%
+ but the pageslts package might not be able\MessageBreak%
+ to get all labels for the references\MessageBreak%
+ to the respective pages right.\MessageBreak%
}
-\NewCommandCopy{\OrigPagenumbering}{\pagenumbering}
-
\newcounter{CurrentPage}
\setcounter{CurrentPage}{1}
\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS at pnc}}
@@ -355,9 +388,16 @@
\else%
\def\pagesLTS at tmpC{Roman}%
\ifx\pagesLTS at pnc\pagesLTS at tmpC%
- \ifpagesLTS at RomanMulti%
- \renewcommand*{\thepage}{\XRoman{page}}%
- \fi%
+ \IfPackageLoadedTF{romanbarpagenumber}{%
+ \ifpagesLTS at RomanMulti%
+ \renewcommand*{\thepage}{\Roman at bar{\XRoman{page}}}%
+ \else%
+ \renewcommand*{\thepage}{\Roman at bar{page}}%
+ \fi%
+ }{\ifpagesLTS at RomanMulti%
+ \renewcommand*{\thepage}{\XRoman{page}}%
+ \fi%
+ }%
\else%
\ifx\pagesLTS at pnc\pagesLTS at alph%
\ifx\pagesLTS at alphMult\pagesLTS at ab%
@@ -382,34 +422,44 @@
\renewcommand*{\thepage}{\erroralphalph{\fnsymbolmult}{page}}%
\fi%
\else%
- \PackageError{pageslts}{unknown page numbering scheme}{%
- The pageslts package encountered the unknown\MessageBreak%
- page numbering scheme\MessageBreak%
- \meaning#1. \MessageBreak%
- If this is no typing mistake, it might work\MessageBreak%
- - or it might not work.\MessageBreak%
- \@ehc%
- }%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \IfPackageLoadedT{hyperref}{%
+ \renewcommand*{\thepage}{\texorpdfstring{\null}{{}}%
+ \csname @gobble\endcsname \c at page}}%
+ \else%
+ \PackageError{pageslts}{unknown page numbering scheme}{%
+ The pageslts package encountered the unknown\MessageBreak%
+ page numbering scheme\MessageBreak%
+ \meaning#1. \MessageBreak%
+ If this is no typing mistake, it might work\MessageBreak%
+ - or it might not work.\MessageBreak%
+ \@ehc}%
+ \fi\fi\fi\fi\fi\fi\fi\fi%
\let\pagesLTS at tmpC\undefined%
}
+\NewCommandCopy{\OrigPagenumbering}{\pagenumbering}
+
\renewcommand{\pagenumbering}[1]{%
\edef\pagesLTS at tmpA{#1}%
- \ifx\pagesLTS at pnc\pagesLTS at fns%
- \pagesLTS at providecounter{pagesLTS.fnsymbol.local}%
- \fi%
- \ifx\pagesLTS at tmpA\pagesLTS at fns%
- \pagesLTS at providecounter{pagesLTS.fnsymbol.local}%
- \fi%
\ifx\pagesLTS at pnc\pagesLTS at tmpA%
\else%
- \ifnum \value{CurrentPage}>1%
+ \ifx\pagesLTS at tmpA\pagesLTS at fns%
+ \pagesLTS at providecounter{pagesLTS.fnsymbol.local}%
+ \fi%
+ \ifx\pagesLTS at tmpA\pagesLTS at silly%
+ \IfPackageLoadedF{sillypage}{\PackageError{pageslts}{%
+ silly pagenumbering requested, sillypage package not loaded}{%
+ When using \string\pagenumbering{silly},\MessageBreak%
+ load the sillypage package.}}%
+ \pagesLTS at providecounter{pagesLTS.silly.local}%
+ \fi%
+ \ifx\pagesLTS at tmpA\pagesLTS at gobble%
+ \pagesLTS at providecounter{pagesLTS.gobble.local}%
+ \fi%
+ \ifnum\value{CurrentPage}>1%
\addtocounter{page}{-1}%
\addtocounter{pagesLTS.current.local.\pagesLTS at pnc}{-1}%
\newcounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}%
@@ -416,29 +466,46 @@
\setcounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
\value{pagesLTS.current.local.\pagesLTS at pnc}}%
\ifx\pagesLTS at pnc\pagesLTS at fns%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
\setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
\addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
-\value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
\fi%
\else%
- \pagesLTS at writelabel{\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}}%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}<2%
- \pagesLTS at writelabel{\pagesLTS at pnc}%
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
+ \addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
+ -\value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
+ \fi%
\else%
- \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
- \pagesLTS at providecounter{pagesLTS.\pagesLTS at pnc.done}%
- \addtocounter{pagesLTS.\pagesLTS at pnc.done}{%
- \value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
- \addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
- -\value{pagesLTS.\pagesLTS at pnc.done}}%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
+ \addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
+ -\value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
+ \fi%
+ \else%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}<2%
+ \pagesLTS at writelabel{\pagesLTS at pnc}%
+ \fi%
+ \fi%
\fi%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \ifpagesLTS at pagecontinue%
+ \setcounter{pagesLTS.tmpcounter}{\numexpr\value{pagesLTS.pnc.\pagesLTS at pnc}-1\relax}%
+ \pagesLTS at providecounter{pagesLTS.\pagesLTS at pnc.done}%
+ \addtocounter{pagesLTS.\pagesLTS at pnc.done}{%
+ \value{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.tmpcounter}.local.count}}%
+ \addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
+ -\value{pagesLTS.\pagesLTS at pnc.done}}%
+ \fi%
+ \fi%
+ \pagesLTS at writelabel{\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}}%
\if at filesw%
\immediate\write\@auxout{\string
\pagesLTS at providecounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.cnt}}%
- \fi%
- \edef\pagesLTS at tmpB{\arabic{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}}%
- \if at filesw%
+ \edef\pagesLTS at tmpB{\arabic{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}}%
\immediate\write\@auxout{\string
\setcounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.cnt}{\pagesLTS at tmpB}}%
\fi%
@@ -448,6 +515,11 @@
\addtocounter{pagesLTS.current.local.\pagesLTS at pnc}{+1}%
\addtocounter{page}{+1}%
\xdef\pagesLTS at pnc{#1}%
+ \ifpagesLTS at pagecontinue%
+ \else%
+ \pagesLTS at providecounter{pagesLTS.current.local.\pagesLTS at pnc}%
+ \setcounter{pagesLTS.current.local.\pagesLTS at pnc}{1}%
+ \fi%
\OrigPagenumbering{#1}%
\expandPagenumbering{#1}%
\pagesLTS at providecounter{pagesLTS.pnc.\pagesLTS at pnc}%
@@ -460,13 +532,22 @@
\setcounter{page}{1}%
\fi%
\pagesLTS at providecounter{pagesLTS.current.local.\pagesLTS at pnc}%
- \ifnum \value{pagesLTS.double.\pagesLTS at pnc}=1%
+ \ifnum\value{pagesLTS.double.\pagesLTS at pnc}=1%
\setcounter{pagesLTS.current.local.\pagesLTS at pnc}{1}%
\fi%
- \else%% before the first page has shipped out
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at zero\relax%
+ \else%
+ \PackageNoteNoLine{pageslts}{%
+ \string\pagenumbering\space used more than once before the end\MessageBreak%
+ of the first page, maybe in the preamble.\MessageBreak%
+ Resetting all unused page numbering schemes now}%
+ \setcounter{pagesLTS.pnc.\pagesLTS at pnc}{0}%
+ \setcounter{pagesLTS.double.\pagesLTS at pnc}{0}%
+ \setcounter{pagesLTS.current.local.\pagesLTS at pnc}{0}%
+ \fi%
\xdef\pagesLTS at pnc{#1}%
- \global\c at page \@ne\relax%
- \global\def\thepage{\csname \expandafter @\pagesLTS at pnc \endcsname \c at page}%
+ \OrigPagenumbering{#1}%
\expandPagenumbering{#1}%
\pagesLTS at providecounter{pagesLTS.pnc.\pagesLTS at pnc}%
\setcounter{pagesLTS.pnc.\pagesLTS at pnc}{1}%
@@ -505,7 +586,25 @@
{\arabic{pagesLTS.fnsymbol.local}}%
}{\arabic{pagesLTS.fnsymbol.local}}%
\else%
- \pageref{#1}%
+ \def\pagesLTS at tmpB{pagesLTS.silly.local}%
+ \ifx\pagesLTS at tmpA\pagesLTS at tmpB%
+ \pagesLTS at providecounter{pagesLTS.silly.local}%
+ \IfPackageLoadedTF{hyperref}{%
+ \href{\#pagesLTS.silly.local.\arabic{pagesLTS.silly.local}}%
+ {\arabic{pagesLTS.silly.local}}%
+ }{\arabic{pagesLTS.silly.local}}%
+ \else%
+ \def\pagesLTS at tmpB{pagesLTS.gobble.local}%
+ \ifx\pagesLTS at tmpA\pagesLTS at tmpB%
+ \pagesLTS at providecounter{pagesLTS.gobble.local}%
+ \IfPackageLoadedTF{hyperref}{%
+ \href{\#pagesLTS.gobble.local.\arabic{pagesLTS.gobble.local}}%
+ {\arabic{pagesLTS.gobble.local}}%
+ }{\arabic{pagesLTS.gobble.local}}%
+ \else%
+ \pageref{#1}%
+ \fi%
+ \fi%
\fi%
\let\pagesLTS at tmpA\undefined%
\let\pagesLTS at tmpB\undefined%
@@ -518,7 +617,19 @@
\pagesLTS at providecounter{pagesLTS.fnsymbol.local}%
\arabic{pagesLTS.fnsymbol.local}%
\else%
- \IfPackageLoadedTF{hyperref}{\pageref*{#1}}{\pageref{#1}}%
+ \def\pagesLTS at tmpB{pagesLTS.silly.local}%
+ \ifx\pagesLTS at tmpA\pagesLTS at tmpB%
+ \pagesLTS at providecounter{pagesLTS.silly.local}%
+ \arabic{pagesLTS.silly.local}%
+ \else%
+ \def\pagesLTS at tmpB{pagesLTS.gobble.local}%
+ \ifx\pagesLTS at tmpA\pagesLTS at tmpB%
+ \pagesLTS at providecounter{pagesLTS.gobble.local}%
+ \arabic{pagesLTS.gobble.local}%
+ \else%
+ \IfPackageLoadedTF{hyperref}{\pageref*{#1}}{\pageref{#1}}%
+ \fi%
+ \fi%
\fi%
\let\pagesLTS at tmpA\undefined%
\let\pagesLTS at tmpB\undefined%
@@ -526,14 +637,29 @@
\newcommand\overrideLTSlabel[2]{%
\@bsphack%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}>1%
- \edef\pagesLTS at tmpC{#1}%
- \edef\pagesLTS at tmpD{pagesLTS.\pagesLTS at pnc.local}%
- \ifx\pagesLTS at tmpC\pagesLTS at tmpD%
+ \if at filesw%
+ \edef\pagesLTS at tmpC{#1}%
+ \edef\pagesLTS at tmpD{pagesLTS.\pagesLTS at pnc.local}%
+ \ifx\pagesLTS at tmpC\pagesLTS at tmpD%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
+ \else%
+ \edef\pagesLTS at tmpD{fnsymbol}%
+ \ifx\pagesLTS at pnc\pagesLTS at tmpD%
\immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
+ \fi%
+ \edef\pagesLTS at tmpD{gobble}%
+ \ifx\pagesLTS at pnc\pagesLTS at tmpD%
+ \immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
+ \fi%
+ \edef\pagesLTS at tmpD{silly}%
+ \ifx\pagesLTS at pnc\pagesLTS at tmpD%
+ \immediate\write\@auxout{\string\undonewlabel{#1}}\@overriddenmessage s{#1}%
+ \fi%
\fi%
\fi%
\pagesLTS at putlabel{#1}{#2}{0}%
+ \fi%
\@esphack%
}
@@ -545,20 +671,47 @@
\IfPackageLoadedT{hyperref}{\phantomsection%
\hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}%
}%
- \ifnum \pagesLTS at esov=\pagesLTS at zero%
- \label{pagesLTS.fnsymbol}%
+ \ifnum\pagesLTS at esovFs=\pagesLTS at zero%
+ \if at filesw\label{pagesLTS.fnsymbol}\fi%
+ \pagesLTS at putlabel{pagesLTS.fnsymbol.local}{\theCurrentPageLocal}{0}%
\else%
\overridelabel{pagesLTS.fnsymbol}%
+ \overrideLTSlabel{pagesLTS.fnsymbol.local}{\theCurrentPageLocal}%
\fi%
\else%
- \IfPackageLoadedT{hyperref}{\phantomsection}%
- \if at filesw%
- \overridelabel{pagesLTS.\pagesLTS at pnc}%
- \addtocounter{page}{+1}%
- \overrideLTSlabel{pagesLTS.\pagesLTS at pnc.local}{\theCurrentPageLocal}%
- \addtocounter{page}{-1}%
- \fi%
- \fi%
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \pagesLTS at providecounter{pagesLTS.silly.cont}%
+ \addtocounter{pagesLTS.silly.cont}{1}%
+ \IfPackageLoadedT{hyperref}{\phantomsection%
+ \hypertarget{pagesLTS.silly.local.\arabic{pagesLTS.silly.cont}}{}%
+ }%
+ \ifnum\pagesLTS at esovSy=\pagesLTS at zero%
+ \if at filesw\label{pagesLTS.silly}\fi%
+ \pagesLTS at putlabel{pagesLTS.silly.local}{\theCurrentPageLocal}{0}%
+ \else%
+ \overridelabel{pagesLTS.silly}%
+ \overrideLTSlabel{pagesLTS.silly.local}{\theCurrentPageLocal}%
+ \fi%
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \pagesLTS at providecounter{pagesLTS.gobble.cont}%
+ \addtocounter{pagesLTS.gobble.cont}{1}%
+ \IfPackageLoadedT{hyperref}{\phantomsection%
+ \hypertarget{pagesLTS.gobble.local.\arabic{pagesLTS.gobble.cont}}{}%
+ }%
+ \ifnum\pagesLTS at esovGbl=\pagesLTS at zero%
+ \if at filesw\label{pagesLTS.gobble}\fi%
+ \pagesLTS at putlabel{pagesLTS.gobble.local}{\theCurrentPageLocal}{0}%
+ \else%
+ \overridelabel{pagesLTS.gobble}%
+ \overrideLTSlabel{pagesLTS.gobble.local}{\theCurrentPageLocal}%
+ \fi%
+ \else%
+ \IfPackageLoadedT{hyperref}{\phantomsection}%
+ \if at filesw%
+ \overridelabel{pagesLTS.\pagesLTS at pnc}%
+ \overrideLTSlabel{pagesLTS.\pagesLTS at pnc.local}{\theCurrentPageLocal}%
+ \fi\fi\fi\fi%
\endgroup%
}
@@ -593,7 +746,7 @@
\fi%
\fi%
\fi%
- \ifnum \value{CurrentPage}=1%
+ \ifnum\value{CurrentPage}=1%
\ifx\pagesLTS at called\pagesLTS at zero%
\gdef\pncmissing{1}%
\setcounter{pagesLTS.tmpcounter}{\value{page}}%
@@ -610,12 +763,19 @@
\fi%
\ifx\pagesLTS at pnc\pagesLTS at fns%
\pagesLTS at EveryShipout%
- \xdef\pagesLTS at esov{\arabic{pagesLTS.fnsymbol.cont}}%
+ \xdef\pagesLTS at esovFs{\arabic{pagesLTS.fnsymbol.cont}}%
\else%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
\pagesLTS at EveryShipout%
- \fi%
- \fi%
+ \xdef\pagesLTS at esovSy{\arabic{pagesLTS.silly.cont}}%
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \pagesLTS at EveryShipout%
+ \xdef\pagesLTS at esovGbl{\arabic{pagesLTS.gobble.cont}}%
+ \else%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \pagesLTS at EveryShipout%
+ \fi\fi\fi\fi%
\addtocounter{CurrentPage}{1}%
\addtocounter{pagesLTS.current.local.\pagesLTS at pnc}{1}%
}
@@ -632,28 +792,34 @@
}
\newcommand{\pagesLTS at makeHy}{%
- \gdef\pagesLTS at Hy{}%
- \IfPackageLoadedT{hyperref}{%
- \ifHy at pageanchor%
- \xdef\pagesLTS at Hptest{Doc-Start}%
- \ifx\pagesLTS at Hptest\@currentHpage\relax%
- \gdef\pagesLTS at Hy{\@currentHpage}%
- \else%
- \edef\pagesLTS at Hptest{\@currentHpage}%
- \ifx\pagesLTS at Hptest\empty\relax%
+ \xdef\pagesLTS at Hptest{Doc-Start}%
+ \ifx\pagesLTS at Hptest\@currentHpage\relax%
+ \gdef\pagesLTS at Hy{\@currentHpage}%
+ \else%
+ \edef\pagesLTS at Hptest{\@currentHpage}%
+ \ifx\pagesLTS at Hptest\empty\relax%
+ \else%
+ \edef\pagesLTS at Hptest{page.}%
+ \ifx\@currentHpage\pagesLTS at Hptest\relax%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \PackageNoteNoLine{pageslts}{%
+ With gobbled page numbers "\string\@currentHpage "\MessageBreak%
+ is just "page." without number.\MessageBreak%
+ "\string\pagesLTSlastpageHy " is now let empty}%
\else%
- \gdef\pagesLTS at Hy{\pagesLTS at 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%
+ \PackageWarningNoLine{pageslts}{%
+ \string\@currentHpage\space is just "page." without number.\MessageBreak%
+ \string\pagesLTSlastpageHy\space is now let empty}%
\fi%
- \fi%
- \fi%
- }%
+ \else%
+ \gdef\pagesLTS at Hy{\pagesLTS at 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
@@ -696,15 +862,21 @@
\begingroup%
\protected at iwrite\@auxout{}{\string\newlabel{#1}{%
{\@currentlabel}{#2}{\@currentlabelname}%
- {\IfPackageLoadedTF{hyperref}{\ifHy at pageanchor\@currentHpage\fi%
- }{\@currentHref}}%
- {\@kernel at reserved@label at data}}%
- }%
+ {\ifx\pagesLTS at pnc\pagesLTS at fns%
+ \@currentHref%
+ \else\ifx\pagesLTS at pnc\pagesLTS at silly%
+ \@currentHref%
+ \else\ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \@currentHref%
+ \else\ifHy at pageanchor\@currentHpage\fi%
+ \fi\fi\fi%
+ }%
+ {\@kernel at reserved@label at data}}}%
\endgroup%
\fi%
}{%
\if at filesw%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}<2%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}<2%
\protected at iwrite\@auxout{}{\string\newlabel{#1}{%
{\@currentlabel}{#2}{\@currentlabelname}%
{\@currentHref}{\@kernel at reserved@label at data}}%
@@ -737,30 +909,29 @@
\pagesLTS at messageNPN}%
\else%
\pagesLTS at writelabel{\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}}%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}<2%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}<2%
\ifx\pagesLTS at pnc\pagesLTS at fns%
- \else%
- \pagesLTS at writelabel{\pagesLTS at pnc}%
- \fi%
- \fi%
- \fi%
+ \else\ifx\pagesLTS at pnc\pagesLTS at silly%
+ \else\ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \else\pagesLTS at writelabel{\pagesLTS at pnc}%
+ \fi\fi\fi\fi\fi%
\addtocounter{page}{+1}%
\pagesLTS at putlabel{LastPages}{\theCurrentPage}{1}%
\addtocounter{CurrentPage}{+1}%
- \addtocounter{pagesLTS.current.local.\pagesLTS at pnc}{1}%
+ \addtocounter{pagesLTS.current.local.\pagesLTS at pnc}{+1}%
}
\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.}%
+ \PackageNoteNoLine{pageslts}{Packages lastpage and pageslts used:\MessageBreak%
+ Are you sure that you want to load both packages?}%
}%
\IfPackageLoadedTF{hyperref}{%
- \IfPackageAtLeastTF{hyperref}{2024-10-30}{}{%
+ \ProvideTextCommand{\textasteriskcentered}{PD1}{*}%
+ \IfPackageAtLeastF{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 at hyperref.sty\endcsname.}}%
+ Required version: 2024-10-30 v7.01k or newer,\MessageBreak%
+ found version:\space\space\space\space\csname ver at hyperref.sty\endcsname.}}%
}{\PackageNoteNoLine{pageslts}{Package hyperref not loaded.\MessageBreak%
pageslts would support hyperref.\MessageBreak%
The page references will NOT be hyperlinked}%
@@ -796,24 +967,19 @@
}
\def\pagesLTS at skld{0}
-\IfPackageLoadedT{showkeys}{%
- \IfPackageLoadedWithOptionsF{showkeys}{final}{%
- \def\pagesLTS at skld{1}%
- }%
+\IfPackageLoadedT{showkeys}{\IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \def\pagesLTS at skld{1}}%
}%
\AddToHook{enddocument/afterlastpage}{%
- \IfPackageLoadedT{showkeys}{%
- \IfPackageLoadedWithOptionsF{showkeys}{final}{%
- \ifx\pagesLTS at skld\pagesLTS at 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%
- }%
- }%
+ \IfPackageLoadedT{showkeys}{\IfPackageLoadedWithOptionsF{showkeys}{final}{%
+ \ifx\pagesLTS at skld\pagesLTS at 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}%
+ }%
\ifx\pncmissing\pagesLTS at one\relax%
\PackageError{pageslts}{pagenumbering scheme missing}{\pagesLTS at messageNPN}%
\fi%
@@ -820,29 +986,60 @@
\PackageInfo{pageslts}{enddocument/afterlastpage (AED): pageslts setting LastPage}%
\ifx\pagesLTS at pnc\pagesLTS at fns%
\def\pagesLTS at tmpA{\arabic{pagesLTS.fnsymbol.local}}%
- \ifnum \pagesLTS at eso=\pagesLTS at tmpA%
+ \ifnum\pagesLTS at esoFs=\pagesLTS at tmpA%
\gdef\pagesLTS at rerun{0}%
\else%
\gdef\pagesLTS at rerun{1}%
\fi%
\if at filesw%
- \immediate\write\@auxout{\string\gdef\string\pagesLTS at eso{\pagesLTS at tmpA}}%
+ \immediate\write\@auxout{\string\gdef\string\pagesLTS at esoFs{\pagesLTS at tmpA}}%
\fi%
- \fi%
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at silly%
+ \def\pagesLTS at tmpA{\arabic{pagesLTS.silly.local}}%
+ \ifnum\pagesLTS at esoSy=\pagesLTS at tmpA%
+ \gdef\pagesLTS at rerun{0}%
+ \else%
+ \gdef\pagesLTS at rerun{1}%
+ \fi%
+ \if at filesw%
+ \immediate\write\@auxout{\string\gdef\string\pagesLTS at esoSy{\pagesLTS at tmpA}}%
+ \fi%
+ \else%
+ \ifx\pagesLTS at pnc\pagesLTS at gobble%
+ \def\pagesLTS at tmpA{\arabic{pagesLTS.gobble.local}}%
+ \ifnum\pagesLTS at esoGbl=\pagesLTS at tmpA%
+ \gdef\pagesLTS at rerun{0}%
+ \else%
+ \gdef\pagesLTS at rerun{1}%
+ \fi%
+ \if at filesw%
+ \immediate\write\@auxout{\string\gdef\string\pagesLTS at esoGbl{\pagesLTS at tmpA}}%
+ \fi\fi\fi\fi%
\pagesLTS at putlabel{LastPage}{\thepage}{1}%
\let\pagesLTS at tmpA\undefined%
\if at filesw%
- \ifx\pagesLTS at esov\pagesLTS at zero\relax%
+ \ifx\pagesLTS at esovFs\pagesLTS at zero\relax%
\else%
\immediate\write\@auxout{\string\pagesLTS at providecounter{pagesLTS.fnsymbol.local}}%
- \immediate\write\@auxout{\string\setcounter{pagesLTS.fnsymbol.local}{\pagesLTS at esov}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.fnsymbol.local}{\pagesLTS at esovFs}}%
\fi%
+ \ifx\pagesLTS at esovSy\pagesLTS at zero\relax%
+ \else%
+ \immediate\write\@auxout{\string\pagesLTS at providecounter{pagesLTS.silly.local}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.silly.local}{\pagesLTS at esovSy}}%
+ \fi%
+ \ifx\pagesLTS at esovGbl\pagesLTS at zero\relax%
+ \else%
+ \immediate\write\@auxout{\string\pagesLTS at providecounter{pagesLTS.gobble.local}}%
+ \immediate\write\@auxout{\string\setcounter{pagesLTS.gobble.local}{\pagesLTS at esovGbl}}%
+ \fi%
\fi%
\pagesLTS at providecounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}%
\setcounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{%
\value{pagesLTS.current.local.\pagesLTS at pnc}}%
\addtocounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}{-1}%
- \ifnum \value{pagesLTS.pnc.\pagesLTS at pnc}>1%
+ \ifnum\value{pagesLTS.pnc.\pagesLTS at pnc}>1%
\setcounter{pagesLTS.tmpcounter}{\value{pagesLTS.pnc.\pagesLTS at pnc}}%
\@tempcnta=\value{pagesLTS.tmpcounter}\relax%
\loop%
@@ -859,13 +1056,13 @@
\edef\pagesLTS at tmpA{\arabic{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.count}}%
\immediate\write\@auxout{\string
\setcounter{pagesLTS.\pagesLTS at pnc.\arabic{pagesLTS.pnc.\pagesLTS at pnc}.local.cnt}{\pagesLTS at tmpA}}%
- \let\pagesLTS at tmpA\undefined%
\fi%
\addtocounter{page}{-1}%
\def\pagesLTS at tmpA{\thepage}%
\if at filesw%
\protected at iwrite\@auxout{}{\string\gdef\string\pagesLTSlastpage{\pagesLTS at tmpA}}%
- \pagesLTS at makeHy|%
+ \gdef\pagesLTS at Hy{}%
+ \IfPackageLoadedT{hyperref}{\ifHy at pageanchor\pagesLTS at makeHy\fi}%
\protected at iwrite\@auxout{}{\string\gdef\string\pagesLTSlastpageHy{\pagesLTS at Hy}}%
\fi%
\addtocounter{page}{+1}%
@@ -898,11 +1095,12 @@
\ifx\pagesLTS at FMBpncn\pagesLTS at zero%
\else%
\ifx\pagesLTS at FMBpncp\pagesLTS at one%
- \PackageError{pageslts}{\string\pagenumbering\space before \string\frontmatter}{%
+ \PackageWarning{pageslts}{\string\pagenumbering\space before \string\frontmatter:\MessageBreak%
Do not use \string\pagenumbering{\pagesLTS at FMBpncn} before \string\frontmatter\MessageBreak%
on the same page!\MessageBreak%
\string\frontmatter\space (re)defines the page numbering scheme to \pagesLTS at FMEpncn ,\MessageBreak%
- thus earlier use of \string\pagenumbering{\pagesLTS at FMBpncn} on the same page is useless anyway.}%
+ thus earlier use of \string\pagenumbering{\pagesLTS at FMBpncn} %
+ on the same page is useless anyway\MessageBreak}%
\fi%
\fi%
\fi%
More information about the tex-live-commits
mailing list.