texlive[45586] Master/texmf-dist: etoc (23oct17)
commits+karl at tug.org
commits+karl at tug.org
Tue Oct 24 00:21:41 CEST 2017
Revision: 45586
http://tug.org/svn/texlive?view=revision&revision=45586
Author: karl
Date: 2017-10-24 00:21:41 +0200 (Tue, 24 Oct 2017)
Log Message:
-----------
etoc (23oct17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/etoc/README.md
trunk/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf
trunk/Master/texmf-dist/doc/latex/etoc/etoc.pdf
trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx
trunk/Master/texmf-dist/source/latex/etoc/etoc.ins
trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty
Modified: trunk/Master/texmf-dist/doc/latex/etoc/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/README.md 2017-10-23 22:21:26 UTC (rev 45585)
+++ trunk/Master/texmf-dist/doc/latex/etoc/README.md 2017-10-23 22:21:41 UTC (rev 45586)
@@ -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 @@
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\]
---------------------
Modified: trunk/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/etoc/etoc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx 2017-10-23 22:21:26 UTC (rev 45585)
+++ trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx 2017-10-23 22:21:41 UTC (rev 45586)
@@ -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 @@
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,8 +10900,15 @@
\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 @@
%
% |1.08f|'s \csa{etocsetlevel} avoids multiple insertions of the same level
% in the \csa{Etoc at levellist} list.
+%
+% |1.08k| modified \csa{Etoc at 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 at levellist\@empty
\def\Etoc at newlevel #1{\expandafter\def\expandafter\Etoc at levellist\expandafter
@@ -11795,10 +11817,12 @@
\def\Etoc at etoccontentsline #1{%
\global\expandafter\let\expandafter\Etoc at level\csname Etoc@#1@@\endcsname
\Etoc at skipthisonefalse
- \ifnum\Etoc at level=\Etoc@@six@@\Etoc at skipthisonetrue
+ \ifnum\Etoc at level=\Etoc@@six@@
+ \Etoc at skipthisonetrue
\else
\ifEtoc at localtoc
- \ifEtoc at stoptoc\Etoc at skipthisonetrue
+ \ifEtoc at stoptoc
+ \Etoc at skipthisonetrue
\else
\ifEtoc at notactive\Etoc at setflags
\Etoc at skipthisonetrue
@@ -11954,10 +11978,11 @@
\Etoc at global\def\etocthelinkedname {#1}% (probably redefined later)
\Etoc at getthepage #2\etoc@ % defines \etocthelinkedpage
\Etoc at getnb #1\relax\relax\etoc@ % sets number, name, and \etocthelink
- \ifEtoc at number\else
- \ifnum\Etoc at level=\m at ne
- \Etoc at getit #1\hspace\relax\etoc@ % additional job for parts
- \fi
+ \ifEtoc at number
+ \else
+ \ifnum\Etoc at level=\m at ne
+ \Etoc at getit #1\hspace\relax\etoc@ % additional job for parts
+ \fi
\fi
\Etoc at global\expandafter\let\csname etoclink \endcsname\etocthelink
\Etoc at global\expandafter\let\csname etocname \endcsname\etocthelinkedname
@@ -11971,9 +11996,11 @@
% \begin{macrocode}
\def\Etoc at getthepage #1{%
\let\Etoc at next\Etoc at getthepage@nohyp
- \ifEtoc at hyperref\ifx\hyper at linkstart#1%
+ \ifEtoc at hyperref
+ \ifx\hyper at linkstart#1%
\let\Etoc at next\Etoc at getthepage@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc at next #1%
}
\def\Etoc at getthepage@nohyp #1\etoc@ {%
@@ -12010,16 +12037,20 @@
% \begin{macrocode}
\def\Etoc at getnb #1{%
\let\Etoc at next\Etoc at getnb@nohyp
- \ifEtoc at hyperref\ifx\hyper at linkstart#1%
+ \ifEtoc at hyperref
+ \ifx\hyper at linkstart#1%
\let\Etoc at next\Etoc at getnb@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc at next #1%
}
\def\Etoc at getit #1{%
\let\Etoc at next\Etoc at getit@nohyp
- \ifEtoc at hyperref\ifx\hyper at linkstart#1%
+ \ifEtoc at hyperref
+ \ifx\hyper at linkstart#1%
\let\Etoc at next\Etoc at getit@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc at next #1%
}
% \end{macrocode}
@@ -12060,7 +12091,7 @@
% |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 at getnb@hyp #1#2#3#4#5#6\etoc@ {%
\def\Etoc at getname ##1\relax\relax\etoc@ {%
@@ -12193,7 +12224,7 @@
% \begin{macrocode}
\def\Etoc at openouttoc{%
\ifEtoc at hyperref
- \ifx\hyper at last\@undefined
+ \ifx\hyper at last\@undefined
\IfFileExists{\jobname .toc}
{\Hy at WarningNoLine
{old toc file detected, not used; run LaTeX again (cheers from etoc)}%
@@ -12200,7 +12231,7 @@
\global\Etoc at toctoks={}%
}
{}%
- \fi
+ \fi
\fi
\if at filesw
\newwrite \tf at toc
@@ -12257,7 +12288,7 @@
% \begin{macrocode}
\def\etoc@@startlocaltoc#1#2{%
\ifEtoc at localtoc
- \ifnum #1=#2\relax
+ \ifnum #1=#2\relax
\ifEtoc at jj \global\let\Etoc at localtop\Etoc@@minusone@@ \fi
\ifEtoc at j \global\let\Etoc at localtop\Etoc@@zero@@ \fi
\ifEtoc@ \global\let\Etoc at localtop\Etoc@@one@@ \fi
@@ -12275,7 +12306,7 @@
\global\Etoc at false
\global\Etoc at jfalse
\global\Etoc at jjfalse
- \fi
+ \fi
\fi
}
\let\etoc at startlocaltoc\@gobble
@@ -12463,13 +12494,24 @@
% 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 at localtableofcontents#1{%
\Etoc at localtoctrue
@@ -12477,7 +12519,7 @@
\edef\Etoc at tocid{#1}%
\ifnum\Etoc at 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 at filesw\immediate\write\@mainaux{\noexpand\@tempswatrue}\fi
\global\Etoc at stoptoctrue % do only heading
\Etoc at tableofcontents
@@ -12491,7 +12533,7 @@
\ifEtoc at emptytoc
\ifEtoc at notactive
%\PackageWarning{etoc}{Unknown toc ID \number\Etoc at tocid. Run LaTeX again}%
- \setbox0\hbox{\ref{etoc-id \number\Etoc at tocid: run LaTeX again!}}%
+ \setbox0\hbox{\ref{Unknown toc ID \number\Etoc at tocid. Rerun LaTeX}}%
%\if at filesw\immediate\write\@mainaux{\noexpand\@tempswatrue}\fi
\global\Etoc at emptytocfalse % assume real one will be non-empty
\global\Etoc at stoptoctrue % and print only heading for this pass
@@ -12561,9 +12603,11 @@
% a bit the style of conditionals here for clarity of code.
% \begin{macrocode}
\global\Etoc at emptytocfalse\ifEtoc at checksemptiness\Etoc at setemptytocbool\fi
- \ifEtoc at emptytoc\ifEtoc at notocifnotoc
- \expandafter\expandafter\expandafter\@gobble
- \fi\fi
+ \ifEtoc at emptytoc
+ \ifEtoc at notocifnotoc
+ \expandafter\expandafter\expandafter\@gobble
+ \fi
+ \fi
\Etoc at tableofcontents
\endgroup\ifEtoc at mustclosegroup\endgroup\fi
\Etoc at tocdepthreset % 1.07h, renamed 1.08h
@@ -12669,8 +12713,8 @@
\def\Etoc at tableofcontents
{%
\ifnum\c at tocdepth>\Etoc at minf
- \else\expandafter
- \Etoc at gobbletoetoc@
+ \else
+ \expandafter\Etoc at gobbletoetoc@
\fi
\Etoc at par
\etocbeforetitlehook % 1.07m
@@ -12679,6 +12723,13 @@
\let\contentsline\Etoc at etoccontentsline
\ifEtoc at standard
\else % moved here from \Etoc at toctoc (1.08)
+% \end{macrocode}
+% Prior to |1.08|, this was done in |\Etoc at 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 at levellist@elt####1{%
\expandafter\let\csname etocsaved####1tocline\expandafter\endcsname
\csname l@####1\endcsname
@@ -12700,9 +12751,12 @@
% was forced to modify globally |\contentsline|. The collateral effect is that
% \etoc is now forced to reset globally |\contentsline|.
% \begin{macrocode}
- \ifx\Etoc at global\global\ifx\tof at finish\@empty\else
- \global\let\contentsline\Etoc at savedcontentsline
- \fi\fi
+ \ifx\Etoc at global\global
+ \ifx\tof at finish\@empty
+ \else
+ \global\let\contentsline\Etoc at savedcontentsline
+ \fi
+ \fi
\@gobble\etoc@
}% end of \Etoc at tableofcontents definition by \etocsettocstyle
}
@@ -12998,8 +13052,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
@@ -13035,10 +13090,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 at framed@titlebox=\hb at xt@\linewidth{\color at begingroup
\hss
- \ifx\etocbkgcolorcmd\Etoc at relax\else
+ \ifx\etocbkgcolorcmd\Etoc at 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 @@
\copy\z@
\hss
\hskip-\linewidth
- \etoctoprulecolorcmd\leaders\etoctoprule\hss%
+ \etoctoprulecolorcmd\leaders\etoctoprule\hss
\hskip\wd\z@
\etoctoprulecolorcmd\leaders\etoctoprule\hss\color at endgroup}%
\setbox\z@\hbox{\etocleftrule\etocrightrule}%
@@ -13062,7 +13118,8 @@
\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 @@
\vskip\etocinnerbottomsep
\egroup
\vbox{\hsize\linewidth
- \ifx\etocbkgcolorcmd\Etoc at relax\else
+ \ifx\etocbkgcolorcmd\Etoc at relax
+ \else
\kern\ht\etoc at framed@titlebox
\kern\dp\etoc at framed@titlebox
\hb at xt@\linewidth{\color at begingroup
@@ -13221,7 +13279,11 @@
\def\Etoc at addsuitablecontentsline{\addcontentsline {toc}{#1}{#2}}%
\renewcommand*\etocaftertitlehook{%
\ifmem at em@starred at listof
- \else\phantomsection\aftergroup\Etoc at addsuitablecontentsline\fi}}
+ \else
+ \phantomsection
+ \aftergroup\Etoc at addsuitablecontentsline
+ \fi}%
+}
\def\etocmemoirstyle{%
\etocsettocstyle
{\ensureonecol \par \begingroup \@nameuse {@tocmaketitle}
Modified: trunk/Master/texmf-dist/source/latex/etoc/etoc.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/etoc/etoc.ins 2017-10-23 22:21:26 UTC (rev 45585)
+++ trunk/Master/texmf-dist/source/latex/etoc/etoc.ins 2017-10-23 22:21:41 UTC (rev 45586)
@@ -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
Modified: trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty 2017-10-23 22:21:26 UTC (rev 45585)
+++ trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty 2017-10-23 22:21:41 UTC (rev 45586)
@@ -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 at etoccontentsline #1{%
\global\expandafter\let\expandafter\Etoc at level\csname Etoc@#1@@\endcsname
\Etoc at skipthisonefalse
- \ifnum\Etoc at level=\Etoc@@six@@\Etoc at skipthisonetrue
+ \ifnum\Etoc at level=\Etoc@@six@@
+ \Etoc at skipthisonetrue
\else
\ifEtoc at localtoc
- \ifEtoc at stoptoc\Etoc at skipthisonetrue
+ \ifEtoc at stoptoc
+ \Etoc at skipthisonetrue
\else
\ifEtoc at notactive\Etoc at setflags
\Etoc at skipthisonetrue
@@ -340,10 +342,11 @@
\Etoc at global\def\etocthelinkedname {#1}% (probably redefined later)
\Etoc at getthepage #2\etoc@ % defines \etocthelinkedpage
\Etoc at getnb #1\relax\relax\etoc@ % sets number, name, and \etocthelink
- \ifEtoc at number\else
- \ifnum\Etoc at level=\m at ne
- \Etoc at getit #1\hspace\relax\etoc@ % additional job for parts
- \fi
+ \ifEtoc at number
+ \else
+ \ifnum\Etoc at level=\m at ne
+ \Etoc at getit #1\hspace\relax\etoc@ % additional job for parts
+ \fi
\fi
\Etoc at global\expandafter\let\csname etoclink \endcsname\etocthelink
\Etoc at global\expandafter\let\csname etocname \endcsname\etocthelinkedname
@@ -352,9 +355,11 @@
}
\def\Etoc at getthepage #1{%
\let\Etoc at next\Etoc at getthepage@nohyp
- \ifEtoc at hyperref\ifx\hyper at linkstart#1%
+ \ifEtoc at hyperref
+ \ifx\hyper at linkstart#1%
\let\Etoc at next\Etoc at getthepage@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc at next #1%
}
\def\Etoc at getthepage@nohyp #1\etoc@ {%
@@ -370,16 +375,20 @@
}
\def\Etoc at getnb #1{%
\let\Etoc at next\Etoc at getnb@nohyp
- \ifEtoc at hyperref\ifx\hyper at linkstart#1%
+ \ifEtoc at hyperref
+ \ifx\hyper at linkstart#1%
\let\Etoc at next\Etoc at getnb@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc at next #1%
}
\def\Etoc at getit #1{%
\let\Etoc at next\Etoc at getit@nohyp
- \ifEtoc at hyperref\ifx\hyper at linkstart#1%
+ \ifEtoc at hyperref
+ \ifx\hyper at linkstart#1%
\let\Etoc at next\Etoc at getit@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc at next #1%
}
\begingroup\@tfor\x:=NUMBZRLINZ\do{\catcode\expandafter`\x=12 }\lccode`Z `e
@@ -502,7 +511,7 @@
{\typeout{No file \jobname.toc.}}}
\def\Etoc at openouttoc{%
\ifEtoc at hyperref
- \ifx\hyper at last\@undefined
+ \ifx\hyper at last\@undefined
\IfFileExists{\jobname .toc}
{\Hy at WarningNoLine
{old toc file detected, not used; run LaTeX again (cheers from etoc)}%
@@ -509,7 +518,7 @@
\global\Etoc at toctoks={}%
}
{}%
- \fi
+ \fi
\fi
\if at filesw
\newwrite \tf at toc
@@ -541,7 +550,7 @@
}
\def\etoc@@startlocaltoc#1#2{%
\ifEtoc at localtoc
- \ifnum #1=#2\relax
+ \ifnum #1=#2\relax
\ifEtoc at jj \global\let\Etoc at localtop\Etoc@@minusone@@ \fi
\ifEtoc at j \global\let\Etoc at localtop\Etoc@@zero@@ \fi
\ifEtoc@ \global\let\Etoc at localtop\Etoc@@one@@ \fi
@@ -559,7 +568,7 @@
\global\Etoc at false
\global\Etoc at jfalse
\global\Etoc at jjfalse
- \fi
+ \fi
\fi
}
\let\etoc at startlocaltoc\@gobble
@@ -629,7 +638,7 @@
\edef\Etoc at tocid{#1}%
\ifnum\Etoc at 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 at filesw\immediate\write\@mainaux{\noexpand\@tempswatrue}\fi
\global\Etoc at stoptoctrue % do only heading
\Etoc at tableofcontents
@@ -640,7 +649,7 @@
\ifEtoc at emptytoc
\ifEtoc at notactive
%\PackageWarning{etoc}{Unknown toc ID \number\Etoc at tocid. Run LaTeX again}%
- \setbox0\hbox{\ref{etoc-id \number\Etoc at tocid: run LaTeX again!}}%
+ \setbox0\hbox{\ref{Unknown toc ID \number\Etoc at tocid. Rerun LaTeX}}%
%\if at filesw\immediate\write\@mainaux{\noexpand\@tempswatrue}\fi
\global\Etoc at emptytocfalse % assume real one will be non-empty
\global\Etoc at stoptoctrue % and print only heading for this pass
@@ -674,9 +683,11 @@
\ifx\Etoc at nexttoken\ref\Etoc at dothis{\expandafter\Etoc at ref\@gobble}\fi
\ifEtoc at tocwithid\Etoc at dothis{\Etoc at localtableofcontents{\c at etoc@tocid}}\fi
\global\Etoc at emptytocfalse\ifEtoc at checksemptiness\Etoc at setemptytocbool\fi
- \ifEtoc at emptytoc\ifEtoc at notocifnotoc
- \expandafter\expandafter\expandafter\@gobble
- \fi\fi
+ \ifEtoc at emptytoc
+ \ifEtoc at notocifnotoc
+ \expandafter\expandafter\expandafter\@gobble
+ \fi
+ \fi
\Etoc at tableofcontents
\endgroup\ifEtoc at mustclosegroup\endgroup\fi
\Etoc at tocdepthreset % 1.07h, renamed 1.08h
@@ -718,8 +729,8 @@
\def\Etoc at tableofcontents
{%
\ifnum\c at tocdepth>\Etoc at minf
- \else\expandafter
- \Etoc at gobbletoetoc@
+ \else
+ \expandafter\Etoc at gobbletoetoc@
\fi
\Etoc at par
\etocbeforetitlehook % 1.07m
@@ -741,9 +752,12 @@
\etocaftercontentshook
#2\@nobreakfalse % 1.07d: \@nobreakfalse moved here
\Etoc at resettocdepth % 1.07g. moved here from before #2 by 1.08
- \ifx\Etoc at global\global\ifx\tof at finish\@empty\else
- \global\let\contentsline\Etoc at savedcontentsline
- \fi\fi
+ \ifx\Etoc at global\global
+ \ifx\tof at finish\@empty
+ \else
+ \global\let\contentsline\Etoc at savedcontentsline
+ \fi
+ \fi
\@gobble\etoc@
}% end of \Etoc at 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 at framed@titlebox=\hb at xt@\linewidth{\color at begingroup
\hss
- \ifx\etocbkgcolorcmd\Etoc at relax\else
+ \ifx\etocbkgcolorcmd\Etoc at 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 at 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 at relax\else
+ \ifx\etocbkgcolorcmd\Etoc at relax
+ \else
\kern\ht\etoc at framed@titlebox
\kern\dp\etoc at framed@titlebox
\hb at xt@\linewidth{\color at begingroup
@@ -1167,7 +1185,11 @@
\def\Etoc at addsuitablecontentsline{\addcontentsline {toc}{#1}{#2}}%
\renewcommand*\etocaftertitlehook{%
\ifmem at em@starred at listof
- \else\phantomsection\aftergroup\Etoc at addsuitablecontentsline\fi}}
+ \else
+ \phantomsection
+ \aftergroup\Etoc at addsuitablecontentsline
+ \fi}%
+}
\def\etocmemoirstyle{%
\etocsettocstyle
{\ensureonecol \par \begingroup \@nameuse {@tocmaketitle}
More information about the tex-live-commits
mailing list