summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lastpage
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-04 15:42:37 +0000
committerKarl Berry <karl@freefriends.org>2011-09-04 15:42:37 +0000
commitcd52946117f6a20d871a85a7103c220a5b5f7d14 (patch)
tree4e35ce758183b130d3d8a5d35fbacf87907eb71d /Master/texmf-dist/tex/latex/lastpage
parent749f97a36ff7f6d00441e6ed353ca0ffcc6f51b5 (diff)
lastpage (1sep11)
git-svn-id: svn://tug.org/texlive/trunk@23793 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lastpage')
-rw-r--r--Master/texmf-dist/tex/latex/lastpage/lastpage.sty78
-rw-r--r--Master/texmf-dist/tex/latex/lastpage/lastpage209.sty2
2 files changed, 71 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
index dc2a7bae9f8..c3ea955e466 100644
--- a/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
+++ b/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2011/08/08 v1.2i
+%% Version: 2011/09/01 v1.2k
%%
%% Copyright (C) 2010, 2011 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -50,10 +50,15 @@
%% lastpage.sty, lastpage.pdf, lastpage.ins, lastpage.drv,
%% lastpage-example.tex.
%%
-\NeedsTeXFormat{LaTeX2e}[2009/09/24]
-\ProvidesPackage{lastpage}[2011/08/08 v1.2i
+\NeedsTeXFormat{LaTeX2e}[2011/06/27]
+\ProvidesPackage{lastpage}[2011/09/01 v1.2k
Refers to last page's name (HMM; JPG)]%
+%% lastpage may work with earlier versions of LaTeX,
+%% but this was not tested. Please consider updating
+%% your LaTeX (and packages) to the most recent version
+%% (if it is/they are not already the most recent version).
+
%% Allows for things like
%% Page \thepage\ of \pageref{LastPage}
%% to get
@@ -76,6 +81,7 @@
\def\lastpage@firstpage{1}
\AtBeginDocument{%
+ \@ifpackageloaded{tikz}{\gdef\lastpage@tikz{1}}{}%
\@ifpackageloaded{hyperref}{\gdef\lastpage@hyper{1}}{}%
\@ifpackageloaded{pageslts}{%
\PackageWarning{lastpage}{Package pageslts found.\MessageBreak%
@@ -123,6 +129,8 @@
\begingroup
\addtocounter{page}{-1}%
\immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}}}%
+ \immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
+ \immediate\write\@auxout{\string\gdef\string\lastpage@lastpageHy{}}%
\addtocounter{page}{+1}%
\endgroup
\fi%
@@ -184,23 +192,77 @@
\ifHy@pageanchor page.\Hy@temp\fi}{}}%
}%
%% End of code from the hyperref package. %%
+ \immediate\write\@auxout{%
+ \string\xdef\string\lastpage@lastpage{\thepage}}%
+ \ifHy@pageanchor%
+ \immediate\write\@auxout{%
+ \string\xdef\string\lastpage@lastpageHy{\Hy@temp}}%
+ \else%
+ \immediate\write\@auxout{%
+ \string\gdef\string\lastpage@lastpageHy{}}%
+ \fi%
\addtocounter{page}{+1}%
\endgroup
}
+\newcommand{\lastpage@fileswtest}[2]{%
+ \edef\lastpage@testa{#1}%
+ \edef\lastpage@testb{#2}%
+ \ifx\lastpage@testa\lastpage@testb% OK
+ \else%
+ \ifx\lastpage@tikz\lastpage@one%
+ \PackageWarning{lastpage}%
+ {The lastpage package was not allowed to write to an\MessageBreak%
+ .aux file. This package does not work without access\MessageBreak%
+ to an .aux file.\MessageBreak%
+ }%
+ \else%
+ \PackageError{lastpage}{No auxiliary file allowed}%
+ {The lastpage package was not allowed to write to an .aux file.\MessageBreak%
+ This package does not work without access to an .aux file.\MessageBreak%
+ Press Ctrl+Z to exit.\MessageBreak%
+ }%
+ \fi%
+ \fi%
+ }
+\newcommand{\lastpage@fileswtestHy}{%
+ \ifHy@pageanchor%
+ \lastpage@fileswtest{\Hy@temp}{\lastpage@lastpageHy}%
+ \else%
+ \lastpage@fileswtest{\empty}{\lastpage@lastpageHy}%
+ \fi%
+ }
+
\AtEndDocument{%
\gdef\lastpage@putlabel{\relax}
+ \ifx\lastpage@LTS\lastpage@one%
+ \else%
+ \@ifundefined{lastpage@lastpage}%
+ {\gdef\lastpage@lastpage{LastpagePackageError}%
+ % If there really is a page numbered (!) "LastpagePackageError",
+ % you will get the rerun warning whether it is necessary or not.
+ \PackageWarning{lastpage}{Rerun to get the references right}%
+ }{% already defined, nothing to be done.
+ }%
+ \@ifundefined{lastpage@lastpageHy}%
+ {\gdef\lastpage@lastpageHy{LastpagePackageError}%
+ }{% already defined, nothing to be done.
+ }%
+ \fi%
\if@filesw%
\message{^^JAED: lastpage setting LastPage^^J}%
\clearpage\lastpage@putl@bel%
\else%
- \PackageError{lastpage}{No auxiliary file allowed}%
- {The lastpage package was not allowed to write to an .aux file.\MessageBreak%
- This package does not work without access to an .aux file.\MessageBreak%
- Press Ctrl+Z to exit.\MessageBreak%
- }%
+ \ifx\lastpage@LTS\lastpage@one%
+ \else%
+ \lastpage@fileswtest{\thepage}{\lastpage@lastpage}%
+ \ifx\lastpage@hyper\lastpage@one%
+ \lastpage@fileswtestHy%
+ \fi%
+ \fi%
\fi%
}
+
\endinput
%%
%% End of file `lastpage.sty'.
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty
index 7cb928ceb9a..a6d6610022b 100644
--- a/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty
+++ b/Master/texmf-dist/tex/latex/lastpage/lastpage209.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2011/08/08 v1.2i
+%% Version: 2011/09/01 v1.2k
%%
%% Copyright (C) 2010, 2011 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>