summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-03-07 22:20:24 +0000
committerKarl Berry <karl@freefriends.org>2023-03-07 22:20:24 +0000
commita20fb04c7c311fb4c3958390501cb652db498895 (patch)
tree8c89f478b3c55b302c6c0d1e45c1b2292ab8f999 /Master/texmf-dist/doc/latex
parent8f4ee8d038215a1830cecf5d5a0c6895acabe0fc (diff)
lastpage (7mar23)
git-svn-id: svn://tug.org/texlive/trunk@66435 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/lastpage/README68
-rw-r--r--Master/texmf-dist/doc/latex/lastpage/lastpage-example.pdfbin118155 -> 129481 bytes
-rw-r--r--Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex139
-rw-r--r--Master/texmf-dist/doc/latex/lastpage/lastpage.pdfbin436318 -> 440770 bytes
4 files changed, 113 insertions, 94 deletions
diff --git a/Master/texmf-dist/doc/latex/lastpage/README b/Master/texmf-dist/doc/latex/lastpage/README
index 322cfbb6de0..6135895020e 100644
--- a/Master/texmf-dist/doc/latex/lastpage/README
+++ b/Master/texmf-dist/doc/latex/lastpage/README
@@ -1,4 +1,4 @@
-README for lastpage package, 2021/09/03, v1.2n
+README for lastpage package, 2023-03-07, v2.0a
TABLE OF CONTENTS
@@ -17,7 +17,7 @@ TABLE OF CONTENTS
1 INTRODUCTION
==============
-This LaTeX package puts the label LastPage (\AtEndDocument)
+This LaTeX package puts the label LastPage at the end of the document
into the .aux file, allowing the user to refer to the last page
of a document. This might be particularly useful in places
like headers or footers. -
@@ -26,47 +26,46 @@ fnsymbol page numbering scheme is used, or another package
has output after this package, or the number of pages
instead of the last page's name is needed, or the page
numbers exeed a certain range, there might be problems,
-which can be solved by using the pageslts package instead.
+which can be solved by using the pageslts package instead
+[which needs updating to current LaTeX-format and therefore might fail].
This material is published under the LPPL 1.3c: This work may be
distributed and/or modified under the 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
+Public License, either version 1.3c of this license or (at your option)
+any later version. This version of this license is in
https://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
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.
+and version 1.3c or later is part of all distributions of
+LaTeX version 2005-12-01 or later.
2 DOWNLOAD
==========
-`lastpage' is available on CTAN:
-https://www.ctan.org/pkg/lastpage
+"lastpage" is available on CTAN:
+https://ctan.org/pkg/lastpage
Also a ZIP file is provided that contains the files:
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),
+the style files (lastpage.sty, lastpage209.sty, lastpage23.sty,
+lastpageclassic.sty, lastpagemodern.sty),
and this README, already sorted in a TDS tree:
-https://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
+https://mirror.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
3 INSTALLATION
==============
-First, please make sure that there is no old version of
-lastpage at some obsolete place in your system.
-
Installation with ZIP file in TDS format
----------------------------------------
-The ZIP file `lastpage.tds.zip' contains the files
+The ZIP file "lastpage.tds.zip" contains the files
sorted in a TDS tree. Thus you can directly unpack the
ZIP file inside a TDS tree.
-See https://www.ctan.org/TDS-guidelines for an explanation
+See https://ctan.org/TDS-guidelines for an explanation
of TDS.
Example:
cd /...somewhere.../texmf
@@ -82,18 +81,22 @@ a) Download the lastpage files from CTAN.
If necessary, unpack them.
b) Generate the package and driver files:
tex lastpage.dtx
-c) Install the file `*.sty' in your TDS tree:
- cp *.sty TDS:tex/latex/lastpage/
- Replace `TDS:' by the prefix of your TDS tree
+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 lastpageclassic.sty TDS:tex/latex/lastpage/
+ cp lastpagemodern.sty TDS:tex/latex/lastpage/
+ Replace "TDS:" by the prefix of your TDS tree
(texmf directory).
d) Create the documentation, if necessary, e.g.
pdflatex lastpage.dtx
makeindex -s gind.ist lastpage.idx
- pdflatex undolabl.dtx
+ pdflatex lastpage.dtx
makeindex -s gind.ist lastpage.idx
pdflatex lastpage.dtx
-e) Update the databases, if necessary, e.g. for teTeX:
- mktexlsr .../texmf
+e) Update the databases if necessary, e.g. for TeXLive
+ texhash or mktexlsr.
f) Create the lastpage-example.pdf, if necessary, e.g.
pdflatex lastpage-example.tex
pdflatex lastpage-example.tex
@@ -110,19 +113,18 @@ g) Copy the documentation files to
The lastpage package does not depend on other packages,
but the lastpage.dtx does (for unpacking and constructing
the documentation), see "7.1 Downloads" in the manual
-https://mirrors.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf
+https://mirror.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf
5 PACKAGE COMPATIBILITY
=======================
-lastpage is not compatible with the very old version 2.0
+lastpage is not compatible with the ancient version 2.0
(and earlier) of the endfloat package. The recent version of
-endfloat is available at
-https://www.ctan.org/pkg/endfloat
+endfloat is available at https://ctan.org/pkg/endfloat
6 AUTHORS/MAINTAINER
-=====================
+====================
* Author of the original main code:
Jeffrey P. Goldberg (Thanks!)
@@ -131,19 +133,19 @@ https://www.ctan.org/pkg/endfloat
7 BUG REPORTS
-==============
+=============
A bug report should contain:
* Comprehensive problem description. This includes error or
warning messages.
* \errorcontextlines=\maxdimen can be added in the
TeX code to get more information in TeX error messages.
-* Minimal test file that shows the problem, but does not
- contain any unnecessary packages and code.
+* Minimal test file that shows the problem,
+ but does not contain any unnecessary packages and code.
* Used drivers/programs.
* Version information about used packages and programs.
-* If you are using LaTeX, then add "\listfiles". Then
- a list of version information is printed at the end
+* If you are using LaTeX, then add "\listfiles" to the document.
+ Then a list of version information is printed at the end
of the LaTeX run.
* Please no other files than the minimal test file.
The other files .log, .dvi, .ps, .pdf are seldom
@@ -158,6 +160,6 @@ Bug reports can be send to the maintainer:
8 KNOWN PROBLEMS
-=================
+================
Really a lot, see chapter 3 of the documentation! \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/lastpage/lastpage-example.pdf b/Master/texmf-dist/doc/latex/lastpage/lastpage-example.pdf
index a3c7c074778..9a6cd36a1c6 100644
--- a/Master/texmf-dist/doc/latex/lastpage/lastpage-example.pdf
+++ b/Master/texmf-dist/doc/latex/lastpage/lastpage-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex b/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
index a06abddb9f3..14fc5deb30b 100644
--- a/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
+++ b/Master/texmf-dist/doc/latex/lastpage/lastpage-example.tex
@@ -9,17 +9,13 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2021/09/03 v1.2n
+%% Version: 2023-03-07 v2.0a
+%% Info: Refers to last page's name
%%
-%% Copyright (C) 2010 - 2021 by
-%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+%% Copyright (C) 2010 - 2023 by
+%% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
%% Portions of code copyrighted by other people as marked.
%%
-%% The usual disclaimer applies:
-%% If it doesn't work right that's your problem.
-%% (Nevertheless, send an e-mail to the maintainer
-%% when you find an error in this package.)
-%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
@@ -28,39 +24,50 @@
%% and the latest version of this license is in
%% 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.
+%% LaTeX version 2005-12-01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is H.-Martin Muench.
%%
-%% This package was invented by
-%% Jeffrey P. Goldberg (jeffrey+news at goldmark dot org).
+%% This package was invented by Jeffrey P. Goldberg.
%% I thought that a replacement was needed and therefore created the pageslts package,
-%% https://www.ctan.org/pkg/pageslts
+%% 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 slash thepage{} of slash pageref{LastPage}"
+%% to get "Page 7 of 9" or "Page VII of IX",
+%% the NUMBER of pages is nowadays available via slash @abspage@last from the kernel,
+%% but with pages for example I to X and then 1 to 10, the number of pages would be "20",
+%% while the name of the last page is "10". Decide what you need/want!
+%%
%% This work consists of the main source file lastpage.dtx,
%% the README, and the derived files
-%% lastpage.sty, lastpage.pdf,
-%% lastpage.ins, lastpage.drv,
+%% lastpage.sty, lastpage209.sty, lastpage2e.sty,
+%% lastpageclassic.sty, lastpagemodern.sty,
+%% lastpage.pdf, lastpage.ins, lastpage.drv,
%% lastpage-example.tex, lastpage-example.pdf.
%%
%% In memoriam
-%% Claudia Simone Barth + 1996/01/30
-%% Tommy Muench + 2014/01/02
-%% Hans-Klaus Muench + 2014/08/24
+%% Claudia Simone Barth + 1996-01-30
+%% Tommy Muench + 2014-01-02
+%% Hans-Klaus Muench + 2014-08-24
%%
-\documentclass[british]{article}[2014/09/29]% v1.4h
-\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}
-\usepackage[draft]{showkeys}[2014/10/28]% v3.17
+\documentclass[british]{article}[2022/07/02]% v1.4n Standard LaTeX document class
+\makeatletter
+\@ifl@t@r\fmtversion{2022/11/01}{%
+ \AddToHook{enddocument/afterlastpage}[lastpage]{%
+ \message{^^JLaTeX Info: Executing hook `enddocument/afterlastpage'.}}%
+}{\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}%
+ }
+\makeatother
+\usepackage[draft]{showkeys}[2022/04/12]% v3.18 Show cite and label keys (DPC, MH)
%% Use final instead of draft to hide the keys. %%
-\usepackage{hyperref}[2012/11/06]% v6.83m
-\hypersetup{%
- extension=pdf,%
+\usepackage{hyperref}[2023-02-07]% v7.00v Hypertext links for LaTeX
+\hypersetup{extension=pdf,%
plainpages=false,%
pdfpagelabels=true,%
hyperindex=false,%
@@ -68,33 +75,30 @@
pdftitle={lastpage package example},%
pdfauthor={H.-Martin Muench},%
pdfsubject={Example for the lastpage package},%
- pdfkeywords={LaTeX, lastpage, H.-Martin Muench},%
+ pdfkeywords={LaTeX, lastpage},%
pdfview=Fit,%
pdfstartview=Fit,%
pdfpagelayout=SinglePage%
}
%% If hyperref is not used, the url package
-%% https://www.ctan.org/pkg/url
+%% https://ctan.org/pkg/url
%% 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}[2021/09/03]% v1.2n
+\usepackage{lastpage}[2023-03-07]% v2.0a
\makeatletter
\renewcommand{\@evenfoot}{%
\normalsize\slshape \today\hfil \upshape %
page \thepage{} of \pageref{LastPage}}
\renewcommand{\@oddfoot}{\@evenfoot}
\makeatother
-\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles
\begin{document}
\pagenumbering{Roman}
-
\section*{Example for lastpage}
\markboth{Example for lastpage}{Example for lastpage}
-
This example demonstrates the use of package\newline
-\textsf{lastpage}, v1.2n as of 2021/09/03 (HMM; JPG).\newline
+\textsf{lastpage}, v2.0a as of 2023-03-07 (HMM; JPG).\newline
The package takes no options.\newline
For more details please see the documentation!\newline
@@ -119,47 +123,21 @@ 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 Reader DC 2021.005.20060:
-Edit $>$ Preferences $>$ Categories: Page Display $>$
+for the display of the pdf (in Adobe Acrobat Reader 2022.003.20322:
+Edit $>$ Preferences $>$ 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
-\url{https://www.ctan.org/pkg/pageslts}.
-
+\url{https://ctan.org/pkg/pageslts}.
\bigskip
-Save per page about $200\unit{ml}$~water, $2\unit{g}$~CO$_{2}$
-and $2\unit{g}$~wood:\newline
-Therefore please print only if this is really necessary.\newline
-I do NOT think, that it is necessary to print THIS file, really\newline
-(at least not after this page)!
-
-\bigskip
-
-\noindent The page (\verb|\thepage|): \thepage \newline
-
-\noindent Last page's name (LastPage): \pageref{LastPage}
-
-\newpage
-
\noindent The page (\verb|\thepage|): \thepage \newline
-
-\noindent Last page's name (LastPage): \pageref{LastPage}
-
-\newpage
-
-\noindent The page (\verb|\thepage|): \thepage \newline
-
-\noindent Last page's name (LastPage): \pageref{LastPage}
-
+Last page's name (LastPage): \pageref{LastPage}
\newpage
-\section*{The End}
-
\noindent The page (\verb|\thepage|): \thepage \newline
-
-\noindent Last page's name (LastPage): \pageref{LastPage}
+Last page's name (LastPage): \pageref{LastPage}
\bigskip
@@ -207,6 +185,45 @@ prints:\newline
Page \thepage{} is page \makeatletter\lastpage@lastpage\makeatother.%
\newline
This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
+\newpage
+
+\noindent The page (\verb|\thepage|): \thepage \newline
+Last page's name (LastPage): \pageref{LastPage}
+\bigskip
+
+With modern \LaTeX{} it is possible to say:
+\begin{quote}
+\begin{verbatim}
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\documentclass{article}
+\pagenumbering{fnsymbol}
+\begin{document}
+\addtocounter{page}{8}%
+\makeatletter%
+\ExplSyntaxOn%
+\xdef\test{\numexpr\the\g_shipout_readonly_int +1\relax}%
+\ExplSyntaxOff%
+\ifnum \@abspage@last = \test\relax%
+This is the last page.%
+\else%
+This is not the last page
+(or it is but \LaTeX{} needs another compilation run
+to detect this).
+\fi
+\makeatother
+\end{document}
+\end{verbatim}
+\end{quote}
+
+\newpage
+\section*{The End}
+\noindent The page (\verb|\thepage|): \thepage \newline
+Last page's name (LastPage): \pageref{LastPage}
+\bigskip
+
+To see the content of the \texttt{enddocument/afterlastpage}-hook
+(for a recent \LaTeX-format!) use
+\verb|\ShowHook{enddocument/afterlastpage}|.% without the \verb||, of course!
\end{document}
\endinput
%%
diff --git a/Master/texmf-dist/doc/latex/lastpage/lastpage.pdf b/Master/texmf-dist/doc/latex/lastpage/lastpage.pdf
index d0bedd4949a..4f0988a919f 100644
--- a/Master/texmf-dist/doc/latex/lastpage/lastpage.pdf
+++ b/Master/texmf-dist/doc/latex/lastpage/lastpage.pdf
Binary files differ