diff options
author | Karl Berry <karl@freefriends.org> | 2017-10-23 22:21:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-10-23 22:21:41 +0000 |
commit | cf7010cece3857384bdd19324eef056cf764385b (patch) | |
tree | ef3b59a6d9c52210fdcc8fc2455f7d74061ef19a | |
parent | 08541f1238259e89340cc52f9838c8591dbab1f5 (diff) |
etoc (23oct17)
git-svn-id: svn://tug.org/texlive/trunk@45586 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/etoc/README.md | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf | bin | 579804 -> 579990 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/etoc/etoc.pdf | bin | 621615 -> 623754 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/etoc/etoc.dtx | 158 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/etoc/etoc.ins | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/etoc/etoc.sty | 94 |
6 files changed, 181 insertions, 89 deletions
diff --git a/Master/texmf-dist/doc/latex/etoc/README.md b/Master/texmf-dist/doc/latex/etoc/README.md index 58f5cc428de..fe9c3a69eed 100644 --- a/Master/texmf-dist/doc/latex/etoc/README.md +++ b/Master/texmf-dist/doc/latex/etoc/README.md @@ -1,6 +1,6 @@ <!-- --> - Source: etoc.dtx (v1.08k-2017/09/28) + Source: etoc.dtx (v1.08l-2017/10/23) Author: Jean-Francois Burnol Author: Christine Roemer et al. (German tranlation) Info: Completely customisable TOCs @@ -116,6 +116,14 @@ etoc.pdf, etoc-DE.pdf, etoc.dvi, etoc-DE.dvi. RECENT CHANGES ============== +v1.08l \[2017/10/23\] +--------------------- + +Workaround an issue with `Emacs/AUCTeX` wrongly reporting about +actually non-existent LaTeX errors, which was triggered by some +strings written (indirectly) to log file by etoc under some +circumstances. + v1.08k \[2017/09/28\] --------------------- diff --git a/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf b/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf Binary files differindex dc2c87083b8..39395caa6f8 100644 --- a/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf +++ b/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf diff --git a/Master/texmf-dist/doc/latex/etoc/etoc.pdf b/Master/texmf-dist/doc/latex/etoc/etoc.pdf Binary files differindex c0dab8dda58..e24ce5f0baf 100644 --- a/Master/texmf-dist/doc/latex/etoc/etoc.pdf +++ b/Master/texmf-dist/doc/latex/etoc/etoc.pdf diff --git a/Master/texmf-dist/source/latex/etoc/etoc.dtx b/Master/texmf-dist/source/latex/etoc/etoc.dtx index a1ab3297a6d..faf51197861 100644 --- a/Master/texmf-dist/source/latex/etoc/etoc.dtx +++ b/Master/texmf-dist/source/latex/etoc/etoc.dtx @@ -2,12 +2,12 @@ % N.B.: this dtx file is NOT for use with \DocInput. The latex source of the % user manual is not prefixed with percent signs. %<*none> -\def\etocdtxtimestamp {Time-stamp: <28-09-2017 at 16:19:24 CEST>}% +\def\etocdtxtimestamp {Time-stamp: <23-10-2017 at 12:03:59 CEST>}% %</none> %<*!readme> %% %% Package: etoc -%% Version: 1.08k-2017/09/28 +%% Version: 1.08l-2017/10/23 %% License: LPPL 1.3c %% Copyright (C) 2012-2017 Jean-Francois Burnol %% <jfbu at free dot fr> @@ -17,14 +17,14 @@ %% %</!readme> %<*insfile> -\def\etocpkgdate {2017/09/28} -\def\etocdocdate {2017/09/28} -\def\etocpkgversion {v1.08k} +\def\etocpkgdate {2017/10/23} +\def\etocdocdate {2017/10/23} +\def\etocpkgversion {v1.08l} \def\etocpkgdescription {Completely customisable TOCs (JFB)} %</insfile> %<*none> -\def\etocDEpkgdate {28.09.2017}% METTRE À JOUR À CHAQUE BUMP! -\def\etocDEdocdate {28.09.2017} +\def\etocDEpkgdate {23.10.2017}% METTRE À JOUR À CHAQUE BUMP! +\def\etocDEdocdate {23.10.2017} \def\etocDEDEdocdate {09.04.2015}% \def\etocDEDEpkgversion {v1.08d}% % Definition of \etocLicense @@ -35,7 +35,7 @@ \catcode32=13\catcode`\\=12^^Brelax^^A ^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A {% Package: etoc -% Version: 1.08k-2017/09/28 +% Version: 1.08l-2017/10/23 % License: LPPL 1.3c % Copyright (C) 2012-2017 Jean-Francois Burnol <jfbu at free dot fr> % Copyright (C) 2014-2017 Christine Roemer <Christine_Roemer at t-online dot de> @@ -69,7 +69,7 @@ %<*readme> <!-- --> - Source: etoc.dtx (v1.08k-2017/09/28) + Source: etoc.dtx (v1.08l-2017/10/23) Author: Jean-Francois Burnol Author: Christine Roemer et al. (German tranlation) Info: Completely customisable TOCs @@ -185,6 +185,15 @@ etoc.pdf, etoc-DE.pdf, etoc.dvi, etoc-DE.dvi. RECENT CHANGES ============== +v1.08l \[2017/10/23\] +--------------------- + +Workaround an issue with `Emacs/AUCTeX` wrongly reporting about +actually non-existent LaTeX errors, which was triggered by some +strings written (indirectly) to log file by etoc under some +circumstances. + + v1.08k \[2017/09/28\] --------------------- @@ -10891,7 +10900,14 @@ Dokumentation erzeugt von der Quelldatei mit dem Stempel \begin{multicols}{2} \begin{jfverbatim} -v1.08k [2017/09/28]^ +v1.08l [2017/10/23]^ + + Workaround an issue with Emacs/AUCTeX wrongly reporting about + actually non-existent LaTeX errors, which was triggered by some + strings written (indirectly) to log file by etoc under some + circumstances. + +~v1.08k [2017/09/28]^ Adds \etocsetlocaltop.toc. See corresponding manual section for details. @@ -11492,6 +11508,12 @@ v1.08k [2017/09/28]^ % % |1.08f|'s \csa{etocsetlevel} avoids multiple insertions of the same level % in the \csa{Etoc@levellist} list. +% +% |1.08k| modified \csa{Etoc@newlevel}: formerly a token |\l@#1| was stored in +% place of braced name |{#1}|. This changed is to facilitate creation of the +% |\etocsavedsectiontocline| etc... macros later on, at each TOC. But the +% stored |#1| is not expanded immediately, although it is in other parts of +% \csa{etocsetlevel}, which may cause timing problems if |#1| is a macro. % \begin{macrocode} \let\Etoc@levellist\@empty \def\Etoc@newlevel #1{\expandafter\def\expandafter\Etoc@levellist\expandafter @@ -11795,10 +11817,12 @@ v1.08k [2017/09/28]^ \def\Etoc@etoccontentsline #1{% \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname \Etoc@skipthisonefalse - \ifnum\Etoc@level=\Etoc@@six@@\Etoc@skipthisonetrue + \ifnum\Etoc@level=\Etoc@@six@@ + \Etoc@skipthisonetrue \else \ifEtoc@localtoc - \ifEtoc@stoptoc\Etoc@skipthisonetrue + \ifEtoc@stoptoc + \Etoc@skipthisonetrue \else \ifEtoc@notactive\Etoc@setflags \Etoc@skipthisonetrue @@ -11954,10 +11978,11 @@ v1.08k [2017/09/28]^ \Etoc@global\def\etocthelinkedname {#1}% (probably redefined later) \Etoc@getthepage #2\etoc@ % defines \etocthelinkedpage \Etoc@getnb #1\relax\relax\etoc@ % sets number, name, and \etocthelink - \ifEtoc@number\else - \ifnum\Etoc@level=\m@ne - \Etoc@getit #1\hspace\relax\etoc@ % additional job for parts - \fi + \ifEtoc@number + \else + \ifnum\Etoc@level=\m@ne + \Etoc@getit #1\hspace\relax\etoc@ % additional job for parts + \fi \fi \Etoc@global\expandafter\let\csname etoclink \endcsname\etocthelink \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname @@ -11971,9 +11996,11 @@ v1.08k [2017/09/28]^ % \begin{macrocode} \def\Etoc@getthepage #1{% \let\Etoc@next\Etoc@getthepage@nohyp - \ifEtoc@hyperref\ifx\hyper@linkstart#1% + \ifEtoc@hyperref + \ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getthepage@hyp - \fi\fi + \fi + \fi \Etoc@next #1% } \def\Etoc@getthepage@nohyp #1\etoc@ {% @@ -12010,16 +12037,20 @@ v1.08k [2017/09/28]^ % \begin{macrocode} \def\Etoc@getnb #1{% \let\Etoc@next\Etoc@getnb@nohyp - \ifEtoc@hyperref\ifx\hyper@linkstart#1% + \ifEtoc@hyperref + \ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getnb@hyp - \fi\fi + \fi + \fi \Etoc@next #1% } \def\Etoc@getit #1{% \let\Etoc@next\Etoc@getit@nohyp - \ifEtoc@hyperref\ifx\hyper@linkstart#1% + \ifEtoc@hyperref + \ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getit@hyp - \fi\fi + \fi + \fi \Etoc@next #1% } % \end{macrocode} @@ -12060,7 +12091,7 @@ v1.08k [2017/09/28]^ % |1.08j| corrects the old |\ifx#1\numberline| into |\ifx\numberline#1|. % % |1.08k| uses a delimited macro to identify \csa{numberline}, -% \csa{chapternumberline} etc... in one go, avoiding +% \csa{chapternumberline} etc... in one go. % \begin{macrocode} \def\Etoc@getnb@hyp #1#2#3#4#5#6\etoc@ {% \def\Etoc@getname ##1\relax\relax\etoc@ {% @@ -12193,14 +12224,14 @@ v1.08k [2017/09/28]^ % \begin{macrocode} \def\Etoc@openouttoc{% \ifEtoc@hyperref - \ifx\hyper@last\@undefined + \ifx\hyper@last\@undefined \IfFileExists{\jobname .toc} {\Hy@WarningNoLine {old toc file detected, not used; run LaTeX again (cheers from etoc)}% \global\Etoc@toctoks={}% } {}% - \fi + \fi \fi \if@filesw \newwrite \tf@toc @@ -12257,7 +12288,7 @@ v1.08k [2017/09/28]^ % \begin{macrocode} \def\etoc@@startlocaltoc#1#2{% \ifEtoc@localtoc - \ifnum #1=#2\relax + \ifnum #1=#2\relax \ifEtoc@jj \global\let\Etoc@localtop\Etoc@@minusone@@ \fi \ifEtoc@j \global\let\Etoc@localtop\Etoc@@zero@@ \fi \ifEtoc@ \global\let\Etoc@localtop\Etoc@@one@@ \fi @@ -12275,7 +12306,7 @@ v1.08k [2017/09/28]^ \global\Etoc@false \global\Etoc@jfalse \global\Etoc@jjfalse - \fi + \fi \fi } \let\etoc@startlocaltoc\@gobble @@ -12463,13 +12494,24 @@ v1.08k [2017/09/28]^ % I hesitated with |1.08i| to write something to aux file in order to let % \LaTeX\ prompt the user for extra pass, after insertion of some new % |\localtableofcontents|, but finally I prefer to only trick \LaTeX\ into -% telling about undefined references. The first solution has the advantage +% telling about undefined references. +% +% The \cs{PackageWarning} approach has the advantage % that at least in Emacs/AUCTeX the |C-cC-c| will propose |LaTeX|, not |View|. % But perhaps some automated scripts checking |aux| file will not like the % extra line which is then removed in next pass, and could possibly do one % extra unneeded compilation to check |aux| file remains identical. Hence the -% second approach. Earlier I did only a |\PackageWarning| but this does not -% output a message near the end of the log file or console output. +% second approach. (edit |2017/10/23|: good thing I documented that! I had +% completely forgotten that rationale, but I wonder if it is correct.) +% +% Also the |\PackageWarning| does not trigger a visible message +% near the end of the log file or console output, contrarily to a +% \centeredline{|LaTeX Warning: There were undefined references.|} +% followed by a +% \centeredline{|LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.|} +% +% Method used here seems to work fine also with |latexmk|: it does not seem to +% induce it into making too many runs. % \begin{macrocode} \def\Etoc@localtableofcontents#1{% \Etoc@localtoctrue @@ -12477,7 +12519,7 @@ v1.08k [2017/09/28]^ \edef\Etoc@tocid{#1}% \ifnum\Etoc@tocid<\@ne %\PackageWarning{etoc}{Unknown toc reference \@secondoftwo#1. Run LaTeX again}% - \setbox0\hbox{\ref{etoc-ref \@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 \Etoc@tableofcontents @@ -12491,7 +12533,7 @@ v1.08k [2017/09/28]^ \ifEtoc@emptytoc \ifEtoc@notactive %\PackageWarning{etoc}{Unknown toc ID \number\Etoc@tocid. Run LaTeX again}% - \setbox0\hbox{\ref{etoc-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 @@ -12561,9 +12603,11 @@ v1.08k [2017/09/28]^ % a bit the style of conditionals here for clarity of code. % \begin{macrocode} \global\Etoc@emptytocfalse\ifEtoc@checksemptiness\Etoc@setemptytocbool\fi - \ifEtoc@emptytoc\ifEtoc@notocifnotoc - \expandafter\expandafter\expandafter\@gobble - \fi\fi + \ifEtoc@emptytoc + \ifEtoc@notocifnotoc + \expandafter\expandafter\expandafter\@gobble + \fi + \fi \Etoc@tableofcontents \endgroup\ifEtoc@mustclosegroup\endgroup\fi \Etoc@tocdepthreset % 1.07h, renamed 1.08h @@ -12669,8 +12713,8 @@ v1.08k [2017/09/28]^ \def\Etoc@tableofcontents {% \ifnum\c@tocdepth>\Etoc@minf - \else\expandafter - \Etoc@gobbletoetoc@ + \else + \expandafter\Etoc@gobbletoetoc@ \fi \Etoc@par \etocbeforetitlehook % 1.07m @@ -12679,6 +12723,13 @@ v1.08k [2017/09/28]^ \let\contentsline\Etoc@etoccontentsline \ifEtoc@standard \else % moved here from \Etoc@toctoc (1.08) +% \end{macrocode} +% Prior to |1.08|, this was done in |\Etoc@toctoc| +% +% |1.08k| defines here |\etocsavedchaptertocline|, |\etocsavedsectiontocline|, +% and so on for all declared level names, again at each TOC and for the +% duration of it. +% \begin{macrocode} \def\Etoc@levellist@elt####1{% \expandafter\let\csname etocsaved####1tocline\expandafter\endcsname \csname l@####1\endcsname @@ -12700,9 +12751,12 @@ v1.08k [2017/09/28]^ % was forced to modify globally |\contentsline|. The collateral effect is that % \etoc is now forced to reset globally |\contentsline|. % \begin{macrocode} - \ifx\Etoc@global\global\ifx\tof@finish\@empty\else - \global\let\contentsline\Etoc@savedcontentsline - \fi\fi + \ifx\Etoc@global\global + \ifx\tof@finish\@empty + \else + \global\let\contentsline\Etoc@savedcontentsline + \fi + \fi \@gobble\etoc@ }% end of \Etoc@tableofcontents definition by \etocsettocstyle } @@ -12998,8 +13052,9 @@ v1.08k [2017/09/28]^ \newcommand*\etocruledstyle[2][\etocdefaultnbcol]{% \etocsettocstyle {\addvspace{\etocabovetocskip}% - \ifnum #1>\@ne\expandafter\@firstoftwo - \else \expandafter\@secondoftwo + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo \fi {\multicolpretolerance\etocmulticolpretolerance \multicoltolerance\etocmulticoltolerance @@ -13035,10 +13090,11 @@ v1.08k [2017/09/28]^ \addvspace{\etocabovetocskip}% \sbox\z@{#2}% \dimen\z@\dp\z@ - \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi + \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi \setbox\etoc@framed@titlebox=\hb@xt@\linewidth{\color@begingroup \hss - \ifx\etocbkgcolorcmd\Etoc@relax\else + \ifx\etocbkgcolorcmd\Etoc@relax + \else \sbox\tw@{\color{white}% \vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}% \ifdim\wd\z@<\linewidth \dp\tw@\z@\fi @@ -13048,7 +13104,7 @@ v1.08k [2017/09/28]^ \copy\z@ \hss \hskip-\linewidth - \etoctoprulecolorcmd\leaders\etoctoprule\hss% + \etoctoprulecolorcmd\leaders\etoctoprule\hss \hskip\wd\z@ \etoctoprulecolorcmd\leaders\etoctoprule\hss\color@endgroup}% \setbox\z@\hbox{\etocleftrule\etocrightrule}% @@ -13062,7 +13118,8 @@ v1.08k [2017/09/28]^ \hbox\bgroup \begin{minipage}{\hsize}% \etocframedmphook - \ifnum #1>\@ne\expandafter\@firstoftwo + \ifnum #1>\@ne + \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi {\multicolpretolerance\etocmulticolpretolerance @@ -13081,7 +13138,8 @@ v1.08k [2017/09/28]^ \vskip\etocinnerbottomsep \egroup \vbox{\hsize\linewidth - \ifx\etocbkgcolorcmd\Etoc@relax\else + \ifx\etocbkgcolorcmd\Etoc@relax + \else \kern\ht\etoc@framed@titlebox \kern\dp\etoc@framed@titlebox \hb@xt@\linewidth{\color@begingroup @@ -13221,7 +13279,11 @@ v1.08k [2017/09/28]^ \def\Etoc@addsuitablecontentsline{\addcontentsline {toc}{#1}{#2}}% \renewcommand*\etocaftertitlehook{% \ifmem@em@starred@listof - \else\phantomsection\aftergroup\Etoc@addsuitablecontentsline\fi}} + \else + \phantomsection + \aftergroup\Etoc@addsuitablecontentsline + \fi}% +} \def\etocmemoirstyle{% \etocsettocstyle {\ensureonecol \par \begingroup \@nameuse {@tocmaketitle} diff --git a/Master/texmf-dist/source/latex/etoc/etoc.ins b/Master/texmf-dist/source/latex/etoc/etoc.ins index cd2365c107c..080b845ee24 100644 --- a/Master/texmf-dist/source/latex/etoc/etoc.ins +++ b/Master/texmf-dist/source/latex/etoc/etoc.ins @@ -1,6 +1,6 @@ %% %% Package: etoc -%% Version: 1.08k-2017/09/28 +%% Version: 1.08l-2017/10/23 %% License: LPPL 1.3c %% Copyright (C) 2012-2017 Jean-Francois Burnol %% <jfbu at free dot fr> @@ -8,9 +8,9 @@ %% <Christine_Roemer at t-online dot de> %% and collaborators for the translation into German of the documentation %% -\def\etocpkgdate {2017/09/28} -\def\etocdocdate {2017/09/28} -\def\etocpkgversion {v1.08k} +\def\etocpkgdate {2017/10/23} +\def\etocdocdate {2017/10/23} +\def\etocpkgversion {v1.08l} \def\etocpkgdescription {Completely customisable TOCs (JFB)} %% Run etex on this file to extract from etoc.dtx: %% etoc.sty, etoc.tex, etoc-DE.tex and README.md diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty index 5fb278c2445..48a8a986c45 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} - [2017/09/28 v1.08k Completely customisable TOCs (JFB)] + [2017/10/23 v1.08l Completely customisable TOCs (JFB)] %% %% Package: etoc -%% Version: 1.08k-2017/09/28 +%% Version: 1.08l-2017/10/23 %% License: LPPL 1.3c %% Copyright (C) 2012-2017 Jean-Francois Burnol %% <jfbu at free dot fr> @@ -293,10 +293,12 @@ \def\Etoc@etoccontentsline #1{% \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname \Etoc@skipthisonefalse - \ifnum\Etoc@level=\Etoc@@six@@\Etoc@skipthisonetrue + \ifnum\Etoc@level=\Etoc@@six@@ + \Etoc@skipthisonetrue \else \ifEtoc@localtoc - \ifEtoc@stoptoc\Etoc@skipthisonetrue + \ifEtoc@stoptoc + \Etoc@skipthisonetrue \else \ifEtoc@notactive\Etoc@setflags \Etoc@skipthisonetrue @@ -340,10 +342,11 @@ \Etoc@global\def\etocthelinkedname {#1}% (probably redefined later) \Etoc@getthepage #2\etoc@ % defines \etocthelinkedpage \Etoc@getnb #1\relax\relax\etoc@ % sets number, name, and \etocthelink - \ifEtoc@number\else - \ifnum\Etoc@level=\m@ne - \Etoc@getit #1\hspace\relax\etoc@ % additional job for parts - \fi + \ifEtoc@number + \else + \ifnum\Etoc@level=\m@ne + \Etoc@getit #1\hspace\relax\etoc@ % additional job for parts + \fi \fi \Etoc@global\expandafter\let\csname etoclink \endcsname\etocthelink \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname @@ -352,9 +355,11 @@ } \def\Etoc@getthepage #1{% \let\Etoc@next\Etoc@getthepage@nohyp - \ifEtoc@hyperref\ifx\hyper@linkstart#1% + \ifEtoc@hyperref + \ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getthepage@hyp - \fi\fi + \fi + \fi \Etoc@next #1% } \def\Etoc@getthepage@nohyp #1\etoc@ {% @@ -370,16 +375,20 @@ } \def\Etoc@getnb #1{% \let\Etoc@next\Etoc@getnb@nohyp - \ifEtoc@hyperref\ifx\hyper@linkstart#1% + \ifEtoc@hyperref + \ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getnb@hyp - \fi\fi + \fi + \fi \Etoc@next #1% } \def\Etoc@getit #1{% \let\Etoc@next\Etoc@getit@nohyp - \ifEtoc@hyperref\ifx\hyper@linkstart#1% + \ifEtoc@hyperref + \ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getit@hyp - \fi\fi + \fi + \fi \Etoc@next #1% } \begingroup\@tfor\x:=NUMBZRLINZ\do{\catcode\expandafter`\x=12 }\lccode`Z `e @@ -502,14 +511,14 @@ {\typeout{No file \jobname.toc.}}} \def\Etoc@openouttoc{% \ifEtoc@hyperref - \ifx\hyper@last\@undefined + \ifx\hyper@last\@undefined \IfFileExists{\jobname .toc} {\Hy@WarningNoLine {old toc file detected, not used; run LaTeX again (cheers from etoc)}% \global\Etoc@toctoks={}% } {}% - \fi + \fi \fi \if@filesw \newwrite \tf@toc @@ -541,7 +550,7 @@ } \def\etoc@@startlocaltoc#1#2{% \ifEtoc@localtoc - \ifnum #1=#2\relax + \ifnum #1=#2\relax \ifEtoc@jj \global\let\Etoc@localtop\Etoc@@minusone@@ \fi \ifEtoc@j \global\let\Etoc@localtop\Etoc@@zero@@ \fi \ifEtoc@ \global\let\Etoc@localtop\Etoc@@one@@ \fi @@ -559,7 +568,7 @@ \global\Etoc@false \global\Etoc@jfalse \global\Etoc@jjfalse - \fi + \fi \fi } \let\etoc@startlocaltoc\@gobble @@ -629,7 +638,7 @@ \edef\Etoc@tocid{#1}% \ifnum\Etoc@tocid<\@ne %\PackageWarning{etoc}{Unknown toc reference \@secondoftwo#1. Run LaTeX again}% - \setbox0\hbox{\ref{etoc-ref \@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 \Etoc@tableofcontents @@ -640,7 +649,7 @@ \ifEtoc@emptytoc \ifEtoc@notactive %\PackageWarning{etoc}{Unknown toc ID \number\Etoc@tocid. Run LaTeX again}% - \setbox0\hbox{\ref{etoc-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 @@ -674,9 +683,11 @@ \ifx\Etoc@nexttoken\ref\Etoc@dothis{\expandafter\Etoc@ref\@gobble}\fi \ifEtoc@tocwithid\Etoc@dothis{\Etoc@localtableofcontents{\c@etoc@tocid}}\fi \global\Etoc@emptytocfalse\ifEtoc@checksemptiness\Etoc@setemptytocbool\fi - \ifEtoc@emptytoc\ifEtoc@notocifnotoc - \expandafter\expandafter\expandafter\@gobble - \fi\fi + \ifEtoc@emptytoc + \ifEtoc@notocifnotoc + \expandafter\expandafter\expandafter\@gobble + \fi + \fi \Etoc@tableofcontents \endgroup\ifEtoc@mustclosegroup\endgroup\fi \Etoc@tocdepthreset % 1.07h, renamed 1.08h @@ -718,8 +729,8 @@ \def\Etoc@tableofcontents {% \ifnum\c@tocdepth>\Etoc@minf - \else\expandafter - \Etoc@gobbletoetoc@ + \else + \expandafter\Etoc@gobbletoetoc@ \fi \Etoc@par \etocbeforetitlehook % 1.07m @@ -741,9 +752,12 @@ \etocaftercontentshook #2\@nobreakfalse % 1.07d: \@nobreakfalse moved here \Etoc@resettocdepth % 1.07g. moved here from before #2 by 1.08 - \ifx\Etoc@global\global\ifx\tof@finish\@empty\else - \global\let\contentsline\Etoc@savedcontentsline - \fi\fi + \ifx\Etoc@global\global + \ifx\tof@finish\@empty + \else + \global\let\contentsline\Etoc@savedcontentsline + \fi + \fi \@gobble\etoc@ }% end of \Etoc@tableofcontents definition by \etocsettocstyle } @@ -973,8 +987,9 @@ \newcommand*\etocruledstyle[2][\etocdefaultnbcol]{% \etocsettocstyle {\addvspace{\etocabovetocskip}% - \ifnum #1>\@ne\expandafter\@firstoftwo - \else \expandafter\@secondoftwo + \ifnum #1>\@ne + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo \fi {\multicolpretolerance\etocmulticolpretolerance \multicoltolerance\etocmulticoltolerance @@ -999,10 +1014,11 @@ \addvspace{\etocabovetocskip}% \sbox\z@{#2}% \dimen\z@\dp\z@ - \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi + \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi \setbox\etoc@framed@titlebox=\hb@xt@\linewidth{\color@begingroup \hss - \ifx\etocbkgcolorcmd\Etoc@relax\else + \ifx\etocbkgcolorcmd\Etoc@relax + \else \sbox\tw@{\color{white}% \vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}% \ifdim\wd\z@<\linewidth \dp\tw@\z@\fi @@ -1012,7 +1028,7 @@ \copy\z@ \hss \hskip-\linewidth - \etoctoprulecolorcmd\leaders\etoctoprule\hss% + \etoctoprulecolorcmd\leaders\etoctoprule\hss \hskip\wd\z@ \etoctoprulecolorcmd\leaders\etoctoprule\hss\color@endgroup}% \setbox\z@\hbox{\etocleftrule\etocrightrule}% @@ -1026,7 +1042,8 @@ \hbox\bgroup \begin{minipage}{\hsize}% \etocframedmphook - \ifnum #1>\@ne\expandafter\@firstoftwo + \ifnum #1>\@ne + \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi {\multicolpretolerance\etocmulticolpretolerance @@ -1045,7 +1062,8 @@ \vskip\etocinnerbottomsep \egroup \vbox{\hsize\linewidth - \ifx\etocbkgcolorcmd\Etoc@relax\else + \ifx\etocbkgcolorcmd\Etoc@relax + \else \kern\ht\etoc@framed@titlebox \kern\dp\etoc@framed@titlebox \hb@xt@\linewidth{\color@begingroup @@ -1167,7 +1185,11 @@ \def\Etoc@addsuitablecontentsline{\addcontentsline {toc}{#1}{#2}}% \renewcommand*\etocaftertitlehook{% \ifmem@em@starred@listof - \else\phantomsection\aftergroup\Etoc@addsuitablecontentsline\fi}} + \else + \phantomsection + \aftergroup\Etoc@addsuitablecontentsline + \fi}% +} \def\etocmemoirstyle{% \etocsettocstyle {\ensureonecol \par \begingroup \@nameuse {@tocmaketitle} |