summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-08 23:10:08 +0000
committerKarl Berry <karl@freefriends.org>2010-12-08 23:10:08 +0000
commit683d8229d4e98772f56ad658500561b7dc97ad62 (patch)
tree9a30a0bd8c225ecbb04d2cd08efb81403d304673 /Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty
parent1dd12f0cdb395b2f0be720638566c238b2354a71 (diff)
interfaces 2.5 (8dec10)
git-svn-id: svn://tug.org/texlive/trunk@20692 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty')
-rw-r--r--Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty202
1 files changed, 122 insertions, 80 deletions
diff --git a/Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty b/Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty
index cd69680eb70..c7e37386583 100644
--- a/Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty
+++ b/Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% interfaces : 2010/11/26 v2.4 - interfaces : interfaces with keys for other packages (FC)
+%% interfaces : 2010/12/07 v2.5 - interfaces : interfaces with keys for other packages (FC)
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -44,7 +44,7 @@
%% Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%%
\ProvidesPackage{interfaces-tocloft}
- [2010/11/26 v2.4 pgfkeys macros for tocloft (FC)]
+ [2010/12/07 v2.5 pgfkeys macros for tocloft (FC)]
\RequirePackage{interfaces-base}
\itf@Check@Package{tocloft}
\itf@pgfkeys
@@ -61,13 +61,20 @@
\AfterPreamble{\itf@pgfkeys\pgfqkeys{/itf/tocloft/#1}{#2}}%
}% \listofsetup
-\def\itf@cft@newlistof#1{%
+\def\itf@cft@newlistof#1#2#3{% #1=toc/lof (ext.), #2=entry (\newlistof only), #3=title (\newlistof only)
\pgfqkeys{/itf/tocloft/#1}{%
+ depth/.store in counter cs=c@#1depth,%
+ depth/.append code=\expandafter\global\csname c@#1depth\endcsname
+ \csname c@#1depth\endcsname
+ \addtocontents{#1}{\csname c@#1depth\endcsname
+ \the\csname c@#1depth\endcsname\relax},%
+ #1depth/.alias*=depth,%
pagestyle/.code=\tocloftpagestyle{##1},%
parskip/.store in skip cs=cftparskip,%
parsep/.alias=parskip,%
mark/.store in cs=cftmark#1,%
marks/.alias=mark,%
+ mark=,%
label/.store as code,%
ref/.store as code,%
ref/.initial=\csname cft#1title\endcsname,% overwritten (toc,lof,lot)
@@ -80,6 +87,11 @@
aftertitleskip/.alias*=title/bottom,%
title/font/.store as code in cs=cft#1titlefont,%
title/format/.alias*=title/font,%
+ title/color/.store as color,%
+ title/color/.append code=\pgfkeysalso{/itf/tocloft/#1/title/font+={%
+ \color{\pgfkeysvalueof{/itf/tocloft/#1/title/color}}}},%
+ title/font/color/.alias=title/color,%
+ title/format/color/.alias=title/color,%
title/after/.store as code in cs=cftafter#1title,%
title/command/.code=\csdef{@cftmake#1title}####1{##1},%
dotsep/.code=\itf@units@mu\itf@musk{##1}% converts to mu
@@ -126,12 +138,12 @@
multicols/.alias=columns,%
twocolumns/.true=\pgfkeysalso{columns=2},%
twocolumns/.false=\pgfkeysalso{columns=1},%
- columns/rule/.store as dimen,%
+ columns/rule/.estore as dimen,%
columns/rule/.default=\columnseprule,%
columns/rule,% assign default
columnseprule/.alias*=columns/rule,%
columns/rule/width/.alias*=columns/rule,%
- columns/sep/.store as dimen,%
+ columns/sep/.estore as dimen,%
columns/sep/.default=\columnsep,%
columns/sep/.blank=10\p@,%
columns/sep,% assign default
@@ -140,7 +152,7 @@
columns/rule/color,% assign default (\normalcolor)
columnseprulecolor/.alias*=columns/rule/color,%
columns/rulecolor/.alias*=columns/rule/color,%
- multicolsep/.store as glue,%
+ multicolsep/.estore as glue,%
multicolsep/.default=0pt plus4pt minus3pt,%
multicolsep,% sets default
multicols/begin/.initial=,multicols/begin/.default=,%
@@ -156,7 +168,7 @@
bookmark/italic/.true=\pgfkeysaddvalue{/itf/tocloft/#1/bookmark}{}{,italic=true},%
bookmark/italic/.false=\pgfkeysaddvalue{/itf/tocloft/#1/bookmark}{}{,italic=false},%
bookmark/color/.code=\pgfkeysaddvalue{/itf/tocloft/#1/bookmark}{}{,color={##1}},%
- bookmark/level/.code=\pgfkeysEaddvalue{/itf/tocloft/#1/bookmark}{}{level={%
+ bookmark/level/.code=\pgfkeysEaddvalue{/itf/tocloft/#1/bookmark}{}{,level={%
\ifcsname toclevel@##1\endcsname
\csname toclevel@##1\endcsname
\else##1\fi}},%
@@ -169,7 +181,7 @@
}% AfterPackage interfaces-bookmark
%% while making a format \jobname is expanded to the name of the format...
%% Therefore, the following commands must be expanded \AtEndPreamble
- \AtEndPreamble{%
+ \AfterPreamble{%
\BeforeFile{\jobname.#1}{%
\pgfkeysvalueof{/itf/tocloft/#1/before}%
\pgfkeysvalueof{/itf/tocloft/#1/columns/before@hook}%
@@ -181,31 +193,29 @@
}%
\ifcsname #1setup\endcsname\else
\pgfqkeys{/itf/tocloft/#1}{%
- pagenumbers/.true=\@cftpnumon{#1},%
- pagenumbers/.false=\@cftpnumoff{#1},%
- pagenumber/.alias=pagenumbers
+ title={#3},%
+ pagenumbers/.true=\@cftpnumon{#2},%
+ pagenumbers/.false=\@cftpnumoff{#2},%
+ pagenumbers/on/.alias=pagenumbers/true,
+ pagenumbers/off/.alias=pagenumbers/false,
+ pagenumber/.alias=pagenumbers,%
}%
\expandafter\pretocmd\csname @cftmake#1title\expandafter\endcsname
- \expandafter{\expandafter\itf@tocloft\csname cft#1title\endcsname{#1}{listof#1}}
- {\PackageInfo{interfaces-tocloft}
- {Command \expandafter\string\csname @cftmake#1title\endcsname
+ \expandafter{\expandafter\itf@tocloft\csname cft#1title\endcsname{#1}{listof#2}}
+ {\@PackageInfoNoLine{interfaces-tocloft}
+ {Command \expandafter\string\csname @cftmake#1title\endcsname\space
successfully augmented}}
- {\PackageWarning{interfaces-tocloft}
- {Command \expandafter\string\csname @cftmake#1title\endcsname
+ {\@PackageWarningNoLine{interfaces-tocloft}
+ {Command \expandafter\string\csname @cftmake#1title\endcsname\space
\space could not be patched
\MessageBreak Keys label and bookmark won't work for \string\listofsetup}}%
\fi
}% \itf@cft@newlistof
-\itf@cft@newlistof{toc}
-\itf@cft@newlistof{lof}
-\itf@cft@newlistof{lot}
+\itf@cft@newlistof{toc}{}{}
+\itf@cft@newlistof{lof}{}{}
+\itf@cft@newlistof{lot}{}{}
%% Specific to toc only -------------------------------------------------------
\pgfqkeys{/itf/tocloft/toc}{%
- depth/.store in counter cs=c@tocdepth,%
- depth/.append code=
- \global\c@tocdepth\c@tocdepth
- \addtocontents{toc}{\c@tocdepth\the\c@tocdepth\relax},%
- tocdepth/.alias=depth,%
title/.store as code in cs=contentsname,%
contentsname/.alias=title,%
ref/.initial=\contentsname,%
@@ -233,14 +243,8 @@
\pgfqkeys{/itf/tocloft}{%
lof/pagenumbers/.style={figure/pagenumbers={#1},subfigure/pagenumbers={#1}},%
lof/pagenumber/.alias=lof/pagenumbers,%
- lof/depth/.store in counter cs=c@lofdepth,%
- lof/depth/.append code=\global\c@lofdepth\c@lofdepth
- \addtocontents{lof}{\c@lofdepth\the\c@lofdepth\relax},%
lot/pagenumbers/.style={figure/pagenumbers={#1},subfigure/pagenumbers={#1}},%
lot/pagenumber/.alias=lot/pagenumbers,%
- lot/depth/.store in counter cs=c@lotdepth,%
- lot/depth/.append code=\global\c@lotdepth\c@lotdepth
- \addtocontents{lot}{\c@lotdepth\the\c@lotdepth\relax},%
}%
\else
\pgfqkeys{/itf/tocloft}{%
@@ -255,108 +259,146 @@
\expandafter\itf@cft@sec@name\csname#1\endcsname{#1}%
}% \itf@cft@secname
\def\itf@cft@sec@name#1#2{%
- \ifx#1\chapter chap\else
- \ifx#1\section sec\else
- \ifx#1\subsection subsec\else
- \ifx#1\subsubsection subsubsec\else
- \ifx#1\paragraph para\else
- \ifx#1\subparagraph subpara\else
- \ifx#1\figure fig\else
- \ifx#1\subsubfigure subfig\else
- \ifx#1\table tab\else
- \ifx#1\subtable subtab\else
- #2\fi
- \fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \ifx#1\relax #2\else
+ \ifx#1\section sec\else
+ \ifx#1\subsection subsec\else
+ \ifx#1\subsubsection subsubsec\else
+ \ifx#1\paragraph para\else
+ \ifx#1\subparagraph subpara\else
+ \ifx#1\figure fig\else
+ \ifx#1\subsubfigure subfig\else
+ \ifx#1\table tab\else
+ \ifx#1\subtable subtab\else
+ \ifx#1\chapter chap\else
+ #2\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
}% \itf@cft@section@name
%% tocloft setup for tables sections :
\pgfkeys{%
-/handlers/.cft@def/.style={\pgfkeyscurrentpath/.store in cs=\itf@cft@name #1\@nil},%
-/handlers/.cft@code/.style={\pgfkeyscurrentpath/.store as code in cs=\itf@cft@name #1\@nil},%
-/handlers/.cft@length/.style={\pgfkeyscurrentpath/.store in skip cs=\itf@cft@name #1\@nil},%
+/handlers/.cft@def/.style={%
+ \pgfkeyscurrentpath/.store in cs=\itf@cft@name #1\@nil},%
+/handlers/.cft@code/.style={%
+ \pgfkeyscurrentpath/.store as code in cs=\itf@cft@name #1\@nil},%
+/handlers/.cft@length/.style={%
+ \pgfkeyscurrentpath/.store in skip cs=\itf@cft@name #1\@nil},%
}
\def\itf@cft@newsection{\itf@cft@new@section{/itf/tocloft}}
-\def\itf@cft@new@section#1#2#3{% #2=part / chap / sec / subsec etc., #3 = toc | lof | lot
- \pgfqkeys{#1/#3/#2}{%
- skip/.cft@length=before.#2.skip,%
+\def\itf@cft@new@section#1#2#3{% #2 = toc | lof | lot, #3=part / chap / sec / subsec etc.
+ \pgfqkeys{#1/#2/#3}{%
+ skip/.cft@length=before.#3.skip,%
beforeskip/.alias*=skip,%
top/.alias*=skip,%
- indent/.cft@length=.#2.indent,%
- font/.cft@code=.#2.font,%
- font/.append code={\pgfkeysalso{/itf/tocloft/#3/#2/pagenumber/font={##1}}},%
+ indent/.cft@length=.#3.indent,%
+ font/.cft@code=.#3.font,%
+ font/.append code=\pgfkeysalso{/itf/tocloft/#2/#3/pagenumber/font={##1}},%
format/.alias*=font,%
- number/width/.cft@length=.#2.numwidth,%
+ color/.store as color,%
+ color/.append code=\pgfkeysalso{/itf/tocloft/#2/#3/font+={%
+ \color{\pgfkeysvalueof{/itf/tocloft/#2/#3/color}}%
+ \ifdefined\hypersetup \hypersetup{%
+ linkcolor=\pgfkeysvalueof{/itf/tocloft/#2/#3/color}}%
+ \fi}},%
+ font/color/.alias=color,%
+ format/color/.alias=color,%
+ number/width/.cft@length=.#3.numwidth,%
numwidth/.alias*=number/width,%
- presnum/.cft@code=.#2.presnum,%
+ presnum/.cft@code=.#3.presnum,%
number/before/.alias*=presnum,%
- aftersnum/.cft@code=.#2.aftersnum,%
+ aftersnum/.cft@code=.#3.aftersnum,%
number/after/.alias*=aftersnum,%
- aftersnumb/.cft@code=.#2.aftersnumb,%
+ aftersnumb/.cft@code=.#3.aftersnumb,%
title/before/.alias*=aftersnumb,%
- leader/.cft@def=.#2.leader,%
- leader/.default=\cftdotfill{\csname\itf@cft@name.#2.dotsep\@nil\endcsname},%
+ leader/.cft@def=.#3.leader,%
+ leader/.default=\cftdotfill{\csname\itf@cft@name.#3.dotsep\@nil\endcsname},%
leaders/.alias=leader,%
dotsep/.code={\ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text
- \csdef{\itf@cft@name.#2.dotsep\@nil}{\cftdotsep}%
+ \csdef{\itf@cft@name.#3.dotsep\@nil}{\cftdotsep}%
\else
\itf@units@mu\itf@musk{##1}%
- \csedef{\itf@cft@name.#2.dotsep\@nil}{\itf@strip@mu\itf@musk}%
+ \csedef{\itf@cft@name.#3.dotsep\@nil}{\itf@strip@mu\itf@musk}%
\fi},%
dotsep/.blank=\cftnodots,%
- nodots/.code=\csdef{\itf@cft@name.#2.dotsep\@nil}{\cftnodots},%
+ nodots/.code=\csdef{\itf@cft@name.#3.dotsep\@nil}{\cftnodots},%
nodots/.value forbidden,%
- pagefont/.cft@code=.#2.pagefont,%
+ pagefont/.cft@code=.#3.pagefont,%
page/font/.alias*=pagefont,%
pagenumber/font/.alias*=pagefont,%
- afterpnum/.cft@code=.#2.afterpnum,%
+ pagenumbers/font/.alias*=pagefont,%
+ page/color/.store as color,%
+ page/color/.append code=\pgfkeysalso{/itf/tocloft/#2/#3/pagefont+={%
+ \color{\pgfkeysvalueof{/itf/tocloft/#2/#3/page/color}}%
+ \ifdefined\hypersetup \hypersetup{%
+ linkcolor=\pgfkeysvalueof{/itf/tocloft/#2/#3/page/color}}%
+ \fi}},%
+ pagenumber/color/.alias=page/color,%
+ pagenumbers/color/.alias=page/color,%
+ page/font/color/.alias=page/color,%
+ pagenumber/font/color/.alias=page/color,%
+ pagenumbers/font/color/.alias=page/color,%
+ afterpnum/.cft@code=.#3.afterpnum,%
page/after/.alias*=afterpnum,%
pagenumber/after/.alias*=afterpnum,%
- pagenumbers/.on=\@cftpnumon{\itf@cft@secname{#2}},%
- pagenumbers/.off=\@cftpnumoff{\itf@cft@secname{#2}},%
+ pagenumbers/.on=\@cftpnumon{\itf@cft@secname{#3}},%
+ pagenumbers/.off=\@cftpnumoff{\itf@cft@secname{#3}},%
pagenumber/.alias=pagenumbers,%
}% \pgfqkeys
}% \itf@cft@new@section
\@for\itf@tp:=part,chap,chapter,sec,section,subsec,subsection,%
subsubsec,subsubsection,para,paragraph,subpara,subparagraph%
- \do{\expandafter\itf@cft@newsection\expandafter{\itf@tp}{toc}}%
+ \do{\edef\itf@tp{\noexpand\itf@cft@newsection{toc}{\itf@tp}}\itf@tp}%
\if@cftsubfigopt
\@for\itf@tp:=fig,figure,subfig,subfigure%
- \do{\expandafter\itf@cft@newsection\expandafter{\itf@tp}{lof}}%
+ \do{\edef\itf@tp{\noexpand\itf@cft@newsection{lof}{\itf@tp}}\itf@tp}%
\@for\itf@tp:=tab,table,subtab,subtable%
- \do{\expandafter\itf@cft@newsection\expandafter{\itf@tp}{lot}}%
+ \do{\edef\itf@tp{\noexpand\itf@cft@newsection{lot}{\itf@tp}}\itf@tp}%
\else
\@for\itf@tp:=fig,figure%
- \do{\expandafter\itf@cft@newsection\expandafter{\itf@tp}{lof}}%
+ \do{\edef\itf@tp{\noexpand\itf@cft@newsection{lof}{\itf@tp}}\itf@tp}%
\@for\itf@tp:=tab,table%
- \do{\expandafter\itf@cft@newsection\expandafter{\itf@tp}{lot}}%
+ \do{\edef\itf@tp{\noexpand\itf@cft@newsection{lot}{\itf@tp}}\itf@tp}%
\fi
\itf@patch\pretocmd\@cftmaketoctitle
{\itf@tocloft\contentsname{toc}{tableofcontents}}
- {\PackageInfo{interfaces-tocloft}
+ {\@PackageInfoNoLine{interfaces-tocloft}
{Command \string\@cftmaketoctitle\space successfully augmented}}
- {\PackageWarning{interfaces-tocloft}
+ {\@PackageWarningNoLine{interfaces-tocloft}
{Command \string\@cftmaketoctitle\space could not be patched
\MessageBreak label and bookmark keys for \string\tocsetup\space won't work}}%
\itf@patch\pretocmd\@cftmakeloftitle
{\itf@tocloft\listfigurename{lof}{listoffigures}}
- {\PackageInfo{interfaces-tocloft}
+ {\@PackageInfoNoLine{interfaces-tocloft}
{Command \string\@cftmakeloftitle\space successfully augmented}}
- {\PackageWarning{interfaces-tocloft}
+ {\@PackageWarningNoLine{interfaces-tocloft}
{Command \string\@cftmakeloftitle\space could not be patched
\MessageBreak label and bookmark keys for \string\lofsetup\space won't work}}%
\itf@patch\pretocmd\@cftmakelottitle
{\itf@tocloft\listtablename{lot}{listoftables}}
- {\PackageInfo{interfaces-tocloft}
+ {\@PackageInfoNoLine{interfaces-tocloft}
{Command \string\@cftmakelottitle\space successfully augmented}}
- {\PackageWarning{interfaces-tocloft}
+ {\@PackageWarningNoLine{interfaces-tocloft}
{Command \string\@cftmakelottitle\space could not be patched
\MessageBreak label and bookmark keys for \string\lotsetup\space won't work}}%
-\itf@patch\apptocmd\newlistentry
- {\itf@cft@newlistof{#2}}
- {\PackageInfo{interfaces-tocloft}
+\expandafter\itf@patch\expandafter\patchcmd\csname\string\newlistof\endcsname
+ {#4}{\csname cft#3title\endcsname}
+ {\@PackageInfoNoLine{interfaces-tocloft}
+ {Command \string\newlistof\space successfully patched}}
+ {\@PackageWarningNoLine{interfaces-tocloft}
+ {Command \string\newlistof\space could not be patched
+ \MessageBreak \string\listofsetup\space will not work}}%
+\expandafter\itf@patch\expandafter\apptocmd\csname\string\newlistof\endcsname
+ {\itf@cft@newlistof{#3}{#2}{#4}}
+ {\@PackageInfoNoLine{interfaces-tocloft}
+ {Command \string\newlistof\space successfully augmented}}
+ {\@PackageWarningNoLine{interfaces-tocloft}
+ {Command \string\newlistof\space could not be patched
+ \MessageBreak \string\listofsetup\space will not work}}%
+\expandafter\itf@patch\expandafter\apptocmd\csname\string\newlistentry\endcsname
+ {\itf@cft@newsection{#3}{#2}}
+ {\@PackageInfoNoLine{interfaces-tocloft}
{Command \string\newlistentry\space successfully augmented}}
- {\PackageWarning{interfaces-tocloft}
+ {\@PackageWarningNoLine{interfaces-tocloft}
{Command \string\newlistentry\space could not be patched
- \MessageBreak \string\listofsetup\space will not work}}%
+ \MessageBreak \string\listofsetup\space will not work}}
\def\itf@tocloft#1#2#3{%
\expandafter\def\expandafter#1\expandafter{%
\expandafter\itf@cft@label