texlive[50317] Master/texmf-dist: etoc (10mar19)

commits+karl at tug.org commits+karl at tug.org
Sun Mar 10 22:00:10 CET 2019


Revision: 50317
          http://tug.org/svn/texlive?view=revision&revision=50317
Author:   karl
Date:     2019-03-10 22:00:10 +0100 (Sun, 10 Mar 2019)
Log Message:
-----------
etoc (10mar19)

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	2019-03-10 20:59:57 UTC (rev 50316)
+++ trunk/Master/texmf-dist/doc/latex/etoc/README.md	2019-03-10 21:00:10 UTC (rev 50317)
@@ -1,12 +1,12 @@
 <!-- -->
 
-    Source:  etoc.dtx (v1.08p-2018/07/04)
+    Source:  etoc.dtx (v1.09-2019/03/09)
     Author:  Jean-Francois Burnol
     Author:  Christine Roemer et al. (German tranlation)
     Info:    Completely customisable TOCs
     License: LPPL 1.3c
-    Copyright (C) 2012-2018 Jean-Francois Burnol.
-    Copyright (C) 2014-2018 Christine Roemer and collaborators for
+    Copyright (C) 2012-2019 Jean-Francois Burnol.
+    Copyright (C) 2014-2019 Christine Roemer and collaborators for
     the translation into German of the documentation.
     <jfbu at free dot fr>    <Christine_Roemer at t-online dot de>
 
@@ -116,7 +116,17 @@
 RECENT CHANGES
 ==============
 
-v1.08p \[2018/04/07\]
+v1.09 \[2019/03/09\]
+--------------------
+
+New features: `\etoclocaltop`, `\localtableofcontentswithrelativedepth`.
+Thanks to Tony Roberts for feature request.
+
+Note to hackers: internal control sequence `\Etoc at localtop` is gone.
+
+etoc now requires e-TeX (`\numexpr`, `\unless`).
+
+v1.08p \[2018/07/04\]
 ---------------------
 
 Fixed bug surfacing in case of `linktoc=page` option of hyperref.

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	2019-03-10 20:59:57 UTC (rev 50316)
+++ trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx	2019-03-10 21:00:10 UTC (rev 50317)
@@ -2,29 +2,29 @@
 % 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: <04-07-2018 at 15:13:02 CEST>}%
+\def\etocdtxtimestamp {Time-stamp: <10-03-2019 at 09:35:44 CET>}%
 %</none>
 %<*!readme>
 %%
 %% Package: etoc
-%% Version: 1.08p-2018/07/04
+%% Version: 1.09-2019/03/09
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2018 Jean-Francois Burnol
+%% Copyright (C) 2012-2019 Jean-Francois Burnol
 %%                         <jfbu at free dot fr>
-%% Copyright (C) 2014-2018 Christine Roemer
+%% Copyright (C) 2014-2019 Christine Roemer
 %%                         <Christine_Roemer at t-online dot de>
 %% and collaborators for the translation into German of the documentation
 %%
 %</!readme>
 %<*insfile>
-\def\etocpkgdate        {2018/07/04}
-\def\etocdocdate        {2018/07/04}
-\def\etocpkgversion     {v1.08p}
+\def\etocpkgdate        {2019/03/09}
+\def\etocdocdate        {2019/03/09}
+\def\etocpkgversion     {v1.09}
 \def\etocpkgdescription {Completely customisable TOCs (JFB)}
 %</insfile>
 %<*none>
-\def\etocDEpkgdate      {04.07.2018}% METTRE À JOUR À CHAQUE BUMP!
-\def\etocDEdocdate      {04.07.2018}
+\def\etocDEpkgdate      {09.03.2019}% METTRE À JOUR À CHAQUE BUMP!
+\def\etocDEdocdate      {09.03.2019}
 \def\etocDEDEdocdate    {09.04.2015}%
 \def\etocDEDEpkgversion {v1.08d}%
 % Definition of \etocLicense
@@ -35,10 +35,10 @@
     \catcode32=13\catcode`\\=12^^Brelax^^A
 ^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A
 {% Package: etoc
-% Version: 1.08p-2018/07/04
+% Version: 1.09-2019/03/09
 % License: LPPL 1.3c
-% Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr>
-% Copyright (C) 2014-2018 Christine Roemer <Christine_Roemer at t-online dot de>
+% Copyright (C) 2012-2019 Jean-Francois Burnol <jfbu at free dot fr>
+% Copyright (C) 2014-2019 Christine Roemer <Christine_Roemer at t-online dot de>
 % and collaborators for the translation into German of the documentation
 %
 %     This Work may be distributed and/or modified under the
@@ -69,13 +69,13 @@
 %<*readme>
 <!-- -->
 
-    Source:  etoc.dtx (v1.08p-2018/07/04)
+    Source:  etoc.dtx (v1.09-2019/03/09)
     Author:  Jean-Francois Burnol
     Author:  Christine Roemer et al. (German tranlation)
     Info:    Completely customisable TOCs
     License: LPPL 1.3c
-    Copyright (C) 2012-2018 Jean-Francois Burnol.
-    Copyright (C) 2014-2018 Christine Roemer and collaborators for
+    Copyright (C) 2012-2019 Jean-Francois Burnol.
+    Copyright (C) 2014-2019 Christine Roemer and collaborators for
     the translation into German of the documentation.
     <jfbu at free dot fr>    <Christine_Roemer at t-online dot de>
 
@@ -185,7 +185,18 @@
 RECENT CHANGES
 ==============
 
-v1.08p \[2018/04/07\]
+v1.09 \[2019/03/09\]
+--------------------
+
+New features: `\etoclocaltop`, `\localtableofcontentswithrelativedepth`.
+Thanks to Tony Roberts for feature request.
+
+Note to hackers: internal control sequence `\Etoc at localtop` is gone.
+
+etoc now requires e-TeX (`\numexpr`, `\unless`).
+
+
+v1.08p \[2018/07/04\]
 ---------------------
 
 Fixed bug surfacing in case of `linktoc=page` option of hyperref.
@@ -193,6 +204,7 @@
 https://github.com/ho-tex/hyperref/issues/65,
 https://github.com/dbitouze/yathesis/issues/61).
 
+
 v1.08o \[2018/06/15\]
 ---------------------
 
@@ -200,11 +212,13 @@
 and document uses hyperref. Caused by a typo in a macro name at
 previous release.
 
+
 v1.08n \[2018/02/23\]
 ---------------------
 
 Refactoring of core macros detecting `\numberline` and its variants.
 
+
 v1.08m \[2018/02/07\]
 ---------------------
 
@@ -828,12 +842,13 @@
 \etocsetlevel{visibletoc}{6}
 %--------
 % add-ons for the `fancy TOC' (2013/01/25)
-    \newcounter{dummypart}
-    \newcounter{dummychapter}
-    \newcounter{dummysection}
-    \etocsetlevel{dummypart}{6}
-    \etocsetlevel{dummychapter}{6}
-    \etocsetlevel{dummysection}{6}
+% supprimé 2019/03/09
+    % \newcounter{dummypart}
+    % \newcounter{dummychapter}
+    % \newcounter{dummysection}
+    % \etocsetlevel{dummypart}{6}
+    % \etocsetlevel{dummychapter}{6}
+    % \etocsetlevel{dummysection}{6}
 %--------
 % for "Another compatibility mode"  (2013/02/21):
 % attention au 5 qui est hard-coded 
