summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pageslts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-08 23:12:26 +0000
committerKarl Berry <karl@freefriends.org>2010-09-08 23:12:26 +0000
commit5adcd9650d837853891dd467590841dae36653cd (patch)
tree818bb3970417775d78b96367ea1ac9e5c209fb48 /Master/texmf-dist/tex/latex/pageslts
parentf328f8f461746d6d176bc5066247026665c2b141 (diff)
pageslts 1.1h (25aug10)
git-svn-id: svn://tug.org/texlive/trunk@19618 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pageslts')
-rw-r--r--Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty237
1 files changed, 136 insertions, 101 deletions
diff --git a/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty b/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty
index fc00157aafc..c33b6e44376 100644
--- a/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty
+++ b/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty
@@ -55,7 +55,7 @@
%% pagesLTS-example.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{pagesLTS}[2010/07/15 v1.1d
+\ProvidesPackage{pagesLTS}[2010/08/25 v1.1i
Refers to special pages' numbers/names (HMM)]%
%% Allows for things like\\
@@ -73,7 +73,7 @@
\RequirePackage{atveryend}[2010/03/24]% v1.5
\RequirePackage{everyshi}[2001/05/15]%v 3.00
\RequirePackage{kvoptions}[2010/02/22]% v3.7
-\RequirePackage{undolabl}[2010/07/15]% v1.0d
+\RequirePackage{undolabl}[2010/07/29]% v1.0f
%% pagesLTS package uses Prelim@EveryShipout code from the
%% prelim2e package [2009/05/29 v1.3] by Martin Schr\"{o}der, thanks!
@@ -101,25 +101,25 @@
\def\pagesLTS@one{1}
\ifpagesLTS@pagecontinue%
-\PackageInfo{pagesLTS}{Option pagecontinue enabled\MessageBreak%
- (maybe by default):\MessageBreak%
- The pagesLTS package will continue the page numbering,\MessageBreak%
- when the same page numbering scheme is used twice.\MessageBreak%
- If you do not want this, call pagesLTS with option\MessageBreak%
- pagecontinue=false\MessageBreak%
- (or use \ setcounter{page}=1).\MessageBreak%
-}%
+ \PackageInfo{pagesLTS}{Option pagecontinue enabled\MessageBreak%
+ (maybe by default):\MessageBreak%
+ The pagesLTS package will continue the page numbering,\MessageBreak%
+ when the same page numbering scheme is used twice.\MessageBreak%
+ If you do not want this, call pagesLTS with option\MessageBreak%
+ pagecontinue=false\MessageBreak%
+ (or use \ setcounter{page}=1).\MessageBreak%
+ }%
\else%
-\PackageWarningNoLine{pagesLTS}{Option pagecontinue is false:\MessageBreak%
- The pagesLTS package was used, but the option\MessageBreak%
- pagecontinue was set to false.\MessageBreak%
- If you want the page numbers to be continued,\MessageBreak%
- when the same page numbering scheme is used twice,\MessageBreak%
- please call pagesLTS with option pagecontinue=true,\MessageBreak%
- otherwise the page number is reset to one each time\MessageBreak%
- the page numbering scheme is changed.\MessageBreak%
- For details please see the documentation!\MessageBreak%
-}%
+ \PackageWarningNoLine{pagesLTS}{Option pagecontinue is false:\MessageBreak%
+ The pagesLTS package was used, but the option\MessageBreak%
+ pagecontinue was set to false.\MessageBreak%
+ If you want the page numbers to be continued,\MessageBreak%
+ when the same page numbering scheme is used twice,\MessageBreak%
+ please call pagesLTS with option pagecontinue=true,\MessageBreak%
+ otherwise the page number is reset to one each time\MessageBreak%
+ the page numbering scheme is changed.\MessageBreak%
+ For details please see the documentation!\MessageBreak%
+ }%
\fi%
\def\pagesLTS@ab{ab}
@@ -152,7 +152,7 @@
The pagesLTS package was used, but the option\MessageBreak%
fnsymbolmult was set to false.\MessageBreak%
If you want the page numbering of the footnotesymbol\MessageBreak%
- scheme to be extended using the AlphAlph package,\MessageBreak%
+ scheme to be extended using the alphalph package,\MessageBreak%
please call pagesLTS with option fnsymbolmult=true,\MessageBreak%
otherwise page numbers of the footnotesymbol scheme\MessageBreak%
greater than nine will need to be defined otherwise.\MessageBreak%
@@ -249,7 +249,7 @@
\PackageInfo{pagesLTS}{Option fnsymbolmult enabled\MessageBreak%
(maybe by default):\MessageBreak%
The pagesLTS package will extend the page numbering\MessageBreak%
- of the footnotesymbol scheme using the AlphAlph\MessageBreak%
+ of the footnotesymbol scheme using the alphalph\MessageBreak%
package.\MessageBreak%
If you do not want this, call pagesLTS with option\MessageBreak%
fnsymbolmult=false.\MessageBreak%
@@ -294,7 +294,6 @@
\newcounter{pagesLTS.fnsymbol}
\newcounter{pagesLTS.fnsymbol.local}
\newcounter{pagesLTS.fnsymbol.cont}
-\newcounter{pagesLTS.double.0}
\newcounter{pagesLTS.current.local.0}
\setcounter{pagesLTS.current.local.0}{1}
\newcounter{pagesLTS.pnc.0}
@@ -311,7 +310,7 @@
\fi%
}
-\newcommand{\XXRoman}[1]{%
+\newcommand{\XRoman}[1]{%
\ifnum\value{#1}>0 %
\Roman{#1}%
\else%
@@ -323,16 +322,19 @@
\fi%
}
-\newcommand{\lastpages}[2]{%
- \@ifundefined{c@pagesLTS.#1.#2.local.cnt}{%
- \newcounter{pagesLTS.#1.#2.local.cnt}}{\relax}%
- \arabic{pagesLTS.#1.#2.local.cnt}%
+\newcommand{\XXRoman}[1]{\XRoman{#1}%
+ \PackageError{pagesLTS}{Old command \string\XXRoman\space found}{Replaced by \string\XRoman.}%
}
\newcommand{\pagesLTS@ifcounter}[1]{%
\@ifundefined{c@#1}{\newcounter{#1}}{\relax}%
}
+\newcommand{\lastpages}[2]{%
+ \pagesLTS@ifcounter{pagesLTS.#1.#2.local.cnt}%
+ \arabic{pagesLTS.#1.#2.local.cnt}%
+ }
+
\newcommand{\pagesLTS@writelabel}[1]{%
\addtocounter{page}{+1}%
\pagesLTS@putlabel{pagesLTS.#1}{\thepage}
@@ -381,7 +383,7 @@
\def\pagesLTS@tmpC{Roman}%
\ifx\pagesLTS@pnc\pagesLTS@tmpC%
\ifpagesLTS@RomanMulti%
- \renewcommand*{\thepage}{\XXRoman{page}}%
+ \renewcommand*{\thepage}{\XRoman{page}}%
\fi%
\else%
\ifx\pagesLTS@pnc\pagesLTS@alph%
@@ -435,27 +437,27 @@
\value{pagesLTS.current.local.\pagesLTS@pnc}}%
\ifx\pagesLTS@pnc\pagesLTS@fns%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \pagesLTS@ifcounter{pagesLTS.tmpa}%
- \setcounter{pagesLTS.tmpa}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \addtocounter{pagesLTS.tmpa}{-1}%
- \pagesLTS@ifcounter{pagesLTS.tmpb}%
- \addtocounter{pagesLTS.tmpb}{\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpa}.local.count}}%
+ \mathchardef\pagesLTS@tmpa=\arabic{pagesLTS.pnc.0}%
+ \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
+ \addtocounter{pagesLTS.pnc.0}{-1}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
- -\value{pagesLTS.tmpb}}%
+ -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
+ \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpa}%
\fi%
\else%
\pagesLTS@writelabel{\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}}%
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2%
\pagesLTS@writelabel{\pagesLTS@pnc}%
\else%
- \pagesLTS@ifcounter{pagesLTS.tmpa}%
- \setcounter{pagesLTS.tmpa}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \addtocounter{pagesLTS.tmpa}{-1}%
+ \mathchardef\pagesLTS@tmpa=\arabic{pagesLTS.pnc.0}%
+ \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
+ \addtocounter{pagesLTS.pnc.0}{-1}%
\pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.done}%
\addtocounter{pagesLTS.\pagesLTS@pnc.done}{%
- \value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpa}.local.count}}%
+ \value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
-\value{pagesLTS.\pagesLTS@pnc.done}}%
+ \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpa}%
\fi%
\if@filesw%
\immediate\write\@auxout{\string
@@ -467,6 +469,7 @@
\setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}{\pagesLTS@tmpB}}%
\fi%
\fi%
+ \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}%
\setcounter{pagesLTS.double.\pagesLTS@pnc}{\value{page}}%
\addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{+1}%
\addtocounter{page}{+1}%
@@ -620,13 +623,13 @@
\immediate\write\@auxout{\string
\undonewlabel{pagesLTS.\pagesLTS@pnc.local}{\on@line}}%
\else%
- \relax % Error: no undolable package at all, message given above
- \fi
- \fi
+ \relax% Error: no undolabl package at all, message already given above
+ \fi%
+ \fi%
\fi%
- \addtocounter{page}{+1}
+ \addtocounter{page}{+1}%
\pagesLTS@putlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}%
- \addtocounter{page}{-1}
+ \addtocounter{page}{-1}%
\fi%
%% Code from prelim2e package again: %%
}%
@@ -674,10 +677,13 @@
\fi%
\fi%
\ifnum \value{CurrentPage}=1% This is the first shipout!
+ \@ifundefined{Hy@Warning}{% hyperref not loaded
+ }{% hyperref loaded
+ \gdef\pagesLTS@hyper{1}%
+ }%
\ifx\pagesLTS@called\pagesLTS@zero
\PackageError{pagesLTS}{pagenumbering missing}{\pagesLTS@messageNPN }%
- \newcounter{pagesLTS@tmpD}%
- \setcounter{pagesLTS@tmpD}{\value{page}}%
+ \mathchardef\pagesLTS@tmpD=\arabic{page}%
%% Code from Andres L\"{o}h, Universiteit Utrecht (NL) %%
\def\extract#1{\expandafter\extract@ #1\END}
\def\extract@#1\csname @#2\endcsname#3\END{#2}
@@ -686,7 +692,7 @@
\let\pagesLTS@tmpP\pagesLTS@tmpQ%
\def\pagesLTS@pnc{0}%
\pagenumbering{\pagesLTS@tmpP}%
- \setcounter{page}{\value{pagesLTS@tmpD}}%
+ \setcounter{page}{\pagesLTS@tmpD}%
\fi%
\pagesLTS@writelabel{0}%
\fi%
@@ -757,8 +763,19 @@
\pagesLTS@putlabelhyper{#1}{#2}%
\else%
\if@filesw%
- \immediate\write\@auxout{\string
- \newlabel{#1}{{}{#2}}}%
+ \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2%
+ \immediate\write\@auxout{\string
+ \newlabel{#1}{{}{#2}}}%
+ \else%
+ \edef\pagesLTStmpA{#1}%
+ \edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}%
+ \ifx\pagesLTStmpA\pagesLTStmpB%
+ \immediate\write\@auxout{\string
+ \undonewlabel{#1}}%
+ \fi%
+ \immediate\write\@auxout{\string
+ \newlabel{#1}{{}{#2}}}%
+ \fi%
\fi%
\fi%
\addtocounter{page}{+1}%
@@ -824,19 +841,35 @@
}%
}{}%
\@ifpackageloaded{lastpage}%
- {\PackageWarning{pagesLTS}{Incompatible package lastpage detected:\MessageBreak%
- Package pagesLTS was loaded, but also the old\MessageBreak%
- lastpage package.\MessageBreak%
- pagesLTS has all functionality of the lastpage\MessageBreak%
- package (and more), so just remove the lastpage\MessageBreak%
- package from your document.\MessageBreak%
- pagesLTS will now ''kill'' the lastpage@putlabel\MessageBreak%
- command of the lastpage package.\MessageBreak%
- }%
- \gdef\lastpage@putlabel{\relax}%
+ {\@ifpackagelater{lastpage}{2010/07/28}% 2010/07/29 v1.2a
+ {\@ifpackagelater{lastpage}{2010/08/24}% 2010/08/25 v1.2d
+ {\PackageWarning{pagesLTS}{lastpage package detected.\MessageBreak%
+ With pagesLTS package in use, lastpage has no function.\MessageBreak%
+ Just remove the lastpage package from your document.\MessageBreak%
+ }%
+ }{%
+ \PackageWarning{pagesLTS}{Old lastpage package detected.\MessageBreak%
+ With pagesLTS package in use, lastpage has no function.\MessageBreak%
+ Just remove the lastpage package from your document.\MessageBreak%
+ At least update it!\MessageBreak%
+ }%
+ }%
+ }{%
+ \PackageWarning{pagesLTS}{Incompatible package lastpage detected:\MessageBreak%
+ Package pagesLTS was loaded, but also an old\MessageBreak%
+ version of the lastpage package.\MessageBreak%
+ pagesLTS has all functionality of the lastpage\MessageBreak%
+ package (and more), so just remove the lastpage\MessageBreak%
+ package from your document.\MessageBreak%
+ (At least update it!)\MessageBreak%
+ pagesLTS will now ''kill'' the lastpage@putlabel\MessageBreak%
+ command of the lastpage package.\MessageBreak%
+ }%
+ \gdef\lastpage@putlabel{\relax}%
+ }%
}{}%
\@ifpackageloaded{alphalph}%
- {\PackageInfo{pagesLTS}{Package AlphAlph detected.\MessageBreak%
+ {\PackageInfo{pagesLTS}{Package alphalph detected.\MessageBreak%
pagesLTS supports alphalph. Congratulations!\MessageBreak%
}%
\global\def\pagesLTS@AlphAlph{1}%
@@ -847,10 +880,10 @@
{\ifx\pagesLTS@alphMult\pagesLTS@zero%
\PackageWarning{pagesLTS}{\pagesLTS@messageaMz }%
\else%
- \PackageError{pagesLTS}{Package AlphAlph not loaded}%
- {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak%
+ \PackageError{pagesLTS}{Package alphalph not loaded}%
+ {Package alphalph was not loaded, but package pagesLTS\MessageBreak%
was called without option alphMult=0 (zero).\MessageBreak%
- Either load package AlphAlph,\MessageBreak%
+ Either load package alphalph,\MessageBreak%
or give option alphMult=0 (zero) to the pagesLTS package.\MessageBreak%
}%
\fi%
@@ -858,18 +891,18 @@
\PackageWarning{pagesLTS}{\pagesLTS@messageAMiz }%
\relax%
\else%
- \PackageError{pagesLTS}{Package AlphAlph not loaded}%
- {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak%
+ \PackageError{pagesLTS}{Package alphalph not loaded}%
+ {Package alphalph was not loaded, but package pagesLTS\MessageBreak%
was called without option AlphMulti=0 (zero).\MessageBreak%
- Either load package AlphAlph,\MessageBreak%
+ Either load package alphalph,\MessageBreak%
or give option AlphMulti=0 (zero) to the pagesLTS package.\MessageBreak%
}%
\fi%
\ifpagesLTS@fnsymbolmult%
- \PackageError{pagesLTS}{Package AlphAlph not loaded}%
- {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak%
+ \PackageError{pagesLTS}{Package alphalph not loaded}%
+ {Package alphalph was not loaded, but package pagesLTS\MessageBreak%
was called without option fnsymbolmult=false.\MessageBreak%
- Either load package AlphAlph,\MessageBreak%
+ Either load package alphalph,\MessageBreak%
or give option fnsymbolmult=false to the pagesLTS package.\MessageBreak%
}%
\else%
@@ -883,25 +916,36 @@
\global\def\pagesLTS@hyper{1}%
\@ifpackageloaded{pdfpages}%
{\PackageWarning{pagesLTS}{Package pdfpages detected.\MessageBreak%
- Using hyperref with pdfpages can cause problems.\MessageBreak%
- See ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/pax/ \MessageBreak%
+ Using hyperref with pdfpages can cause problems. See\MessageBreak%
+ ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/pax/\MessageBreak%
for project pax (PDFAnnotExtractor).\MessageBreak%
}%
}{\relax}%
\@ifpackageloaded{undolabl}%
{\@ifpackagelater{undolabl}{2010/07/14}% 2010/07/15 v1.0d
- {\gdef\pagesLTS@undolable{new}%
+ {\gdef\pagesLTS@undolable{new}% not necessarily newest, but new
+ \@ifpackagelater{undolabl}{2010/07/28}% 2010/07/29 v1.0f
+ {% recent version as of the time of last revision of this package: OK
+ }{% old, but not obsolete version
+ \PackageWarningNoLine{pagesLTS}{Old version of undolabl package used.\MessageBreak%
+ See ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/undolabl/ \MessageBreak%
+ for a new version.\MessageBreak%
+ }%
+ }
}{\gdef\pagesLTS@undolable{old}%
- \PackageWarning{pagesLTS}{Obsolete version of undolabl package used.\MessageBreak%
+ \PackageError{pagesLTS}{Obsolete version of undolabl package used.}{%
See ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/undolabl/ \MessageBreak%
for a new version.\MessageBreak%
+ \@ehc%
}%
}
}{\gdef\pagesLTS@undolable{none}%
\PackageError{pagesLTS}{Package undolabl missing}{%
- Package undolable not found.\MessageBreak%
- The pagesLTS package needs the undolable package.\MessageBreak%
- Please see the pagesLTS documentation on how to get it.\MessageBreak%
+ Package undolabl not found.\MessageBreak%
+ The pagesLTS package needs the undolabl package.\MessageBreak%
+ See e.g.\MessageBreak%
+ ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/undolabl/ \MessageBreak%
+ \@ehd%
}%
}
\@ifpackagelater{hyperref}{2010/06/17}{% 2010/06/18 v6.81g
@@ -916,29 +960,19 @@
%% Heiko Oberdiek (hyperref version 2010/06/18 v6.81g).
%% pagesLTS may work with earlier versions of this packages,
%% but this was not tested.
- %% Code from hyperref package, where \lastpage@putlabel was replaced
- %% by \pagesLTS@putlabelhyper. But what does it do/what is it good for?
- %%
- %% \@ifclassloaded{revtex4}{%
- %% \begingroup
- %% \toks@\expandafter{\pagesLTS@putlabelhyper}%
- %% \edef\x{\endgroup
- %% \def\noexpand\pagesLTS@putlabelhyper{%
- %% \noexpand\stepcounter{page}%
- %% \the\toks@
- %% \noexpand\addtocounter{page}\noexpand\m@ne
- %% }%
- %% }%
- %% \x
- %% }{}%
- %%
}%
{\PackageWarning{pagesLTS}{Package hyperref NOT detected.\MessageBreak%
pagesLTS would support hyperref. The page references\MessageBreak%
will NOT be hyperlinked!\MessageBreak }%
}%
+ \newcommand\pagesLTS@dofilelist{}%
+ \let\pagesLTS@dofilelist\@dofilelist%
+ \def\@dofilelist{\pagesLTS@dofilelist\pagesLTS@rerunwarning}%
}
+\newcommand\pagesLTS@rerunwarning{}%
+\let\pagesLTS@rerunwarning\relax%
+
\AtEndDocument{%
\message{AED: pagesLTS setting LastPage}%
\clearpage%
@@ -976,13 +1010,12 @@
\value{pagesLTS.current.local.\pagesLTS@pnc}}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{-1}
\ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
- \pagesLTS@ifcounter{pagesLTS.tmpA}%
- \setcounter{pagesLTS.tmpA}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
- \addtocounter{pagesLTS.tmpA}{-1}%
- \pagesLTS@ifcounter{pagesLTS.tmpB}%
- \addtocounter{pagesLTS.tmpB}{\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpA}.local.count}}%
+ \mathchardef\pagesLTS@tmpD=\arabic{pagesLTS.pnc.0}%
+ \setcounter{pagesLTS.pnc.0}{\value{pagesLTS.pnc.\pagesLTS@pnc}}%
+ \addtocounter{pagesLTS.pnc.0}{-1}%
\addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{%
- -\value{pagesLTS.tmpB}}%
+ -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}%
+ \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpD}%
\fi%
\if@filesw%
\immediate\write\@auxout{\string
@@ -1016,9 +1049,11 @@
\AtVeryEndDocument{%
\ifx\pagesLTS@rerun\pagesLTS@one%
- \PackageWarningNoLine{pagesLTS}{Label(s) may have changed.\MessageBreak%
- Rerun to get cross-references right.\MessageBreak%
- }%
+ \def\pagesLTS@rerunwarning{%
+ \PackageWarningNoLine{pagesLTS}{Label(s) may have changed.\MessageBreak%
+ Rerun to get cross-references right.\MessageBreak%
+ }%
+ }%
\fi%
}