summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-29 23:34:52 +0000
committerKarl Berry <karl@freefriends.org>2013-01-29 23:34:52 +0000
commit2aa50a550686e193749ba9cf09b3398452fa8e1d (patch)
treeb30f4010d8af8b23f3ba2293ba80c72d50a735c4 /Master/texmf-dist/tex/latex/lastpage/lastpage.sty
parent00db22e467544f6ebde833dc8fbb53ec70367306 (diff)
lastpage (29jan13)
git-svn-id: svn://tug.org/texlive/trunk@28985 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lastpage/lastpage.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lastpage/lastpage.sty42
1 files changed, 29 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/lastpage/lastpage.sty b/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
index c3ea955e466..08a47c7e178 100644
--- a/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
+++ b/Master/texmf-dist/tex/latex/lastpage/lastpage.sty
@@ -9,13 +9,13 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2011/09/01 v1.2k
+%% Version: 2013/01/28 v1.2l
%%
-%% Copyright (C) 2010, 2011 by
+%% Copyright (C) 2010 - 2013 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
%% Portions of code copyrighted by other people as marked.
%%
-%% The usual disclaimer applys:
+%% 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.)
@@ -51,7 +51,7 @@
%% lastpage-example.tex.
%%
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
-\ProvidesPackage{lastpage}[2011/09/01 v1.2k
+\ProvidesPackage{lastpage}[2013/01/28 v1.2l
Refers to last page's name (HMM; JPG)]%
%% lastpage may work with earlier versions of LaTeX,
@@ -60,7 +60,7 @@
%% (if it is/they are not already the most recent version).
%% Allows for things like
-%% Page \thepage\ of \pageref{LastPage}
+%% Page \thepage{} of \pageref{LastPage}
%% to get
%% 'Page 7 of 9'.
%% For LaTeX 2.09 use lastpage209.sty.
@@ -70,19 +70,21 @@
%% contribution to the most recent version (if it is not already
%% the most recent version).
-%% The recent version of the endfloat package is v2.4i as of 1995/10/11.
+%% The recent version of the endfloat package is v2.5d as of 2011/12/25.
%% The lastpage package is not fully compatible with version 2.0
%% (and earlier) of the endfloat package, because those versions
%% redefined the \enddocument command.
\def\lastpage@one{1}
\gdef\lastpage@hyper{0}
+\gdef\lastpage@nameref{0}
\gdef\lastpage@LTS{0}
\def\lastpage@firstpage{1}
\AtBeginDocument{%
\@ifpackageloaded{tikz}{\gdef\lastpage@tikz{1}}{}%
\@ifpackageloaded{hyperref}{\gdef\lastpage@hyper{1}}{}%
+ \@ifpackageloaded{nameref}{\gdef\lastpage@nameref{1}}{}%
\@ifpackageloaded{pageslts}{%
\PackageWarning{lastpage}{Package pageslts found.\MessageBreak%
Therefore the lastpage package is no longer\MessageBreak%
@@ -126,13 +128,17 @@
\ifx\lastpage@hyper\lastpage@one%
\lastpage@putlabelhyper%
\else%
- \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
+ \ifx\lastpage@nameref\lastpage@one%
+ \lastpage@putlabelNR%
+ \else%
+ \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%
\fi%
\fi%
}
@@ -205,6 +211,16 @@
\endgroup
}
+\newcommand{\lastpage@putlabelNR}{%
+ \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
+ }
+
\newcommand{\lastpage@fileswtest}[2]{%
\edef\lastpage@testa{#1}%
\edef\lastpage@testb{#2}%