diff options
author | Karl Berry <karl@freefriends.org> | 2023-01-15 20:55:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-01-15 20:55:22 +0000 |
commit | 761117c9a43a30125a65086b3daf5e8c8ab82e50 (patch) | |
tree | e293f40e2137e55ddc23b4c5008c12e0d84f7ad0 /Master/texmf-dist/tex | |
parent | dbe13a8c559cf436f66cae202a5fb2b5855151af (diff) |
etoc (15jan23)
git-svn-id: svn://tug.org/texlive/trunk@65550 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/etoc/etoc.sty | 358 |
1 files changed, 131 insertions, 227 deletions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty index 9aa95139231..51a49cd2ada 100644 --- a/Master/texmf-dist/tex/latex/etoc/etoc.sty +++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty @@ -22,13 +22,13 @@ %% in the same archive or directory.) %% %% Package: etoc -%% Version: 1.09i +%% Version: 1.1a %% License: LPPL 1.3c -%% Copyright (C) 2012-2022 Jean-Francois Burnol +%% Copyright (C) 2012-2023 Jean-Francois Burnol %% <jfbu at free dot fr> -\NeedsTeXFormat{LaTeX2e} +\NeedsTeXFormat{LaTeX2e}[2020/10/01] \ProvidesPackage{etoc} -[2022/11/21 v1.09i Completely customisable TOCs (JFB)] +[2023/01/14 v1.1a Completely customisable TOCs (JFB)] \RequirePackage{multicol} \DeclareOption*{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}} \ProcessOptions\relax @@ -36,8 +36,8 @@ \def\Etoc@par{\par} \def\etocinline{\def\Etoc@par{}} \let\etocnopar\etocinline -\def\etocdisplay{\def\Etoc@par{\par}}% 1.07m 2015/01/23 -\let\Etoc@global\@empty % 1.08 2015/03/10 +\def\etocdisplay{\def\Etoc@par{\par}} +\let\Etoc@global\@empty \def\etocglobaldefs{\let\Etoc@global\global\let\tof@global\global} \def\etoclocaldefs {\let\Etoc@global\@empty\let\tof@global\@empty} \newif\ifEtoc@jj % book @@ -50,26 +50,26 @@ \newif\ifEtoc@v % subparagraph \newif\ifEtoc@number \newif\ifEtoc@hyperref -\newif\ifEtoc@parskip % 1.07d +\newif\ifEtoc@parskip \newif\ifEtoc@tocwithid \newif\ifEtoc@standard -\newif\ifEtoc@skipprefix % 1.08 -\newif\ifEtoc@isfirst % 1.08 +\newif\ifEtoc@skipprefix +\newif\ifEtoc@isfirst \newif\ifEtoc@localtoc \newif\ifEtoc@skipthisone \newif\ifEtoc@stoptoc \newif\ifEtoc@notactive \newif\ifEtoc@mustclosegroup -\newif\ifEtoc@emptytoc % 1.08e -\newif\ifEtoc@checksemptiness % 1.08e. Default is 'no checks'. +\newif\ifEtoc@emptytoc +\newif\ifEtoc@checksemptiness \def\etocchecksemptiness {\Etoc@checksemptinesstrue } -\def\etocdoesnotcheckemptiness {\Etoc@checksemptinessfalse }% 1.08i -\newif\ifEtoc@notocifnotoc % 1.08e +\def\etocdoesnotcheckemptiness {\Etoc@checksemptinessfalse } +\newif\ifEtoc@notocifnotoc \def\etocnotocifnotoc {\Etoc@checksemptinesstrue\Etoc@notocifnotoctrue } \def\etoc@{\etoc@} -\newif\ifEtoc@bracedname % 1.08p +\newif\ifEtoc@bracedname \newcounter{etoc@tocid} -\newcounter{etoc@tocdepth}% 1.07g +\newcounter{etoc@tocdepth} \@ifclassloaded{memoir}{\def\Etoc@minf{-\thr@@}}{\def\Etoc@minf{-\tw@}} \def\Etoc@@minustwo@@{-\tw@} \let\Etoc@@minusone@@\m@ne @@ -152,65 +152,7 @@ \etocsetlevel{subparagraph}{5} \AtBeginDocument{% \@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}% -\@ifpackageloaded{hyperref}{% - \Etoc@hyperreftrue - \@ifpackagelater{hyperref}{2022/11/13}% - {% - \def\Etoc@getthepage {% - \ifx\Hy@toclinkstart\Etoc@getthepage@token - \expandafter\expandafter\expandafter\Etoc@getthepage@hyp - \else - \expandafter\Etoc@getthepage@nohyp - \fi}% - \def\Etoc@getnb@a {% - \ifx\Hy@toclinkstart\Etoc@getnb@token - \expandafter\expandafter\expandafter\Etoc@getnb@hyp - \else - \expandafter\Etoc@getnb@nohyp - \fi}% - \def\Etoc@getit {% - \ifx\Hy@toclinkstart\Etoc@getit@token - \expandafter\expandafter\expandafter\Etoc@getit@hyp - \else - \expandafter\Etoc@getit@nohyp - \fi}% - }% - {% - \def\Etoc@getthepage {% - \ifx\hyper@linkstart\Etoc@getthepage@token - \expandafter\Etoc@getthepage@hyp - \else - \expandafter\Etoc@getthepage@nohyp - \fi}% - \def\Etoc@getnb@a {% - \ifx\hyper@linkstart\Etoc@getnb@token - \expandafter\Etoc@getnb@hyp - \else - \expandafter\Etoc@getnb@nohyp - \fi}% - \def\Etoc@getit {% - \ifx\hyper@linkstart\Etoc@getit@token - \expandafter\Etoc@getit@hyp - \else - \expandafter\Etoc@getit@nohyp - \fi}% - }% - \def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}% - \let\Etoc@gobblefourorthree\@gobblefour - }% - {% - \let\Etoc@getthepage\Etoc@getthepage@nohyp - \let\Etoc@getnb@a\Etoc@getnb@nohyp - \let\Etoc@getit \Etoc@getit@nohyp - \def\Etoc@et@hop#1#2#3#4{#2{#3}{#4}#1}% - \long\def\Etoc@gobblefourorthree#1#2#3{}% - }% -\@ifl@t@r\fmtversion{2020/10/01}% - {% - \def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}% - \let\Etoc@gobblefourorthree\@gobblefour - }% - {}% +\@ifpackageloaded{hyperref}{\Etoc@hyperreftrue}{}% } \def\Etoc@setflags {% \ifcase \Etoc@level @@ -360,7 +302,7 @@ \fi \fi \fi - \let\Etoc@next\Etoc@gobblefourorthree + \let\Etoc@next\@gobblefour \ifEtoc@skipthisone \else \unless\ifnum\c@tocdepth<\Etoc@level @@ -373,47 +315,89 @@ \fi \Etoc@next{#1}% } -\def\Etoc@etoccontentsline@ #1{% - \Etoc@doends % separated since 1.08 - \Etoc@dobegins % separated since 1.08k. Does \Etoc@setflags. +\def\Etoc@etoccontentsline@ #1#2#3#4{% + \Etoc@doends + \Etoc@dobegins \Etoc@global\edef\Etoc@prefix {\expandafter\noexpand \csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname }% \Etoc@global\edef\Etoc@contents{\expandafter\noexpand \csname Etoc@contents@\csname Etoc@#1@\endcsname\endcsname }% \ifEtoc@skipprefix \Etoc@global\let\Etoc@prefix\@empty\fi \global\Etoc@skipprefixfalse - \Etoc@et@hop{\Etoc@prefix\Etoc@contents}{\Etoc@savedcontentsline{#1}}% + \Etoc@lxyz{#2}{#3}{#4}% + \Etoc@prefix\Etoc@contents } -\def\Etoc@lxyz #1#2{% - \Etoc@global\let\etocthelink\@firstofone % fall-back, was let \@empty up to 1.08i (inc.) - \Etoc@global\def\etocthename {#1}% (if linked, will be removed later) - \Etoc@global\def\etocthelinkedname {#1}% (probably redefined later) - \futurelet\Etoc@getthepage@token - \Etoc@getthepage #2\etoc@ % defines \etocthelinkedpage +\def\Etoc@lxyz #1#2#3{% + \ifEtoc@hyperref + \Etoc@global\def\etocthelink##1{\hyperlink{#3}{##1}}% + \else + \Etoc@global\let\etocthelink\@firstofone + \fi + \Etoc@global\def\etocthepage {#2}% + \ifEtoc@hyperref + \ifx\etocthepage\ltx@empty + \Etoc@global\let\etocthelinkedpage\etocthepage + \else + \Etoc@global\def\etocthelinkedpage{\hyperlink {#3}{#2}}% + \fi + \else + \Etoc@global\let\etocthelinkedpage\etocthepage + \fi + \Etoc@global\def\etocthename{#1}% + \ifEtoc@hyperref + \Etoc@global\def\etocthelinkedname{\hyperlink{#3}{#1}}% + \else + \Etoc@global\let\etocthelinkedname\etocthename + \fi \futurelet\Etoc@getnb@token - \Etoc@@getnb #1\relax\relax\etoc@ % sets number, name, and \etocthelink + \Etoc@@getnb #1\relax\relax\etoc@ \ifEtoc@number \else \ifnum\Etoc@level=\m@ne \futurelet\Etoc@getit@token - \Etoc@@getit #1\hspace\relax\etoc@ % additional job for parts + \Etoc@@getit #1\hspace\relax\etoc@ \fi \fi + \ifEtoc@number + \ifEtoc@hyperref + \def\Etoc@tmp##1##2{\Etoc@global\def##2{\hyperlink{#3}{##1}}}% + \expandafter\Etoc@tmp\expandafter{\etocthename}\etocthelinkedname + \expandafter\Etoc@tmp\expandafter{\etocthenumber}\etocthelinkednumber + \else + \Etoc@global\let\etocthelinkedname\etocthename + \Etoc@global\let\etocthelinkednumber\etocthenumber + \fi + \else + \Etoc@global\let\etocthenumber\@empty + \Etoc@global\let\etocthelinkednumber\@empty + \fi \Etoc@global\expandafter\let\csname etoclink \endcsname\etocthelink - \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname - \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber - \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage - } -\def\Etoc@getthepage@nohyp #1\etoc@ {% - \Etoc@global\def\etocthepage {#1}% - \Etoc@global\def\etocthelinkedpage {#1}% + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthename + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthenumber + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthepage + \ifEtoc@hyperref + \Etoc@lxyz@hyper + \fi } -\def\Etoc@getthepage@hyp #1#2#3#4#5\etoc@ {% - \Etoc@global\def\etocthepage {#4}% - \edef\Etoc@tmp {{#3}}% - \Etoc@global\expandafter\def\expandafter\etocthelinkedpage\expandafter - {\expandafter\hyperlink \Etoc@tmp{#4}}% - \Etoc@global\edef\etocthelink##1{\noexpand\hyperlink\Etoc@tmp{##1}}% +\def\Etoc@lxyz@hyper{% + \ifcase\Hy@linktoc + % none: nothing to do + \or % section (aka name for etoc): link name and number + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \or % page. Do as hyperref: add a link only if page number isn't empty. + \ifx\etocthepage\ltx@empty + \else + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \fi + \else % all + \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname + \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber + \ifx\etocthepage\ltx@empty + \else + \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage + \fi + \fi } \def\Etoc@@getnb {% \Etoc@bracednamefalse @@ -440,7 +424,7 @@ \ifx\Etoc@getnb@token\bgroup \expandafter\Etoc@getnb@nohyp@nonbr \else - \expandafter\Etoc@getnb@a + \expandafter\Etoc@getnb@nohyp \fi } \def\Etoc@getnb@nohyp #1{% @@ -488,72 +472,15 @@ \fi \Etoc@global\let\etocthelinkedname \etocthename } -\def\Etoc@getnb@hyp #1#2#3#4#5\etoc@ {% - \edef\Etoc@tmp {{#3}}% - \Etoc@global\edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}% - \Etoc@global\def\etocthename {#4}% temporary definition - \Etoc@global\expandafter\def\expandafter\etocthelinkedname - \expandafter {\expandafter\hyperlink \Etoc@tmp{#4}}% - \futurelet\Etoc@hyp@getnb@token\Etoc@getnb@hyp@a #4\relax\relax\etoc@ -} -\def\Etoc@getnb@hyp@a {% - \ifx\Etoc@hyp@getnb@token\bgroup - \expandafter\Etoc@getnb@nohyp@nonbr - \else - \expandafter\Etoc@getnb@hyp@b - \fi -} -\def\Etoc@getnb@hyp@b #1{% - \in@{#1}{\numberline\chapternumberline\partnumberline\booknumberline}% - \ifin@ - \let\Etoc@next\Etoc@getnb@hyp@nmbrd - \else - \let\Etoc@next\Etoc@getnb@nohyp@nonbr - \in@{#1}{\nonumberline}% - \ifin@ - \ifx\nonumberline\empty - \let\Etoc@next\Etoc@getnb@hyp@nonumberline - \else - \def\Etoc@next{\expandafter\Etoc@getnb@hyp@nmbrd}% - \fi - \fi - \fi - \Etoc@next #1% -} -\def\Etoc@getnb@hyp@nmbrd #1#2#3\relax\relax\etoc@ {% - \Etoc@global\Etoc@numbertrue - \Etoc@global\def\etocthenumber {#2}% - \Etoc@global\expandafter\def\expandafter\etocthelinkednumber - \expandafter{\expandafter\hyperlink \Etoc@tmp{#2}}% - \Etoc@global\def\etocthename {#3}% - \Etoc@global\expandafter\def\expandafter\etocthelinkedname - \expandafter{\expandafter\hyperlink \Etoc@tmp{#3}}% -} -\def\Etoc@getnb@hyp@nonumberline #1\relax\relax\etoc@ {% - \Etoc@global\Etoc@numberfalse - \Etoc@global\let\etocthenumber \@empty - \Etoc@global\let\etocthelinkednumber \@empty - \ifEtoc@bracedname - \Etoc@global\expandafter\def\expandafter\etocthename - \expandafter{\expandafter{#1}}% - \else - \Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}% - \fi - \Etoc@global\expandafter\expandafter\expandafter\def - \expandafter\expandafter\expandafter\etocthelinkedname - \expandafter\expandafter\expandafter{% - \expandafter\expandafter\expandafter\hyperlink - \expandafter\Etoc@tmp\expandafter{\etocthename}}% -} \def\Etoc@@getit{% \ifEtoc@bracedname \expandafter\expandafter\expandafter\Etoc@getit@nameisbraced \expandafter\@firstofone \else - \expandafter\Etoc@getit + \expandafter\Etoc@getit@nohyp \fi } -\def\Etoc@getit@nameisbraced {\futurelet\Etoc@getit@token\Etoc@getit } +\def\Etoc@getit@nameisbraced {\futurelet\Etoc@getit@token\Etoc@getit@nohyp } \def\Etoc@getit@nohyp #1\hspace#2#3\etoc@ {% \ifx\relax#2% \else @@ -571,36 +498,13 @@ \fi \Etoc@global\let\etocthelinkedname\etocthename } -\def\Etoc@getit@hyp #1#2#3#4#5\etoc@ {% - \edef\Etoc@tmp {{#3}}% - \Etoc@global\edef\etocthelink ##1{\noexpand\hyperlink \Etoc@tmp{##1}}% - \Etoc@global\def\etocthename {#4}% temporary definition - \Etoc@global\expandafter\def\expandafter\etocthelinkedname - \expandafter{\expandafter\hyperlink \Etoc@tmp{#4}}% - \Etoc@getit@hyp@a #4\hspace\relax\etoc@ -} -\def\Etoc@getit@hyp@a #1\hspace#2#3\etoc@ {% - \ifx\relax#2% not extremely safe - \else - \Etoc@global\Etoc@numbertrue - \Etoc@global\def\etocthenumber {#1}% - \Etoc@global\expandafter\def\expandafter\etocthelinkednumber - \expandafter{\expandafter\hyperlink \Etoc@tmp{#1}}% - \Etoc@getit@hyp@getname #3\etoc@ - \fi -} -\def\Etoc@getit@hyp@getname #1\hspace\relax\etoc@ {% - \Etoc@global\def\etocthename {#1}% - \Etoc@global\expandafter\def\expandafter\etocthelinkedname - \expandafter{\expandafter\hyperlink \Etoc@tmp{#1}}% -}% \let\etocthename \@empty \let\etocthenumber \@empty \let\etocthepage \@empty \let\etocthelinkedname \@empty \let\etocthelinkednumber \@empty \let\etocthelinkedpage \@empty -\let\etocthelink \@firstofone % prior to 1.08j its was \let to \@empty +\let\etocthelink \@firstofone \DeclareRobustCommand*{\etocname} {} \DeclareRobustCommand*{\etocnumber}{} \DeclareRobustCommand*{\etocpage} {} @@ -738,7 +642,7 @@ \fi \fi \fi - \Etoc@gobblefourorthree\relax + \@gobblefour\relax } \def\Etoc@testingcontentsline #1{% \ifEtoc@stoptoc @@ -751,7 +655,7 @@ \fi \fi \fi - \Etoc@gobblefourorthree\relax + \@gobblefour\relax } \def\Etoc@localtableofcontents#1{% \gdef\etoclocaltop{-\@m}% @@ -759,13 +663,11 @@ \global\Etoc@emptytocfalse \edef\Etoc@tocid{#1}% \ifnum\Etoc@tocid<\@ne - %\PackageWarning{etoc}{Unknown toc reference \@secondoftwo#1. Run LaTeX again}% \setbox0\hbox{\ref{Unknown toc ref \@secondoftwo#1. Rerun LaTeX}}% - %\if@filesw\immediate\write\@mainaux{\noexpand\@tempswatrue}\fi - \global\Etoc@stoptoctrue % do only heading + \global\Etoc@stoptoctrue \gdef\etoclocaltop{-\thr@@}% \Etoc@tableofcontents - \expandafter\Etoc@gobbletoetoc@ % skip all the rest + \expandafter\Etoc@gobbletoetoc@ \fi \global\Etoc@notactivetrue \ifEtoc@checksemptiness @@ -773,16 +675,12 @@ \fi \ifEtoc@emptytoc \ifEtoc@notactive - %\PackageWarning{etoc}{Unknown toc ID \number\Etoc@tocid. Run LaTeX again}% \setbox0\hbox{\ref{Unknown toc ID \number\Etoc@tocid. Rerun LaTeX}}% - %\if@filesw\immediate\write\@mainaux{\noexpand\@tempswatrue}\fi - \global\Etoc@emptytocfalse % assume real one will be non-empty - \global\Etoc@stoptoctrue % and print only heading for this pass + \global\Etoc@emptytocfalse + \global\Etoc@stoptoctrue \gdef\etoclocaltop{-\thr@@}% \Etoc@tableofcontents \expandafter\expandafter\expandafter\Etoc@gobbletoetoc@ - \else - %% \PackageWarning{etoc}{This toc is apparently empty}% \fi \else \global\Etoc@stoptocfalse @@ -793,9 +691,9 @@ \fi \@gobble\etoc@ \endgroup\ifEtoc@mustclosegroup\endgroup\fi - \Etoc@tocdepthreset % 1.07h, renamed 1.08h - \etocaftertochook % 1.07g - \let\Etoc@localtocdepth\c@tocdepth % 1.09 + \Etoc@tocdepthreset + \etocaftertochook + \let\Etoc@localtocdepth\c@tocdepth }% \Etoc@localtableofcontents \def\Etoc@getrefno #1#2\etoc@ {#1} \def\Etoc@getref #1{\@ifundefined{r@#1}{0}{\expandafter\expandafter\expandafter @@ -818,8 +716,8 @@ \fi \Etoc@tableofcontents \endgroup\ifEtoc@mustclosegroup\endgroup\fi - \Etoc@tocdepthreset % 1.07h, renamed 1.08h - \etocaftertochook % 1.07g + \Etoc@tocdepthreset + \etocaftertochook \@gobble\etoc@ }% \Etoc@t@bleofcontents \def\Etoc@table@fcontents{% @@ -835,8 +733,8 @@ \let\etocaftercontentshook \@empty \def\etoctableofcontents{% \Etoc@openouttoc - \Etoc@tocdepthset % new with 1.08h (\etocsetnexttocdepth) - \begingroup % closed in \Etoc@t@bleofcontents or \Etoc@localtableofcontents + \Etoc@tocdepthset + \begingroup \@ifstar {\let\Etoc@aftertitlehook\@empty\Etoc@table@fcontents} {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@table@fcontents}% @@ -845,8 +743,8 @@ \let\tableofcontents\etoctableofcontents \newcommand*\localtableofcontents{% \Etoc@openouttoc - \Etoc@tocdepthset % new with 1.08h (\etocsetnexttocdepth) - \begingroup % closed in \Etoc@t@bleofcontents or \Etoc@localtableofcontents + \Etoc@tocdepthset + \begingroup \@ifstar {\let\Etoc@aftertitlehook\@empty\Etoc@localtable@fcontents} {\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@localtable@fcontents}% @@ -866,27 +764,34 @@ \expandafter\Etoc@gobbletoetoc@ \fi \Etoc@par - \etocbeforetitlehook % 1.07m - \Etoc@storetocdepth % 1.07g - \let\Etoc@savedcontentsline\contentsline % moved up here 1.08 + \etocbeforetitlehook + \Etoc@storetocdepth + \let\Etoc@savedcontentsline\contentsline \let\contentsline\Etoc@etoccontentsline \ifEtoc@standard - \else % moved here from \Etoc@toctoc (1.08) + \else \def\Etoc@levellist@elt####1{% - \expandafter\let\csname etocsaved####1tocline\expandafter\endcsname - \csname l@####1\endcsname - \expandafter\let\csname l@####1\endcsname\Etoc@lxyz}% + \expandafter\def\csname etocsaved####1tocline\endcsname + {\PackageWarning{etoc}{\expandafter\string\csname + etocsaved####1tocline\endcsname\space is deprecated + and to be\MessageBreak soon removed from etoc. + Use directly \expandafter\string\csname l@####1\endcsname\MessageBreak }% + \expandafter\let\csname etocsaved####1tocline\expandafter\endcsname + \csname l@####1\endcsname + \csname l@####1\endcsname + }% + }% \Etoc@levellist \fi #1% \Etoc@tocdepthset - \ifEtoc@parskip\parskip\z@skip\fi %1.07d + \ifEtoc@parskip\parskip\z@skip\fi \Etoc@aftertitlehook \gdef\etoclocaltop{-\thr@@}% \Etoc@toctoc \etocaftercontentshook - #2\@nobreakfalse % 1.07d: \@nobreakfalse moved here - \Etoc@restoretocdepth % 1.07g. moved here from before #2 by 1.08 + #2\@nobreakfalse + \Etoc@restoretocdepth \ifx\Etoc@global\global \@ifundefined{tof@finish} {} @@ -936,9 +841,9 @@ \def\etoctoclineleaders {\hbox{\normalfont\normalsize\hb@xt@2ex {\hss.\hss}}} \def\etocabbrevpagename {p.~} -\def\etocpartname {Part}% modified 1.08b +\def\etocpartname {Part} \def\etocbookname {Book} -\def\etocdefaultlines{\Etoc@standardfalse % +\def\etocdefaultlines{\Etoc@standardfalse %% `book': \etoc@setstyle{@minustwo} {\addpenalty\@M\etocskipfirstprefix} @@ -1011,7 +916,7 @@ \vbox{\etocname~% \leaders\box\z@\hfil\box\tw@ \baselineskip\etocbaselinespreadone\baselineskip - \par}% 1.08b adds the % here + \par}% \else \vbox{\etocname~% \leaders\copy\z@\hfil\break @@ -1070,7 +975,7 @@ \addpenalty{-\@highpenalty}}% \etoc@setstyle{@four}{}{}{}{}% \etoc@setstyle{@five}{}{}{}{}% -} % end of \etocdefaultlines! +} \def\etocabovetocskip{3.5ex \@plus 1ex \@minus .2ex} \def\etocbelowtocskip{3.5ex \@plus 1ex \@minus .2ex} \def\etoccolumnsep{2em} @@ -1329,7 +1234,6 @@ {\ensureonecol \par \begingroup \phantomsection \ifx\Etoc@aftertitlehook\@empty \else - % non-starred variant \ifmem@em@starred@listof \else \Etoc@addsuitablecontentsline @@ -1530,7 +1434,7 @@ \endgroup }% } -\def\etocdepthtag #1#{\Etoc@depthtag } % \etocdepthtag.toc {name} +\def\etocdepthtag #1#{\Etoc@depthtag } \def\Etoc@depthtag #1{\addtocontents {toc}{\protect\etoc@depthtag {#1}}} \def\etocimmediatedepthtag #1#{\Etoc@depthtag@immediately } \def\Etoc@depthtag@immediately #1{% @@ -1571,8 +1475,8 @@ \def\resettocdepth {\@ifstar {\Etoc@tocvsec@err \resettocdepth }% {\Etoc@tocvsec@err \resettocdepth }% }% - \def\save@tocdepth #1#2#3{}% % if etoc is added to file previously - \let\reset@tocdepth\relax % using tocvsec2 + \def\save@tocdepth #1#2#3{}% + \let\reset@tocdepth\relax \let\remax@tocdepth\relax \let\tableofcontents\etoctableofcontents \PackageWarning {etoc} @@ -1602,8 +1506,8 @@ \global\let\Etoc@tocdepthset\@empty }% }% -\let\Etoc@tocdepthreset\@empty % new 1.08h functioning of \etocsetnexttocdepth -\let\Etoc@tocdepthset \@empty % +\let\Etoc@tocdepthreset\@empty +\let\Etoc@tocdepthset \@empty \def\etocsetlocaltop #1#{\Etoc@set@localtop}% \def\Etoc@set@localtop #1{% \@ifundefined{Etoc@#1@@}% @@ -1674,8 +1578,8 @@ \etocstandarddisplaystyle \etocobeytoctocdepth \etocobeydepthtags -\let\etocaftertochook \@empty % public for end user. -\let\etocbeforetitlehook \@empty % new with 1.07m +\let\etocaftertochook \@empty +\let\etocbeforetitlehook \@empty \def\etockeeporiginaltableofcontents {\let\tableofcontents\etocoriginaltableofcontents}% \endinput |