summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/interfaces/interfaces-tocloft.sty
blob: 8780eb81f95f37ad893db89157405e36b988dc29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
%%
%% This is file `interfaces-tocloft.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% interfaces.dtx  (with options: `tocloft')
%% 
%% This is a generated file.
%% 
%% interfaces : 2011/02/19 v3.1 - 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
%% version 1.3 of this license or (at your option) any later
%% version. The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% 
%% This work consists of the main source file interfaces.dtx
%% and the derived files
%%     interfaces.sty, interfaces.pdf, interfaces.ins,
%%     interfaces-base.sty,
%%     interfaces-LaTeX.sty,
%%     interfaces-tikz.sty,
%%     interfaces-titlesec.sty,
%%     interfaces-hyperref.sty,
%%     interfaces-bookmark.sty,
%%     interfaces-hypbmsec.sty,
%%     interfaces-fancyhdr.sty,
%%     interfaces-marks.sty,
%%     interfaces-tocloft.sty,
%%     interfaces-makecell.sty,
%%     interfaces-enumitem.sty,
%%     interfaces-truncate.sty,
%%     interfaces-appendix.sty,
%%     interfaces-embedfile.sty,
%%     interfaces-environ.sty,
%%     interfaces-umrand.sty,
%%     interfaces-scrlfile.sty,
%%     interfaces-pgfkeys.sty,
%%     interfaces-etoolbox.sty
%% 
%% interfaces: interfaces with keys for other packages (FC)
%% Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%% 
\ProvidesPackage{interfaces-tocloft}
   [2011/02/19 v3.1 pgfkeys macros for tocloft (FC)]
