diff options
author | Karl Berry <karl@freefriends.org> | 2024-04-27 19:56:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-04-27 19:56:46 +0000 |
commit | 10a689183023c5d362a4aa436bdbe0dcd26c7a67 (patch) | |
tree | e87cde3d9e1c07c2ae8bbd84c29351cd6d4ba59e /Master/texmf-dist/tex/latex | |
parent | fac69c3c46b724e8708162ad18e3775a5afc1bc1 (diff) |
lastpage (27apr24)
git-svn-id: svn://tug.org/texlive/trunk@71099 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
5 files changed, 50 insertions, 97 deletions
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage.sty index 77aeae49400..154c0bdf712 100644 --- a/Master/texmf-dist/tex/latex/lastpage/lastpage.sty +++ b/Master/texmf-dist/tex/latex/lastpage/lastpage.sty @@ -9,10 +9,10 @@ %% This is a generated file. %% %% Project: lastpage -%% Version: 2023-10-14 v2.0e +%% Version: 2024-04-27 v2.1a %% Info: Refers to last page's name %% -%% Copyright (C) 2010 - 2023 by +%% Copyright (C) 2010 - 2024 by %% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de> %% Portions of code copyrighted by other people as marked. %% @@ -60,7 +60,7 @@ %% Part of the "lastpage" package %% loads either lastpage2.09.sty for TeX 2.09 or lastpage2e.sty for LaTeX 2e %% with code from https://groups.google.com/g/comp.text.tex/c/-Qmhj1ZI4xM -\def\loadlastpage{\ProvidesPackage{lastpage}[2023/10/14 v2.0e lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}} +\def\loadlastpage{\ProvidesPackage{lastpage}[2024/04/27 v2.1a lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}} \begingroup \expandafter \ifx \csname documentclass\endcsname\relax \endgroup \expandafter \input{lastpage209.sty} \else \endgroup \expandafter \loadlastpage diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty index b99cfff16a6..f93a6d0f1ae 100644 --- a/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty +++ b/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty @@ -9,10 +9,10 @@ %% This is a generated file. %% %% Project: lastpage -%% Version: 2023-10-14 v2.0e +%% Version: 2024-04-27 v2.1a %% Info: Refers to last page's name %% -%% Copyright (C) 2010 - 2023 by +%% Copyright (C) 2010 - 2024 by %% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de> %% Portions of code copyrighted by other people as marked. %% diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty index 9983c6b9999..50d8183d2a5 100644 --- a/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty +++ b/Master/texmf-dist/tex/latex/lastpage/lastpage2e.sty @@ -9,10 +9,10 @@ %% This is a generated file. %% %% Project: lastpage -%% Version: 2023-10-14 v2.0e +%% Version: 2024-04-27 v2.1a %% Info: Refers to last page's name %% -%% Copyright (C) 2010 - 2023 by +%% Copyright (C) 2010 - 2024 by %% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de> %% Portions of code copyrighted by other people as marked. %% @@ -59,9 +59,9 @@ %% %% Part of the "lastpage" package \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{lastpage2e}[2023/10/14 v2.0e % +\ProvidesPackage{lastpage2e}[2024/04/27 v2.1a % Decide which 2e lastpage version to use (HMM)] -\@ifl@t@r\fmtversion{2022/11/01}{\RequirePackage{lastpagemodern}}{% +\@ifl@t@r\fmtversion{2023/06/01}{\RequirePackage{lastpagemodern}}{% \RequirePackage{lastpageclassic}} \message{^^J} \endinput diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty b/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty index d1d80cd3c15..d7a4b6ce9af 100644 --- a/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty +++ b/Master/texmf-dist/tex/latex/lastpage/lastpageclassic.sty @@ -9,10 +9,10 @@ %% This is a generated file. %% %% Project: lastpage -%% Version: 2023-10-14 v2.0e +%% Version: 2024-04-27 v2.1a %% Info: Refers to last page's name %% -%% Copyright (C) 2010 - 2023 by +%% Copyright (C) 2010 - 2024 by %% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de> %% Portions of code copyrighted by other people as marked. %% @@ -59,7 +59,7 @@ %% %% Part of the "lastpage" package \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{lastpageclassic}[2023/10/14 v2.0e % +\ProvidesPackage{lastpageclassic}[2024/04/27 v2.1a % Refers to last page's name (HMM; JPG)] %% allows for things like "Page \thepage{} of \pageref{LastPage}" %% to get "Page 7 of 9" diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty b/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty index 9f7adb2cccc..efeedd84bb3 100644 --- a/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty +++ b/Master/texmf-dist/tex/latex/lastpage/lastpagemodern.sty @@ -9,10 +9,10 @@ %% This is a generated file. %% %% Project: lastpage -%% Version: 2023-10-14 v2.0e +%% Version: 2024-04-27 v2.1a %% Info: Refers to last page's name %% -%% Copyright (C) 2010 - 2023 by +%% Copyright (C) 2010 - 2024 by %% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de> %% Portions of code copyrighted by other people as marked. %% @@ -58,8 +58,8 @@ %% Hans-Klaus Muench + 2014-08-24 %% %% Part of the "lastpage" package -\NeedsTeXFormat{LaTeX2e}[2022-11-01] -\ProvidesPackage{lastpagemodern}[2023-10-14 v2.0e % +\NeedsTeXFormat{LaTeX2e}[2023-06-01] +\ProvidesPackage{lastpagemodern}[2024-04-27 v2.1a % Refers to last page's name (HMM; JPG)] %% allows for things like "Page \thepage{} of \pageref{LastPage}" %% to get "Page 7 of 9" or "Page VII of IX"; @@ -73,22 +73,17 @@ \gdef\lastpage@lastpageHy{??} \newcommand\lastpage@gobbleminus[1]{\ifx-#1\else#1\fi} -%% from https://texfaq.org/FAQ-isitanum - \newcounter{lastpagecount} - \newcommand{\lastpage@IfNumericTF}[3]{% -%% similar to https://tex.stackexchange.com/a/17119 \sbox\z@{\c@lastpagecount=0\lastpage@gobbleminus{#1}\relax}% \ifdim\wd0>\z@\relax#3% is not numeric \else#2% is numeric -\fi% -} +\fi} \AddToHook{begindocument/end}{\gdef\lastpage@putlabel{\relax}} -%% From https://tex.stackexchange.com/a/542425 with thanks to -%% Prof. Enrico Gregorio +%% from https://tex.stackexchange.com/a/12811/542425 +%% with thanks to Prof. Enrico Gregorio \long\def\protected@iwrite#1#2#3{% \begingroup% #2% @@ -99,83 +94,41 @@ \if@nobreak\ifvmode\nobreak\fi\fi% } -\newcommand{\lastpage@numeric}{\protected@iwrite\@auxout{}{% - \string\newlabel{LastPage}{% - {\@currentlabel}% - {\thepage}% - {\@currentlabelname}% - {\IfPackageLoadedTF{hyperref}{\ifHy@pageanchor page.\Hy@temp\fi% - }{\@currentHref}}% - {\@kernel@reserved@label@data}}}% - } - -\newcommand{\lastpage@nonnumeric}{\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}}}% - } +%% similar to https://tex.stackexchange.com/a/12811/6865 +\def\lastpage@rmpage#1{\expandafter\lastpage@currentH#1\relax} +\def\lastpage@currentH#1.#2\relax{#2} \newcommand{\lastpage@putl@bel}{% \IfPackageLoadedTF{pageslts}{\relax}{% - \IfPackageLoadedTF{hyperref}{\ifHy@pageanchor\else% - \PackageWarningNoLine{lastpage}{% - The \string\pageref{LastPage} link does not work\MessageBreak% - using hyperref with disabled option `pageanchor'.\MessageBreak% - Better enable `pageanchor' or use\MessageBreak% - \string\pageref*{LastPage} (not generating a link)% - }\fi}{}% + \IfPackageLoadedTF{hyperref}{% + \IfPackageAtLeastTF{hyperref}{2023-11-07}{\relax}{% + \PackageError{lastpage}{hyperref package version too old}{% + required version: 2023-11-07 or newer, found version:\MessageBreak% + \csname ver@hyperref.sty\endcsname\MessageBreak% + Update hyperref or use lastpageclassic.sty instead of\MessageBreak% + lastpagemodern.sty!}}% + \ifHy@pageanchor\else% + \PackageWarningNoLine{lastpage}{% + The \string\pageref{LastPage} link does not work\MessageBreak% + using hyperref with disabled option `pageanchor'.\MessageBreak% + Better enable `pageanchor' or use\MessageBreak% + \string\pageref*{LastPage} (not generating a link)}% + \fi% + }{}% \begingroup% \addtocounter{page}{-1}% - \IfPackageLoadedTF{hyperref}{% - % with code from \Hy@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% - % 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% - % NOT! \Hy@GlobalStepCount\Hy@pagecounter - \def\Hy@TempPageAnchor{\hyper@@anchor{page.\the\Hy@pagecounter}}% - \def\Hy@temp{\the\Hy@pagecounter}% - \fi% - \fi% - }{}% - \IfFormatAtLeastTF{2023/06/01}{% - \lastpage@IfNumericTF{\thepage}{\lastpage@numeric}{\lastpage@nonnumeric}% - }{\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}}% + \protected@iwrite\@auxout{}{\string\newlabel{LastPage}{% + {\@currentlabel}{\thepage}{\@currentlabelname}% + {\IfPackageLoadedTF{hyperref}{\ifHy@pageanchor\@currentHpage\fi% + }{\@currentHref}}% + {\@kernel@reserved@label@data}}% + }% + \protected@iwrite\@auxout{}{% + \string\gdef\string\lastpage@lastpage{\thepage}}% + \gdef\lastpage@Hy{\IfPackageLoadedTF{hyperref}{% + \ifHy@pageanchor\lastpage@rmpage{\@currentHpage}\fi}{}}% + \protected@iwrite\@auxout{}{% + \string\gdef\string\lastpage@lastpageHy{\lastpage@Hy}}% \addtocounter{page}{+1}% \endgroup% }% @@ -209,7 +162,7 @@ \newcommand{\lastpage@fileswtestHy}{% \ifHy@pageanchor% - \lastpage@fileswtest{\Hy@temp}{\lastpage@lastpageHy}% + \lastpage@fileswtest{\@currentHpage}{\@the@H@page}% \else% \lastpage@fileswtest{\empty}{\lastpage@lastpageHy}% \fi% |