summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pageslts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-18 00:08:48 +0000
committerKarl Berry <karl@freefriends.org>2010-09-18 00:08:48 +0000
commit079fd1cddf588d6f323494351c5f11cccb6f2381 (patch)
tree92ed920a3c4220ccf55401076d6cda5d9bdc68a7 /Master/texmf-dist/tex/latex/pageslts
parent9669de7e7cf777e99c658796438928fa0e4cbabb (diff)
pageslts update (27aug10)
git-svn-id: svn://tug.org/texlive/trunk@19785 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pageslts')
-rw-r--r--Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty183
1 files changed, 136 insertions, 47 deletions
diff --git a/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty b/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty
index c33b6e44376..5fa148874b0 100644
--- a/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty
+++ b/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty
@@ -11,13 +11,13 @@
%% IMPORTANT NOTICE:
%% On the first page backslash pagenumbering should be called
%% (with the appropriate argument out of e.g.
-%% * roman - Lowercase Roman numerals: i, ii, iii, iv,...
-%% * Roman - Uppercase Roman numerals: I, II, III, IV,...
-%% * arabic - Arabic numerals: 1, 2, 3, 4,...
-%% * alph - Lowercase letters: a, b, c, d,...
-%% * Alph - Uppercase letters: A, B, C, D,...
+%% * roman - Lowercase Roman numerals: i, ii, iii, iv,...
+%% * Roman - Uppercase Roman numerals: I, II, III, IV,...
+%% * arabic - Arabic numerals: 1, 2, 3, 4,...
+%% * alph - Lowercase letters: a, b, c, d,...
+%% * Alph - Uppercase letters: A, B, C, D,...
%% * fnsymbol - Footnote symbols: *, ^^86 (ddagger), ^^87 (dddagger),
-%% ^^a7 (mathsection),...
+%% ^^a7 (mathsection),...
%% ). The command backslash pagenumbering is renewed, but no change
%% should be visible to the output text, because only labels are added.
%% backslash OrigPagenumbering can be used to get the original meaning
@@ -55,7 +55,7 @@
%% pagesLTS-example.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{pagesLTS}[2010/08/25 v1.1i
+\ProvidesPackage{pagesLTS}[2010/09/12 v1.1j
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/29]% v1.0f
+\RequirePackage{undolabl}[2010/09/12]% v1.0g
%% pagesLTS package uses Prelim@EveryShipout code from the
%% prelim2e package [2009/05/29 v1.3] by Martin Schr\"{o}der, thanks!
@@ -337,13 +337,13 @@
\newcommand{\pagesLTS@writelabel}[1]{%
\addtocounter{page}{+1}%
- \pagesLTS@putlabel{pagesLTS.#1}{\thepage}
+ \pagesLTS@putlabel{pagesLTS.#1}{\thepage}{1}
\addtocounter{page}{-1}%
\ifx\pagesLTS@pnc\pagesLTS@zero%
\relax%
\else%
\addtocounter{page}{+1}%
- \pagesLTS@putlabel{pagesLTS.#1.local}{\theCurrentPageLocal}
+ \pagesLTS@putlabel{pagesLTS.#1.local}{\theCurrentPageLocal}{1}
\addtocounter{page}{-1}%
\fi%
}
@@ -510,7 +510,20 @@
\let\pagesLTS@tmpB\undefined%
}
-\newcommand{\lastpagereftxt}[1]{%
+\def\lastpagereftxt#1{\pagesLTS@@pageref#1*\END}
+
+\def\pagesLTS@@pageref#1*#2\END{%
+ \ifx\\#2\\% no star
+ \pagesLTS@@@pageref{#1}%
+ \else% star
+ \expandafter\pagesLTS@@@pagerefstar%
+ \fi%
+}
+
+\def\pagesLTS@@@pageref#1{\lastpagereftext{#1}}
+\def\pagesLTS@@@pagerefstar#1{\lastpagereftextstar{#1}}
+
+\newcommand{\lastpagereftext}[1]{%
\def\pagesLTS@tmpA{#1}%
\def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
\ifx\pagesLTS@tmpA\pagesLTS@tmpB%
@@ -526,7 +539,36 @@
\let\pagesLTS@tmpB\undefined%
}
-\newcommand{\lastpagerefend}[1]{%
+\newcommand{\lastpagereftextstar}[1]{%
+ \def\pagesLTS@tmpA{#1}%
+ \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
+ \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
+ \arabic{pagesLTS.fnsymbol.local}%
+ \else%
+ \ifx\pagesLTS@hyper\pagesLTS@one%
+ \pageref*{#1}%
+ \else%
+ \pageref{#1}%
+ \fi%
+ \fi%
+ \let\pagesLTS@tmpA\undefined%
+ \let\pagesLTS@tmpB\undefined%
+ }
+
+\def\lastpagerefend#1{\pagesLTS@@pagerefend#1*\END}
+
+\def\pagesLTS@@pagerefend#1*#2\END{%
+ \ifx\\#2\\% no star
+ \pagesLTS@@@pagerefend{#1}%
+ \else% star
+ \expandafter\pagesLTS@@@pagerefendstar%
+ \fi%
+}
+
+\def\pagesLTS@@@pagerefend#1{\l@stpagerefend{#1}}
+\def\pagesLTS@@@pagerefendstar#1{\l@stpagerefendstar{#1}}
+
+\newcommand{\l@stpagerefend}[1]{%
\def\pagesLTS@tmpA{#1}%
\def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
\ifx\pagesLTS@tmpA\pagesLTS@tmpB%
@@ -578,6 +620,67 @@
\let\pagesLTS@tmpB\undefined%
}
+\newcommand{\l@stpagerefendstar}[1]{%
+ \def\pagesLTS@tmpA{#1}%
+ \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}%
+ \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
+ \arabic{pagesLTS.fnsymbol.local}%
+ \else%
+ \def\pagesLTS@tmpB{pagesLTS.fnsymbol}%
+ \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
+ \ifx\pagesLTS@hyper\pagesLTS@one%
+ \pageref*{pagesLTS.fnsymbol}%
+ \else \pageref{pagesLTS.fnsymbol}%
+ \fi%
+ \else%
+ \def\pagesLTS@tmpB{LastPage}%
+ \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
+ \ifx\pagesLTS@hyper\pagesLTS@one%
+ \pageref*{LastPage}%
+ \else \pageref{LastPage}%
+ \fi%
+ \else%
+ \def\pagesLTS@tmpB{VeryLastPage}%
+ \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
+ \ifx\pagesLTS@hyper\pagesLTS@one%
+ \pageref*{VeryLastPage}%
+ \else \pageref{VeryLastPage}%
+ \fi%
+ \else%
+ \def\pagesLTS@tmpB{LastPages}%
+ \ifx\pagesLTS@tmpA\pagesLTS@tmpB%
+ \ifx\pagesLTS@hyper\pagesLTS@one%
+ \pageref*{LastPages}%
+ \else \pageref{LastPages}%
+ \fi%
+ \else%
+ \ifx\pagesLTS@hyper\pagesLTS@one%
+ \pageref*{#1}%
+ \else \pageref{#1}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \let\pagesLTS@tmpA\undefined%
+ \let\pagesLTS@tmpB\undefined%
+ }
+
+\newcommand\overrideLTSlabel[2]{%
+ \@bsphack
+ \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1%
+ \edef\pagesLTStmpA{#1}%
+ \edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}%
+ \ifx\pagesLTStmpA\pagesLTStmpB%
+ \immediate\write\@auxout{\string\undonewlabel{#1}\string\relax}%
+ \@overriddenmessage s{#1}%
+ \fi%
+ \fi%
+ \pagesLTS@putlabel{#1}{#2}{0}%
+ \@esphack
+ }
+
\newcommand{\@pagesLTS@Prelim@EveryShipout}{%
%% The following code is from the prelim2e package %%
%% [2009/05/29 v1.3] by Martin Schr\"{o}der (Thanks!): %%
@@ -613,23 +716,10 @@
\fi%
\if@filesw%
\overridelabel{pagesLTS.\pagesLTS@pnc}%
- \def\pagesLTS@uv{new}%
- \ifx\pagesLTS@undolable\pagesLTS@uv%
- \immediate\write\@auxout{\string
- \undonewlabel{pagesLTS.\pagesLTS@pnc.local}}%
- \else%
- \def\pagesLTS@uv{old}%
- \ifx\pagesLTS@undolable\pagesLTS@uv%
- \immediate\write\@auxout{\string
- \undonewlabel{pagesLTS.\pagesLTS@pnc.local}{\on@line}}%
- \else%
- \relax% Error: no undolabl package at all, message already given above
- \fi%
- \fi%
+ \addtocounter{page}{+1}%
+ \overrideLTSlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}%
+ \addtocounter{page}{-1}%
\fi%
- \addtocounter{page}{+1}%
- \pagesLTS@putlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}%
- \addtocounter{page}{-1}%
\fi%
%% Code from prelim2e package again: %%
}%
@@ -757,7 +847,7 @@
\fi%
}
-\newcommand{\pagesLTS@putlabel}[2]{%
+\newcommand{\pagesLTS@putlabel}[3]{%
\addtocounter{page}{-1}%
\ifx\pagesLTS@hyper\pagesLTS@one%
\pagesLTS@putlabelhyper{#1}{#2}%
@@ -770,8 +860,11 @@
\edef\pagesLTStmpA{#1}%
\edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}%
\ifx\pagesLTStmpA\pagesLTStmpB%
- \immediate\write\@auxout{\string
- \undonewlabel{#1}}%
+ \edef\pagesLTStmpA{#3}%
+ \ifx\pagesLTStmpA\pagesLTS@one%
+ \immediate\write\@auxout{\string
+ \undonewlabel{#1}}%
+ \fi%
\fi%
\immediate\write\@auxout{\string
\newlabel{#1}{{}{#2}}}%
@@ -799,7 +892,7 @@
\fi%
\fi%
\addtocounter{page}{+1}%
- \pagesLTS@putlabel{LastPages}{\theCurrentPage}
+ \pagesLTS@putlabel{LastPages}{\theCurrentPage}{1}
\addtocounter{CurrentPage}{1}%
\addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{1}%
}
@@ -812,7 +905,6 @@
This package does not work without access to an .aux file.\MessageBreak%
Press Ctrl+Z to exit.\MessageBreak%
}%
- % \endinput
\fi%
\@ifpackageloaded{endfloat}%
{\@ifpackagelater{endfloat}{1992/03/31}% April 1992 v2.0
@@ -842,7 +934,7 @@
}{}%
\@ifpackageloaded{lastpage}%
{\@ifpackagelater{lastpage}{2010/07/28}% 2010/07/29 v1.2a
- {\@ifpackagelater{lastpage}{2010/08/24}% 2010/08/25 v1.2d
+ {\@ifpackagelater{lastpage}{2010/09/11}% 2010/09/12 v1.2e
{\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%
@@ -923,8 +1015,7 @@
}{\relax}%
\@ifpackageloaded{undolabl}%
{\@ifpackagelater{undolabl}{2010/07/14}% 2010/07/15 v1.0d
- {\gdef\pagesLTS@undolable{new}% not necessarily newest, but new
- \@ifpackagelater{undolabl}{2010/07/28}% 2010/07/29 v1.0f
+ {\@ifpackagelater{undolabl}{2010/09/11}% 2010/09/12 v1.0g
{% 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%
@@ -932,20 +1023,18 @@
for a new version.\MessageBreak%
}%
}
- }{\gdef\pagesLTS@undolable{old}%
- \PackageError{pagesLTS}{Obsolete version of undolabl package used.}{%
+ }{\PackageError{pagesLTS}{Incompatible, obsolete version of undolabl package used.}{%
See ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/undolabl/ \MessageBreak%
for a new version.\MessageBreak%
- \@ehc%
+ Type X <return> to quit.\MessageBreak%
}%
}
- }{\gdef\pagesLTS@undolable{none}%
- \PackageError{pagesLTS}{Package undolabl missing}{%
+ }{\PackageError{pagesLTS}{Package undolabl missing}{%
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%
+ Type X <return> to quit.\MessageBreak%
}%
}
\@ifpackagelater{hyperref}{2010/06/17}{% 2010/06/18 v6.81g
@@ -974,7 +1063,7 @@
\let\pagesLTS@rerunwarning\relax%
\AtEndDocument{%
- \message{AED: pagesLTS setting LastPage}%
+ \message{AED: pagesLTS setting LastPage ^^J}%
\clearpage%
\ifx\pagesLTS@pnc\pagesLTS@fns%
\def\pagesLTS@tmpA{\arabic{pagesLTS.fnsymbol.local}}%
@@ -988,7 +1077,7 @@
\gdef\string\pagesLTS@eso{\pagesLTS@tmpA}}%
\fi%
\fi%
- \pagesLTS@putlabel{LastPage}{\thepage}%
+ \pagesLTS@putlabel{LastPage}{\thepage}{1}%
\let\pagesLTS@tmpA\undefined%
}
@@ -1039,9 +1128,9 @@
\setcounter{pagesLTS.pagenr}{\pagesLTS@tmpB}}%
\fi%
\addtocounter{CurrentPage}{+1}%
- \message{AED: pagesLTS setting VeryLastPage via AfterLastShipout}%
- \pagesLTS@putlabel{VeryLastPage}{\thepage}%
- \message{AED: pagesLTS setting LastPages via AfterLastShipout}%
+ \message{AED: pagesLTS setting VeryLastPage via AfterLastShipout ^^J}%
+ \pagesLTS@putlabel{VeryLastPage}{\thepage}{1}%
+ \message{AED: pagesLTS setting LastPages via AfterLastShipout ^^J}%
\pagesLTS@putlabels%
\let\pagesLTS@tmpA\undefined%
\let\pagesLTS@tmpB\undefined%