diff options
author | Karl Berry <karl@freefriends.org> | 2017-08-29 21:04:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-08-29 21:04:44 +0000 |
commit | 2e6c7e8759a7bfd9eeb47e47f79614d924bd0e47 (patch) | |
tree | 0127c2a0dbe631388090ffebe213e788ee617f61 /Master/texmf-dist/tex | |
parent | b180f86879660a6bbae8a3778b7bc92aa650026d (diff) |
tocloft (29aug17)
git-svn-id: svn://tug.org/texlive/trunk@45166 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tocloft/tocloft.sty | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/tocloft/tocloft.sty b/Master/texmf-dist/tex/latex/tocloft/tocloft.sty index 907d17a728c..133efc420bc 100644 --- a/Master/texmf-dist/tex/latex/tocloft/tocloft.sty +++ b/Master/texmf-dist/tex/latex/tocloft/tocloft.sty @@ -23,7 +23,13 @@ %% This work consists of the files listed in the README file. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tocloft}[2013/05/02 v2.3f parameterised ToC, etc., typesetting] +\ProvidesPackage{tocloft}[2017/08/29 v2.3h parameterised ToC, etc., typesetting] +\newcommand\@cftifundefined[1]{% + \begingroup\expandafter\expandafter\expandafter\endgroup\ifx\csname #1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} \newcommand{\@cftquit}{} \newif\if@cfthaschapter \newif\if@cftkoma @@ -33,9 +39,9 @@ \@ifclassloaded{scrbook}{\@cftkomatrue}{} \newif\if@cfttitlesec \AtBeginDocument{\@ifpackageloaded{titlesec}{\@cfttitlesectrue}{}} -\@ifundefined{chapter}{% +\@cftifundefined{chapter}{% \@cfthaschapterfalse - \@ifundefined{section}{% + \@cftifundefined{section}{% \PackageWarning{tocloft}% {I don't recognize any sectional divisions so I'll do nothing} \renewcommand{\@cftquit}{\endinput} @@ -179,7 +185,7 @@ Consider installing the current version of tocbibind.}} \newcommand{\@cftasnumb}{} \newif\if@cftdopart \newif\if@cfthaspart -\@ifundefined{part}{\@cfthaspartfalse}{\@cfthasparttrue} +\@cftifundefined{part}{\@cfthaspartfalse}{\@cfthasparttrue} \if@cfthaspart \renewcommand*{\l@part}[2]{% \@cftdopartfalse @@ -943,6 +949,8 @@ Consider installing the current version of tocbibind.}} \fi \fi \@namedef{cftafter#3title}{} + \@namedef{cft#3prehook}{} + \@namedef{cft#3posthook}{} } \newcommand{\cftsetindents}[3]{% \def\@cftemp{#1} @@ -1105,6 +1113,38 @@ Consider installing the current version of tocbibind.}} }{} } +\def\@starttoc@latex@orig#1{% + \begingroup + \makeatletter + \@input{\jobname.#1}% + \if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax + \fi + \@nobreakfalse +\endgroup} +\ifx\@starttoc\@starttoc@latex@orig + \def\@starttoc#1{% + \csname cft#1prehook\endcsname + \begingroup + \makeatletter + \@input{\jobname.#1}% + \if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax + \fi + \@nobreakfalse + \endgroup + \csname cft#1posthook\endcsname} + \newcommand\cfttocprehook{} + \newcommand\cftlofprehook{} + \newcommand\cftlotprehook{} + \newcommand\cfttocposthook{} + \newcommand\cftlofposthook{} + \newcommand\cftlotposthook{} +\else + \PackageWarning{tocloft}{\string\@starttoc\space has already been redefined; tocloft bailing out.} +\fi \endinput %% %% End of file `tocloft.sty'. |