diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-19 21:54:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-19 21:54:34 +0000 |
commit | c51bd9eb0830b5921097132dfe036674c15bbb58 (patch) | |
tree | 0fd5df190a563e098c91a150a8a3d43582c388ff /Master/texmf-dist/tex/latex | |
parent | 2c3d34694bd4e8ce33c94da676c69fcdffb4a045 (diff) |
pageslts (19jan14)
git-svn-id: svn://tug.org/texlive/trunk@32720 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/pageslts/pageslts.sty | 282 |
1 files changed, 106 insertions, 176 deletions
diff --git a/Master/texmf-dist/tex/latex/pageslts/pageslts.sty b/Master/texmf-dist/tex/latex/pageslts/pageslts.sty index 063a76174cd..704fa5ef13c 100644 --- a/Master/texmf-dist/tex/latex/pageslts/pageslts.sty +++ b/Master/texmf-dist/tex/latex/pageslts/pageslts.sty @@ -9,9 +9,9 @@ %% This is a generated file. %% %% Project: pageslts -%% Version: 2013/01/28 v1.2b +%% Version: 2014/01/19 v1.2c %% -%% Copyright (C) 2010 - 2013 by +%% Copyright (C) 2010 - 2014 by %% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de> %% Portions of code copyrighted by other people as marked. %% @@ -60,8 +60,10 @@ %% pageslts.sty, pageslts.pdf, pageslts.ins, pageslts.drv, %% pageslts-example.tex. %% +%% In memoriam Tommy Muench + 2014/01/02. +%% \NeedsTeXFormat{LaTeX2e}[2011/06/27] -\ProvidesPackage{pageslts}[2013/01/28 v1.2b +\ProvidesPackage{pageslts}[2014/01/19 v1.2c Refers to special pages' numbers/names (HMM)] %% Allows for things like\\ @@ -103,6 +105,7 @@ \RequirePackage{atveryend}[2011/06/30]% v1.8 \RequirePackage{everyshi}[2001/05/15]% v3.00 \RequirePackage{letltxmacro}[2010/09/02]% v1.4 +\RequirePackage{ltxcmds}[2011/11/09]% v1.22 \RequirePackage{kvoptions}[2011/06/30]% v3.11 \RequirePackage{undolabl}[2012/01/01]% v1.0k \RequirePackage{rerunfilecheck}[2011/04/15]% v1.7 @@ -114,7 +117,7 @@ %% to the most recent version (if they are 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 pageslts package is not fully compatible with version 2.0 %% (and earlier) of the endfloat package, because those versions %% redefined the \enddocument command. @@ -151,7 +154,7 @@ 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% + For details please see the documentation% } \fi @@ -161,24 +164,8 @@ \def\pagesLTS@BBi{BB} \ifx\pagesLTS@alphMult\pagesLTS@ab% - \ifpagesLTS@pagecontinue% \relax - \else - \PackageWarningNoLine{pageslts}{Option pagecontinue=false used,\MessageBreak% - but not alphMult=0.\MessageBreak% - Now setting alphMult=0.\MessageBreak% - } - \setkeys{pagesLTS}{alphMult=0} - \fi \else \ifx\pagesLTS@alphMult\pagesLTS@bb% - \ifpagesLTS@pagecontinue% \relax - \else - \PackageWarningNoLine{pageslts}{Option pagecontinue=false used,\MessageBreak% - but not alphMult=0.\MessageBreak% - Now setting alphMult=0.\MessageBreak% - } - \setkeys{pagesLTS}{alphMult=0} - \fi \else \ifx\pagesLTS@alphMult\pagesLTS@zero% \PackageWarningNoLine{pageslts}{% @@ -191,7 +178,7 @@ alphalph package and call pageslts\MessageBreak% with option alphMult=ab (for aa, ab, ac, ad,...) or\MessageBreak% with option alphMult=bb (for aa, bb, cc, dd,...).\MessageBreak% - For details please see the documentation!\MessageBreak% + For details please see the documentation!% } \else \PackageError{pageslts}{Unknown option value}{% @@ -199,7 +186,7 @@ alphMult= \pagesLTS@alphMult . Only values\MessageBreak% ab, bb, and 0 (zero) are valid.\MessageBreak% The default ab is set.\MessageBreak% - For details please see the documentation!\MessageBreak% + For details please see the documentation!% } \setkeys{pagesLTS}{alphMult=ab} \fi @@ -207,24 +194,8 @@ \fi \ifx\pagesLTS@AlphMulti\pagesLTS@ABi% - \ifpagesLTS@pagecontinue% \relax - \else - \PackageWarningNoLine{pageslts}{Option pagecontinue=false used,\MessageBreak% - but not AlphMulti=0.\MessageBreak% - Now setting AlphMulti=0.\MessageBreak% - } - \setkeys{pagesLTS}{AlphMulti=0} - \fi \else \ifx\pagesLTS@AlphMulti\pagesLTS@BBi% - \ifpagesLTS@pagecontinue% \relax - \else - \PackageWarningNoLine{pageslts}{Option pagecontinue=false used,\MessageBreak% - but not AlphMulti=0.\MessageBreak% - Now setting AlphMulti=0.\MessageBreak% - } - \setkeys{pagesLTS}{AlphMulti=0} - \fi \else \ifx\pagesLTS@AlphMulti\pagesLTS@zero% \PackageWarningNoLine{pageslts}{% @@ -237,7 +208,7 @@ alphalph package and call pageslts\MessageBreak% with option AlphMulti=AB (for AA, AB, AC, AD,...) or\MessageBreak% with option AlphMulti=BB (for AA, BB, CC, DD,...).\MessageBreak% - For details please see the documentation!\MessageBreak% + For details please see the documentation!% } \else \PackageError{pageslts}{Unknown option value}{% @@ -245,7 +216,7 @@ AlphMulti= \pagesLTS@AlphMulti . Only values\MessageBreak% AB, BB, and 0 (zero) are valid.\MessageBreak% The default AB is set.\MessageBreak% - For details please see the documentation!\MessageBreak% + For details please see the documentation!% } \setkeys{pagesLTS}{AlphMulti=AB} \fi @@ -265,16 +236,6 @@ \fi \ifpagesLTS@romanMult% - \ifpagesLTS@pagecontinue% \relax - \else - \PackageWarningNoLine{pageslts}{Option pagecontinue=false used,\MessageBreak% - but also romanMult.\MessageBreak% - Now setting romanMult=false.\MessageBreak% - } - \setkeys{pagesLTS}{romanMult=false} - \fi -\fi -\ifpagesLTS@romanMult% \PackageInfo{pageslts}{Option romanMult enabled\MessageBreak% (maybe by default):\MessageBreak% The pageslts package will extend the page numbering\MessageBreak% @@ -297,16 +258,6 @@ \fi \ifpagesLTS@RomanMulti% - \ifpagesLTS@pagecontinue% \relax - \else - \PackageWarningNoLine{pageslts}{Option pagecontinue=false used,\MessageBreak% - but also RomanMulti.\MessageBreak% - Now setting RomanMulti=false.\MessageBreak% - } - \setkeys{pagesLTS}{RomanMulti=false} - \fi -\fi -\ifpagesLTS@RomanMulti% \PackageInfo{pageslts}{Option RomanMulti enabled\MessageBreak% (maybe by default):\MessageBreak% The pageslts package will extend the page numbering\MessageBreak% @@ -329,16 +280,6 @@ \fi \ifpagesLTS@fnsymbolmult% - \ifpagesLTS@pagecontinue% \relax - \else - \PackageWarningNoLine{pageslts}{Option pagecontinue=false used,\MessageBreak% - but also fnsymbolmult.\MessageBreak% - Now setting fnsymbolmult=false.\MessageBreak% - } - \setkeys{pagesLTS}{fnsymbolmult=false} - \fi -\fi -\ifpagesLTS@fnsymbolmult% \PackageInfo{pageslts}{Option fnsymbolmult enabled\MessageBreak% (maybe by default):\MessageBreak% The pageslts package will extend the page numbering\MessageBreak% @@ -366,9 +307,6 @@ \def\pagesLTS@fns{fnsymbol} \def\pagesLTS@alph{alph} \def\pagesLTS@Alph{Alph} -\def\pagesLTS@AlphAlph{0} -\def\pagesLTS@hyper{0} -\def\pagesLTS@nameref{0} \def\pagesLTS@rerun{0} \def\pagesLTS@eso{0} \def\pagesLTS@esov{0} @@ -589,7 +527,7 @@ \addtocounter{page}{+1}% \xdef\pagesLTS@pnc{#1}% \OrigPagenumbering{#1}% - \expandPagenumbering{#1} + \expandPagenumbering{#1}% \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}% \addtocounter{pagesLTS.pnc.\pagesLTS@pnc}{1}% \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}% @@ -606,9 +544,7 @@ \else% %% before the first page has shipped out \xdef\pagesLTS@pnc{#1}% - \countdef\c@page=0 \c@page=1 - \def\cl@page{} - \global\c@page \@ne + \global\c@page \@ne\relax% \global\def\thepage{\csname \expandafter @\pagesLTS@pnc \endcsname \c@page}% \expandPagenumbering{#1} \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}% @@ -643,11 +579,10 @@ \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}% - \ifx\pagesLTS@hyper\pagesLTS@one% + \ltx@ifpackageloaded{hyperref}{% \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% {\arabic{pagesLTS.fnsymbol.local}}% - \else \arabic{pagesLTS.fnsymbol.local}% - \fi% + }{\arabic{pagesLTS.fnsymbol.local}}% \else% \pageref{#1}% \fi% @@ -662,11 +597,7 @@ \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}% \arabic{pagesLTS.fnsymbol.local}% \else% - \ifx\pagesLTS@hyper\pagesLTS@one% - \pageref*{#1}% - \else% - \pageref{#1}% - \fi% + \ltx@ifpackageloaded{hyperref}{\pageref*{#1}}{\pageref{#1}}% \fi% \let\pagesLTS@tmpA\undefined% \let\pagesLTS@tmpB\undefined% @@ -690,43 +621,38 @@ \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% \pagesLTS@ifcounter{pagesLTS.fnsymbol.local}% - \ifx\pagesLTS@hyper\pagesLTS@one% + \ltx@ifpackageloaded{hyperref}{% \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% {\arabic{pagesLTS.fnsymbol.local}}% - \else \arabic{pagesLTS.fnsymbol.local}% - \fi% + }{\arabic{pagesLTS.fnsymbol.local}}% \else% \def\pagesLTS@tmpB{pagesLTS.fnsymbol}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% - \ifx\pagesLTS@hyper\pagesLTS@one% + \ltx@ifpackageloaded{hyperref}{% \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% {\pagesLTS.lastpage}% - \else \pageref{pagesLTS.fnsymbol}% - \fi% + }{\pageref{pagesLTS.fnsymbol}}% \else% \def\pagesLTS@tmpB{LastPage}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% - \ifx\pagesLTS@hyper\pagesLTS@one% + \ltx@ifpackageloaded{hyperref}{% \href{\#pagesLTS.fnsymbol.local.\pagesLTS@eso}% {\pagesLTS.lastpage}% - \else \pageref{LastPage}% - \fi% + }{\pageref{LastPage}}% \else% \def\pagesLTS@tmpB{VeryLastPage}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% - \ifx\pagesLTS@hyper\pagesLTS@one% + \ltx@ifpackageloaded{hyperref}{% \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% {\pagesLTS.lastpage}% - \else \pageref{VeryLastPage}% - \fi% + }{\pageref{VeryLastPage}}% \else% \def\pagesLTS@tmpB{LastPages}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% - \ifx\pagesLTS@hyper\pagesLTS@one% + \ltx@ifpackageloaded{hyperref}{% \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% {\arabic{pagesLTS.pagenr}}% - \else \pageref{LastPages}% - \fi% + }{\pageref{LastPages}}% \else% \pageref{#1}% \fi% @@ -747,35 +673,23 @@ \else% \def\pagesLTS@tmpB{pagesLTS.fnsymbol}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% - \ifx\pagesLTS@hyper\pagesLTS@one% - \pageref*{pagesLTS.fnsymbol}% - \else \pageref{pagesLTS.fnsymbol}% - \fi% + \ltx@ifpackageloaded{hyperref}{\pageref*{pagesLTS.fnsymbol}}{% + \pageref{pagesLTS.fnsymbol}}% \else% \def\pagesLTS@tmpB{LastPage}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% - \ifx\pagesLTS@hyper\pagesLTS@one% - \pageref*{LastPage}% - \else \pageref{LastPage}% - \fi% + \ltx@ifpackageloaded{hyperref}{\pageref*{LastPage}}{\pageref{LastPage}}% \else% \def\pagesLTS@tmpB{VeryLastPage}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% - \ifx\pagesLTS@hyper\pagesLTS@one% - \pageref*{VeryLastPage}% - \else \pageref{VeryLastPage}% - \fi% + \ltx@ifpackageloaded{hyperref}{\pageref*{VeryLastPage}}{% + \pageref{VeryLastPage}}% \else% \def\pagesLTS@tmpB{LastPages}% \ifx\pagesLTS@tmpA\pagesLTS@tmpB% - \ifx\pagesLTS@hyper\pagesLTS@one% - \pageref*{LastPages}% - \else \pageref{LastPages}% - \fi% + \ltx@ifpackageloaded{hyperref}{\pageref*{LastPages}}{\pageref{LastPages}}% \else% - \ifx\pagesLTS@hyper\pagesLTS@one% - \pageref*{#1}% - \else \pageref{#1}% + \ltx@ifpackageloaded{hyperref}{\pageref*{#1}}{\pageref{#1}}% \fi% \fi% \fi% @@ -792,7 +706,7 @@ \edef\pagesLTStmpA{#1}% \edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}% \ifx\pagesLTStmpA\pagesLTStmpB% - \immediate\write\@auxout{\string\undonewlabel{#1}\string\relax}% + \immediate\write\@auxout{\string\undonewlabel{#1}}% \@overriddenmessage s{#1}% \fi% \fi% @@ -821,19 +735,17 @@ \ifx\pagesLTS@pnc\pagesLTS@fns% \pagesLTS@ifcounter{pagesLTS.fnsymbol.cont}% \addtocounter{pagesLTS.fnsymbol.cont}{1}% - \ifx\pagesLTS@hyper\pagesLTS@one% + \ltx@ifpackageloaded{hyperref}{% \phantomsection% \hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}% - \fi% + }{}% \ifnum \pagesLTS@esov=\pagesLTS@zero% \label{pagesLTS.fnsymbol}% \else% \overridelabel{pagesLTS.fnsymbol}% \fi% \else% - \ifx\pagesLTS@hyper\pagesLTS@one% - \phantomsection% - \fi% + \ltx@ifpackageloaded{hyperref}{\phantomsection}{}% \if@filesw% \overridelabel{pagesLTS.\pagesLTS@pnc}% \addtocounter{page}{+1}% @@ -886,10 +798,6 @@ \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% \global\def\pncmissing{1}% \mathchardef\pagesLTS@tmpD=\arabic{page}% @@ -979,38 +887,27 @@ \message{(pageslts) cannot be shown, because pageslts does not use \string\label,}% \message{(pageslts) but writes directly to the \jobname.aux file. ^^J}% \fi% - \ifx\pagesLTS@hyper\pagesLTS@one% - \pagesLTS@putlabelhyper{#1}{#2}% - \else% + \ltx@ifpackageloaded{hyperref}{\pagesLTS@putlabelhyper{#1}{#2}}{% else \if@filesw% \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2% - \ifx\pagesLTS@nameref\pagesLTS@one% - \immediate\write\@auxout{\string - \newlabel{#1}{{}{#2}{}{}{}}}% - \else% - \immediate\write\@auxout{\string - \newlabel{#1}{{}{#2}}}% - \fi% + \ltx@ifpackageloaded{nameref}{% + \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}{}{}{}}}}{% else + \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}}}}% \else% \edef\pagesLTStmpA{#1}% \edef\pagesLTStmpB{pagesLTS.\pagesLTS@pnc.local}% \ifx\pagesLTStmpA\pagesLTStmpB% \edef\pagesLTStmpA{#3}% \ifx\pagesLTStmpA\pagesLTS@one% - \immediate\write\@auxout{\string - \undonewlabel{#1}}% + \immediate\write\@auxout{\string\undonewlabel{#1}}% \fi% \fi% - \ifx\pagesLTS@nameref\pagesLTS@one% - \immediate\write\@auxout{\string - \newlabel{#1}{{}{#2}{}{}{}}}% - \else% - \immediate\write\@auxout{\string - \newlabel{#1}{{}{#2}}}% - \fi% + \ltx@ifpackageloaded{nameref}{% + \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}{}{}{}}}}{% else + \immediate\write\@auxout{\string\newlabel{#1}{{}{#2}}}}% \fi% \fi% - \fi% + }% \addtocounter{page}{+1}% } @@ -1053,9 +950,9 @@ }% {\PackageError{pageslts}{Incompatible, very old endfloat package detected.}% {The very old version 2.0 (and earlier) of the\MessageBreak% - endfloat package actually redefined the \ enddocument,\MessageBreak% + endfloat package actually redefined the \string\enddocument ,\MessageBreak% and so interfered drastically with the LaTeX2e commands\MessageBreak% - which make use of \ AtEndDocument.\MessageBreak% + which make use of \string\AtEndDocument .\MessageBreak% Newer versions of the endfloat package exists\MessageBreak% (at least: v2.5d as of 2011/12/25)\MessageBreak% in modern documentation form,\MessageBreak% @@ -1094,15 +991,12 @@ \gdef\lastpage@putlabel{\relax}% }% }{}% - \@ifpackageloaded{alphalph}% - {\global\def\pagesLTS@AlphAlph{1}% - \newalphalph{\AlphMult}[mult]{\@Alph}{26}% + \ltx@ifpackageloaded{alphalph}% + {\newalphalph{\AlphMult}[mult]{\@Alph}{26}% \newalphalph{\alphMult}[mult]{\@alph}{26}% \newalphalph{\fnsymbolmult}[mult]{\@fnsymbol}{5}% - }{% \relax - } - \@ifpackageloaded{hyperref}% - {\gdef\pagesLTS@hyper{1}% + }{}% + \ltx@ifpackageloaded{hyperref}{% \@ifpackageloaded{pdfpages}% {\PackageWarningNoLine{pageslts}{Package pdfpages detected.\MessageBreak% Using hyperref with pdfpages can cause problems. See\MessageBreak% @@ -1148,19 +1042,13 @@ %% Heiko Oberdiek (hyperref version 2012/11/06 v6.83m). %% pageslts may work with earlier versions of this packages, %% but this was not tested. - }% - {\PackageWarning{pageslts}{Package hyperref NOT detected.\MessageBreak% - pageslts would support hyperref. The page references\MessageBreak% - will NOT be hyperlinked!\MessageBreak }% - }% - \@ifpackageloaded{nameref}% - {\gdef\pagesLTS@nameref{1}% - }{% relax, \pagesLTS@nameref stays 0 - }% - \@ifpackageloaded{showkeys}{% - \@ifpackagewith{showkeys}{final}{\relax}{\gdef\pagesLTS@SK{1}}% - }{% \relax + }{% + \PackageWarning{pageslts}{Package hyperref NOT detected.\MessageBreak% + pageslts would support hyperref. The page references\MessageBreak% + will NOT be hyperlinked!\MessageBreak }% }% + \ltx@ifpackageloaded{showkeys}{% + \@ifpackagewith{showkeys}{final}{}{\gdef\pagesLTS@SK{1}}}{}% } \AtEndDocument{% @@ -1195,12 +1083,12 @@ \immediate\write\@auxout{\string \setcounter{pagesLTS.fnsymbol.local}{\pagesLTS@esov}}% \fi% - \ifx\pagesLTS@hyper\pagesLTS@one% + \ltx@ifpackageloaded{hyperref}{% \ifx\pagesLTS@pnc\pagesLTS@fns% \immediate\write\@auxout{\string \gdef\string\lastpageref{\string\lastpagerefend}}% \fi% - \fi% + }{}% \fi% \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}% \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% @@ -1209,9 +1097,14 @@ \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1% \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.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}% + \@tempcnta=\value{pagesLTS.pnc.0}\relax% + \loop% + \ifnum\@tempcnta>1\relax% + \addtocounter{pagesLTS.pnc.0}{-1}% + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + -\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.0}.local.count}}% + \@tempcnta=\value{pagesLTS.pnc.0}\relax% + \repeat% \setcounter{pagesLTS.pnc.0}{\pagesLTS@tmpD}% \fi% \if@filesw% @@ -1262,6 +1155,43 @@ \fi% } +\newcommand*{\ifund@fined}[1]{% + % from http://de.comp.text.tex.narkive.com/uNza5NAA/ifundef-and-ifdef + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } + +\ifund@fined{frontmatter}{\relax}{% + \ltx@GlobalPrependToMacro{\frontmatter}{\pagesLTS@prefrontmatter}% + \ltx@GlobalAppendToMacro{\frontmatter}{\pagesLTS@postfrontmatter}% + } + +\newcommand{\pagesLTS@prefrontmatter}{% + \xdef\pagesLTS@FMBpncn{\pagesLTS@pnc}% + \xdef\pagesLTS@FMBpncp{\arabic{pagesLTS.current.local.\pagesLTS@pnc}}% + } + +\newcommand{\pagesLTS@postfrontmatter}{% + \xdef\pagesLTS@FMEpncn{\pagesLTS@pnc}% + \ifx\pagesLTS@FMBpncn\pagesLTS@FMEpncn% + \else% + \ifx\pagesLTS@FMBpncn\pagesLTS@zero% + \else% + \ifx\pagesLTS@FMBpncp\pagesLTS@one% + \PackageError{pageslts}{\string\pagenumbering\space before \string\frontmatter}{% + Do not use \string\pagenumbering{\pagesLTS@FMBpncn} before \string\frontmatter \MessageBreak% + on the same page!\MessageBreak% + \string\frontmatter\space (re)defines the page numbering scheme to \pagesLTS@FMEpncn , \MessageBreak% + thus earlier use of \string\pagenumbering{\pagesLTS@FMBpncn} on the same page is useless anyway.}% + \fi% + \fi% + \fi% +} + \endinput %% %% End of file `pageslts.sty'. |