summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lastpage
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-07-24 20:22:07 +0000
committerKarl Berry <karl@freefriends.org>2023-07-24 20:22:07 +0000
commit3055b80d02fddbad245f27ee4e49c90e801ceea7 (patch)
tree6dea9e30861a820ae5f1e129276927b830829ce6 /Master/texmf-dist/tex/latex/lastpage
parentb0cc1f5978aadab4a408401714ccb10ca46c7766 (diff)
lastpage (24jul23)
git-svn-id: svn://tug.org/texlive/trunk@67722 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lastpage')
-rw-r--r--Master/texmf-dist/tex/latex/lastpage/lastpage.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lastpage/lastpage209.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty5
-rw-r--r--Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty27
-rw-r--r--Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty167
5 files changed, 88 insertions, 121 deletions
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
index e7271da7521..991413af18c 100644
--- a/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
+++ b/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2023-04-12 v2.0b
+%% Version: 2023-07-24 v2.0c
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2023 by
@@ -59,7 +59,7 @@
%% Part of the "lastpage" package
%% loads either lastpage2.09.sty for TeX 2.09 or lastpage2e.sty for LaTeX 2e
%% with code from https://groups.google.com/g/comp.text.tex/c/-Qmhj1ZI4xM
-\def\loadlastpage{\ProvidesPackage{lastpage}[2023/04/12 v2.0b lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2023/07/24 v2.0c lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
\begingroup \expandafter \ifx \csname documentclass\endcsname\relax
\endgroup \expandafter \input{lastpage209.sty}
\else \endgroup \expandafter \loadlastpage
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty
index 48f28130f71..5f06379d259 100644
--- a/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty
+++ b/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2023-04-12 v2.0b
+%% Version: 2023-07-24 v2.0c
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2023 by
@@ -59,8 +59,8 @@
%% Part of the "lastpage" package
%% FOR LaTeX 2.09 ONLY - FOR LaTeX 2e USE lastpage2e.sty
%% This is lastpage209.sty invented by Jeffrey P. Goldberg,
-%% after Piet van Oostrum: Page layout in LaTeX, March 2, 2004, section 16; fancyhdr.pdf;
-%% lastpage209.sty maintained by H.-Martin Muench.
+%% after Piet van Oostrum: Page layout in LaTeX, March 2, 2004, section 16;
+%% fancyhdr.pdf; lastpage209.sty maintained by H.-Martin Muench.
\let\origenddocument=\enddocument%
\def\enddocument{\clearpage%
{\addtocounter{page}{-1}%
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty
index f2de5b9d9af..8b983e14ffc 100644
--- a/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty
+++ b/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2023-04-12 v2.0b
+%% Version: 2023-07-24 v2.0c
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2023 by
@@ -58,7 +58,8 @@
%%
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpage2e}[2023/04/12 v2.0b Decide which 2e lastpage version to use (HMM)]
+\ProvidesPackage{lastpage2e}[2023/07/24 v2.0c %
+ Decide which 2e lastpage version to use (HMM)]
\@ifl@t@r\fmtversion{2022/11/01}{\RequirePackage{lastpagemodern}}{%
\RequirePackage{lastpageclassic}}
\message{^^J}
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty b/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty
index 88121ac9ddc..03101c36897 100644
--- a/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty
+++ b/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2023-04-12 v2.0b
+%% Version: 2023-07-24 v2.0c
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2023 by
@@ -58,8 +58,10 @@
%%
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpageclassic}[2023/04/12 v2.0b Refers to last page's name (HMM; JPG)]
-%% allows for things like "Page \thepage{} of \pageref{LastPage}" to get "Page 7 of 9"
+\ProvidesPackage{lastpageclassic}[2023/07/24 v2.0c %
+ Refers to last page's name (HMM; JPG)]
+%% allows for things like "Page \thepage{} of \pageref{LastPage}"
+%% to get "Page 7 of 9"
\gdef\lastpage@one{1}
\gdef\lastpage@hyper{0}
@@ -124,8 +126,8 @@
\fi%
\begingroup%
\addtocounter{page}{-1}%
-%% The following code is from the hyperref package %%
-%% 2010/04/17 v6.80x; newer versions are available. %%
+%% with code from \Hy@EveryPageAnchor of the hyperref package,
+%% 2010/04/17 v6.80x; newer versions are available
\let\@number\@firstofone%
\ifHy@pageanchor%
\ifHy@hypertexnames%
@@ -133,30 +135,16 @@
\def\Hy@temp{\arabic{page}}%
\else%
\Hy@unicodefalse%
-%% Code not from hyperref package: %%
-%% The following lines are taken from the pageslts package, %%
-%% which in turn got them from the hyperref package and %%
-%% modified them. %%
-%% Without the modification, after the first shipout "PD1" %%
-%% is inserted each time |\pdfstringdef\Hy@temp{\thepage}| %%
-%% is executed. %%
\ifnum \value{page}=1\relax%
\ifx \lastpage@firstpage\lastpage@one\relax%
\def\Hy@temp{\thepage}%
\gdef\lastpage@firstpage{0}%
\else%
-%% Code from hyperref package again: %%
\pdfstringdef\Hy@temp{\thepage}%
-%% End of code from the hyperref package. %%
\fi%
-%% The pageslts package would even check for fnsymbol page %%
-%% numbering scheme and adapt the code correspondingly. %%
\else%
-%% Code from hyperref package again: %%
\pdfstringdef\Hy@temp{\thepage}%
-%% Code from pageslts package again: %%
\fi%
-%% Code from hyperref package again: %%
\fi%
\else%
\def\Hy@temp{\the\Hy@pagecounter}%
@@ -166,7 +154,6 @@
\string\newlabel{LastPage}{{}{\thepage}{}{%
\ifHy@pageanchor page.\Hy@temp\fi}{}}%
}%
-%% End of code from the hyperref package. %%
\immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
\ifHy@pageanchor%
\immediate\write\@auxout{\string\xdef\string\lastpage@lastpageHy{\Hy@temp}}%
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty b/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty
index 2c4848ec724..5ff8a590ca7 100644
--- a/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty
+++ b/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2023-04-12 v2.0b
+%% Version: 2023-07-24 v2.0c
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2023 by
@@ -58,7 +58,8 @@
%%
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[2022-11-01]
-\ProvidesPackage{lastpagemodern}[2023-04-12 v2.0b Refers to last page's name (HMM; JPG)]
+\ProvidesPackage{lastpagemodern}[2023-07-24 v2.0c %
+ Refers to last page's name (HMM; JPG)]
%% allows for things like "Page \thepage{} of \pageref{LastPage}"
%% to get "Page 7 of 9" or "Page VII of IX";
%% the NUMBER of pages is available via \@abspage@last, but with pages
@@ -70,106 +71,84 @@
\gdef\lastpage@lastpage{??}
\gdef\lastpage@lastpageHy{??}
-\AddToHook{begindocument/end}{%
- \IfPackageLoadedTF{endfloat}{%
- \IfPackageAtLeastTF{endfloat}{1994/06/01}{\relax}{%
- \PackageError{lastpage}{%
- Incompatibility with outdated version of endfloat package}{%
- lastpage is not fully compatible with a version\MessageBreak%
- before 2.1 of the endfloat package,\MessageBreak%
- because those versions redefined\MessageBreak%
- the \string\enddocument\space command.}%
- }}{}%
- \gdef\lastpage@putlabel{\relax}%
+\AddToHook{begindocument/end}{\gdef\lastpage@putlabel{\relax}}
+
+%% From https://tex.stackexchange.com/a/542425 with thanks to
+%% Prof. Enrico Gregorio
+\long\def\protected@iwrite#1#2#3{%
+ \begingroup%
+ #2%
+ \let\protect\@unexpandable@protect%
+ \edef\reserved@a{\immediate\write#1{#3}}%
+ \reserved@a%
+ \endgroup%
+ \if@nobreak\ifvmode\nobreak\fi\fi%
}
\newcommand{\lastpage@putl@bel}{%
\IfPackageLoadedTF{pageslts}{\relax}{%
- \IfPackageLoadedTF{hyperref}{\lastpage@putlabelhyper}{%
- \IfPackageLoadedTF{nameref}{\lastpage@putlabelNR}{%
- \begingroup%
- \addtocounter{page}{-1}%
- \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}}}%
- \immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
- \immediate\write\@auxout{\string\gdef\string\lastpage@lastpageHy{}}%
- \addtocounter{page}{+1}%
- \endgroup%
- }%
- }%
- }%
- }
-
-\newcommand{\lastpage@putlabelhyper}{%
- \ifHy@pageanchor%
- \else%
- \PackageError{lastpage}{hyperref option pageanchor disabled}{%
- The \string\pageref{LastPage} link does not work\MessageBreak%
- using hyperref with disabled option `pageanchor'.\MessageBreak%
- }%
- \fi%
- \begingroup%
- \addtocounter{page}{-1}%
-%% The following code is from the hyperref package %%
-%% 2010/04/17 v6.80x; newer versions are available. %%
- \let\@number\@firstofone%
- \ifHy@pageanchor%
- \ifHy@hypertexnames%
- \ifHy@plainpages%
- \def\Hy@temp{\arabic{page}}%
- \else%
- \Hy@unicodefalse%
-%% Code not from hyperref package: %%
-%% The following lines are taken from the pageslts package, %%
-%% which in turn got them from the hyperref package and %%
-%% modified them. %%
-%% Without the modification, after the first shipout "PD1" %%
-%% is inserted each time |\pdfstringdef\Hy@temp{\thepage}| %%
-%% is executed. %%
- \ifnum \value{page}=1\relax%
- \ifx \lastpage@firstpage\lastpage@one\relax%
- \def\Hy@temp{\thepage}%
- \gdef\lastpage@firstpage{0}%
+ \IfPackageLoadedTF{hyperref}{\ifHy@pageanchor\else%
+ \PackageError{lastpage}{hyperref option pageanchor disabled}{%
+ The \string\pageref{LastPage} link does not work\MessageBreak%
+ using hyperref with disabled option `pageanchor'.\MessageBreak%
+ }\fi}{}%
+ \begingroup%
+ \addtocounter{page}{-1}%
+ \IfPackageLoadedTF{hyperref}{%
+ % with code from \Hy@EveryPageAnchor of the hyperref package,
+ % 2023-07-08 v7.01b
+ \ifHy@pageanchor%
+ \ifHy@hypertexnames%
+ \ifHy@plainpages%
+ \def\Hy@temp{\the\c@page}%
+ \def\Hy@TempPageAnchor{\hyper@@anchor{page.\the\c@page}}%
+ \Hy@PageAnchorSlidesPlain%
\else%
-%% Code from hyperref package again: %%
- \pdfstringdef\Hy@temp{\thepage}%
-%% End of code from the hyperref package. %%
- \fi%
-%% The pageslts package would even check for fnsymbol page %%
-%% numbering scheme and adapt the code correspondingly. %%
+ % No \begingroup, because we are in a group anyway.
+ \let\@number\@firstofone%
+ \Hy@unicodefalse%
+ \Hy@PageAnchorSlide%
+ \pdfstringdef\@the@H@page{\thepage}%
+ % No \endgroup, because we are in a group anyway.
+ \EdefUnescapeString\@the@H@page{\@the@H@page}%
+ \def\Hy@TempPageAnchor{\hyper@@anchor{page.\@the@H@page}}%
+ \def\Hy@temp{\@the@H@page}%
+ \fi%
\else%
-%% Code from hyperref package again: %%
- \pdfstringdef\Hy@temp{\thepage}%
-%% Code from pageslts package again: %%
+ % NOT! \Hy@GlobalStepCount\Hy@pagecounter
+ \def\Hy@TempPageAnchor{\hyper@@anchor{page.\the\Hy@pagecounter}}%
+ \def\Hy@temp{\the\Hy@pagecounter}%
\fi%
-%% Code from hyperref package again: %%
\fi%
- \else%
- \def\Hy@temp{\the\Hy@pagecounter}%
- \fi%
- \fi%
- \immediate\write\@auxout{%
- \string\newlabel{LastPage}{{}{\thepage}{}{%
- \ifHy@pageanchor page.\Hy@temp\fi}{}}%
- }%
-%% End of code from the hyperref package. %%
- \immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
- \ifHy@pageanchor%
- \immediate\write\@auxout{\string\xdef\string\lastpage@lastpageHy{\Hy@temp}}%
- \else%
- \immediate\write\@auxout{\string\gdef\string\lastpage@lastpageHy{}}%
- \fi%
- \addtocounter{page}{+1}%
- \endgroup%
- }
-
-\newcommand{\lastpage@putlabelNR}{%
- \begingroup%
- \addtocounter{page}{-1}%
- \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}{}{}{}}}%
- \immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
- \immediate\write\@auxout{\string\gdef\string\lastpage@lastpageHy{}}%
- \addtocounter{page}{+1}%
- \endgroup%
+ }{}%
+ \IfFormatAtLeastTF{2023/06/01}{%
+ \protected@iwrite\@auxout{}{\string\newlabel{LastPage}{%
+ {\@currentlabel}%
+ {\IfPackageLoadedTF{hyperref}{\string\begingroup%
+ \string\pdfstringdefDisableCommands{\string\let%
+ \string\TextOrMath\string\@firstoftwo}\thepage%
+ \string\endgroup%
+ }{\thepage}}%
+ {\@currentlabelname}%
+ {\IfPackageLoadedTF{hyperref}{\ifHy@pageanchor page.\Hy@temp\fi%
+ }{\@currentHref}}%
+ {\@kernel@reserved@label@data}}}%
+ }{\IfPackageLoadedTF{hyperref}{\protected@iwrite\@auxout{}{%
+ \string\newlabel{LastPage}{{}{\thepage}{}{%
+ \ifHy@pageanchor page.\Hy@temp\fi}{}}}%
+ }{\IfPackageLoadedTF{nameref}{\protected@iwrite\@auxout{}{%
+ \string\newlabel{LastPage}{{}{\thepage}{}{}{}}}%
+ }{\protected@iwrite\@auxout{}{\string\newlabel{LastPage}{%
+ {}{\thepage}}}%
+ }%
+ }%
+ }%
+ \protected@iwrite\@auxout{}{\string\gdef\string\lastpage@lastpage{\thepage}}%
+ \gdef\lastpage@Hy{\IfPackageLoadedTF{hyperref}{\ifHy@pageanchor\Hy@temp\fi}{}}%
+ \protected@iwrite\@auxout{}{\string\gdef\string\lastpage@lastpageHy{\lastpage@Hy}}%
+ \addtocounter{page}{+1}%
+ \endgroup%
+ }%
}
\newcommand{\lastpage@fileswtest}[2]{%