@@ -999,33 +1014,36 @@
     \ifnum\tikztreelevel=1
 %        \pgftransformrotate{55+((\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild)}%
 % -90 Dimanche 25 septembre 2016 à 17:18:50. Non finalement zero. Non -36
+% ****
+% Bon finalement 1.09 n'utilise plus cette customgrowth
+% ****
         \pgftransformrotate{-36+((\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild)}%
         \pgftransformxshift{\the\tikzleveldistance}%
     \fi
     \ifnum\tikztreelevel=2
-% modif Mercredi 27 septembre 2017 à 17:16:44
         \pgfmathsetmacro\tikzoffsetofcurrentchild{(\tikzsiblingdistance)*(6+\tikznumberofcurrentgrandchild)}%
-        \ifdim\tikzoffsetofcurrentchild pt<\tikzlevelheight pt
+        \ifdim\tikzoffsetofcurrentchild pt<\tikzlevelheight
             \pgftransformxshift{\tikzlevelwidth/2}
             \pgftransformyshift{-\tikzlevelheight/2+\tikzoffsetofcurrentchild}
         \else
         \pgfmathsetmacro\tikzoffsetofcurrentchild{\tikzoffsetofcurrentchild-\tikzlevelheight}%
-        \ifdim\tikzoffsetofcurrentchild pt<\tikzlevelwidth pt
+        \ifdim\tikzoffsetofcurrentchild pt<\tikzlevelwidth
             \pgftransformxshift{\tikzlevelwidth/2-\tikzoffsetofcurrentchild}
             \pgftransformyshift{\tikzlevelheight/2}
         \else
         \pgfmathsetmacro\tikzoffsetofcurrentchild{\tikzoffsetofcurrentchild-\tikzlevelwidth}%
-        \ifdim\tikzoffsetofcurrentchild pt<\tikzlevelheight pt
+        \ifdim\tikzoffsetofcurrentchild pt<\tikzlevelheight
             \pgftransformxshift{-\tikzlevelwidth/2}
             \pgftransformyshift{\tikzlevelheight/2-\tikzoffsetofcurrentchild}
         \else
         \pgfmathsetmacro\tikzoffsetofcurrentchild{\tikzoffsetofcurrentchild-\tikzlevelheight}%
-        \ifdim\tikzoffsetofcurrentchild pt<\tikzlevelwidth pt
+        \ifdim\tikzoffsetofcurrentchild pt<\tikzlevelwidth
+
             \pgftransformxshift{-\tikzlevelwidth/2+\tikzoffsetofcurrentchild}
             \pgftransformyshift{-\tikzlevelheight/2}
         \else
         \pgfmathsetmacro\tikzoffsetofcurrentchild{\tikzoffsetofcurrentchild-\tikzlevelwidth}%
-        %\ifdim\tikzoffsetofcurrentchild pt<\tikzlevelheight pt
+        %\ifdim\tikzoffsetofcurrentchild pt<\tikzlevelheight
             \pgftransformxshift{\tikzlevelwidth/2}
             \pgftransformyshift{-\tikzlevelheight/2+\tikzoffsetofcurrentchild}
         %\fi
@@ -1034,18 +1052,18 @@
     \fi
 }
 
-% version circulaire utilisée avec les version 1.08a--1.08f du manuel.
-% \def\tikzmycustomgrowth {%
-%   \pgftransformreset
-%   \ifnum\tikztreelevel=1
-%     \pgftransformrotate {(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1)}%
-%   \fi
-%   \ifnum\tikztreelevel=2
-%     \pgftransformrotate {(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentgrandchild-4)}%
-%     \global\advance\tikznumberofcurrentgrandchild by 1
-%  \fi
-%  \pgftransformxshift {\the\tikzleveldistance}%
-% }
+%version circulaire utilisée avec les version 1.08a--1.08f du manuel.
+\def\tikzmycustomgrowth {%
+  \pgftransformreset
+  \ifnum\tikztreelevel=1
+    \pgftransformrotate {126+(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1)}%
+  \fi
+  \ifnum\tikztreelevel=2
+    \pgftransformrotate {(\pgfkeysvalueof{/tikz/sibling angle})*(2+\tikznumberofcurrentgrandchild)}%
+    \global\advance\tikznumberofcurrentgrandchild by 1
+ \fi
+ \pgftransformxshift {\the\tikzleveldistance}%
+}
 
 \newcounter{partco}
 % 1,2,3,4,5,... -> 1,2,3,1,2,3,1,2,3
@@ -1072,12 +1090,21 @@
 
 \newcommand\toc{\csa{table\-of\-con\-tents}\xspace}
 \newcommand\localtoc{\csa{local\-table\-of\-con\-tents}\xspace}
+\newcommand\localtocwrdp
+          {\csa{local\-table\-of\-con\-tents\-with\-rel\-a\-tive\-depth}\xspace}
 
 \newcommand\lowast{\raisebox{-.25\height}{*}}
 \newcommand\starit[1]{\csa{#1\lowast}}
 \newcommand\staritb[1]{\csb{#1}\lowast}
 
+\hyphenation{
+table-of-con-tents
+local-table-of-con-tents
+local-table-of-con-tents-with-rel-a-tive-depth
+}
+
 \hyphenation{toc-depth sec-num-depth con-tents-line}
+
 \hyphenation{etoc-stan-dard-lines
 etoc-de-fault-lines
 etoc-toc-lines
@@ -1133,7 +1160,8 @@
 etoc-af-ter-con-tents-hook
 etoc-af-ter-toc-hook
 etoc-skip-first-pre-fix
-etoc-only-on-first}
+etoc-only-on-first
+}
 
 \hyphenation{ 
 etoc-font-mi-nus-two 
@@ -1279,14 +1307,14 @@
 
 \etocsettagdepth {preamble}{part}
 \etocsettagdepth {overview}{part}
-\etocsettagdepth {arbitrarily}{all}
-\etocsettagdepth {examples}{all}
-\etocsettagdepth {surprising}{all}
+\etocsettagdepth {arbitrarily}{part}
+\etocsettagdepth {examples}{part}
+\etocsettagdepth {surprising}{part}
 \etocsettagdepth {linestyles}{part}
 \etocsettagdepth {globalcmds}{part}
 \etocsettagdepth {custom}{part}
-\etocsettagdepth {tips}{all}
-\etocsettagdepth {etocandworld}{all}
+\etocsettagdepth {tips}{part}% pour faire de la place pour 1.09
+\etocsettagdepth {etocandworld}{part}
 \etocsettagdepth {code}{all}
 
 \etocinline\tableofcontents\label{toc:mindmaptitlepage}
@@ -1294,6 +1322,7 @@
 % \immediate\openout\TOCasTree=\jobname.toctree
 % \immediate\write\TOCasTree{\the\treetok}%
 
+
 \tikzset {branch color/.style={concept color=#1!white,
              every child/.append style={concept color=#1!white!30!white}},
 % ajout pour version de 1.08g
@@ -1302,34 +1331,37 @@
          }%
 
 \global
-\setbox\TitlePageMindmapTOC\hbox {\begingroup
-\resizebox!{\dimexpr\paperheight-1cm\relax}{%
+\setbox\TitlePageMindmapTOC\hbox {%
+%\begingroup
+\resizebox{\dimexpr\paperwidth-1cm\relax}!{%
 \begin{tikzpicture}[mindmap,
                     text width=2cm,
                     align = flush center,
+% pour 1.09 je reviens à version circulaire simplifiée
                     growth function=\tikzmycustomgrowth,
                     nodes={concept},
                     concept color=orange!60,
                     root concept/.append style={font=\huge, text width = 6cm},
-                    % level 1/.append style={level distance=7cm, sibling
-                    % angle=360/9},% 9 hard-coded mais je pourrais aussi le
-                    % calculer
-% je passe de 6 à 7cm pour doc du 2015/12/11, mais je dois aussi écarter un
-% peu level2
                     level 1/.append style={level distance=7cm, sibling
-                      angle=360/10},% passage de 9 à 10 pour 1.08h, je pourrais aussi le calculer
-                    level 1 concept/.append style={font=\Large, text width =
-                      3cm},
+                       angle=360/10},% passage de 9 à 10 pour 1.08h, je pourrais aussi le calculer
+%                    level 1 concept/.append style={font=\Large, text width =
+%                      3cm},
 % ancienne version circulaire
 % level 2/.append style={level distance=12.5cm, sibling angle=360/39},% 
 % % distance par rapport au CENTRE ! (avec le code tel qu'en ce moment)
 % 39 hard coded mais je pourrais aussi le calculer
 % pour version rectangulaire, par tâtonnements:
-        level 2/.append style={level width=21cm,level height=30cm, sibling
-          distance=3cm},% modif Mercredi 27 septembre 2017 à 17:17:20
+        % level 2/.append style={level width=21cm,
+        %                        level height=30cm,
+        %   sibling distance=1cm},%
+        level 2/.append style={level distance=10cm, sibling angle=30},%
+        level 2 concept/.append style={text width=2cm},
                    ]
 \the\treetok
-\end{tikzpicture}}\endgroup }
+\end{tikzpicture}%
+}%
+%\endgroup 
+}
 \endgroup
 
 \noindent\null
@@ -1882,6 +1914,7 @@
   \csb{etocinline}\par
   \csb{etoclink}\par
   \csb{etoclocalframed}\par
+  \csb{etoclocaltop}\par
   \csb{etoclocalmulticol}\par
   \csb{etoclocalruled}\par
   \csb{etocmulticolstyle}\par
@@ -1913,6 +1946,7 @@
   \csb{etoctoccontentsline}\par
   \csb{etoctoclines}\par
   \csb{localtableofcontents}\par
+  \csb{localtableofcontentswithrelativedepth}\par
   \csb{tableofcontents}\par
 %\vspace{5\baselineskip}\hrule height 0pt
 \end{multicols}
@@ -1932,18 +1966,57 @@
 \etocstandardlines
 \localtableofcontents
 
-\section{Labeling and reusing elsewhere}
+\section{The \toc, \localtoc and \localtocwrdp commands}
 \label{tableofcontents}
 \label{localtableofcontents}
+\label{localtableofcontentswithrelativedepth}
 
-\etoc allows arbitrarily many \csa{tableofcontents} commands in
-your document. The line styles and the toc display style may of
-course be changed in-between. Furthermore 
-\csa{localtableofcontents} will print local tables of
+\begin{description}
+\item[\toc] can be used arbitrarily many times in the document. Styling either
+  globally the TOC or its individual entries is customizable at any time in the document.
+\item[\localtoc] will print local tables of
 contents: \emph{i.e.} all sections and sub-units inside a
 given chapter, or all subsubsections and lower inside a given
-subsection, etc . . .
+subsection, etc... (see also \csb{etocsetnexttocdepth}).%
+%
+\footnote{As is explained in \autoref{sec:labeling} the syntax allows to
+  create somewhere a local table of contents and to display it at some other
+  location either before or after its origin.}%
+\textsuperscript{,}%
+\footnote{As is explained in \autoref{sec:tocdepth} \etoc allows at anytime to
+  locally redefine the numeric levels associated to named ones, which brings
+  great flexibility to achieve special effects, all done using only a single
+  auxiliary file, the standard |.toc| file.}
+%
+\item[\localtocwrdp\marg{number}] can be used to override the document or
+  current tocdepth setting (see \autoref{sec:tocdepth} for a discussion of
+  tocdepth) to become relative to where the local TOC originates. For example,
+  assuming the default numeric level assignments to standard sectioning units
+\begin{verbatim}
+\section{This is a section}
+\localtableofcontentswithrelativedepth{+2}
+\end{verbatim}
+  will create a local table of contents taking into account the subsections
+  and subsubsections inside this section, independently of what is the value
+  of the |tocdepth| counter at this position in the document. If the numeric
+  argument had been |3|, the local TOC would have displayed also paragraphs.
+  If the section had been a chapter, and again for a relative tocdepth of |2|,
+  the taken into account levels would have been sections and subsections.%
+%
+\footnote{The situation may be more complex, as the |.toc| file itself may
+  well contain \texttt{\string\setcounter\{tocdepth\}\{...\}} commands. This
+  is not recommended pratice with \etoc. See the discussion of
+  \csb{etocsettocdepth.toc} and \csb{etocdepthtag.toc} for more on this.}
+\end{description}
 
+The macro \localtocwrdp is \textbf{new with |1.09|}.%
+%
+\footnote{Thanks to Tony \textsc{Roberts} for feature request.}
+%
+
+\section{Labeling and reusing elsewhere}
+\label{sec:labeling}
+
 \etoc allows the labeling of a TOC with (for example)
 \csa{label\{toc:A\}} and will redisplay it elsewhere when
 told \csa{tableofcontents}\csa{ref\{toc:A\}}. The actual
@@ -1978,6 +2051,7 @@
 
 \section{A powerful functionality of \etoc: the
   re-assignment of levels with \csbhyp{etocsetlevel}}
+\label{sec:tocdepth}
 
 The intrinsic levels manipulated by \etoc are numeric: from
 |-2| (which corresponds to |book| in the |memoir| class)
@@ -2064,15 +2138,25 @@
   where needed, \csb{etocsetnexttocdepth} before |\tableofcontents| or
   |\localtableofcontents|.
 
-% pas traduit
-  \csa{etocsetnexttocdepth} used to modify the |tocdepth| counter immediately.
-  In case two or more such commands were issued in a row with no TOC being
-  typeset, this could break the correct restoring of the |tocdepth| counter
-  after the TOC. Starting with |1.08h|, the |tocdepth| counter is modified
-  only at the time the TOC is typeset, not earlier, thus fixing that
-  issue.\footnote{Thanks to Denis \textsc{Bitouzé} for signaling the problem.}
-%
+\begin{framed}
+  It is possible to use \csb{etocsettocdepth} inside the first argument of
+  \csb{etocsettocstyle} (possibly in conjunction with checking the
+  \csb{etoclocaltop} value, \emph{which however will be up-to-date there only if
+  \csb{etocchecksemptiness} was executed}). There is no worry then about
+  possible impact on hyperref bookmarks later on, because \etoc always resets
+  the |tocdepth| counter after typesetting a TOC to the value it had before
+  it.
 
+  Since |1.09| the macro \csb{etocsetnexttocdepth} works also if located in
+  first argument of \csb{etocsettocstyle}, but there is no reason to use it
+  there as \csb{etocsettocdepth} has no durable effet on the |tocdepth|
+  counter if executed there.
+
+  Check \csb{localtableofcontentswithrelativedepth} for a simpler way to
+  control the depth of local tables of contents. This has the advantage of
+  working reliably whether or not the \csb{etocchecksemptiness} is used.
+\end{framed}
+
 \subsection{The hyperref option \emph{bookmarksdepth}}
 \label{ssec:bookmarksdepth}
 
@@ -2264,7 +2348,6 @@
 heading (and no contents naturally). The second \LaTeX{} run will then
 correctly decide which local TOC is empty or not.
 
-
 \subsection{The \csbhyp{etocnotocifnotoc} command}
 \label{etocnotocifnotoc}
 
@@ -2295,6 +2378,58 @@
 of contents to be empty (for that run) and thus printed nothing (not even a
 |\par|).
 
+% pas traduit
+\section{The \csbhyp{etoclocaltop} command}
+\label{etoclocaltop}
+
+\textbf{New with 1.09 (2019/03/09)}.
+
+Within either the TOC style
+(\csb{etocsettocstyle}) or the local title styles (\csb{etocsetstyle}), the
+control sequence \csb{etoclocaltop} is made equivalent for the duration of
+\csb{localtableofcontents} to a numeric (self-delimiting) denotation of the
+current top level.
+
+Thus: it will in numeric contexts (|\ifnum|, |\ifcase|, ...) represent zero
+for a local TOC corresponding to chapter, or one if in a section, or two if in
+a subsection, etc..., assuming of course here that the default levels are
+obeyed (see \autoref{sec:tocdepth}).
+
+\begin{framed}
+  \csb{etoclocaltop} from inside the TOC heading (first argument of
+  \csb{etocsettocstyle}) has the correct value \emph{only under
+    \csb{etocchecksemptiness} regime}. Special circumstances correspond to
+  some special values:
+  \begin{description}[nolistsep]
+  \item[|-3|] (|-\thr@@|)\newline
+    signals that \etoc considers the local TOC to be
+    ``unknown''; this happens at the last local TOC, for the first \LaTeX\ run
+    after adding a new \localtoc to the document. In doubt, \etoc assumes the
+    TOC will prove non empty, hence it prints (independently of whether the
+    check for emptiness was activated or not) the heading as specified by
+    \csb{etocsettocstyle}. Thus, check if \csb{etoclocaltop} gives |-3| as a
+    a \meta{number} to detect that situation from within the first argument of
+    \csb{etocsettocstyle}, if desired.
+  \item[|-1000|](|-\@m|)\newline  is in case of a \localtoc
+    being considered ``known'' (although it may still refer to the data in the
+    |.toc| file from the previous run) but without the check for emptiness
+    having been executed.
+  \item[|-10000|](|-\@M|)\newline  is the value when accessed from the title
+    of a global TOCs.
+  \end{description}
+\end{framed}
+\begin{framed}
+  When executed from within a local table of contents \textbf{line styles}
+  (\csb{etocsetstyle}), \csb{etoclocaltop} always will hold the correct value,
+  whether or not the emptiness check was executed.
+
+  For a global table of contents however, it will always keep the value |-3|.
+\end{framed}
+
+Attention! \cs{etoclocaltop} is only to be queried; modifying it is strictly
+forbidden and falls under the most rigorous prosecution allowed by federal
+law.
+
 \section{Adding commands to the \texorpdfstring{\texttt{.toc}}{.toc} file}
 \label{sec:addingtotoc}
 
@@ -3177,285 +3312,6 @@
 \end{filecontentshere}
 \attachfile{etocsnippet-\the\value{section}.tex}
 
-\section{A TOC with a fancy layout}
-
-Here is  a table of contents where
-the sections from a given chapter are to be represented by a number
-range (like 18--22 for a given chapter, 42--49 for another one ...
-of course to be inserted automatically in the TOC). 
-
-This is not an image inclusion, the TOC is produced from its original
-|tex| source inserted in this document after replacement of 
-|part|, |chapter| or |section| with |dummypart|, |dummychapter| and
-|dummysection| (and there is also a dummy page count).  We
-copied the line styles used in the original and
-displayed the table of contents following:
-\begin{verbatim}
-    \etocsetlevel{dummypart}  {-1} \etocsetlevel{part}   {2}
-    \etocsetlevel{dummychapter}{0} \etocsetlevel{chapter}{2}
-    \etocsetlevel{dummysection}{1} \etocsetlevel{section}{2}
-                    \etocsetnexttocdepth{dummysection}
-\end{verbatim}
-Each chapter displays the numbers of only the first and the last sections it
-  contains. See the
-source file |etoc.dtx| for the details of how this is done. 
-
-Another technique for doing this kind of things is explained in 
-  \autoref{ssec:statistics}.  
-
-\begingroup
-
-    \etocsetlevel{dummypart}{-1}
-    \etocsetlevel{dummychapter}{0}
-    \etocsetlevel{dummysection}{1}
-    \etocsetlevel{part}{2}
-    \etocsetlevel{chapter}{2}
-    \etocsetlevel{section}{2}
-
-    \newif\ifextraidone
-    \newif\ifextraiidone
-
-    \etocsetstyle{dummypart}
-    {}
-    {}
-    {\begin{center}\Large\bfseries PART \etocnumber
-    \ifextraiidone\\\etocname.\fi\end{center}
-    \ifextraidone\else
-    \noindent\hskip.7\linewidth
-        \hbox to .2\linewidth
-% février (ou janvier?) 2013
-% je modifie ici en ajoutant un \hss, pour compenser la plus petite
-% taille de txrm. Ok.
-        {\hss\small\textsc{\bfseries Sections.\hss Page.}}\par\fi
-    \extraidonetrue
-    }
-    {}
-
-    \newcommand\mytocleaders{\hbox to .125\linewidth{...\hss}}
-    \etocsetstyle{dummychapter}
-    {}
-    {\par\noindent\etocifnumbered
-        {\makebox[.15\linewidth][r]{\bfseries\etocnumber.}}
-        {\hspace*{.15\linewidth}}}
-    {\hbox to .65\linewidth
-        {\hspace{1em}\etocname\leaders\mytocleaders\hss}%
-     \hskip-.1\linewidth
-     \hbox to .2\linewidth{\hspace{1.5em}...\hss
-                    \etocifnumbered
-                        {\etocpage}
-                        {\ifextraiidone\else\etocpage\fi}}%
-     \hskip-.2\linewidth
-    }
-    {}
-
-    \newbox\forsectionnumbers
-    \makeatletter
-% 21 février 2013: je rajoute \color at begingroup et \color at endgroup
-    \etocsetstyle{dummysection}
-    {\setbox\forsectionnumbers=\hbox to .1\linewidth
-        \bgroup\color at begingroup\hss\etocskipfirstprefix}
-    {\@gobble}
-    {\etocnumber---}
-    {\etocnumber\color at endgroup\egroup
-    % for reasons I do not quite understand, in some pdf viewers the dots
-    % do not completely disappear if here \fboxsep0pt is used.
-    % (problèmes liés à l'anti-aliasing, sur Mac OS X, Skim, Preview...)
-    % (j'ai maintenu ici la méthode de mon post sur stackexchange, mais
-    %  sans doute je pourrais réfléchir à une autre façon évitant d'avoir à
-    %  « effacer ») 
-        \fboxsep=.5pt\colorbox{white}{\box\forsectionnumbers}\par
-        \ifextraiidone\else
-            \begin{center}\bfseries Concord.\end{center}
-            \noindent\makebox[.15\linewidth][r]{\textsc{\bfseries Lesson.}}\par
-        \fi\extraiidonetrue
-    }
-    \makeatother
-
-    \renewcommand{\etocinnertopsep}{0pt}
-
-    \etocruledstyle[1]{%
-        \parbox{\linewidth}{%
-            \centering
-            \textsc{\bfseries\LARGE\MakeUppercase{Table of Contents}}\\
-            \rule{.2\linewidth}{2pt}}%
-    }
-        
-    \etocsetnexttocdepth{dummysection}
-
-    \tableofcontents
-   
-\makeatletter
-    \def\adddummysection {\stepcounter{dummysection}%
-      \addtocontents {toc}{\protect\contentsline 
-          {dummysection}{\protect\numberline{\thedummysection}}%
-                   {\the\dummypage }%
-     %\ifEtoc at hyperref ou \ifdefined\hyperref si e-TeX
-     {\@currentHref }%
-     %\fi
-     }}
- 
-    \def\adddummychapter #1{\stepcounter{dummychapter}%
-      \advance\dummypage2
-      \addtocontents {toc}{\protect\contentsline 
-          {dummychapter}{\protect\numberline{\thedummychapter}#1}%
-                   {\the\dummypage }%
-     %\ifEtoc at hyperref ou \ifdefined\hyperref si e-TeX
-     {\@currentHref }%
-     %\fi
-     }}
-
-
-    \def\adddummychapno #1{\advance\dummypage2
-      \addtocontents {toc}{\protect\contentsline 
-          {dummychapter}{#1}{\the\dummypage }%
-     %\ifEtoc at hyperref ou \ifdefined\hyperref si e-TeX
-     {\@currentHref }%
-     %\fi
-     }}
-
-    \def\adddummypart #1{\stepcounter{dummypart}%
-       \advance\dummypage4
-       \addtocontents {toc}{\protect\contentsline 
-          {dummypart}{\protect\numberline{\Roman{dummypart}}#1}%
-                     {\the\dummypage }%
-     %\ifEtoc at hyperref ou \ifdefined\hyperref si e-TeX
-     {\@currentHref }%
-     %\fi
-     }}
-\makeatother
-    
-    \newcount\dummypage \dummypage-1
-
-    \adddummypart {}
-    
-    \adddummychapno {Introductory}
-
-    \newcount\tempcount
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<8
-    \repeat
-
-    \adddummychapter {Concord of Subject and Verb}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<17
-    \repeat
-
-    \adddummychapter {Concord of Substantive and Adjective}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<22
-    \repeat
-
-    \adddummychapno {Concord of Relative and its Antecedent}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<25
-    \repeat
-
-    \adddummypart {Government}
-
-    \adddummychapter {The Accusative Case}
-
-    \adddummychapno {General uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<30
-    \repeat
-
-    \adddummychapno {Particular uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<37
-    \repeat
-
-    \adddummychapter {Verbs governing two Accusatives}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<41
-    \repeat
-
-    \adddummychapter {The Causal}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<49
-    \repeat
-
-    \adddummychapter {The Instrumental Case}
-
-    \adddummychapno {General uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<54
-    \repeat
-
-    \adddummychapno {Particular uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<59
-    \repeat
-
-    \adddummychapter {The Dative Case}
-
-    \adddummychapno {General uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<65
-    \repeat
-
-    \adddummychapno {Particular uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<71
-    \repeat
-
-    \adddummychapter {The Ablative Case}
-
-    \adddummychapno {General uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<75
-    \repeat
-
-    \adddummychapno {Particular uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<86
-    \repeat
-
-    \adddummychapter {The Locative Case}
-
-    \adddummychapno {General uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<92
-    \repeat
-
-    \adddummychapno {Particular uses}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<100
-    \repeat
-\endgroup
-
-
 \section{The TOC as a tree}\label{tocastree}
 
 Using |tikz|\footnote{\url{http://ctan.org/pkg/pgf}} and the package
@@ -4688,6 +4544,29 @@
 and switch to one-column style, and the \meta{after\_toc} part
 would then reenact the two-column mode.
 
+\textbf{\TeX\ hacker note:} We have seen in the previous chapter some examples
+of using |\begin{enumerate}| and |\end{enumerate}| within TOC line styles.
+There is a real difficulty with doing however something like this:
+\begin{verbatim}
+\etocsettocstyle{\begin{enumerate}}{\end{enumerate}}
+\etocsetstyle{section}{}{\item \sectionname}{}{}
+\end{verbatim}
+Indeed for example on first compilation of a document, the |.toc| file is
+empty and there will be the typical ``Something's wrong--perhaps a missing
+\string\item''. Using \csb{etocchecksemptiness} does not help, because as is
+explained there, on first encountering a new TOC added at end of a document,
+\etoc considers it non-empty, hence querying \csb{etocifwasempty} serves
+nothing. No, one must do something like this:
+\begin{verbatim}
+\makeatletter
+\etocsettocstyle
+  {\begin{enumerate}}
+  {\if at newlist\item Please run \LaTeX\ again\fi
+   \end{enumerate}}
+\makeatother
+\etocsetstyle{section}{}{\item \sectionname}{}{}
+\end{verbatim}
+
 The commands to be described next \csb{etocmulticolstyle},
 \csb{etocruledstyle}, and \csb{etocframedstyle} all call
 \csa{etocsettocstyle} as a lower-level routine, to start a 
@@ -6110,14 +5989,14 @@
 
 \etocsettagdepth {preamble}{part}
 \etocsettagdepth {overview}{part}
-\etocsettagdepth {arbitrarily}{all}
-\etocsettagdepth {examples}{all}
-\etocsettagdepth {surprising}{all}
+\etocsettagdepth {arbitrarily}{part}
+\etocsettagdepth {examples}{part}
+\etocsettagdepth {surprising}{part}
 \etocsettagdepth {linestyles}{part}
 \etocsettagdepth {globalcmds}{part}
 \etocsettagdepth {custom}{part}
-\etocsettagdepth {tips}{all}
-\etocsettagdepth {etocandworld}{all}
+\etocsettagdepth {tips}{part}
+\etocsettagdepth {etocandworld}{part}
 \etocsettagdepth {code}{all}
 
 \etocinline\tableofcontents\label{toc:mindmaptitlepage}
@@ -6130,8 +6009,9 @@
          }%
 
 \global
-\setbox\TitlePageMindmapTOC\hbox {\begingroup
-\resizebox!{\dimexpr\paperheight-1cm\relax}{%
+\setbox\TitlePageMindmapTOC\hbox {%
+%\begingroup
+\resizebox{\dimexpr\paperwidth-1cm\relax}!{%
 \begin{tikzpicture}[mindmap,
                     text width=2cm,
                     align = flush center,
@@ -6139,15 +6019,16 @@
                     nodes={concept},
                     concept color=orange!60,
                     root concept/.append style={font=\huge, text width = 6cm},
-% geändert 2015/11/12 6cm->7cm
-  level 1/.append style={level distance=7cm, sibling angle=360/10},
-  level 1 concept/.append style={font=\Large, text width = 3cm},
-% geändert 2015/11/12 20cm->21cm
-  level 2/.append style={level width=21cm,level height=30cm, sibling
-          distance=3cm},%
+                    level 1/.append style={level distance=7cm, sibling
+                       angle=360/10},% passage de 9 à 10 pour 1.08h, je pourrais aussi le calculer
+        level 2/.append style={level distance=10cm, sibling angle=30},%
+        level 2 concept/.append style={text width=2cm},
                    ]
 \the\treetok
-\end{tikzpicture}}\endgroup }
+\end{tikzpicture}%
+}%
+%\endgroup 
+}
 \endgroup
 
 \noindent\null
@@ -6703,6 +6584,7 @@
   \csb{etocignoretoctocdepth}\par
   \csb{etocinline}\par
   \csb{etoclink}\par
+  \csb{etoclocaltop}\par
   \csb{etoclocalframed}\par
   \csb{etoclocalmulticol}\par
   \csb{etoclocalruled}\par
@@ -6735,6 +6617,7 @@
   \csb{etoctoccontentsline}\par
   \csb{etoctoclines}\par
   \csb{localtableofcontents}\par
+  \csb{localtableofcontentswithrelativedepth}\par
   \csb{tableofcontents}\par
 %\vspace{5\baselineskip}\hrule height 0pt
 \end{multicols}
@@ -6754,18 +6637,60 @@
 \etocstandardlines
 \localtableofcontents
 
-\section{Beschriften und anderswo wieder benutzen}
+\section{Die \toc-, \localtoc- und \localtocwrdp"=Befehle}
 \label{tableofcontents}
 \label{localtableofcontents}
+\label{localtableofcontentswithrelativedepth}
 
-\etoc  erlaubt beliebig viele \csa{tableofcontents}"=Befehle in
+\begin{description}
+\item[\toc] \etoc erlaubt beliebig viele \csa{tableofcontents}"=Befehle in
 ihrem Dokument. Die Zeilen- und Inhaltsangabenstile können
-natürlich dazwischen geändert werden. Außerdem setzt 
+natürlich dazwischen geändert werden.
+\item[\localtoc] Außerdem setzt 
 \csa{localtableofcontents} lokale Inhaltsangaben: \emph{z.\,B.} alle 
 Abschnitte und Unterabschnitte innerhalb eines bestimmten 
 Kapitels oder alle Unterabschnitte und tiefer innerhalb eines gegebenen 
-Unterabschnitt usw. 
+Unterabschnitt usw.%
+\begin{otherlanguage}{english}
+\footnote{As is explained in \autoref{sec:labeling} the syntax allows to
+  create somewhere a local table of contents and to display it at some other
+  location either before or after its origin.}%
+%
+\footnote{As is explained in \autoref{sec:tocdepth} \etoc allows at anytime to
+  locally redefine the numeric levels associated to named ones, which brings
+  great flexibility to achieve special effects, all done using only a single
+  auxiliary file, the standard |.toc| file.}
+%
+\item[\localtocwrdp\marg{number}] can be used to override the document or
+  current tocdepth setting (see \autoref{sec:tocdepth} for a discussion of
+  tocdepth) to become relative to where the local TOC originates. For example,
+  assuming the default numeric level assignments to standard sectioning units
+\begin{verbatim}
+\section{This is a section}
+\localtableofcontentswithrelativedepth{+2}
+\end{verbatim}
+  will create a local table of contents taking into account the subsections
+  and subsubsections inside this section, independently of what is the value
+  of the |tocdepth| counter at this position in the document. If the numeric
+  argument had been |3|, the local TOC would have displayed also paragraphs.
+  If the section had been a chapter, and again for a relative tocdepth of |2|,
+  the taken into account levels would have been sections and subsections.%
+%
+\footnote{The situation may be more complex, as the |.toc| file itself may
+  well contain \texttt{\string\setcounter\{tocdepth\}\{...\}} commands. This
+  is not recommended pratice with \etoc. See the discussion of
+  \csb{etocsettocdepth.toc} and \csb{etocdepthtag.toc} for more on this.}
+\end{otherlanguage}
+\end{description}
 
+The macro \localtocwrdp is \textbf{new with |1.09|}.%
+%
+\footnote{Thanks to Tony \textsc{Roberts} for feature request.}
+%
+
+\section{Beschriften und anderswo wieder benutzen}
+\label{sec:labeling}
+
 \etoc erlaubt das Labeln von Inhaltsangaben, beispielsweise mit
 \csa{label\{toc:A\}}, und wird es woanders
 \csa{tableofcontents}\csa{ref\{toc:A\}}, wenn gewollt, wieder anzeigen. Das
@@ -6799,6 +6724,7 @@
 
 \section{Eine mächtige Funktionsweise von \etoc: Die Wieder\-zuweisung von 
 Levels mit von \csbhyp{etocsetlevel}}
+\label{sec:tocdepth}
 
 Die intrinsischen Level, die durch \etoc manipuliert wurden, sind numerisch: von
 |-2| (welches |book| aus der |memoir|-Klasse entspricht) bis hinab zu |5|
@@ -6885,12 +6811,25 @@
 
 %
 \begin{otherlanguage}{english}
-  \csa{etocsetnexttocdepth} used to modify the |tocdepth| counter immediately.
-  In case two or more such commands were issued in a row with no TOC being
-  typeset, this could break the correct restoring of the |tocdepth| counter
-  after the TOC. Starting with |1.08h|, the |tocdepth| counter is modified
-  only at the time the TOC is typeset, not earlier, thus fixing that
-  issue.\footnote{Thanks to Denis \textsc{Bitouzé} for signaling the problem.}
+
+\begin{framed}
+  It is possible to use \csb{etocsettocdepth} inside the first argument of
+  \csb{etocsettocstyle} (possibly in conjunction with checking the
+  \csb{etoclocaltop} value, \emph{which however will be up-to-date there only if
+  \csb{etocchecksemptiness} was executed}). There is no worry then about
+  possible impact on hyperref bookmarks later on, because \etoc always resets
+  the |tocdepth| counter after typesetting a TOC to the value it had before
+  it.
+
+  Since |1.09| the macro \csb{etocsetnexttocdepth} works also if located in
+  first argument of \csb{etocsettocstyle}, but there is no reason to use it
+  there as \csb{etocsettocdepth} has no durable effet on the |tocdepth|
+  counter if executed there.
+
+  Check \csb{localtableofcontentswithrelativedepth} for a simpler way to
+  control the depth of local tables of contents. This has the advantage of
+  working reliably whether or not the \csb{etocchecksemptiness} is used.
+\end{framed}
 \end{otherlanguage}
 
 \subsection{Die hyperref"=Option \emph{bookmarksdepth}}
@@ -7093,7 +7032,6 @@
 heading (and no contents naturally). The second \LaTeX{} run will then
 correctly decide which local TOC is empty or not.
 
-
 \subsection{The \csbhyp{etocnotocifnotoc} command}
 \label{etocnotocifnotoc}
 
@@ -7124,9 +7062,59 @@
 of contents to be empty (for that run) and thus printed nothing (not even a
 |\par|).
 
+% pas traduit
+\section{The \csbhyp{etoclocaltop} command}
+\label{etoclocaltop}
+
+\textbf{New with 1.09 (2019/03/09)}.
+
+Within either the TOC style
+(\csb{etocsettocstyle}) or the local title styles (\csb{etocsetstyle}), the
+control sequence \csb{etoclocaltop} is made equivalent for the duration of
+\csb{localtableofcontents} to a numeric (self-delimiting) denotation of the
+current top level.
+
+Thus: it will in numeric contexts (|\ifnum|, |\ifcase|, ...) represent zero
+for a local TOC corresponding to chapter, or one if in a section, or two if in
+a subsection, etc..., assuming of course here that the default levels are
+obeyed (see \autoref{sec:tocdepth}).
+
+\begin{framed}
+  \csb{etoclocaltop} from inside the TOC heading (first argument of
+  \csb{etocsettocstyle}) has the correct value \emph{only under
+    \csb{etocchecksemptiness} regime}. Special circumstances correspond to
+  some special values:
+  \begin{description}[nolistsep]
+  \item[|-3|] (|-\thr@@|)\newline
+    signals that \etoc considers the local TOC to be
+    ``unknown''; this happens at the last local TOC, for the first \LaTeX\ run
+    after adding a new \localtoc to the document. In doubt, \etoc assumes the
+    TOC will prove non empty, hence it prints (independently of whether the
+    check for emptiness was activated or not) the heading as specified by
+    \csb{etocsettocstyle}. Thus, check if \csb{etoclocaltop} gives |-3| as a
+    a \meta{number} to detect that situation from within the first argument of
+    \csb{etocsettocstyle}, if desired.
+  \item[|-1000|](|-\@m|)\newline  is in case of a \localtoc
+    being considered ``known'' (although it may still refer to the data in the
+    |.toc| file from the previous run) but without the check for emptiness
+    having been executed.
+  \item[|-10000|](|-\@M|)\newline  is the value when accessed from the title
+    of a global TOCs.
+  \end{description}
+\end{framed}
+\begin{framed}
+  When executed from within a local table of contents \textbf{line styles}
+  (\csb{etocsetstyle}), \csb{etoclocaltop} always will hold the correct value,
+  whether or not the emptiness check was executed.
+
+  For a global table of contents however, it will always keep the value |-3|.
+\end{framed}
+
+Attention! \cs{etoclocaltop} is only to be queried; modifying it is strictly
+forbidden and falls under the most rigorous prosecution allowed by federal
+law.
 \end{otherlanguage}
 
-
 \section{Befehle zur \texorpdfstring{\texttt{.toc}}{.toc}-Datei hinzufügen}
 \label{sec:addingtotoc}
 
@@ -7978,285 +7966,6 @@
  \end{filecontentshere}
 \attachfile{etocsnippet-\the\value{section}.tex}
 
-\section{Ein TOC mit einem extravagantem Layout}
-
-Hier ist ein Inhaltsverzeichnis, wo die Abschnitte aus einem bestimmten Kapitel
-durch einen Zahlenbereich dargestellt werden sollen
-(wie 18--22 bei einem bestimmten Kapitel, 42--49 für ein anderes \ldots\
-natürlich in das Inhaltsverzeichnis automatisch eingefügt wurden). 
-
-Dies ist kein Abbildungseinschluss, das Inhaltsverzeichnis wird von seiner
-ursprünglichen 
-|tex|-Quelle in dieses Dokument nach dem Austausch des
-|Teils|, |Kapitels| oder |Abschnitts| mit |Dummy-Teil|, |Dummy-Kapitel| und
-|Dummy-Abschnitt| (und da ist auch eine Dummy-Seitenzahl) produziert.  Wir
-kopierten die Linienstile, wie im Original verwendet, und
-das Inhaltsverzeichnis zeigt folgende Situation an:
-\begin{verbatim}
-    \etocsetlevel{dummypart}  {-1} \etocsetlevel{part}   {2}
-    \etocsetlevel{dummychapter}{0} \etocsetlevel{chapter}{2}
-    \etocsetlevel{dummysection}{1} \etocsetlevel{section}{2}
-                    \etocsetnexttocdepth{dummysection}
-\end{verbatim}
-
-Jedes Kapitel zeigt die Zahl nur von dem ersten und dem letzten Abschnitt an.
-Siehe in der Quelldatei |etoc.dtx| für die Details nach, wie das gemacht wird.
-
-Eine andere Technik für diese Art der Dinge erläutert 
-  \autoref{ssec:statistics}.  
-
-\begingroup
-
-    \etocsetlevel{dummypart}{-1}
-    \etocsetlevel{dummychapter}{0}
-    \etocsetlevel{dummysection}{1}
-    \etocsetlevel{part}{2}
-    \etocsetlevel{chapter}{2}
-    \etocsetlevel{section}{2}
-
-    \newif\ifextraidone
-    \newif\ifextraiidone
-
-    \etocsetstyle{dummypart}
-    {}
-    {}
-    {\begin{center}\Large\bfseries TEIL \etocnumber
-    \ifextraiidone\\\etocname.\fi\end{center}
-    \ifextraidone\else
-    \noindent\hskip.7\linewidth
-        \hbox to .2\linewidth
-% février (ou janvier?) 2013
-% je modifie ici en ajoutant un \hss, pour compenser la plus petite
-% taille de txrm. Ok.
-       {\hss\small\textsc{\bfseries Kapitel.\hss Seite.}}\par\fi
-    \extraidonetrue
-    }
-    {}
-
-    \newcommand\mytocleaders{\hbox to .125\linewidth{...\hss}}
-    \etocsetstyle{dummychapter}
-    {}
-    {\par\noindent\etocifnumbered
-        {\makebox[.15\linewidth][r]{\bfseries\etocnumber.}}
-        {\hspace*{.15\linewidth}}}
-    {\hbox to .65\linewidth
-        {\hspace{1em}\etocname\leaders\mytocleaders\hss}%
-     \hskip-.1\linewidth
-     \hbox to .2\linewidth{\hspace{1.5em}...\hss
-                    \etocifnumbered
-                        {\etocpage}
-                        {\ifextraiidone\else\etocpage\fi}}%
-     \hskip-.2\linewidth
-    }
-    {}
-
-    \newbox\forsectionnumbers
-    \makeatletter
-% 21 février 2013: je rajoute \color at begingroup et \color at endgroup
-    \etocsetstyle{dummysection}
-    {\setbox\forsectionnumbers=\hbox to .1\linewidth
-        \bgroup\color at begingroup\hss\etocskipfirstprefix}
-    {\@gobble}
-    {\etocnumber---}
-    {\etocnumber\color at endgroup\egroup
-    % for reasons I do not quite understand, in some pdf viewers the dots
-    % do not completely disappear if here \fboxsep0pt is used.
-    % (problèmes liés à l'anti-aliasing, sur Mac OS X, Skim, Preview...)
-    % (j'ai maintenu ici la méthode de mon post sur stackexchange, mais
-    %  sans doute je pourrais réfléchir à une autre façon évitant d'avoir à
-    %  « effacer ») 
-        \fboxsep=.5pt\colorbox{white}{\box\forsectionnumbers}\par
-        \ifextraiidone\else
-            \begin{center}\bfseries Kongruenz.\end{center}
-            \noindent\makebox[.15\linewidth][r]{\textsc{\bfseries Übung.}}\par
-        \fi\extraiidonetrue
-    }
-    \makeatother
-
-    \renewcommand{\etocinnertopsep}{0pt}
-
-    \etocruledstyle[1]{%
-        \parbox{\linewidth}{%
-            \centering
-            \textsc{\bfseries\LARGE\MakeUppercase{Inhaltsverzeichnis}}\\
-            \rule{.2\linewidth}{2pt}}%
-    }
-        
-    \etocsetnexttocdepth{dummysection}
-
-    \tableofcontents
-   
-\makeatletter
-    \def\adddummysection {\stepcounter{dummysection}%
-      \addtocontents {toc}{\protect\contentsline 
-          {dummysection}{\protect\numberline{\thedummysection}}%
-                   {\the\dummypage }%
-     %\ifEtoc at hyperref ou \ifdefined\hyperref si e-TeX
-     {\@currentHref }%
-     %\fi
-     }}
- 
-    \def\adddummychapter #1{\stepcounter{dummychapter}%
-      \advance\dummypage2
-      \addtocontents {toc}{\protect\contentsline 
-          {dummychapter}{\protect\numberline{\thedummychapter}#1}%
-                   {\the\dummypage }%
-     %\ifEtoc at hyperref ou \ifdefined\hyperref si e-TeX
-     {\@currentHref }%
-     %\fi
-     }}
-
-    \def\adddummychapno #1{\advance\dummypage2
-      \addtocontents {toc}{\protect\contentsline 
-          {dummychapter}{#1}{\the\dummypage }%
-     %\ifEtoc at hyperref ou \ifdefined\hyperref si e-TeX
-     {\@currentHref }%
-     %\fi
-     }}
-
-    \def\adddummypart #1{\stepcounter{dummypart}%
-       \advance\dummypage4
-       \addtocontents {toc}{\protect\contentsline 
-          {dummypart}{\protect\numberline{\Roman{dummypart}}#1}%
-                     {\the\dummypage }%
-     %\ifEtoc at hyperref ou \ifdefined\hyperref si e-TeX
-     {\@currentHref }%
-     %\fi
-     }}
-\makeatother
-    
-    \newcount\dummypage \dummypage-1
-
-    \adddummypart {}
-    
-    \adddummychapno {Einleitung}
-
-    \newcount\tempcount
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<8
-    \repeat
-
-    \adddummychapter {Kongruenz von Subjekt und Verb}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<17
-    \repeat
-
-    \adddummychapter {Kongruenz von Substantiven und Adjektiven}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<22
-    \repeat
-
-    \adddummychapno {Kongruenz von Relativen und Antezendenten}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<25
-    \repeat
-
-    \adddummypart {Government}
-
-    \adddummychapter {Der Akkusativ}
-
-    \adddummychapno {Allgemeine Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<30
-    \repeat
-
-    \adddummychapno {Besondere Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<37
-    \repeat
-
-    \adddummychapter {Verbrektion über zwei Akkusative}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<41
-    \repeat
-
-    \adddummychapter {Der Kausativ}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<49
-    \repeat
-
-    \adddummychapter {Der Instrumental}
-
-    \adddummychapno {Allgemeine Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<54
-    \repeat
-
-    \adddummychapno {Besondere Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<59
-    \repeat
-
-    \adddummychapter {Der Dativ}
-
-    \adddummychapno {Allgemeine Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<65
-    \repeat
-
-    \adddummychapno {Besondere Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<71
-    \repeat
-
-    \adddummychapter {Der Ablativ}
-
-    \adddummychapno {Allgemeine Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<75
-    \repeat
-
-    \adddummychapno {Besondere Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<86
-    \repeat
-
-    \adddummychapter {Der Lokativ}
-
-    \adddummychapno {Allgemeine Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<92
-    \repeat
-
-    \adddummychapno {Besondere Anwendungen}
-
-    \loop\advance\tempcount by 1
-    \adddummysection
-    \ifnum\tempcount<100
-    \repeat
-\endgroup
-
-
 \section{Das TOC als ein Baum}\label{tocastree}
 
 Mit |tikz|\footnote{\url{http://ctan.org/pkg/pgf}} und dem Paket
@@ -9501,6 +9210,31 @@
 \marg{before\_toc} zu starten, welche mit \marg{after\_toc} wieder geschlossen
 wird.
 
+\begin{otherlanguage}{english}
+  \textbf{\TeX\ hacker note:} We have seen in the previous chapter some examples
+of using |\begin{enumerate}| and |\end{enumerate}| within TOC line styles.
+There is a real difficulty with doing however something like this:
+\begin{verbatim}
+\etocsettocstyle{\begin{enumerate}}{\end{enumerate}}
+\etocsetstyle{section}{}{\item \sectionname}{}{}
+\end{verbatim}
+Indeed for example on first compilation of a document, the |.toc| file is
+empty and there will be the typical ``Something's wrong--perhaps a missing
+\string\item''. Using \csb{etocchecksemptiness} does not help, because as is
+explained there, on first encountering a new TOC added at end of a document,
+\etoc considers it non-empty, hence querying \csb{etocifwasempty} serves
+nothing. No, one must do something like this:
+\begin{verbatim}
+\makeatletter
+\etocsettocstyle
+  {\begin{enumerate}}
+  {\if at newlist\item Please run \LaTeX\ again\fi
+   \end{enumerate}}
+\makeatother
+\etocsetstyle{section}{}{\item \sectionname}{}{}
+\end{verbatim}
+\end{otherlanguage}
+
 \subsection{Die Befehle \csbhyp{etocmulticolstyle}, \csbhyp{etocmulticol} und 
 \csbhyp{etoclocalmulticol}}
 \label{etocmulticolstyle}
@@ -10927,8 +10661,17 @@
 
 \begin{multicols}{2}
 \begin{jfverbatim}
-v1.08p [2018/07/04]^
+v1.09 [2019/03/09]^
 
+   New features: \etoclocaltop, \localtableofcontentswithrelativedepth. Thanks
+   to Tony Roberts for feature request.
+
+   Note to hackers: internal control sequence \Etoc at localtop is gone.
+
+   etoc now requires e-TeX (\numexpr, \unless).
+
+~v1.08p [2018/07/04]^
+
    Fixed bug surfacing in case of linktoc=page option of hyperref.
    Thanks to Denis Bitouzé for report (cf.
    https://github.com/ho-tex/hyperref/issues/65,
@@ -11534,7 +11277,6 @@
 \chardef\Etoc@@four@@ 4
 \chardef\Etoc@@five@@ 5
 \chardef\Etoc@@six@@  6
-%%\let\Etoc at localtop\Etoc@@minustwo@@ % 1.08e does it at each local TOC.
 \def\Etoc@@minustwo@{minustwo}
 \def\Etoc@@minusone@{minusone}
 \def\Etoc@@zero@    {zero}
@@ -11869,6 +11611,9 @@
 % 2011/12 that I got excessively cautious then, and was using an |\Etoc at next|
 % for the |\Etoc at setflags| rather than leaving it like here deep inside
 % conditional branches.
+%
+% Attention! |1.09|'s \cs{etoclocaltop} is the former \cs{Etoc at localtop}
+% \emph{minus one}. Hence some slight change in conditional here.
 %    \begin{macrocode}
 \def\Etoc at etoccontentsline #1{%
   \global\expandafter\let\expandafter\Etoc at level\csname Etoc@#1@@\endcsname
@@ -11883,7 +11628,7 @@
      \ifEtoc at notactive\Etoc at setflags
        \Etoc at skipthisonetrue
      \else
-      \ifnum\Etoc at level<\Etoc at localtop
+      \unless\ifnum\Etoc at level>\etoclocaltop
         \Etoc at skipthisonetrue
         \global\Etoc at stoptoctrue
       \fi
@@ -11894,8 +11639,7 @@
   \let\Etoc at next\Etoc at gobblefourorthree
   \ifEtoc at skipthisone
   \else
-   \ifnum\c at tocdepth<\Etoc at level
-   \else
+   \unless\ifnum\c at tocdepth<\Etoc at level
     \ifEtoc at standard
       \let\Etoc at next\Etoc at savedcontentsline
     \else
@@ -12460,18 +12204,30 @@
 % I replace (|1.08e|) the |\Etoc at global|'s for |\Etoc at localtop| by
 % |\global|'s. The |\relax| is needed because |#2| may sometimes be a count,
 % sometimes tokens.
+%
+% Attention! |1.09| defines a public \cs{etoclocaltop} in replacement of old
+% \cs{Etoc at localtop} \emph{minus one}. Memo: \cs{etoclocaltop} has only
+% meaningful meaning when the local toc has its "active" flag set. Except that
+% I used a "notactive" flag to torture myself, so: has the "notactive" flag
+% off.
+%
+% Also attention |1.09| now sets the |\c at tocdepth| there in relation to
+% implementation of \localtocwrdp. This is needed for line styles in
+% compatibility mode as the code from standard classes checks the tocdepth
+% counter.
 %    \begin{macrocode}
 \def\etoc@@startlocaltoc#1#2{%
     \ifEtoc at localtoc
        \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
-          \ifEtoc at i   \global\let\Etoc at localtop\Etoc@@two@@   \fi
-          \ifEtoc at ii  \global\let\Etoc at localtop\Etoc@@three@@ \fi
-          \ifEtoc at iii \global\let\Etoc at localtop\Etoc@@four@@  \fi
-          \ifEtoc at iv  \global\let\Etoc at localtop\Etoc@@five@@  \fi
-          \ifEtoc at v   \global\let\Etoc at localtop\Etoc@@six@@   \fi
+          \ifEtoc at jj  \global\let\etoclocaltop\Etoc@@minustwo@@\fi
+          \ifEtoc at j   \global\let\etoclocaltop\Etoc@@minusone@@\fi
+          \ifEtoc@    \global\let\etoclocaltop\Etoc@@zero@@    \fi
+          \ifEtoc at i   \global\let\etoclocaltop\Etoc@@one@@     \fi
+          \ifEtoc at ii  \global\let\etoclocaltop\Etoc@@two@@     \fi
+          \ifEtoc at iii \global\let\etoclocaltop\Etoc@@three@@   \fi
+          \ifEtoc at iv  \global\let\etoclocaltop\Etoc@@four@@    \fi
+          \ifEtoc at v   \global\let\etoclocaltop\Etoc@@five@@    \fi
+          \global\c at tocdepth\Etoc at localtocdepth
           \global\Etoc at notactivefalse
           \global\Etoc at vfalse
           \global\Etoc at ivfalse
@@ -12486,9 +12242,11 @@
 }
 \let\etoc at startlocaltoc\@gobble
 %    \end{macrocode}
-% |2015/03/16|: |1.08e| tests if a local table of contents turns out empty. The
-% \csa{Etoc at localtop} here does not have the same meaning as when set-up by
-% the regular \csa{etoc@@startlocaltoc}. It is off by 1 (in general).
+% |2015/03/16|: |1.08e| tests if a local table of contents turns out empty.
+% The \csa{Etoc at localtop} there does not have the same meaning as when set-up
+% by the regular \csa{etoc@@startlocaltoc}. It is off by 1 (in general). THIS
+% IS OBSOLETE since |1.09|: a \cs{etoclocaltop} is used with same meaning in
+% all code branches.
 %
 % After some hesitation I opted for making and obeying the test always (*) for
 % local tables of contents, and do it also for global tables of contents but
@@ -12528,6 +12286,9 @@
 % |\contentsline|.
 %
 % |1.08i| has two |testingcontentsline| macros, one for local, one for global.
+%
+% |1.09| renames the \cs{Etoc at localtop} which was used here to a public
+% \cs{etoclocaltop} to make it usable in \cs{etocsettocstyle}.
 %    \begin{macrocode}
 \def\Etoc at setemptytocbool {%
     \global\Etoc at emptytoctrue
@@ -12537,7 +12298,7 @@
       \ifEtoc at localtoc
         \def\etoc at startlocaltoc##1{%
           \ifnum##1=\Etoc at tocid\relax
-              \global\let\Etoc at localtop\Etoc at level
+              \global\let\etoclocaltop\Etoc at level
               \global\Etoc at notactivefalse
           \fi }%
         \let\contentsline\Etoc at testingcontentslinelocal
@@ -12546,7 +12307,7 @@
       \fi
       \Etoc at storetocdepth
         \the\Etoc at toctoks
-      \Etoc at resettocdepth
+      \Etoc at restoretocdepth
     \endgroup
 }
 \DeclareRobustCommand*\etocifwasempty
@@ -12565,12 +12326,14 @@
 % Set |stoptoc| flag afterwards in all cases. |\Etoc at localtop| will have been
 % initialized by |\etoc@@startlocaltoc| as |\ifEtoc at notactive| flag can be
 % false only then.
+%
+% |1.09| renamed the \cs{Etoc at localtop} as formerly here to \cs{etoclocaltop}
+% and adds support for \localtocwrdp.
 %    \begin{macrocode}
     \ifEtoc at notactive
     \else
-     \ifnum\Etoc at level>\Etoc at localtop
-      \ifnum\Etoc at level>\c at tocdepth
-      \else
+     \ifnum\Etoc at level>\etoclocaltop
+      \unless\ifnum\Etoc at level>\Etoc at localtocdepth
        \global\Etoc at emptytocfalse
        \global\Etoc at stoptoctrue
       \fi
@@ -12587,8 +12350,7 @@
   \else
    \ifnum\csname Etoc@#1@@\endcsname=\Etoc@@six@@
    \else
-    \ifnum\csname Etoc@#1@@\endcsname>\c at tocdepth
-    \else
+    \unless\ifnum\csname Etoc@#1@@\endcsname>\c at tocdepth
      \global\Etoc at emptytocfalse
      \global\Etoc at stoptoctrue
     \fi
@@ -12689,6 +12451,7 @@
 % induce it into making too many runs.
 %    \begin{macrocode}
 \def\Etoc at localtableofcontents#1{%
+    \gdef\etoclocaltop{-\@m}%
     \Etoc at localtoctrue
     \global\Etoc at emptytocfalse
     \edef\Etoc at tocid{#1}%
@@ -12697,6 +12460,7 @@
       \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
+      \gdef\etoclocaltop{-\thr@@}%
       \Etoc at tableofcontents
       \expandafter\Etoc at gobbletoetoc@ % skip all the rest
     \fi
@@ -12704,7 +12468,9 @@
 %    \end{macrocode}
 % |1.08i|'s |\Etoc at setemptytocbool| now checks |localtoc| flag.
 %    \begin{macrocode}
-    \ifEtoc at checksemptiness \Etoc at setemptytocbool \fi
+    \ifEtoc at checksemptiness
+       \Etoc at setemptytocbool
+    \fi
     \ifEtoc at emptytoc
        \ifEtoc at notactive
          %\PackageWarning{etoc}{Unknown toc ID \number\Etoc at tocid. Run LaTeX again}%
@@ -12712,6 +12478,7 @@
          %\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
+         \gdef\etoclocaltop{-\thr@@}%
          \Etoc at tableofcontents
          \expandafter\expandafter\expandafter\Etoc at gobbletoetoc@
        \else
@@ -12720,8 +12487,19 @@
     \else
        \global\Etoc at stoptocfalse
        \global\Etoc at notactivetrue
-       \global\let\Etoc at localtop\Etoc@@minustwo@@
-       \edef\etoc at startlocaltoc##1{\noexpand\etoc@@startlocaltoc{##1}{\Etoc at tocid}}%
+%    \end{macrocode}
+% Prior to |1.09| a \cs{Etoc at localtop} was reset here. This has now been
+% moved to \cs{Etoc at tableofcontents} and \cs{Etoc at localtop} replaced by a
+% public \cs{etoclocaltop} usable in line styles, and in \cs{etocsettocstyle}
+% (under checksemptinesstrue regime).
+%
+% We can end up here either if the emptiness check was done and turned
+% negative (then \cs{etoclocaltop} has the correct level for usage in first
+% argument of \cs{etocsettocstyle}), or if the emptiness check was not done.
+% For the latter case \cs{etoclocaltop} has setting |-\@m|.
+%    \begin{macrocode}
+       \edef\etoc at startlocaltoc##1%
+           {\noexpand\etoc@@startlocaltoc{##1}{\Etoc at tocid}}%
        \Etoc at tableofcontents
     \fi
     \@gobble\etoc@
@@ -12728,8 +12506,15 @@
     \endgroup\ifEtoc at mustclosegroup\endgroup\fi
     \Etoc at tocdepthreset % 1.07h, renamed 1.08h
     \etocaftertochook   % 1.07g
-}
 %    \end{macrocode}
+% |1.09| hesitates about putting this before of after the
+% \cs{etocaftertochook}. The information of the used tocdepth is lost if
+% puuting it first. The usage of \cs{etocaftertochook} may be broken if
+% unexpected tokens follows.
+%    \begin{macrocode}
+    \let\Etoc at localtocdepth\c at tocdepth % 1.09
+}% \Etoc at localtableofcontents
+%    \end{macrocode}
 % |2013/03/07|: I discover a \csa{@namedef} trick to construct the
 % \csa{Etoc at again} space delimited macro:\\
 % |    \@namedef {Etoc at again} {...stuff...}|\\
@@ -12755,6 +12540,7 @@
 %    \begin{macrocode}
 \def\Etoc at dothis #1#2\etoc@ {\fi #1}
 \def\Etoc at t@bleofcontents{%
+    \gdef\etoclocaltop{-\@M}%
     \ifx\Etoc at nexttoken\label\Etoc at dothis{\expandafter\Etoc at label\@gobble}\fi
     \ifx\Etoc at nexttoken\@sptoken\Etoc at dothis{\Etoc at again}\fi
 %    \end{macrocode}
@@ -12788,7 +12574,7 @@
     \Etoc at tocdepthreset % 1.07h, renamed 1.08h
     \etocaftertochook   % 1.07g
     \@gobble\etoc@
-    }
+    }% \Etoc at t@bleofcontents
 %    \end{macrocode}
 % |1.07g| for consistency Etoc@ prefix added.
 %
@@ -12823,10 +12609,12 @@
 %    \end{macrocode}
 % Attention that there could be a |\ref| following, thus we don't yet know
 % whether this is a local or global table of contents.
+%
+% The \cs{Etoc at tocdepthset} is for \cs{etocsetnexttocdepth} mechanism.
 %    \begin{macrocode}
 \def\etoctableofcontents{%
    \Etoc at openouttoc
-   \Etoc at tocdepthset % new with 1.08h
+   \Etoc at tocdepthset % new with 1.08h (\etocsetnexttocdepth)
    \begingroup % closed in \Etoc at t@bleofcontents or \Etoc at localtableofcontents
 %    \end{macrocode}
 % No need for the |tableof| extra group level, even it is better to get rid of
@@ -12843,18 +12631,36 @@
 %    \begin{macrocode}
       \@ifstar
       {\def\Etoc at aftertitlehook{}\Etoc at table@fcontents}
-      {\let\Etoc at aftertitlehook\etocaftertitlehook\Etoc at table@fcontents}}
+      {\let\Etoc at aftertitlehook\etocaftertitlehook\Etoc at table@fcontents}%
+}% \etoctableofcontents
 \let\tableofcontents\etoctableofcontents
 \newcommand*\localtableofcontents{%
    \Etoc at openouttoc
-   \Etoc at tocdepthset % new with 1.08h
+   \Etoc at tocdepthset % new with 1.08h (\etocsetnexttocdepth)
    \begingroup % closed in \Etoc at t@bleofcontents or \Etoc at localtableofcontents
       \let\tof at begingroup\@empty
       \let\tof at endgroup  \@empty
       \@ifstar
       {\def\Etoc at aftertitlehook{}\Etoc at localtable@fcontents}
-      {\let\Etoc at aftertitlehook\etocaftertitlehook\Etoc at localtable@fcontents}}
+      {\let\Etoc at aftertitlehook\etocaftertitlehook\Etoc at localtable@fcontents}%
+}% \localtableofcontents
 %    \end{macrocode}
+% |1.09| adds \localtocwrdp. The motivation is that it is impossible to set
+% in a completely satisfactory way the tocdepth from the first argument of
+% \cs{etocsettocstyle} because the emptiness check does not execute that
+% argument. If one does not care about emptiness check, one can of course set
+% the tocdepth from the first argument of \cs{etocsettocstyle}. One can even
+% use \cs{etocsetnexttocdepth} for that since |1.09| but anyway direct usage
+% of \cs{etocsettocdepth} (or |\setcounter{tocdepth}{...}| is easier as its
+% effet when executed there is automatically limited to duration of the TOC.
+%    \begin{macrocode}
+\newcommand*\localtableofcontentswithrelativedepth[1]{%
+   \edef\Etoc at localtocdepth
+       {\numexpr\noexpand\etoclocaltop+\the\numexpr#1\relax\relax}%
+   \localtableofcontents
+}% \localtableofcontentswithrelativedepth
+\let\Etoc at localtocdepth\c at tocdepth
+%    \end{macrocode}
 % |1.08| moves earlier the definitions of |\Etoc at savedcontentsline| as
 % well as |\Etoc at levellist|. It will thus not be operative to do
 % |\etocsetlevel| from inside the title now. But perhaps it will be
@@ -12914,13 +12720,29 @@
 % |1.08k| removes |\let\chapternumberline\numberline| etc... done formerly here
 %    \begin{macrocode}
     \fi
+%    \end{macrocode}
+% |1.09| makes \cs{etocsetnexttocdepth} usable in |#1| (but this is not 100\%
+% compatible with the emptiness check).
+%
+% |1.09| makes an \cs{etoclocaltop} usable in |#1| if under checksemptiness
+% regime.
+%    \begin{macrocode}
     #1%
+    \Etoc at tocdepthset
     \ifEtoc at parskip\parskip\z at skip\fi %1.07d
     \Etoc at aftertitlehook
+%    \end{macrocode}
+% |1.09| has replaced former \cs{Etoc at localtop} (\emph{minus one}) by
+% \cs{etoclocaltop}. Under checksemptinesstrue regime its value is already
+% known, but it will be obtained again from the toc file execution. As it is
+% used only if TOC is active, resetting it here this way is decorative and
+% could be removed.
+%    \begin{macrocode}
+    \gdef\etoclocaltop{-\thr@@}%
     \Etoc at toctoc
     \etocaftercontentshook
     #2\@nobreakfalse % 1.07d: \@nobreakfalse moved here
-    \Etoc at resettocdepth  % 1.07g. moved here from before #2 by 1.08
+    \Etoc at restoretocdepth  % 1.07g. moved here from before #2 by 1.08
 %    \end{macrocode}
 % |1.08|: necessary if |tableof 1.4a| has been used in global mode and thus
 % was forced to modify globally |\contentsline|. The collateral effect is that
@@ -13635,9 +13457,10 @@
 % when I first worked on |1.07g| I possibly had more than one token
 % after |\etoc at settocdepth|, but I changed that later.
 %
+% |1.09| renames \cs{Etoc at resettocdepth} to \cs{Etoc at restoretocdepth}.
 %    \begin{macrocode}
-\def\Etoc at storetocdepth {\global\c at etoc@tocdepth\c at tocdepth }
-\def\Etoc at resettocdepth {\global\c at tocdepth\c at etoc@tocdepth }
+\def\Etoc at storetocdepth   {\global\c at etoc@tocdepth\c at tocdepth }
+\def\Etoc at restoretocdepth {\global\c at tocdepth\c at etoc@tocdepth }
 \def\etocobeytoctocdepth {\def\etoc at settocdepth
         {\afterassignment\Etoc@@nottoodeep \global\c at tocdepth}}
 \def\Etoc@@nottoodeep {\ifnum\c at tocdepth>\c at etoc@tocdepth
@@ -13729,6 +13552,16 @@
 % with no intervening TOC, due to the fact that the command did an immediate
 % modification of the |tocdepth counter|. This is now delayed until
 % the actual TOC typesetting.
+%
+% |1.09|: slight refactoring of \cs{etocsetnexttocdepth} to let it be usable
+% from first argument of \cs{etocsettocstyle} although it is even simpler to
+% use \cs{etocsettocdepth} there, because the setting is automatically undone
+% at end of TOC.
+%
+% Recall that etoc allows to change all numeric
+% levels assigned to sectioning names, and the one used by
+% \cs{etocsetnexttocdepth} is determined at time of next toc only, when
+% \cs{Etoc at tocdepthset} will expand.
 %    \begin{macrocode}
 \def\invisibletableofcontents {\etocsetnexttocdepth {-3}\tableofcontents }%
 \def\invisiblelocaltableofcontents
@@ -13737,13 +13570,21 @@
     \@ifundefined{Etoc@#1@@}
      {\PackageWarning{etoc}
        {Unknown sectioning unit #1, \protect\etocsetnextocdepth\space ignored}}
-     {\def\Etoc at tocdepthset
-          {\edef\Etoc at tocdepthreset {%
-                   \global\c at tocdepth\the\c at tocdepth\space
-                   \global\let\noexpand\Etoc at tocdepthreset\noexpand\@empty }%
-           \global\c at tocdepth\csname Etoc@#1@@\endcsname
-           \global\let\Etoc at tocdepthset\@empty}}%
+     {\Etoc at setnexttocdepth{\csname Etoc@#1@@\endcsname}}%
 }%
+\def\Etoc at setnexttocdepth#1{%
+    \def\Etoc at tocdepthset{%
+        \Etoc at tocdepthreset
+        \edef\Etoc at tocdepthreset {%
+               \global\c at tocdepth\the\c at tocdepth\space
+               \global\let\noexpand\Etoc at tocdepthreset\noexpand\@empty
+         }%
+        \global\c at tocdepth#1%
+        \global\let\Etoc at tocdepthset\@empty
+    }%
+}%
+\let\Etoc at tocdepthreset\@empty % new 1.08h functioning of \etocsetnexttocdepth
+\let\Etoc at tocdepthset  \@empty %
 %    \end{macrocode}
 % |1.08k|. Serves to make local TOCs even after headings which were not added
 % to the |.toc| file; but of course the local TOCs can only display
@@ -13770,7 +13611,12 @@
       \Etoc at setflags
       \Etoc at skipthisonetrue
      \else
-      \ifnum\Etoc at level<\Etoc at localtop
+%    \end{macrocode}
+% Attention, |1.09| has \cs{etoclocaltop} which is former \cs{Etoc at localtop}
+% \emph{minus one}. Hence the shape of the conditional. Memo: it makes sense
+% only for code executed under "active" status of the TOC.
+%    \begin{macrocode}
+      \unless\ifnum\Etoc at level>\etoclocaltop
        \Etoc at skipthisonetrue
        \global\Etoc at stoptoctrue
       \fi
@@ -13810,8 +13656,6 @@
 \etocstandarddisplaystyle
 \etocobeytoctocdepth
 \etocobeydepthtags
-\let\Etoc at tocdepthreset\@empty % new 1.08h functioning of \etocsetnexttocdepth
-\let\Etoc at tocdepthset  \@empty %
 \let\etocaftertochook    \@empty % public for end user.
 \let\etocbeforetitlehook \@empty % new with 1.07m
 \endinput
@@ -13833,7 +13677,7 @@
   Grave accent  \`     Left brace    \{     Vertical bar  \|
   Right brace   \}     Tilde         \~}
 
-\CheckSum{3454}%
+\CheckSum{3497}%
 
 \csname check at checksum\endcsname
 \Finale

Modified: trunk/Master/texmf-dist/source/latex/etoc/etoc.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/etoc/etoc.ins	2019-03-10 20:59:57 UTC (rev 50316)
+++ trunk/Master/texmf-dist/source/latex/etoc/etoc.ins	2019-03-10 21:00:10 UTC (rev 50317)
@@ -1,16 +1,16 @@
 %%
 %% Package: etoc
-%% Version: 1.08p-2018/07/04
+%% Version: 1.09-2019/03/09
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2018 Jean-Francois Burnol
+%% Copyright (C) 2012-2019 Jean-Francois Burnol
 %%                         <jfbu at free dot fr>
-%% Copyright (C) 2014-2018 Christine Roemer
+%% Copyright (C) 2014-2019 Christine Roemer
 %%                         <Christine_Roemer at t-online dot de>
 %% and collaborators for the translation into German of the documentation
 %%
-\def\etocpkgdate        {2018/07/04}
-\def\etocdocdate        {2018/07/04}
-\def\etocpkgversion     {v1.08p}
+\def\etocpkgdate        {2019/03/09}
+\def\etocdocdate        {2019/03/09}
+\def\etocpkgversion     {v1.09}
 \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	2019-03-10 20:59:57 UTC (rev 50316)
+++ trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty	2019-03-10 21:00:10 UTC (rev 50317)
@@ -23,14 +23,14 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{etoc}
- [2018/07/04 v1.08p Completely customisable TOCs (JFB)]
+ [2019/03/09 v1.09 Completely customisable TOCs (JFB)]
 %%
 %% Package: etoc
-%% Version: 1.08p-2018/07/04
+%% Version: 1.09-2019/03/09
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2018 Jean-Francois Burnol
+%% Copyright (C) 2012-2019 Jean-Francois Burnol
 %%                         <jfbu at free dot fr>
-%% Copyright (C) 2014-2018 Christine Roemer
+%% Copyright (C) 2014-2019 Christine Roemer
 %%                         <Christine_Roemer at t-online dot de>
 %% and collaborators for the translation into German of the documentation
 %%
@@ -85,7 +85,6 @@
 \chardef\Etoc@@four@@ 4
 \chardef\Etoc@@five@@ 5
 \chardef\Etoc@@six@@  6
-%%\let\Etoc at localtop\Etoc@@minustwo@@ % 1.08e does it at each local TOC.
 \def\Etoc@@minustwo@{minustwo}
 \def\Etoc@@minusone@{minusone}
 \def\Etoc@@zero@    {zero}
@@ -304,7 +303,7 @@
      \ifEtoc at notactive\Etoc at setflags
        \Etoc at skipthisonetrue
      \else
-      \ifnum\Etoc at level<\Etoc at localtop
+      \unless\ifnum\Etoc at level>\etoclocaltop
         \Etoc at skipthisonetrue
         \global\Etoc at stoptoctrue
       \fi
@@ -315,8 +314,7 @@
   \let\Etoc at next\Etoc at gobblefourorthree
   \ifEtoc at skipthisone
   \else
-   \ifnum\c at tocdepth<\Etoc at level
-   \else
+   \unless\ifnum\c at tocdepth<\Etoc at level
     \ifEtoc at standard
       \let\Etoc at next\Etoc at savedcontentsline
     \else
@@ -620,14 +618,15 @@
 \def\etoc@@startlocaltoc#1#2{%
     \ifEtoc at localtoc
        \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
-          \ifEtoc at i   \global\let\Etoc at localtop\Etoc@@two@@   \fi
-          \ifEtoc at ii  \global\let\Etoc at localtop\Etoc@@three@@ \fi
-          \ifEtoc at iii \global\let\Etoc at localtop\Etoc@@four@@  \fi
-          \ifEtoc at iv  \global\let\Etoc at localtop\Etoc@@five@@  \fi
-          \ifEtoc at v   \global\let\Etoc at localtop\Etoc@@six@@   \fi
+          \ifEtoc at jj  \global\let\etoclocaltop\Etoc@@minustwo@@\fi
+          \ifEtoc at j   \global\let\etoclocaltop\Etoc@@minusone@@\fi
+          \ifEtoc@    \global\let\etoclocaltop\Etoc@@zero@@    \fi
+          \ifEtoc at i   \global\let\etoclocaltop\Etoc@@one@@     \fi
+          \ifEtoc at ii  \global\let\etoclocaltop\Etoc@@two@@     \fi
+          \ifEtoc at iii \global\let\etoclocaltop\Etoc@@three@@   \fi
+          \ifEtoc at iv  \global\let\etoclocaltop\Etoc@@four@@    \fi
+          \ifEtoc at v   \global\let\etoclocaltop\Etoc@@five@@    \fi
+          \global\c at tocdepth\Etoc at localtocdepth
           \global\Etoc at notactivefalse
           \global\Etoc at vfalse
           \global\Etoc at ivfalse
@@ -649,7 +648,7 @@
       \ifEtoc at localtoc
         \def\etoc at startlocaltoc##1{%
           \ifnum##1=\Etoc at tocid\relax
-              \global\let\Etoc at localtop\Etoc at level
+              \global\let\etoclocaltop\Etoc at level
               \global\Etoc at notactivefalse
           \fi }%
         \let\contentsline\Etoc at testingcontentslinelocal
@@ -658,7 +657,7 @@
       \fi
       \Etoc at storetocdepth
         \the\Etoc at toctoks
-      \Etoc at resettocdepth
+      \Etoc at restoretocdepth
     \endgroup
 }
 \DeclareRobustCommand*\etocifwasempty
@@ -673,9 +672,8 @@
     \global\expandafter\let\expandafter\Etoc at level\csname Etoc@#1@@\endcsname
     \ifEtoc at notactive
     \else
-     \ifnum\Etoc at level>\Etoc at localtop
-      \ifnum\Etoc at level>\c at tocdepth
-      \else
+     \ifnum\Etoc at level>\etoclocaltop
+      \unless\ifnum\Etoc at level>\Etoc at localtocdepth
        \global\Etoc at emptytocfalse
        \global\Etoc at stoptoctrue
       \fi
@@ -692,8 +690,7 @@
   \else
    \ifnum\csname Etoc@#1@@\endcsname=\Etoc@@six@@
    \else
-    \ifnum\csname Etoc@#1@@\endcsname>\c at tocdepth
-    \else
+    \unless\ifnum\csname Etoc@#1@@\endcsname>\c at tocdepth
      \global\Etoc at emptytocfalse
      \global\Etoc at stoptoctrue
     \fi
@@ -702,6 +699,7 @@
   \Etoc at gobblefourorthree\relax
 }
 \def\Etoc at localtableofcontents#1{%
+    \gdef\etoclocaltop{-\@m}%
     \Etoc at localtoctrue
     \global\Etoc at emptytocfalse
     \edef\Etoc at tocid{#1}%
@@ -710,11 +708,14 @@
       \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
+      \gdef\etoclocaltop{-\thr@@}%
       \Etoc at tableofcontents
       \expandafter\Etoc at gobbletoetoc@ % skip all the rest
     \fi
     \global\Etoc at notactivetrue
-    \ifEtoc at checksemptiness \Etoc at setemptytocbool \fi
+    \ifEtoc at checksemptiness
+       \Etoc at setemptytocbool
+    \fi
     \ifEtoc at emptytoc
        \ifEtoc at notactive
          %\PackageWarning{etoc}{Unknown toc ID \number\Etoc at tocid. Run LaTeX again}%
@@ -722,6 +723,7 @@
          %\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
+         \gdef\etoclocaltop{-\thr@@}%
          \Etoc at tableofcontents
          \expandafter\expandafter\expandafter\Etoc at gobbletoetoc@
        \else
@@ -730,8 +732,8 @@
     \else
        \global\Etoc at stoptocfalse
        \global\Etoc at notactivetrue
-       \global\let\Etoc at localtop\Etoc@@minustwo@@
-       \edef\etoc at startlocaltoc##1{\noexpand\etoc@@startlocaltoc{##1}{\Etoc at tocid}}%
+       \edef\etoc at startlocaltoc##1%
+           {\noexpand\etoc@@startlocaltoc{##1}{\Etoc at tocid}}%
        \Etoc at tableofcontents
     \fi
     \@gobble\etoc@
@@ -738,7 +740,8 @@
     \endgroup\ifEtoc at mustclosegroup\endgroup\fi
     \Etoc at tocdepthreset % 1.07h, renamed 1.08h
     \etocaftertochook   % 1.07g
-}
+    \let\Etoc at localtocdepth\c at tocdepth % 1.09
+}% \Etoc at localtableofcontents
 \def\Etoc at getrefno #1#2\etoc@ {#1}
 \def\Etoc at getref #1{\@ifundefined{r@#1}{0}{\expandafter\expandafter\expandafter
           \Etoc at getrefno\csname r@#1\endcsname\relax\etoc@}}
@@ -747,6 +750,7 @@
 \@firstofone{\def\Etoc at again} {\futurelet\Etoc at nexttoken\Etoc at t@bleofcontents}
 \def\Etoc at dothis #1#2\etoc@ {\fi #1}
 \def\Etoc at t@bleofcontents{%
+    \gdef\etoclocaltop{-\@M}%
     \ifx\Etoc at nexttoken\label\Etoc at dothis{\expandafter\Etoc at label\@gobble}\fi
     \ifx\Etoc at nexttoken\@sptoken\Etoc at dothis{\Etoc at again}\fi
     \ifx\Etoc at nexttoken\ref\Etoc at dothis{\expandafter\Etoc at ref\@gobble}\fi
@@ -762,7 +766,7 @@
     \Etoc at tocdepthreset % 1.07h, renamed 1.08h
     \etocaftertochook   % 1.07g
     \@gobble\etoc@
-    }
+    }% \Etoc at t@bleofcontents
 \def\Etoc at table@fcontents{%
     \refstepcounter{etoc at tocid}%
     \Etoc at tocwithidfalse
@@ -776,23 +780,31 @@
 \let\etocaftercontentshook \@empty
 \def\etoctableofcontents{%
    \Etoc at openouttoc
-   \Etoc at tocdepthset % new with 1.08h
+   \Etoc at tocdepthset % new with 1.08h (\etocsetnexttocdepth)
    \begingroup % closed in \Etoc at t@bleofcontents or \Etoc at localtableofcontents
       \let\tof at begingroup\@empty
       \let\tof at endgroup  \@empty
       \@ifstar
       {\def\Etoc at aftertitlehook{}\Etoc at table@fcontents}
-      {\let\Etoc at aftertitlehook\etocaftertitlehook\Etoc at table@fcontents}}
+      {\let\Etoc at aftertitlehook\etocaftertitlehook\Etoc at table@fcontents}%
+}% \etoctableofcontents
 \let\tableofcontents\etoctableofcontents
 \newcommand*\localtableofcontents{%
    \Etoc at openouttoc
-   \Etoc at tocdepthset % new with 1.08h
+   \Etoc at tocdepthset % new with 1.08h (\etocsetnexttocdepth)
    \begingroup % closed in \Etoc at t@bleofcontents or \Etoc at localtableofcontents
       \let\tof at begingroup\@empty
       \let\tof at endgroup  \@empty
       \@ifstar
       {\def\Etoc at aftertitlehook{}\Etoc at localtable@fcontents}
-      {\let\Etoc at aftertitlehook\etocaftertitlehook\Etoc at localtable@fcontents}}
+      {\let\Etoc at aftertitlehook\etocaftertitlehook\Etoc at localtable@fcontents}%
+}% \localtableofcontents
+\newcommand*\localtableofcontentswithrelativedepth[1]{%
+   \edef\Etoc at localtocdepth
+       {\numexpr\noexpand\etoclocaltop+\the\numexpr#1\relax\relax}%
+   \localtableofcontents
+}% \localtableofcontentswithrelativedepth
+\let\Etoc at localtocdepth\c at tocdepth
 \long\def\Etoc at gobbletoetoc@ #1\etoc@ {}
 \newcommand\etocsettocstyle[2]{%
 \def\Etoc at tableofcontents
@@ -815,12 +827,14 @@
         \Etoc at levellist
     \fi
     #1%
+    \Etoc at tocdepthset
     \ifEtoc at parskip\parskip\z at skip\fi %1.07d
     \Etoc at aftertitlehook
+    \gdef\etoclocaltop{-\thr@@}%
     \Etoc at toctoc
     \etocaftercontentshook
     #2\@nobreakfalse % 1.07d: \@nobreakfalse moved here
-    \Etoc at resettocdepth  % 1.07g. moved here from before #2 by 1.08
+    \Etoc at restoretocdepth  % 1.07g. moved here from before #2 by 1.08
     \ifx\Etoc at global\global
      \ifx\tof at finish\@empty
      \else
@@ -1380,8 +1394,8 @@
      \addcontentsline {toc}{#1}{#2}}
 \DeclareRobustCommand*{\etoctoccontentsline}
     {\@ifstar{\Etoc at addcontentsline@}{\Etoc at addtocontents}}
-\def\Etoc at storetocdepth {\global\c at etoc@tocdepth\c at tocdepth }
-\def\Etoc at resettocdepth {\global\c at tocdepth\c at etoc@tocdepth }
+\def\Etoc at storetocdepth   {\global\c at etoc@tocdepth\c at tocdepth }
+\def\Etoc at restoretocdepth {\global\c at tocdepth\c at etoc@tocdepth }
 \def\etocobeytoctocdepth {\def\etoc at settocdepth
         {\afterassignment\Etoc@@nottoodeep \global\c at tocdepth}}
 \def\Etoc@@nottoodeep {\ifnum\c at tocdepth>\c at etoc@tocdepth
@@ -1456,13 +1470,21 @@
     \@ifundefined{Etoc@#1@@}
      {\PackageWarning{etoc}
        {Unknown sectioning unit #1, \protect\etocsetnextocdepth\space ignored}}
-     {\def\Etoc at tocdepthset
-          {\edef\Etoc at tocdepthreset {%
-                   \global\c at tocdepth\the\c at tocdepth\space
-                   \global\let\noexpand\Etoc at tocdepthreset\noexpand\@empty }%
-           \global\c at tocdepth\csname Etoc@#1@@\endcsname
-           \global\let\Etoc at tocdepthset\@empty}}%
+     {\Etoc at setnexttocdepth{\csname Etoc@#1@@\endcsname}}%
 }%
+\def\Etoc at setnexttocdepth#1{%
+    \def\Etoc at tocdepthset{%
+        \Etoc at tocdepthreset
+        \edef\Etoc at tocdepthreset {%
+               \global\c at tocdepth\the\c at tocdepth\space
+               \global\let\noexpand\Etoc at tocdepthreset\noexpand\@empty
+         }%
+        \global\c at tocdepth#1%
+        \global\let\Etoc at tocdepthset\@empty
+    }%
+}%
+\let\Etoc at tocdepthreset\@empty % new 1.08h functioning of \etocsetnexttocdepth
+\let\Etoc at tocdepthset  \@empty %
 \def\etocsetlocaltop #1#{\Etoc at set@localtop}%
 \def\Etoc at set@localtop #1{%
   \@ifundefined{Etoc@#1@@}%
@@ -1484,7 +1506,7 @@
       \Etoc at setflags
       \Etoc at skipthisonetrue
      \else
-      \ifnum\Etoc at level<\Etoc at localtop
+      \unless\ifnum\Etoc at level>\etoclocaltop
        \Etoc at skipthisonetrue
        \global\Etoc at stoptoctrue
       \fi
@@ -1517,8 +1539,6 @@
 \etocstandarddisplaystyle
 \etocobeytoctocdepth
 \etocobeydepthtags
-\let\Etoc at tocdepthreset\@empty % new 1.08h functioning of \etocsetnexttocdepth
-\let\Etoc at tocdepthset  \@empty %
 \let\etocaftertochook    \@empty % public for end user.
 \let\etocbeforetitlehook \@empty % new with 1.07m
 \endinput



More information about the tex-live-commits mailing list