\RequirePackage{interfaces-base}
\itf@Check@Package{tocloft}
\newrobustcmd\tocsetup[1]{%
   \AfterPreamble{\itf@pgfkeys\pgfqkeys{/itf/tocloft/toc}{#1}}%
}% \tocsetup
\newrobustcmd\lofsetup[1]{%
   \AfterPreamble{\itf@pgfkeys\pgfqkeys{/itf/tocloft/lof}{#1}}%
}% \lofsetup
\newrobustcmd\lotsetup[1]{%
   \AfterPreamble{\itf@pgfkeys\pgfqkeys{/itf/tocloft/lot}{#1}}%
}% \lotsetup
\newrobustcmd\listofsetup[2]{%
   \AfterPreamble{\itf@pgfkeys\pgfqkeys{/itf/tocloft/#1}{#2}}%
}% \listofsetup

\def\itf@cft@newlistof#1#2#3{%
   \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)
         ref/.default=\csname cft#1title\endcsname,% overwritten (toc,lof,lot)
         ref/.blank=\pgfkeysnovalue,%
      title/.store as code in cs=cft#1title,% overwritten below for toc, lof and lot
      title/top/.store in skip cs=cftbefore#1titleskip,%
         beforetitleskip/.alias*=title/top,%
      title/bottom/.store in skip cs=cftafter#1titleskip,%
         aftertitleskip/.alias*=title/bottom,%
         title/skip/.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
                   \edef\cftdotsep{\itf@strip@mu\itf@musk},%
         dotsep/.default=4.5mu,%
         dotsep/.blank=\cftnodots,%
      dot/.store in=\cftdot,%
      before/.store as code,%
      after/.store as code,%
      columns/before@hook/.is private=interfaces-tocloft,%
      columns/after@hook/.is private=interfaces-tocloft,%
      columns/before@hook/.initial=,%
      columns/after@hook/.initial=,%
      columns/.code={\ltx@ifpackageloaded{multicol}{%
         \pgfkeysEsetvalue\pgfkeyscurrentkey{\number##1}%
         \ifnum\number##1>\@ne
            \pgfkeysgetvalue{/itf/tocloft/#1/columns/before@hook}\itf@tp
            \ifx \itf@tp\@empty
               \pgfkeyssetvalue{/itf/tocloft/#1/columns/before@hook}{%
                  \begingroup
                  \multicolsep\pgfkeysvalueof{/itf/tocloft/#1/multicolsep}\relax
                  \columnsep\pgfkeysvalueof{/itf/tocloft/#1/columns/sep}\relax
                  \columnseprule\pgfkeysvalueof{/itf/tocloft/#1/columns/rule}\relax
                  \pgfkeysvalueof{/itf/tocloft/#1/multicols/beforebegin}%
                  \def\itf@tocloft@aftermulticols{%
                        \pgfkeysvalueof{/itf/tocloft/#1/multicols/afterend}}%
                  \begin{multicols}{\pgfkeysvalueof{/itf/tocloft/#1/columns}}%
                  \pgfkeysgetvalue{/itf/tocloft/#1/columns/rule/color}\columnseprulecolor
                  \pgfkeysvalueof{/itf/tocloft/#1/multicols/afterbegin}%
               }%
               \pgfkeyssetvalue{/itf/tocloft/#1/columns/after@hook}{%
                  \pgfkeysvalueof{/itf/tocloft/#1/multicols/beforeend}%
                  \aftergroup\itf@tocloft@aftermulticols
                  \end{multicols}%
                  \endgroup
               }%
            \fi
         \else
            \pgfkeyslet\pgfkeyscurrentkey\@ne
            \pgfkeyslet{/itf/tocloft/#1/columns/before@hook}\@empty
            \pgfkeyslet{/itf/tocloft/#1/columns/after@hook}\@empty
         \fi}
         {\PackageError{interfaces-tocloft}
            {Key `columns': package multicol is required}\@eha}%
      },%
      columns/.default=2,columns/.blank=1,%
         multicol/.alias=columns,%
         multicols/.alias=columns,%
      twocolumns/.true=\pgfkeysalso{columns=2},%
      twocolumns/.false=\pgfkeysalso{columns=1},%
      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/.estore as dimen,%
      columns/sep/.default=\columnsep,%
      columns/sep/.blank=10\p@,%
      columns/sep,% assign default
         columnsep/.alias*=columns/sep,%
      columns/rule/color/.store as color command,%
      columns/rule/color,% assign default (\normalcolor)
         columnseprulecolor/.alias*=columns/rule/color,%
         columns/rulecolor/.alias*=columns/rule/color,%
         columns/color/.alias*=columns/rule/color,%
      multicolsep/.estore as glue,%
         multicolsep/.default=0pt plus4pt minus3pt,%
         multicolsep,% sets default
      milticols/beforebegin/.initial=,multicols/beforebegin/.default=,%
      multicols/afterbegin/.initial=,multicols/afterbegin/.default=,%
         multicols/begin/.alias=multicols/afterbegin,%
         multicols/before/.alias=multicols/afterbegin,%
      multicols/beforeend/.initial=,multicols/beforeend/.default=,%
      multicols/afterend/.initial=,multicols/afterend/.default=,%
         multicols/end/.alias=multicols/beforeend,%
         multicols/after/.alias=multicols/beforeend,%
   }% \pgfkeys
   \itf@AfterPackage{interfaces-bookmark}{%
   \def\itf@tocloft@bookmark@handler##1##2{%
      \pgfkeysEaddvalue{/itf/tocloft/##1/bookmark}{}{,##2}%
      \pgfkeysgetvalue{/itf/tocloft/##1/bookmark/text}\itf@tp
      \ifx \itf@tp\@empty
         \pgfkeyssetvalue{/itf/tocloft/##1/bookmark/text}\contentsname \fi}%
   \pgfqkeys{/itf/tocloft/#1}{%
      bookmark/.is multiple choice,%
      bookmark/bold/.true=\itf@tocloft@bookmark@handler{#1}{bold=true},%
      bookmark/bold/.false=\itf@tocloft@bookmark@handler{#1}{bold=false},%
      bookmark/italic/.true=\itf@tocloft@bookmark@handler{#1}{italic=true},%
      bookmark/italic/.false=\itf@tocloft@bookmark@handler{#1}{italic=false},%
      bookmark/color/.code=\itf@tocloft@bookmark@handler{#1}{color={##1}},%
      bookmark/level/.code=\pgfkeysEsetvalue{/itf/tocloft/#1/bookmark/level}{%
                     \ifcsname toclevel@##1\endcsname
                        \csname toclevel@##1\endcsname
                     \else##1\fi}%
                     \itf@tocloft@bookmark@handler{#1}{},%
         bookmark/level/.default=-1,%
         bookmark/level/.initial=-1,%
      bookmark/text/.store as code,%
         bookmark/text/.default=\contentsname,%
      bookmark/.unknown/.code=\pgfkeysEaddvalue{/itf/tocloft/#1/bookmark}
                                          {}{\pgfkeyscurrentname={##1}},%
      bookmark/.initial=,%
   }% \pgfkeys
   }% AfterPackage interfaces-bookmark
   %% while making a format \jobname is expanded to the name of the format...
   %% Therefore, the following commands must be expanded \AtEndPreamble
   \AfterPreamble{%
      \BeforeFile{\jobname.#1}{%
         \pgfkeysvalueof{/itf/tocloft/#1/before}%
         \pgfkeysvalueof{/itf/tocloft/#1/columns/before@hook}%
      }%
      \AfterFile{\jobname.#1}{%
         \pgfkeysvalueof{/itf/tocloft/#1/columns/after@hook}%
         \pgfkeysvalueof{/itf/tocloft/#1/after}%
      }%
   }%
   \ifcsname #1setup\endcsname\else
      \pgfqkeys{/itf/tocloft/#1}{%
         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#2}}
      {\@PackageInfoNoLine{interfaces-tocloft}
         {\expandafter\string\csname @cftmake#1title\endcsname\space
            successfully augmented}}
      {\@PackageWarningNoLine{interfaces-tocloft}
         {\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}{}{}
%% Specific to toc only -------------------------------------------------------
\pgfqkeys{/itf/tocloft/toc}{%
   title/.store as code in cs=contentsname,%
      contentsname/.alias=title,%
   ref/.initial=\contentsname,%
      ref/.default=\contentsname,%
   pagenumbers/.style={% boolean key
      part/pagenumbers={#1},chapter/pagenumbers={#1},section/pagenumbers={#1},%
      subsubsection/pagenumbers={#1},subsubsection/pagenumbers={#1},%
      paragraph/pagenumbers={#1},subparagraph/pagenumbers={#1}},%
   pagenumber/.alias=pagenumbers,%
}%
%% Specific to lof and lot ----------------------------------------------------
\pgfqkeys{/itf/tocloft/lof}{%
   title/.store as code in cs=listfigurename,%
      listfigurename/.alias=title,%
   ref/.initial=\listfigurename,%
      ref/.default=\listfigurename,%
}%
\pgfqkeys{/itf/tocloft/lot}{%
   title/.store as code in cs=listtablename,%
      listtablename/.alias=title,%
   ref/.initial=\listtablename,%
      ref/.default=\listtablename,%
}%
\if@cftsubfigopt
\pgfqkeys{/itf/tocloft}{%
   lof/pagenumbers/.style={figure/pagenumbers={#1},subfigure/pagenumbers={#1}},%
      lof/pagenumber/.alias=lof/pagenumbers,%
   lot/pagenumbers/.style={figure/pagenumbers={#1},subfigure/pagenumbers={#1}},%
      lot/pagenumber/.alias=lot/pagenumbers,%
}%
\else
\pgfqkeys{/itf/tocloft}{%
   lof/pagenumbers/.style={figure/pagenumbers={#1}},%
      lof/pagenumber/.alias=lof/pagenumbers,%
   lot/pagenumbers/.style={figure/pagenumbers={#1}},%
      lot/pagenumber/.alias=lot/pagenumbers,%
}%
\fi
\def\itf@cft@name#1.#2.#3\@nil{cft#1\itf@cft@secname{#2}#3}
\def\itf@cft@secname#1{%
   \expandafter\itf@cft@sec@name\csname#1\endcsname{#1}%
}% \itf@cft@secname
\def\itf@cft@sec@name#1#2{%
   \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},%
}
\def\itf@cft@newsection{\itf@cft@new@section{/itf/tocloft}}
\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=.#3.indent,%
      font/.cft@code=.#3.font,%
      font/.append code=\pgfkeysalso{/itf/tocloft/#2/#3/pagenumber/font={##1}},%
         format/.alias*=font,%
      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=.#3.presnum,%
         number/before/.alias*=presnum,%
      aftersnum/.cft@code=.#3.aftersnum,%
         number/after/.alias*=aftersnum,%
      aftersnumb/.cft@code=.#3.aftersnumb,%
         title/before/.alias*=aftersnumb,%
      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.#3.dotsep\@nil}{\cftdotsep}%
         \else
            \itf@units@mu\itf@musk{##1}%
            \csedef{\itf@cft@name.#3.dotsep\@nil}{\itf@strip@mu\itf@musk}%
         \fi},%
         dotsep/.blank=\cftnodots,%
      nodots/.code=\csdef{\itf@cft@name.#3.dotsep\@nil}{\cftnodots},%
         nodots/.value forbidden,%
      pagefont/.cft@code=.#3.pagefont,%
         page/font/.alias*=pagefont,%
         pagenumber/font/.alias*=pagefont,%
         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{#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{\edef\itf@tp{\noexpand\itf@cft@newsection{toc}{\itf@tp}}\itf@tp}%
\if@cftsubfigopt
   \@for\itf@tp:=fig,figure,subfig,subfigure%
      \do{\edef\itf@tp{\noexpand\itf@cft@newsection{lof}{\itf@tp}}\itf@tp}%
   \@for\itf@tp:=tab,table,subtab,subtable%
      \do{\edef\itf@tp{\noexpand\itf@cft@newsection{lot}{\itf@tp}}\itf@tp}%
\else
   \@for\itf@tp:=fig,figure%
      \do{\edef\itf@tp{\noexpand\itf@cft@newsection{lof}{\itf@tp}}\itf@tp}%
   \@for\itf@tp:=tab,table%
      \do{\edef\itf@tp{\noexpand\itf@cft@newsection{lot}{\itf@tp}}\itf@tp}%
\fi
\itf@patch\pretocmd\@cftmaketoctitle
   {\itf@tocloft\contentsname{toc}{tableofcontents}}
   {\@PackageInfoNoLine{interfaces-tocloft}
      {\string\@cftmaketoctitle\space successfully augmented}}
   {\@PackageWarningNoLine{interfaces-tocloft}
      {\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}}
   {\@PackageInfoNoLine{interfaces-tocloft}
      {\string\@cftmakeloftitle\space successfully augmented}}
   {\@PackageWarningNoLine{interfaces-tocloft}
      {\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}}
   {\@PackageInfoNoLine{interfaces-tocloft}
      {\string\@cftmakelottitle\space successfully augmented}}
   {\@PackageWarningNoLine{interfaces-tocloft}
      {\string\@cftmakelottitle\space could not be patched
      \MessageBreak label and bookmark keys for \string\lotsetup\space won't work}}%
\expandafter\itf@patch\expandafter\patchcmd\csname\string\newlistof\endcsname
   {#4}{\csname cft#3title\endcsname}
   {\@PackageInfoNoLine{interfaces-tocloft}
      {\string\newlistof\space successfully patched}}
   {\@PackageWarningNoLine{interfaces-tocloft}
      {\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}
      {\string\newlistof\space successfully augmented}}
   {\@PackageWarningNoLine{interfaces-tocloft}
      {\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}
      {\string\newlistentry\space successfully augmented}}
   {\@PackageWarningNoLine{interfaces-tocloft}
      {\string\newlistentry\space could not be patched
      \MessageBreak \string\listofsetup\space will not work}}
\def\itf@tocloft#1#2#3{%
   \expandafter\def\expandafter#1\expandafter{%
      \expandafter\itf@cft@label
            \expandafter#1\expandafter{#1}{#2}{#3}}%
}% \itf@tocloft
\long\def\itf@cft@label#1#2#3#4{%
   \def#1{#2}% restore original
   \begingroup
   \pgfkeysifdefined{/itf/tocloft/#3/bookmark}
      {%
      \raisedhyperdef{interfaces}{#4}{#2}%
      \pgfkeysgetvalue{/itf/tocloft/#3/bookmark/text}\itf@tp
      \ifx \itf@tp\@empty \else
         \pgfkeysgetvalue{/itf/tocloft/#3/bookmark}\@tempa
         \expandafter\bookmark\expandafter[%
            \expandafter{\@tempa,
               dest=interfaces.#4,%
               level=\pgfkeysvalueof{/itf/tocloft/#3/bookmark/level}%
            }]{\pgfkeysvalueof{/itf/tocloft/#3/bookmark/text}}%
         \global\BKM@startatroottrue
      \fi}
      {#2}%
   \pgfkeysgetvalue{/itf/tocloft/#3/label}\itf@tp
   \ifx \itf@tp\@empty \else
      \def\@currentHref{interfaces.#4}%
      \pgfkeysgetvalue{/itf/tocloft/#3/ref}\@currentlabel
      \def\@currentlabelname{#2}%
      \label{\pgfkeysvalueof{/itf/tocloft/#3/label}}%
   \fi
   \endgroup
   \gdef\itf@tp{\def#1{#2}\global\let\itf@tp \relax}% restore original
   \aftergroup\itf@tp % simple group introduced by tocloft to print \contentsname
}% \itf@cft@label
\endinput
%%
%% End of file `interfaces-tocloft.sty'.