summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex')
-rw-r--r--Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex71
1 files changed, 58 insertions, 13 deletions
diff --git a/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex b/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
index af4be9f42f0..a06abddb9f3 100644
--- a/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
+++ b/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
@@ -9,9 +9,9 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2015/03/29 v1.2m
+%% Version: 2021/09/03 v1.2n
%%
-%% Copyright (C) 2010 - 2015 by
+%% Copyright (C) 2010 - 2021 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
%% Portions of code copyrighted by other people as marked.
%%
@@ -24,9 +24,9 @@
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
-%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
@@ -66,7 +66,7 @@
hyperindex=false,%
pdflang={en},%
pdftitle={lastpage package example},%
- pdfauthor={Hans-Martin Muench},%
+ pdfauthor={H.-Martin Muench},%
pdfsubject={Example for the lastpage package},%
pdfkeywords={LaTeX, lastpage, H.-Martin Muench},%
pdfview=Fit,%
@@ -78,7 +78,7 @@
%% must be loaded for the \url used in this example:
%% \usepackage{url}
%% or just use \let\url\texttt for the one used url.
-\usepackage{lastpage}[2015/03/29]% v1.2m
+\usepackage{lastpage}[2021/09/03]% v1.2n
\makeatletter
\renewcommand{\@evenfoot}{%
\normalsize\slshape \today\hfil \upshape %
@@ -94,7 +94,7 @@
\markboth{Example for lastpage}{Example for lastpage}
This example demonstrates the use of package\newline
-\textsf{lastpage}, v1.2m as of 2015/03/29 (HMM; JPG).\newline
+\textsf{lastpage}, v1.2n as of 2021/09/03 (HMM; JPG).\newline
The package takes no options.\newline
For more details please see the documentation!\newline
@@ -118,12 +118,10 @@ 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.\newline
-\textbf{Tip}: Use \textit{logical page numbers} for
-the display of the pdf!\newline
-(In Adobe Reader XI (11.0.10): \underline{E}dit $>$
-Prefere\underline{n}ces (Ctrl+k) $>$ Page Display $>$
-Page Content and Information $>$ Use logical page
-\nolinebreak{\underline{n}umbers.)}\newline
+\textbf{Tip}: Use \textit{logical page numbers}
+for the display of the pdf (in Adobe Reader DC 2021.005.20060:
+Edit $>$ Preferences $>$ Categories: Page Display $>$
+Page Content and Information: Use logical page numbers)!\newline
If you are more ambitious in respect to your aims with this package,
you might want to have a look at the \textsf{pageslts} package:\newline
@@ -162,6 +160,53 @@ I do NOT think, that it is necessary to print THIS file, really\newline
\noindent The page (\verb|\thepage|): \thepage \newline
\noindent Last page's name (LastPage): \pageref{LastPage}
+
+\bigskip
+
+\noindent There was the question:
+
+\begin{quote}
+\begin{verbatim}
+\documentclass{article}
+\usepackage{hyperref}
+\usepackage{lastpage}
+\begin{document}
+\ifnum\thepage=\pageref{LastPage} foo \else bar \fi
+\end{document}
+\end{verbatim}
+
+producing the error
+\textquotedblleft missing number, treated as zero\textquotedblright.
+\end{quote}
+
+\noindent \verb|\pageref| inserts a hyperlink, \verb|\pageref{LastPage}|
+is not expandable and the code breaks.\newline
+The code does not generally work even without hyperref.
+
+\begin{quote}
+\begin{verbatim}
+\documentclass{article}
+\usepackage{hyperref}
+\usepackage{lastpage}
+\pagenumbering{Roman}
+\begin{document}
+\addtocounter{page}{8}
+\edef\here{\thepage}
+\makeatletter
+\ifx\here\lastpage@lastpage\relax foo \else bar \fi
+\makeatother
+\end{document}
+\end{verbatim}
+\end{quote}
+
+\noindent does work, because \verb|\lastpage@lastpage| contains the name
+of the page, example:\newline
+\verb|Page \thepage{} is page \makeatletter\lastpage@lastpage\makeatother.|%
+\newline
+prints:\newline
+Page \thepage{} is page \makeatletter\lastpage@lastpage\makeatother.%
+\newline
+This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
\end{document}
\endinput
%%