summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty161
1 files changed, 85 insertions, 76 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
index 1fe9a61bf71..b93eddf47e1 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
@@ -49,37 +49,36 @@
\newlength{\cftbeforelottitleskip}
\newlength{\cftafterlottitleskip}
-\newcommand*{\cftdot}{.}
+\providecommand*{\cftdot}{.}
\providecommand*{\cftdotsep}{1}
-\newcommand*{\cftnodots}{5000}
+\providecommand*{\cftnodots}{5000}
\providecommand{\cftdotfill}[1]{}
-\newcommand*{\cftsetpnumwidth}[1]{}
+\DeclareDocumentCommand{\cftsetpnumwidth}{m}{}
-\newcommand*{\cftsetrmarg}[1]{}
+\DeclareDocumentCommand{\cftsetrmarg}{m}{}
-\newcommand*{\cftpnumalign}[1]{}
+\DeclareDocumentCommand{\cftpnumalign}{m}{}
-\newlength{\cftparskip}
+\LWR@providelength{\cftparskip}
-\newlength{\cftbeforepartskip}
-\newlength{\cftpartindent}
-\newlength{\cftpartnumwidth}
-\newcommand*{\cftpartfont}{}
-\newcommand*{\cftpartpresnum}{}
-\newcommand*{\cftpartaftersnum}{}
-\newcommand*{\cftpartaftersnumb}{}
-\newcommand*{\cftpartleader}{}
-\newcommand*{\cftpartdotsep}{1}
-\newcommand*{\cftpartpagefont}{}
-\newcommand*{\cftpartafterpnum}{}
-
-\newlength{\cftbeforechapskip}
-\newlength{\cftchapindent}
-\newlength{\cftchapnumwidth}
+\LWR@providelength{\cftbeforepartskip}
+\LWR@providelength{\cftpartindent}
+\LWR@providelength{\cftpartnumwidth}
+\providecommand*{\cftpartfont}{}
+\providecommand*{\cftpartpresnum}{}
+\providecommand*{\cftpartaftersnum}{}
+\providecommand*{\cftpartaftersnumb}{}
+\providecommand*{\cftpartleader}{}
+\providecommand*{\cftpartdotsep}{1}
+\providecommand*{\cftpartpagefont}{}
+\providecommand*{\cftpartafterpnum}{}
+\LWR@providelength{\cftbeforechapskip}
+\LWR@providelength{\cftchapindent}
+\LWR@providelength{\cftchapnumwidth}
\newcommand*{\cftchapfont}{}
\newcommand*{\cftchappresnum}{}
\newcommand*{\cftchapaftersnum}{}
@@ -88,10 +87,9 @@
\newcommand*{\cftchapdotsep}{1}
\newcommand*{\cftchappagefont}{}
\newcommand*{\cftchapafterpnum}{}
-
-\newlength{\cftbeforesecskip}
-\newlength{\cftsecindent}
-\newlength{\cftsecnumwidth}
+\LWR@providelength{\cftbeforesecskip}
+\LWR@providelength{\cftsecindent}
+\LWR@providelength{\cftsecnumwidth}
\newcommand*{\cftsecfont}{}
\newcommand*{\cftsecpresnum}{}
\newcommand*{\cftsecaftersnum}{}
@@ -101,9 +99,9 @@
\newcommand*{\cftsecpagefont}{}
\newcommand*{\cftsecafterpnum}{}
-\newlength{\cftbeforesubsecskip}
-\newlength{\cftsubsecindent}
-\newlength{\cftsubsecnumwidth}
+\LWR@providelength{\cftbeforesubsecskip}
+\LWR@providelength{\cftsubsecindent}
+\LWR@providelength{\cftsubsecnumwidth}
\newcommand*{\cftsubsecfont}{}
\newcommand*{\cftsubsecpresnum}{}
\newcommand*{\cftsubsecaftersnum}{}
@@ -113,9 +111,9 @@
\newcommand*{\cftsubsecpagefont}{}
\newcommand*{\cftsubsecafterpnum}{}
-\newlength{\cftbeforesubsubsecskip}
-\newlength{\cftsubsubsecindent}
-\newlength{\cftsubsubsecnumwidth}
+\LWR@providelength{\cftbeforesubsubsecskip}
+\LWR@providelength{\cftsubsubsecindent}
+\LWR@providelength{\cftsubsubsecnumwidth}
\newcommand*{\cftsubsubsecfont}{}
\newcommand*{\cftsubsubsecpresnum}{}
\newcommand*{\cftsubsubsecaftersnum}{}
@@ -125,9 +123,9 @@
\newcommand*{\cftsubsubsecpagefont}{}
\newcommand*{\cftsubsubsecafterpnum}{}
-\newlength{\cftbeforeparaskip}
-\newlength{\cftparaindent}
-\newlength{\cftparanumwidth}
+\LWR@providelength{\cftbeforeparaskip}
+\LWR@providelength{\cftparaindent}
+\LWR@providelength{\cftparanumwidth}
\newcommand*{\cftparafont}{}
\newcommand*{\cftparapresnum}{}
\newcommand*{\cftparaaftersnum}{}
@@ -137,9 +135,9 @@
\newcommand*{\cftparapagefont}{}
\newcommand*{\cftparaafterpnum}{}
-\newlength{\cftbeforesubparaskip}
-\newlength{\cftsubparaindent}
-\newlength{\cftsubparanumwidth}
+\LWR@providelength{\cftbeforesubparaskip}
+\LWR@providelength{\cftsubparaindent}
+\LWR@providelength{\cftsubparanumwidth}
\newcommand*{\cftsubparafont}{}
\newcommand*{\cftsubparapresnum}{}
\newcommand*{\cftsubparaaftersnum}{}
@@ -149,9 +147,9 @@
\newcommand*{\cftsubparapagefont}{}
\newcommand*{\cftsubparaafterpnum}{}
-\newlength{\cftbeforefigskip}
-\newlength{\cftfigindent}
-\newlength{\cftfignumwidth}
+\LWR@providelength{\cftbeforefigskip}
+\LWR@providelength{\cftfigindent}
+\LWR@providelength{\cftfignumwidth}
\newcommand*{\cftfigfont}{}
\newcommand*{\cftfigpresnum}{}
\newcommand*{\cftfigaftersnum}{}
@@ -161,9 +159,9 @@
\newcommand*{\cftfigpagefont}{}
\newcommand*{\cftfigafterpnum}{}
-\newlength{\cftbeforesubfigskip}
-\newlength{\cftsubfigindent}
-\newlength{\cftsubfignumwidth}
+\LWR@providelength{\cftbeforesubfigskip}
+\LWR@providelength{\cftsubfigindent}
+\LWR@providelength{\cftsubfignumwidth}
\newcommand*{\cftsubfigfont}{}
\newcommand*{\cftsubfigpresnum}{}
\newcommand*{\cftsubfigaftersnum}{}
@@ -173,9 +171,9 @@
\newcommand*{\cftsubfigpagefont}{}
\newcommand*{\cftsubfigafterpnum}{}
-\newlength{\cftbeforetabskip}
-\newlength{\cfttabindent}
-\newlength{\cfttabnumwidth}
+\LWR@providelength{\cftbeforetabskip}
+\LWR@providelength{\cfttabindent}
+\LWR@providelength{\cfttabnumwidth}
\newcommand*{\cfttabfont}{}
\newcommand*{\cfttabpresnum}{}
\newcommand*{\cfttabaftersnum}{}
@@ -185,9 +183,9 @@
\newcommand*{\cfttabpagefont}{}
\newcommand*{\cfttabafterpnum}{}
-\newlength{\cftbeforesubtabskip}
-\newlength{\cftsubtabindent}
-\newlength{\cftsubtabnumwidth}
+\LWR@providelength{\cftbeforesubtabskip}
+\LWR@providelength{\cftsubtabindent}
+\LWR@providelength{\cftsubtabnumwidth}
\newcommand*{\cftsubtabfont}{}
\newcommand*{\cftsubtabpresnum}{}
\newcommand*{\cftsubtabaftersnum}{}
@@ -197,44 +195,55 @@
\newcommand*{\cftsubtabpagefont}{}
\newcommand*{\cftsubtabafterpnum}{}
-\newcommand{\cftsetindents}[3]{}
+\DeclareDocumentCommand{\cftsetindents}{m m m}{}
\newcommand{\pagenumbersoff}[1]{}
\newcommand{\pagenumberson}[1]{}
-\NewDocumentCommand{\newlistentry}{o m m m}
-{
-\IfValueTF{#1}
-{
- \newcounter{#2}[#1]
- \expandafter\edef\csname the#2\endcsname{
- \expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}
- }
-}
-{\newcounter{#2}}
-\@namedef{l@#2}##1##2{\hypertocfloat{1}{#2}{#3}{##1}{##2}}
-\expandafter\newlength\csname cftbefore#2skip\endcsname
-\expandafter\newlength\csname cft#2indent\endcsname
-\expandafter\newlength\csname cft#2numwidth\endcsname
-\@namedef{cft#2font}{}
-\@namedef{cft#2presnum}{}
-\@namedef{cft#2aftersnum}{}
-\@namedef{cft#2aftersnumb}{}
-\@namedef{cft#2leader}{}
-\@namedef{cft#2dotsep}{1}
-\@namedef{cft#2pagefont}{}
-\@namedef{cft#2afterpnum}{}
-\@namedef{toclevel@#2}{#4}
-\@namedef{cft#2fillnum}##1{}
+\DeclareDocumentCommand{\newlistentry}{o m m m}
+{%
+\LWR@traceinfo{newlistentry #2 #3 #4}%
+\IfValueTF{#1}%
+{%
+ \@ifundefined{c@#2}{%
+ \newcounter{#2}[#1]%
+ \expandafter\edef\csname the#2\endcsname{%
+ \expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}%
+ }%
+ }{}%
+}%
+{%
+ \@ifundefined{c@#2}{%
+ \newcounter{#2}%
+ }{}%
+}%
+\@namedef{l@#2}##1##2{%
+ \hypertocfloat{1}{#2}{#3}{##1}{##2}%
+ \def\cftwhatismyname{#2}% from memoir
+}%
+\expandafter\newlength\csname cftbefore#2skip\endcsname%
+\expandafter\newlength\csname cft#2indent\endcsname%
+\expandafter\newlength\csname cft#2numwidth\endcsname%
+\@namedef{cft#2font}{}%
+\@namedef{cft#2presnum}{}%
+\@namedef{cft#2aftersnum}{}%
+\@namedef{cft#2aftersnumb}{}%
+\@namedef{cft#2leader}{}%
+\@namedef{cft#2dotsep}{1}%
+\@namedef{cft#2pagefont}{}%
+\@namedef{cft#2afterpnum}{}%
+\@namedef{toclevel@#2}{#4}%
+\@namedef{cft#2fillnum}##1{}%
+\LWR@traceinfo{newlistentry done}%
}
-\NewDocumentCommand{\newlistof}{o m m m}
+\DeclareDocumentCommand{\newlistof}{o m m m}
{%
\IfValueTF{#1}
{\newlistentry[#1]{#2}{#3}{0}}
{\newlistentry{#2}{#3}{0}}
\@namedef{ext@#2}{#3}
-\newcounter{#3depth}
+\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}
\setcounter{#3depth}{1}
\@namedef{cftmark#3}{}
\@namedef{listof#2}{\listof{#2}{#4}}