summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lastpage/lastpage.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/lastpage/lastpage.dtx')
-rw-r--r--macros/latex/contrib/lastpage/lastpage.dtx65
1 files changed, 38 insertions, 27 deletions
diff --git a/macros/latex/contrib/lastpage/lastpage.dtx b/macros/latex/contrib/lastpage/lastpage.dtx
index f5352a3dbe..ed088fea50 100644
--- a/macros/latex/contrib/lastpage/lastpage.dtx
+++ b/macros/latex/contrib/lastpage/lastpage.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: lastpage.dtx
-% Version: 2023-10-06 v2.0d
+% Version: 2023-10-14 v2.0e
% Info: Refers to last page's name
%
% Copyright © 2010 - 2023 by
@@ -66,7 +66,7 @@
\input docstrip.tex
\Msg{**********************************************************************}
\Msg{* Installation *}
-\Msg{* Package: lastpage 2023-10-06 v2.0d Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2023-10-14 v2.0e Refers to last page's name (HMM)*}
\Msg{**********************************************************************}
\keepsilent
@@ -78,7 +78,7 @@
This is a generated file.
Project: lastpage
-Version: 2023-10-06 v2.0d
+Version: 2023-10-14 v2.0e
Info: Refers to last page's name
Copyright (C) 2010 - 2023 by
@@ -186,7 +186,7 @@ In memoriam
%<*driver>
\NeedsTeXFormat{LaTeX2e}[2022-11-01]
\ProvidesFile{lastpage.drv}%
- [2023-10-06 v2.0d Refers to last page's name (HMM)]
+ [2023-10-14 v2.0e 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{%
@@ -244,14 +244,14 @@ In memoriam
% \DoNotIndex{\lastpageclassic.sty,\lastpagemodern.sty,\LaTeX,\LaTeX-kernel,\listfiles}
% \DoNotIndex{\makeatletter,\makeatother,\markboth,\mbox,\message,\MessageBreak}
% \DoNotIndex{\NeedsTeXFormat,\newcommand,\newcounter,\newline,\newpage,\nobreak}
-% \DoNotIndex{\noindent,\normalsize,\numexpr,\origenddocument,\PackageError}
-% \DoNotIndex{\PackageWarning,\pagenumbering,\pageref,\pdfstringdef,\protect,\ProvidesPackage}
+% \DoNotIndex{\noindent,\normalsize,\numexpr,\origenddocument,\PackageError,\PackageWarning}
+% \DoNotIndex{\PackageWarningNoLine,\pagenumbering,\pageref,\pdfstringdef,\protect,\ProvidesPackage}
% \DoNotIndex{\qquad,\RequirePackage,\section,\ShowHook,\slshape,\smallskip,\space,\test,\textbf}
% \DoNotIndex{\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt,\the,\thepage}
% \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write}
%
% \title{The \xpackage{lastpage} package}
-% \date{2023-10-06 v2.0d}
+% \date{2023-10-14 v2.0e}
% \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}\\
% invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}}
%
@@ -756,7 +756,7 @@ In memoriam
pdfpagelayout=SinglePage%
}
\@ifpackageloaded{hyperref}{}{\usepackage{url}[2013/09/16]}% v3.4
-\usepackage{lastpage}[2023-10-06]% v2.0d
+\usepackage{lastpage}[2023-10-14]% v2.0e
\renewcommand{\@evenfoot}{%
\normalsize\slshape \today\hfil \upshape %
page \thepage{} of \pageref{LastPage}}
@@ -768,7 +768,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.0d as of 2023-10-06 (HMM; JPG).\newline
+\textsf{lastpage}, v2.0e as of 2023-10-14 (HMM; JPG).\newline
The package takes no options.\newline
For more details please see the documentation!\newline
@@ -904,7 +904,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/06 v2.0d lastpage:|\linebreak
+% |\def\loadlastpage{\ProvidesPackage{lastpage}[2023/10/14 v2.0e lastpage:|\linebreak
% | 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}|.)
%
% \begin{macrocode}
@@ -912,7 +912,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/06 v2.0d lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2023/10/14 v2.0e 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,7 +952,7 @@ 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/06 v2.0d %
+\ProvidesPackage{lastpage2e}[2023/10/14 v2.0e %
Decide which 2e lastpage version to use (HMM)]
\@ifl@t@r\fmtversion{2022/11/01}{\RequirePackage{lastpagemodern}}{%
\RequirePackage{lastpageclassic}}
@@ -967,7 +967,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/06 v2.0d %
+\ProvidesPackage{lastpageclassic}[2023/10/14 v2.0e %
Refers to last page's name (HMM; JPG)]
%% allows for things like "Page \thepage{} of \pageref{LastPage}"
%% to get "Page 7 of 9"
@@ -1130,16 +1130,20 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \begin{macro}{\lastpage@putlabelhyper}%
% \indent When \xpackage{hyperref} has been loaded, the label is set with the
% |\lastpage@putlabelhyper| command. If the \xpackage{hyperref} package is used,
-% but page-anchors are disabled, the hyperlinking will not work.
+% 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}
\newcommand{\lastpage@putlabelhyper}{%
\ifHy@pageanchor%
\else%
- \PackageError{lastpage}{hyperref option pageanchor disabled}{%
- The \string\pageref{LastPage} link doesn't work\MessageBreak%
+ \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%
% \end{macrocode}
%
@@ -1381,7 +1385,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
%<*lastpagemodern>
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[2022-11-01]
-\ProvidesPackage{lastpagemodern}[2023-10-06 v2.0d %
+\ProvidesPackage{lastpagemodern}[2023-10-14 v2.0e %
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";
@@ -1544,14 +1548,18 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \noindent Otherwise the label is set:\newpage
%
% \noindent If the \xpackage{hyperref} package is used, but page-anchors are disabled,
-% the hyperlinking will not work.
+% 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%
- \PackageError{lastpage}{hyperref option pageanchor disabled}{%
+ \PackageWarningNoLine{lastpage}{%
The \string\pageref{LastPage} link does not work\MessageBreak%
using hyperref with disabled option `pageanchor'.\MessageBreak%
- }\fi}{}%
+ Better enable `pageanchor' or use\MessageBreak%
+ \string\pageref*{LastPage} (not generating a link)%
+ }\fi}{}%
\begingroup%
% \end{macrocode}
%
@@ -1781,7 +1789,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-06, v2.0d,
+% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
%
@@ -1791,7 +1799,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \begin{description}
% \item[-] \TeX-format \LaTeX{}, v2.09
%
-% \item[-] package \xpackage{lastpage209}, 2023-10-06, v2.0d,
+% \item[-] package \xpackage{lastpage209}, 2023-10-14, v2.0e,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.
@@ -1803,7 +1811,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-06, v2.0d,
+% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
%
@@ -1814,7 +1822,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2022/11/01,\newline
% \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2023-10-06, v2.0d,
+% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and can use
@@ -1830,7 +1838,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \item[-] \TeX-format \LaTeXe{} 2022-11-01, better yet 2023-06-01 or newer,\newline
% \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2023-10-06, v2.0d,
+% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and can use
@@ -1843,7 +1851,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% 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-06, v2.0d,
+% \item[-] package \xpackage{lastpage}, 2023-10-14, v2.0e,
% \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
@@ -2314,6 +2322,9 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% in a plain format in the label in the \xfile{aux} file, so that it can be extracted
% to perform calculations with it.
% \end{Version}
+% \begin{Version}{2023-10-14 v2.0e}
+% \item Replaced a |\PackageError| by |\PackageWarningNoLine| as suggested by \textsc{Ulrike Fischer}.
+% \end{Version}
% \end{History}
% \bigskip
%