summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/etoc
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/etoc')
-rw-r--r--Master/texmf-dist/tex/latex/etoc/etoc.sty46
1 files changed, 37 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty
index 30046411ff6..6fe98ce69f2 100644
--- a/Master/texmf-dist/tex/latex/etoc/etoc.sty
+++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty
@@ -22,11 +22,11 @@
%% in the same archive or directory.)
%%
\ProvidesPackage{etoc}
- [2013/12/03 v1.07j Completely customisable TOCs (jfB)]
+ [2014/03/06 v1.07k Completely customisable TOCs (jfB)]
%%
%% Package: etoc
-%% Version: 2013/12/03 v1.07j
-%% Copyright (C) 2012-2013 by Jean-Francois Burnol <jfbu at free dot fr>
+%% Version: 2014/03/06 v1.07k
+%% Copyright (C) 2012-2013-2014 by Jean-Francois Burnol <jfbu at free dot fr>
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{multicol}
@@ -322,7 +322,7 @@
\def\etocthelinkedpage {#1}%
}
\def\Etoc@getthepage@hyp #1#2#3#4#5\etoc@ {%
- \@namedef{etoclink } ##1{\leavevmode #1{#2}{#3}{##1}#5}%
+ \@namedef{etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
\edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
\def\etocthepage {#4}%
\toks@ {#4}%
@@ -670,7 +670,7 @@
\def\etocpartname {\partname}
\def\etocbookname {Book}
\def\etocdefaultlines{\Etoc@standardfalse %
-%% `book' in memoir class:
+%% `book':
\etoc@setstyle{@minustwo}
{\addpenalty\@M\etocskipfirstprefix}
{\addpenalty\@secpenalty}
@@ -866,9 +866,9 @@
\else \let\Etoc@next\@gobble\fi
\Etoc@next{\end{multicols}}%
\addvspace{\etocbelowtocskip}}}
-\long\def\etocframedmphook{\relax}
-\def\etocbkgcolorcmd{\relax}
-\def\Etoc@relax{\relax}
+\def\etocframedmphook{\relax}
+\long\def\etocbkgcolorcmd{\relax}
+\long\def\Etoc@relax{\relax}
\newbox\etoc@framed@titlebox
\newbox\etoc@framed@contentsbox
\newcommand*\etocframedstyle[2][\etocdefaultnbcol]{%
@@ -1058,6 +1058,7 @@
{}
{\if@twocolumn \aftergroup \twocolumn \onecolumn \fi }}
{}%
+ \iftocfeature {toc}{numberline}{\def \nonumberline {\numberline {}}}{}%
\tocbasic@listhead {\listoftocname}%
\begingroup \expandafter \expandafter \expandafter
\endgroup \expandafter
@@ -1116,10 +1117,37 @@
\renewcommand*\etocstandarddisplaystyle{\etocscrreprtstyle}
\Etoc@redefetocstyle{chapter}}{}
\@ifclassloaded{memoir}
- {\renewcommand*\etocfontone{\normalfont\normalsize}
+ {\etocsetlevel{appendix}{0}%
+ \renewcommand*\etocfontone{\normalfont\normalsize}
\etocmemoirtoctotocfmt{chapter}{\contentsname}%
\renewcommand*\etocstandarddisplaystyle{\etocmemoirstyle}
\Etoc@redefetocstyle{chapter}}{}
+\def\etoctocloftstyle {%
+ \etocsettocstyle
+ {\@cfttocstart\par\begingroup
+ \parindent\z@ \parskip\cftparskip \@cftmaketoctitle
+ \if@cfttocbibind\@cftdobibtoc\fi }%
+ {\endgroup\@cfttocfinish }%
+}
+\@ifpackageloaded{tocloft}
+ {\if@cftnctoc\else
+ \renewcommand*\etocstandarddisplaystyle{\etoctocloftstyle}
+ \AtBeginDocument{\let\tableofcontents\etoctableofcontents}
+ \fi }
+ {\AtBeginDocument
+ {\@ifpackageloaded{tocloft}
+ {\if@cftnctoc\else
+ \PackageWarning {etoc}
+ {Package `tocloft' was loaded after `etoc'!^^J%
+**** to prevent it from overwriting \protect\tableofcontents, it will be tricked^^J%
+**** into believing to have been loaded with option `titles'. For better^^J%
+**** compatibility, please load `tocloft' before `etoc'}%
+ \AtEndDocument{\PackageWarning{etoc}
+ {Please load `tocloft' /before/ `etoc'!}}\fi
+ \@cftnctoctrue }%
+ {}%
+ }%
+ }
\def\Etoc@addtocontents #1#2%
{\ifEtoc@hyperref
\addtocontents {toc}{\protect\contentsline