diff options
author | Norbert Preining <norbert@preining.info> | 2024-04-28 03:00:59 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-04-28 03:00:59 +0000 |
commit | 6ed42a56797a9b75307dcebfd82f2d69767e1b97 (patch) | |
tree | a3a53cbc357c9bd13040bede870d9b1801293eb4 /macros/latex | |
parent | 71f3eefe319b1194e0470ee83dd8723b3288f8d4 (diff) |
CTAN sync 202404280300
Diffstat (limited to 'macros/latex')
-rw-r--r-- | macros/latex/contrib/babel-contrib/welsh/README.md (renamed from macros/latex/contrib/babel-contrib/welsh/README) | 13 | ||||
-rw-r--r-- | macros/latex/contrib/babel-contrib/welsh/welsh.dtx | 12 | ||||
-rw-r--r-- | macros/latex/contrib/babel-contrib/welsh/welsh.pdf | bin | 111128 -> 119975 bytes | |||
-rw-r--r-- | macros/latex/contrib/lastpage/README | 6 | ||||
-rw-r--r-- | macros/latex/contrib/lastpage/lastpage-example.pdf | bin | 130736 -> 130201 bytes | |||
-rw-r--r-- | macros/latex/contrib/lastpage/lastpage.dtx | 320 | ||||
-rw-r--r-- | macros/latex/contrib/lastpage/lastpage.pdf | bin | 448061 -> 440278 bytes |
7 files changed, 131 insertions, 220 deletions
diff --git a/macros/latex/contrib/babel-contrib/welsh/README b/macros/latex/contrib/babel-contrib/welsh/README.md index 65ac842dc9..4f975962cb 100644 --- a/macros/latex/contrib/babel-contrib/welsh/README +++ b/macros/latex/contrib/babel-contrib/welsh/README.md @@ -1,12 +1,13 @@ -Welsh 1.1a +## Welsh 1.1b ------------ This is the babel style for Welsh. -Changes 1.1 ------------ +## Changes 1.1b + +* Removed extra space in \ccname in TU strings. + +## Changes 1.1a + * Date fixed * UTF-8 encoded strings for XeTeX and LuaTeX - ----------- -2015-09-03
\ No newline at end of file diff --git a/macros/latex/contrib/babel-contrib/welsh/welsh.dtx b/macros/latex/contrib/babel-contrib/welsh/welsh.dtx index d39ced6622..9e59856b2b 100644 --- a/macros/latex/contrib/babel-contrib/welsh/welsh.dtx +++ b/macros/latex/contrib/babel-contrib/welsh/welsh.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 1989-2015 Johannes L. Braams, Javier Bezos and any +% Copyright 1989-2024 Johannes L. Braams, Javier Bezos and any % individual authors listed elsewhere in this file. All rights % reserved. % @@ -38,16 +38,13 @@ %<code>\ProvidesLanguage{welsh} %\fi %\ProvidesFile{welsh.dtx} - [2015/09/03 v1.1a Welsh support from the babel system] + [2024/04/27 v1.1b Welsh support from the babel system] %\iffalse %% File `welsh.dtx' %% Babel package for LaTeX version 2e -%% Copyright (C) 1989 -- 2015 +%% Copyright (C) 1989 -- 2024 %% by Johannes Braams, TeXniek % by Javier Bezos -% -% This file is part of the babel system, it provides the source -% code for the Welsh language definition file. %<*filedriver> \documentclass{ltxdoc} \newcommand*{\TeXhax}{\TeX hax} @@ -126,11 +123,12 @@ % of \cs{today}} % \changes{welsh-1.1a}{2015/09/03}{Strings are defined in the 3.9 way. % Also Unicode strings} +% \changes{welsh-1.1b}{2024/04/27}{Remove extra space in \cs{ccname}} % \begin{macrocode} \StartBabelCommands*{welsh}{captions} [unicode, charset=utf8, fontenc=EU1 EU2] \SetString{\enclname}{amgaeëdig} - \SetString{\ccname}{copï au} + \SetString{\ccname}{copïau} % \end{macrocode} % % And now, the generic branch, using the LICR and assuming T1. diff --git a/macros/latex/contrib/babel-contrib/welsh/welsh.pdf b/macros/latex/contrib/babel-contrib/welsh/welsh.pdf Binary files differindex fcac31cc60..6c8a9fc97c 100644 --- a/macros/latex/contrib/babel-contrib/welsh/welsh.pdf +++ b/macros/latex/contrib/babel-contrib/welsh/welsh.pdf diff --git a/macros/latex/contrib/lastpage/README b/macros/latex/contrib/lastpage/README index 50b80f6b3a..4545b13a60 100644 --- a/macros/latex/contrib/lastpage/README +++ b/macros/latex/contrib/lastpage/README @@ -1,4 +1,4 @@ -README for lastpage package, 2023-10-14, v2.0e +README for lastpage package, 2024-04-27, v2.1a TABLE OF CONTENTS @@ -50,7 +50,7 @@ the manual (lastpage.pdf), the example (lastpage-example.tex), the compiled example (lastpage-example.pdf), driver (lastpage.drv), lastpage.dtx, installation file (lastpage.ins), -the style files (lastpage.sty, lastpage209.sty, lastpage23.sty, +the style files (lastpage.sty, lastpage209.sty, lastpage2e.sty, lastpageclassic.sty, lastpagemodern.sty), and this README, already sorted in a TDS tree: https://mirror.ctan.org/install/macros/latex/contrib/lastpage.tds.zip @@ -83,7 +83,7 @@ b) Generate the package and driver files: c) Install the files "*.sty" in your TDS tree: cp lastpage.sty TDS:tex/latex/lastpage/ cp lastpage209.sty TDS:tex/latex/lastpage/ - cp lastpage23.sty TDS:tex/latex/lastpage/ + cp lastpage2e.sty TDS:tex/latex/lastpage/ cp lastpageclassic.sty TDS:tex/latex/lastpage/ cp lastpagemodern.sty TDS:tex/latex/lastpage/ Replace "TDS:" by the prefix of your TDS tree diff --git a/macros/latex/contrib/lastpage/lastpage-example.pdf b/macros/latex/contrib/lastpage/lastpage-example.pdf Binary files differindex 1062a3273e..6d1c748525 100644 --- a/macros/latex/contrib/lastpage/lastpage-example.pdf +++ b/macros/latex/contrib/lastpage/lastpage-example.pdf diff --git a/macros/latex/contrib/lastpage/lastpage.dtx b/macros/latex/contrib/lastpage/lastpage.dtx index ed088fea50..104d6b8418 100644 --- a/macros/latex/contrib/lastpage/lastpage.dtx +++ b/macros/latex/contrib/lastpage/lastpage.dtx @@ -1,19 +1,18 @@ % \iffalse meta-comment % % File: lastpage.dtx -% Version: 2023-10-14 v2.0e +% Version: 2024-04-27 v2.1a % Info: Refers to last page's name % -% Copyright © 2010 - 2023 by +% Copyright © 2010 - 2024 by % H.-Martin Münch <Martin dot Muench at Uni-Bonn dot de> % Portions of code copyrighted by other people as marked. % % This package was invented by Jeffrey P. Goldberg. % I thought that a replacement was needed and therefore created the pageslts package, -% https://ctan.org/pkg/pageslts -% . Nevertheless, for compatibility with existing documents/packages as well as for -% the low amount of resources needed by the lastpage package (no new counter!), -% I updated this package. +% https://ctan.org/pkg/pageslts. Nevertheless, for compatibility with existing +% documents/packages as well as for the low amount of resources needed by the +% lastpage package (no new counter!), I updated this package. % Thanks go to Jeffrey P. Goldberg for allowing me to do this. % % While this package allows for things like "Page \thepage{} of \pageref{LastPage}" @@ -66,7 +65,7 @@ \input docstrip.tex \Msg{**********************************************************************} \Msg{* Installation *} -\Msg{* Package: lastpage 2023-10-14 v2.0e Refers to last page's name (HMM)*} +\Msg{* Package: lastpage 2024-04-27 v2.1a Refers to last page's name (HMM)*} \Msg{**********************************************************************} \keepsilent @@ -78,10 +77,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. @@ -184,9 +183,9 @@ In memoriam % % \begin{macrocode} %<*driver> -\NeedsTeXFormat{LaTeX2e}[2022-11-01] +\NeedsTeXFormat{LaTeX2e}[2023-11-01] \ProvidesFile{lastpage.drv}% - [2023-10-14 v2.0e Refers to last page's name (HMM)] + [2024-04-27 v2.1a Refers to last page's name (HMM)] \documentclass{ltxdoc}[2023/03/28]% v2.1j Standard LaTeX documentation class \usepackage{holtxdoc}[2019/12/09]% v0.30 Private additional ltxdoc support (HO) \hypersetup{% @@ -251,7 +250,7 @@ In memoriam % \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write} % % \title{The \xpackage{lastpage} package} -% \date{2023-10-14 v2.0e} +% \date{2024-04-27 v2.1a} % \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}\\ % invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}} % @@ -370,7 +369,7 @@ In memoriam % \section{Some \textsc{Warnings}\label{sec:warn}} % \subsection{\texttt{\textbackslash AtEndDocument}\label{ssec:aed}} % \indent {\bfseries |\AtEndDocument| is not used by the \pkg{lastpagemodern.sty} -% version of the lastpage package, requiring \LaTeX -format 2022-11-01 +% version of the lastpage package, requiring \LaTeX -format 2023-06-01 % or newer. Instead |\AddToHook{enddocument/afterlastpage}| is used % and the problem does not arise.} % \bigskip @@ -413,7 +412,7 @@ In memoriam % \subsection{Interaction with ancient versions of the \xpackage{endfloat} package\label{sec:endfloat}} % % \indent {\bfseries |\AtEndDocument| is not used by the \pkg{lastpagemodern.sty} -% version of the lastpage package, requiring \LaTeX -format 2022-11-01 +% version of the lastpage package, requiring \LaTeX -format 2023-06-01 % or newer. Instead |\AddToHook{enddocument/afterlastpage}| is used % and the problem does not arise.} % @@ -552,22 +551,13 @@ In memoriam % (with appropriate options) can do this. % % \subsection{Other packages manipulating \texttt{\textbackslash lastpage@putlabel}} -% The \xpackage{hyperref} package redefined the |\lastpage@putlabel| command, -% and the \xpackage{revtex4} class still redefines the |\lastpage@putlabel| command, -% and the \xpackage{hyperref} package redefined the |\lastpage@putlabel| command, -% if the \xpackage{revtex4} class was used, and the \xpackage{pageslts} package +% The \xpackage{revtex4} class redefines the |\lastpage@putlabel| command +% (with outdated two arguments), and the \xpackage{pageslts} package % \textquotedblleft kills\textquotedblright{} the |\lastpage@putlabel| command, % because that package uses more advanced labels.\newline -% In my humble opinion it would be preferably if one package (the original one, -% i.\,e. \xpackage{lastpage}) would do the job right, all others packages would -% check for the version of that package, and if an old version is found, -% an error (or at least a warning) message about the use of an outdated -% package is given, and \textit{then} as -% \textquotedblleft last aid\textquotedblright{} the command of the outdated -% package is redefined.\newline -% Therefore here none of the definitions or commands of the other packages -% is altered, but |\lastpage@putlabel| was replaced by |\lastpage@putl@bel|. -% Because |\lastpage@putlabel| is no longer called, now there should not be any +% None of the definitions or commands of the other packages are altered, +% but |\lastpage@putlabel| was replaced by |\lastpage@putl@bel|. +% Because \linebreak |\lastpage@putlabel| is no longer called, now there should not be any % double definitions of the \texttt{lastpage} label. % \newpage % @@ -740,9 +730,9 @@ In memoriam \message{^^JLaTeX Info: Executing hook `enddocument/afterlastpage'.}}% }{\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}% } -\usepackage[draft]{showkeys}[2023/05/11]% v3.19 Show cite and label keys (DPC, MH) +\usepackage[draft]{showkeys}[2023/07/08]% v3.19 Show cite and label keys (DPC, MH) %% Use final instead of draft to hide the keys. %% -\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2023-07-08]% v7.01b +\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-01-20]% v7.01h %% Hypertext links for LaTeX \hypersetup{extension=pdf,% plainpages=false,% @@ -756,7 +746,7 @@ In memoriam pdfpagelayout=SinglePage% } \@ifpackageloaded{hyperref}{}{\usepackage{url}[2013/09/16]}% v3.4 -\usepackage{lastpage}[2023-10-14]% v2.0e +\usepackage{lastpage}[2024/04/27]% v2.1a \renewcommand{\@evenfoot}{% \normalsize\slshape \today\hfil \upshape % page \thepage{} of \pageref{LastPage}} @@ -768,7 +758,7 @@ In memoriam \section*{Example for lastpage} \markboth{Example for lastpage}{Example for lastpage} This example demonstrates the use of package\newline -\textsf{lastpage}, v2.0e as of 2023-10-14 (HMM; JPG).\newline +\textsf{lastpage}, v2.1a as of 2024-04-27 (HMM; JPG).\newline The package takes no options.\newline For more details please see the documentation!\newline @@ -793,7 +783,7 @@ trademark owner. There is no intention of infringement; the usage is to the benefit of the trademark owner.\newline \textbf{Tip}: Use \textit{logical page numbers} -for the display of the pdf (in Adobe Acrobat Reader 2023.006.20320: +for the display of the pdf (in Adobe Acrobat Reader 2024.002.20687: Edit $>$ Preferences $>$ Page Display $>$ Page Content and Information: Use logical page numbers)!\newline @@ -866,7 +856,7 @@ Last page's name (LastPage): \pageref{LastPage} With modern \LaTeX{} it is possible to say: \begin{quote} \begin{verbatim} -\NeedsTeXFormat{LaTeX2e}[2023-06-01] +\NeedsTeXFormat{LaTeX2e}[2023-11-01] \documentclass{article} \pagenumbering{fnsymbol} \begin{document} @@ -904,7 +894,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \DescribeMacro{lastpage.sty} % We first need to determine whether we are on \TeX~2.09 or \LaTeX2e.\newline % (That line, which is too long for the documentation, reads:\newline -% |\def\loadlastpage{\ProvidesPackage{lastpage}[2023/10/14 v2.0e lastpage:|\linebreak +% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/04/27 v2.1a lastpage:|\linebreak % | 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}|.) % % \begin{macrocode} @@ -912,7 +902,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook %% 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 @@ -952,9 +942,9 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook %<*lastpage2e> %% 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} %</lastpage2e> @@ -967,7 +957,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook %<*lastpageclassic> %% 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" @@ -1384,8 +1374,8 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \begin{macrocode} %<*lastpagemodern> %% 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"; @@ -1413,58 +1403,33 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \end{macrocode} % -% People use the label |LastPage| for calculations, for example with -% \begin{quote} -%\begin{verbatim} -%\getrefbykeydefault{LastPage}{page}{0} -%\end{verbatim} -% \end{quote} -% and with -% \begin{quote} -%\begin{verbatim} -%\getpagerefnumber{LastPage} -%\end{verbatim} -% \end{quote} -% (using the \pkg{refcount} package). On the one hand, direct calculations do not work, -% if the page \textquotedblleft number\textquotedblright{} is not -% a plain arabic number (1, 2, 3,\ldots) but |alph| (a, b, c,\ldots), |Alph| (A, B, C,\ldots), -% |roman| (i, ii, iii, iv,\ldots), |Roman| (I, II, III, IV,\ldots), -% |fnsymbol| (foot note symbols: \textasteriskcentered{} (asterisk), \textdagger{} (dagger), -% \textdaggerdbl{} (double dagger), \textsection{} (section symbol),\ldots) or some other fancy name. -% On the other hand, if the page number \emph{is} a plain arabic number, -% calculations do work, if that plain number can be extracted from the label. -% To handle non-numeric page \textquotedblleft number\textquotedblright{} as well as providing -% extractable numeric page numbers, we need to determine (later), whether a page number is numeric or not: -% -% \begin{macro}{\lastpage@gobbleminus} +% \begin{macro}{\lastpage@IfNumericTF} +% |\lastpage@IfNumericTF| was needed to determine whether a page number was numeric or not. +% Although it is no longer used, I am reluctant to remove it because it may have been used +% in other places in documents. +% % \begin{macrocode} \newcommand\lastpage@gobbleminus[1]{\ifx-#1\else#1\fi} -%% from https://texfaq.org/FAQ-isitanum - % \end{macrocode} -% \end{macro} +% which is from \url{https://texfaq.org/FAQ-isitanum}, % \begin{macrocode} \newcounter{lastpagecount} - % \end{macrocode} -% \begin{macro}{\lastpage@IfNumericTF} +% and similar to \url{https://tex.stackexchange.com/a/12811/17119} % \begin{macrocode} \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} % \end{macrocode} % \end{macro} % % \DescribeMacro{\AddToHook\{begindocument/end\}} % \indent |\lastpage@putlabel|, used by older versions of this package, -% is redefined e.\,g. by \xpackage{revtex}, \xpackage{frenchle}, -% \xpackage{PPRcorners}, and old versions of \xpackage{hyperref}. -% While now |\lastpage@putl@bel| is used instead, \xpackage{revtex} +% is/was redefined by other packages. +% While now |\lastpage@putl@bel| is used instead, other packages % could also define a label \texttt{LastPage}, % which then would be multiply defined. (Which is no big issue, % if it is associated with the same page.) Therefore we define @@ -1483,8 +1448,8 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % (thanks to Ulrike Fischer for the report). % % \begin{macrocode} -%% 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% @@ -1498,42 +1463,15 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \end{macrocode} % \end{macro} % -% We need two macros for writing numeric and non-numeric page -% \textquotedblleft numbers\textquotedblright{} into the \xfile{aux} file: -% -% \begin{macro}{\lastpage@numeric} +% \begin{macro}{\lastpage@rmpage} +% Just once we need |\@currentHpage| without the \mbox{\textquotedblleft |page.|\textquotedblright :} % \begin{macrocode} -\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}}}% - } +%% 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} % \end{macrocode} % \end{macro} -% \begin{macro}{\lastpage@nonnumeric} -% \begin{macrocode} -\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}}}% - } - -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\lastpage@putl@bel} % \indent This command does the writing of the label. % If the \xpackage{pageslts} package is used, this \xpackage{lastpage} package @@ -1544,22 +1482,28 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook \newcommand{\lastpage@putl@bel}{% \IfPackageLoadedTF{pageslts}{\relax}{% % \end{macrocode} -% -% \noindent Otherwise the label is set:\newpage -% +% \noindent Otherwise the label is set: % \noindent If the \xpackage{hyperref} package is used, but page-anchors are disabled, % the hyperlinking will not work. (The warning will also be shown, when only % |\pageref*{LastPage}| is used (or neither one), but without messing with |\pageref| % we cannot detect this.) % % \begin{macrocode} - \IfPackageLoadedTF{hyperref}{\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% % \end{macrocode} % @@ -1577,65 +1521,25 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % may be no more invocations of the output routines. % To force the write out, we need to do an |\immediate| protected write % into the \xfile{aux} file. -% -% \begin{macrocode} - \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}{% -% \end{macrocode} -% -% \noindent The |\label| command has been extended, see \LaTeX{} News Issue~37, -% June~2023 (\LaTeX{} release 2023-06-01), -% \url{https://www.latex-project.org/news/latex2e-news/ltnews37.pdf}. -% -% Here we need to distinguish between numeric page numbers, which shall be extractable, -% and non-numeric ones, which need some protection: % \begin{macrocode} - \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\newlabel{LastPage}{% + {\@currentlabel}{\thepage}{\@currentlabelname}% + {\IfPackageLoadedTF{hyperref}{\ifHy@pageanchor\@currentHpage\fi% + }{\@currentHref}}% + {\@kernel@reserved@label@data}}% + }% % \end{macrocode} -% +% \pagebreak % \noindent We also save the values, so that we can later (next rerun) check, % whether they have been saved in the \xfile{aux} file. % % \begin{macrocode} - \protected@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\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}}% % \end{macrocode} % % \noindent After the write-out we restore the page number again, @@ -1691,7 +1595,6 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \end{macrocode} % \end{macro} -% \newpage % % \begin{macro}{\lastpage@fileswtestHy} % \indent \hspace*{2em}When the \xpackage{hyperref} package has been loaded, @@ -1702,7 +1605,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \begin{macrocode} \newcommand{\lastpage@fileswtestHy}{% \ifHy@pageanchor% - \lastpage@fileswtest{\Hy@temp}{\lastpage@lastpageHy}% + \lastpage@fileswtest{\@currentHpage}{\@the@H@page}% \else% \lastpage@fileswtest{\empty}{\lastpage@lastpageHy}% \fi% @@ -1789,7 +1692,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \begin{description} % \item[-] \TeX, \url{https://www.CTAN.org} % -% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e, +% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a, % \url{https://ctan.org/pkg/lastpage} % \end{description} % @@ -1799,10 +1702,10 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \begin{description} % \item[-] \TeX-format \LaTeX{}, v2.09 % -% \item[-] package \xpackage{lastpage209}, 2023-10-14, v2.0e, +% \item[-] package \xpackage{lastpage209}, 2024-04-27, v2.1a, % \url{https://ctan.org/pkg/lastpage} % \end{description} -% and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}. +% and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.\smallskip % % \DescribeMacro{lastpage2e.sty} % The |lastpage2e.sty| for \LaTeXe{} (i.\,e. each document using @@ -1811,7 +1714,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \item[-] \TeX-format \LaTeXe{} 1994/12/01 or newer, % \url{https://www.CTAN.org} % -% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e, +% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a, % \url{https://ctan.org/pkg/lastpage} % \end{description} % @@ -1819,39 +1722,42 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % The |lastpageclassic.sty| for \LaTeXe{} (i.\,e. each document using % the \xpackage{lastpageclassic} package) requires: % \begin{description} -% \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2022/11/01,\newline +% \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2023-05-31,\newline % \url{https://www.CTAN.org} % -% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e, +% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a, % \url{https://ctan.org/pkg/lastpage} % \end{description} % and can use % \begin{description} % \item[-] package \xpackage{hyperref}, 2023-07-08, v7.01b, -% \url{https://ctan.org/pkg/hyperref} +% \url{https://ctan.org/pkg/hyperref}\newline +% (probably also some older and newer versions) % \end{description} % % \DescribeMacro{lastpagemodern.sty} % The |lastpagemodern.sty| for \LaTeXe{} (i.\,e. each document using % the \xpackage{lastpagemodern} package) requires: % \begin{description} -% \item[-] \TeX-format \LaTeXe{} 2022-11-01, better yet 2023-06-01 or newer,\newline +% \item[-] \TeX-format \LaTeXe{} 2023-06-01 or newer,\newline % \url{https://www.CTAN.org} % -% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e, +% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a, % \url{https://ctan.org/pkg/lastpage} % \end{description} % and can use % \begin{description} -% \item[-] package \xpackage{hyperref}, 2023-07-08, v7.01b, +% \item[-] package \xpackage{hyperref}, 2023-11-07 and newer +% (tested with: 2024-01-20, v7.01h), % \url{https://ctan.org/pkg/hyperref} % \end{description} +% \pagebreak % % \DescribeMacro{lastpage-example.tex} % The |lastpage-example.tex| requires the same file as all % documents using the \xpackage{lastpage} package, i.\,e. % \begin{description} -% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e, +% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a, % \url{https://ctan.org/pkg/lastpage}\newline % (Well, it is the example file for this package, and because you are reading the % documentation for the \xpackage{lastpage} package, it can be assumed that you already @@ -1862,10 +1768,10 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \item[-] class \xpackage{article}, 2023-05-17, v1.4n, from \xpackage{classes}: % \url{https://ctan.org/pkg/classes} % -% \item[-] package \xpackage{showkeys}, 2023-05-11, v3.19, +% \item[-] package \xpackage{showkeys}, 2023-07-08, v3.19, % \url{https://ctan.org/pkg/showkeys} % -% \item[-] package \xpackage{hyperref}, 2023-07-08, v7.01b, +% \item[-] package \xpackage{hyperref}, 2024-01-20, v7.01h, % \url{https://ctan.org/pkg/hyperref} % \end{description} % @@ -1886,7 +1792,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \xpackage{fancyheadings}), but because they were mentioned, also they are listed % here: % \begin{description} -% \item[-] package \xpackage{fancyhdr}, 2022-11-09, v4.1, +% \item[-] package \xpackage{fancyhdr}, 2024/04/23, v4.2, % \url{https://ctan.org/pkg/fancyhdr} % % \item[-] package \xpackage{nccfancyhdr}, 2004/12/07, v1.1, @@ -1929,7 +1835,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \item[-] package \xpackage{zref}, 2023-09-14, v2.35, % \url{https://ctan.org/pkg/zref} % -% \item[-] class \xpackage{memoir}, 2023-08-21, v3.8.1, +% \item[-] class \xpackage{memoir}, 2024-01-26, v3.8.2, % \url{https://ctan.org/pkg/memoir}. % \end{description} % @@ -1971,13 +1877,13 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \end{description} % which additionally contains\\ % \begin{tabular}{ll} -% lastpage.ins & The installation file.\\ -% lastpage.drv & The driver to generate the documentation.\\ -% lastpage.sty & The \xext{sty}le file.\\ -% lastpage209.sty & The \xext{sty}le file for \LaTeX2.09{} \textbf{only}.\\ -% lastpage2e.sty & The \xext{sty}le file to determine which 2e-style to use.\\ -% lastpageclassic.sty & The \xext{sty}le file for older \LaTeX-formats.\\ -% lastpagemodern.sty & The \xext{sty}le file for the recent \LaTeX-format.\\ +% lastpage.ins & The \texttt{ins}tallation file.\\ +% lastpage.drv & The \mbox{\texttt{dr}i\texttt{v}er} to generate the documentation.\\ +% lastpage.sty & The \texttt{sty}le file.\\ +% lastpage209.sty & The \texttt{sty}le file for \LaTeX2.09{} \textbf{only}.\\ +% lastpage2e.sty & The \texttt{sty}le file to determine which 2e-style to use.\\ +% lastpageclassic.sty & The \texttt{sty}le file for older \LaTeX-formats.\\ +% lastpagemodern.sty & The \texttt{sty}le file for the recent \LaTeX-format.\\ % lastpage-example.tex & The example file.% % \end{tabular} % @@ -2131,12 +2037,10 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % inventing the \xpackage{lastpage} package as well as for allowing me % to update it. Further I would like to thank \textsc{Heiko Oberdiek} % for providing a~lot~(!) of useful packages (from which I also learned everything -% I know about creating a file in \xfile{dtx} format, OK, say it: copying), -% and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex} -% newsgroups for their help in all things \TeX{}. Thanks for bug reports -% to \textsc{Ulrike Fischer} (twice), \textsc{Sebastian Bank}, \textsc{James Hedges}, -% \textsc{Mikhail Titov}, \textsc{Micha\l{} Herman}, \textsc{Matteo Gamboz}, and -% \textsc{James Small}. +% I know about creating a file in \xfile{dtx} format, OK, say it: copying). +% Thanks for bug reports go to \textsc{Ulrike Fischer} (twice), +% \textsc{Sebastian Bank}, \textsc{James Hedges}, \textsc{Mikhail Titov}, +% \textsc{Micha\l{} Herman}, \textsc{Matteo Gamboz}, and \textsc{James Small}. % Thanks to \textsc{Sven Siegmund} for pointing out a necessary further % explanation in the documentation. % @@ -2315,7 +2219,8 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \item Replaced |\immediate\write| by a form of (pseudo-code!) |\immediate\protected@write|. % (Thanks to \textsc{Ulrike Fischer} for the error report and solution!) % \item Update of the |\lastpage@putl@bel| code to \pkg{hyperref} 2023-07-08, v7.01b, -% which now allows fnsymbol as page numbering scheme. +% which now allows fnsymbol as page numbering scheme (while links to, for example, +% a page named $\|$ still do not work). % \end{Version} % \begin{Version}{2023-10-06 v2.0d} % \item For plain arabic page numbers only, \pkg{lastpage} again writes the page number @@ -2325,6 +2230,13 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook % \begin{Version}{2023-10-14 v2.0e} % \item Replaced a |\PackageError| by |\PackageWarningNoLine| as suggested by \textsc{Ulrike Fischer}. % \end{Version} +% \begin{Version}{2024-04-27 v2.1a} +% \item Utilizes the new |\@currentHpage| provided by the \LaTeX -kernel. +% \item The issue with |\thepage| (former |\lastpage@nonnumeric| command) has has been fixed +% at 2023-11-07, \url{https://github.com/latex3/hyperref/issues/303}. +% \item |\lastpage@IfNumericTF| is no longer needed, but has not been removed +% so as not to break older documents that use it in a different context. +% \end{Version} % \end{History} % \bigskip % diff --git a/macros/latex/contrib/lastpage/lastpage.pdf b/macros/latex/contrib/lastpage/lastpage.pdf Binary files differindex bd129a18b2..02cb1362b7 100644 --- a/macros/latex/contrib/lastpage/lastpage.pdf +++ b/macros/latex/contrib/lastpage/lastpage.pdf |