summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/etoc/etoc.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/etoc/etoc.sty')
-rw-r--r--Master/texmf-dist/tex/latex/etoc/etoc.sty34
1 files changed, 20 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty
index 20f51125d70..9b5e7ed75b1 100644
--- a/Master/texmf-dist/tex/latex/etoc/etoc.sty
+++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty
@@ -23,10 +23,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{etoc}
- [2019/03/09 v1.09 Completely customisable TOCs (JFB)]
+ [2019/11/17 v1.09b Completely customisable TOCs (JFB)]
%%
%% Package: etoc
-%% Version: 1.09-2019/03/09
+%% Version: 1.09b-2019/11/17
%% License: LPPL 1.3c
%% Copyright (C) 2012-2019 Jean-Francois Burnol
%% <jfbu at free dot fr>
@@ -785,8 +785,8 @@
\let\tof@begingroup\@empty
\let\tof@endgroup \@empty
\@ifstar
- {\def\Etoc@aftertitlehook{}\Etoc@table@fcontents}
- {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@table@fcontents}%
+ {\let\Etoc@aftertitlehook\@empty\Etoc@table@fcontents}
+ {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@table@fcontents}%
}% \etoctableofcontents
\let\tableofcontents\etoctableofcontents
\newcommand*\localtableofcontents{%
@@ -796,8 +796,8 @@
\let\tof@begingroup\@empty
\let\tof@endgroup \@empty
\@ifstar
- {\def\Etoc@aftertitlehook{}\Etoc@localtable@fcontents}
- {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@localtable@fcontents}%
+ {\let\Etoc@aftertitlehook\@empty\Etoc@localtable@fcontents}
+ {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@localtable@fcontents}%
}% \localtableofcontents
\newcommand*\localtableofcontentswithrelativedepth[1]{%
\edef\Etoc@localtocdepth
@@ -1266,17 +1266,23 @@
\let\etocreportstylenomarks\etocbookstylenomarks
\def\etocmemoirtoctotocfmt #1#2{%
\def\Etoc@addsuitablecontentsline{\addcontentsline {toc}{#1}{#2}}%
- \renewcommand*\etocaftertitlehook{%
- \ifmem@em@starred@listof
- \else
- \phantomsection
- \aftergroup\Etoc@addsuitablecontentsline
- \fi}%
}
\def\etocmemoirstyle{%
\etocsettocstyle
- {\ensureonecol \par \begingroup \@nameuse {@tocmaketitle}
- \Etoc@aftertitlehook\let\Etoc@aftertitlehook\relax
+ {\ensureonecol \par \begingroup \phantomsection
+ \ifx\Etoc@aftertitlehook\@empty
+ \else
+ % non-starred variant
+ \ifmem@em@starred@listof
+ \else
+ \Etoc@addsuitablecontentsline
+ \fi
+ \fi
+ \@nameuse {@tocmaketitle} %<< space token here from memoir code
+ \ifx\Etoc@aftertitlehook\@empty
+ \else
+ \Etoc@aftertitlehook \let \Etoc@aftertitlehook \relax
+ \fi
\parskip \cftparskip \@nameuse {cfttocbeforelisthook}}
{\@nameuse {cfttocafterlisthook}\endgroup\restorefromonecol}}
\def\etocscrartclstyle{%