texlive[59917] Master/texmf-dist: etoc (13jul21)

commits+karl at tug.org commits+karl at tug.org
Tue Jul 13 22:02:42 CEST 2021


Revision: 59917
          http://tug.org/svn/texlive?view=revision&revision=59917
Author:   karl
Date:     2021-07-13 22:02:42 +0200 (Tue, 13 Jul 2021)
Log Message:
-----------
etoc (13jul21)

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-DE.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etoc.pdf
    trunk/Master/texmf-dist/doc/latex/etoc/etoc.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-10.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-20-A.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-20-B.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-A.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-22-A.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-23.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-24.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-25.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-26.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-27.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-29.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-30-A.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-30-B.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-31.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-32.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-40.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-46.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-48.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-5.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-52-A.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-52-B.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-53.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-54.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-6.tex
    trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-7.tex
    trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx
    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	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/README.md	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,13 +1,13 @@
 <!-- -->
 
-    Source:  etoc.dtx (v1.09c-2020/05/15)
+    Source:  etoc.dtx (v1.09d)
     Author:  Jean-Francois Burnol
     Author:  Christine Roemer et al. (German tranlation)
     Info:    Completely customisable TOCs
     License: LPPL 1.3c
-    Copyright (C) 2012-2020 Jean-Francois Burnol.
-    Copyright (C) 2014-2020 Christine Roemer and collaborators for
-    the translation into German of the documentation.
+    Copyright (C) 2012-2021 Jean-Francois Burnol.
+    Copyright (C) 2014-2015 Christine Roemer and collaborators
+                  (translation into German of the documentation)
     <jfbu at free dot fr>    <Christine_Roemer at t-online dot de>
 
 ABSTRACT
@@ -107,7 +107,20 @@
 RECENT CHANGES
 ==============
 
-v1.09c \[2020/05/05\]
+v1.09d \[2021/07/13\]
+-------------------------
+
+Some minor synching with tableof 1.4c.
+
+Add `\etockeeporiginaltableofcontents` to provide a work-around to a
+compatibility issue with listings's `\lstlistoflistings`, which abuses
+`\tableofcontents` for doing something unrelated to the actual contents.
+Thanks to Denis Bitouzé for report.
+
+Usage: `\usepackage{etoc}\etockeeporiginaltableofcontents`, then
+however you must employ `\etoctableofcontents`, not `\tableofcontents`.
+
+v1.09c \[2020/05/15\]
 ---------------------
 
 Syncs with KOMA-script deprecation of `\iftocfeature`.
@@ -131,123 +144,6 @@
 
 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,
-https://github.com/dbitouze/yathesis/issues/61).
-
-v1.08o \[2018/06/15\]
----------------------
-
-Fixed bug showing up if an unnumbered TOC entry starts with a brace,
-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\]
----------------------
-
-Fix to `1.08k`'s introduced incompatibility with KOMA-script
-and tocbasic's `\nonumberline`.
-
-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.
-
-Adds `\etocsavedparttocline`, `\etocsavedchaptertocline`,
-`\etocsavedsectiontocline`, ... They can be used in the context of
-the technique explained in section "Another compatibility mode".
-
-Formerly, etoc redefined for the duration of the TOC the memoir
-macro `\chapternumberline` and its likes to have same meaning as
-`\numberline` (of course, not when executed in compatibility mode),
-for the sake of extraction of `\etocnumber`.
-
-New method detects presence of any `\<foo>numberline` macro without
-any change to originals; they can thus be used as is when applying
-the approach of "Another compatibility mode" section from manual.
-
-v1.08j \[2017/09/21\]
----------------------
-
-Since `1.08a-2015/03/13` `\etocname`, `\etocnumber`, `\etocpage`
-contain, if hyperref is present and configured for using
-hyperlinks in the TOC, the link destination in already expanded
-form. This means one can use them even if the style closes a
-group (for example from a `&` in a tabular), if `\etocglobaldefs`
-was issued; also one can save their meaning for delayed usage
-(with for example `\LetLtxMacro` as they are robust).
-
-But for some legacy reason `\etoclink`, contrarily to
-`\etocthelink`, was handled differently. Now, `\etoclink` also
-contains the link destination in already expanded form, and can
-thus be used even if the line style issues a `&`, as long as
-`\etocglobaldefs` is issued.
-
-Also, bugs dating back to the early days of the package, but
-surfacing only under relatively rare conditions such as usage
-of hyperref with its option "linktoc=page" got fixed.
-
-v1.08i \[2016/09/29\]
----------------------
-
-This fixes an issue dating back to `1.08e-2015/04/17`: under
-`\etocchecksemptiness` regime, some circumstances (such as adding to
-an already compiled document a `\localtableofcontents` before the
-main `\tableofcontents`) created an "`Undefined control sequence`
-`\Etoc at localtop`" error. Thanks to Denis Bitouzé for reporting the
-problem.
-
-On this occasion, `\etocdoesnotcheckemptiness` has been
-added to unset the flag.
-
-A rather more exotic issue was fixed: the emptiness check for
-local tocs could get confused if the `tocdepth` counter was varying
-in some specific ways from inside the `toc` file.
-
-After adding to a document a `\localtableofcontents`, two LaTeX
-passes are needed for etoc to get a chance to print the
-correct local contents. Formerly, etoc issued a Warning on
-the first pass; it now also induces LaTeX into
-announcing "There were undefined references", as this is nearer
-to the end of the log file and console output.
-
-v1.08h \[2016/09/25\]
----------------------
-
-New functioning of `\etocsetnexttocdepth`: the tocdepth counter is
-modified only at the time of the table of contents, not before. This
-fixes an issue which arose when `\etocsetnexttocdepth` was used
-multiple times with no intervening table of contents. Thanks to
-Denis Bitouzé for reporting the problem.
-
-The PDF documentation includes about 25 LaTeX code snippets also
-as file attachment annotations, additionally to their verbatim
-typesetting. The ordering of the documentation contents has been
-slightly re-organized.
-
-A previous documentation-only update on 2016/09/09 added a new
-section with the (approximate) translation into etoc lingua of the
-book class toc style, for easy customizability.
-
-The latest translation into German of the additions made to the
-documentation dates back to v1.08d \[2015/04/09\].
-
-Thanks to Christine Römer!
+Note: the German version of the documentation was last updated
+at the time of the v1.08d \[2015/04/09\] release.  Since then
+all additions to it have been left in English language.

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etoc-DE.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etoc-DE.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etoc-DE.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,13 +1,12 @@
 %%
 %% Package: etoc
-%% Version: 1.09c-2020/05/15
+%% Version: 1.09d
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2020 Jean-Francois Burnol
+%% Copyright (C) 2012-2021 Jean-Francois Burnol
 %%                         <jfbu at free dot fr>
-%% Copyright (C) 2014-2020 Christine Roemer
+%% Copyright (C) 2014-2015 Christine Roemer and collaborators
 %%                         <Christine_Roemer at t-online dot de>
-%% and collaborators for the translation into German of the documentation
-%%
+%%               (translation into German of the documentation)
 %% run pdflatex thrice on this file etoc-DE.tex to produce the German
 %% documentation etoc-DE.pdf (without source code).
 %%

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etoc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etoc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etoc.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etoc.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,13 +1,12 @@
 %%
 %% Package: etoc
-%% Version: 1.09c-2020/05/15
+%% Version: 1.09d
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2020 Jean-Francois Burnol
+%% Copyright (C) 2012-2021 Jean-Francois Burnol
 %%                         <jfbu at free dot fr>
-%% Copyright (C) 2014-2020 Christine Roemer
+%% Copyright (C) 2014-2015 Christine Roemer and collaborators
 %%                         <Christine_Roemer at t-online dot de>
-%% and collaborators for the translation into German of the documentation
-%%
+%%               (translation into German of the documentation)
 %% run pdflatex thrice on this file etoc.tex to produce the documentation
 %% etoc.pdf, with source code included.
 %%

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-10.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-10.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-10.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-10.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begin{figure}[ht!]
   \centering

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-20-A.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-20-A.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-20-A.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-20-A.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \makeatletter
 \newcommand{\MyStandardTOC}{%

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-20-B.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-20-B.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-20-B.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-20-B.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \etocsetstyle{section}{}
   {\ifnum\etocthenumber=4

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-A.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-A.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-A.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-21-A.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 % it will be easy to globally shift the TOC horizontally if needed
 \def\TOCleftmargin     {0pt}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-21-B.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \makeatletter
 \newcommand*\TOClocalstyle {%

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-22-A.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-22-A.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-22-A.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-22-A.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \etocdefaultlines
 \begingroup

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-23.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-23.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-23.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-23.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begin{figure}[htbp!]\centering
 \colorlet{subsecnum}{black}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-24.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-24.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-24.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-24.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begingroup
 \newsavebox{\forsubsections}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-25.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-25.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-25.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-25.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
    < in the preamble >
 \newcounter{visibletoc}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-26.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-26.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-26.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-26.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
   \etocsetnexttocdepth{2}     % sections are at level 1 and will show up
 \begingroup

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-27.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-27.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-27.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-27.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 % \newtoks\treetok % put this (uncommented) preferably in the preamble
 % \newtoks\tmptok  % (idem)

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-28.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 % \newtoks\treetok % put this (uncommented) preferably in the preamble
 % \newtoks\sectiontok

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-29.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-29.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-29.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-29.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begingroup
 % \newtoks\treetok % done in preamble

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-30-A.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-30-A.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-30-A.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-30-A.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begingroup
 \etocglobaldefs % necessary for \etocname etc... to survive &

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-30-B.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-30-B.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-30-B.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-30-B.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begin{center}
 \etocsetstyle{section}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-31.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-31.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-31.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-31.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \makeatletter
 \newcommand*\TOCcompute at numwidths [2]{% #1=empty/"local", #2=minimal indent

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-32.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-32.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-32.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-32.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \etocsetstyle{section}
 {\begin{enumerate}}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-40.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-40.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-40.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-40.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \etocsettocdepth {subsubsection} % set the initial tocdepth
 \etocdefaultlines % use the package default line styles. At this early stage in

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-46.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-46.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-46.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-46.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \etocruledstyle[2]{\normalfont\normalsize\rmfamily\itshape
   \fbox{\parbox{.6\linewidth}{

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-48.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-48.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-48.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-48.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begingroup
 \definecolor{subsecnum}{RGB}{13,151,225}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-5.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-5.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-5.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-5.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begingroup\parindent 0pt \parfillskip 0pt \leftskip 0cm \rightskip 1cm
 \etocsetstyle {section}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-52-A.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-52-A.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-52-A.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-52-A.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \newsavebox\firstnamei  \newsavebox\firstnumberi
 \newsavebox\lastnamei   \newsavebox\lastnumberi

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-52-B.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-52-B.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-52-B.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-52-B.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \makeatletter
 \newcommand*\firstsubname   {}  \newcommand*\lastsubname    {}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-53.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-53.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-53.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-53.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \etocsetnexttocdepth {all}
 \begingroup

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-54.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-54.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-54.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-54.tex'
 %% generated by the `filecontentshere' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \newtoks\toctabletok
 \newcommand*\appendtotok[2]{% #1=toks variable, #2=macro, expands once #2

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-6.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-6.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-6.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-6.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begingroup
 \newcommand*{\DotsAndPage}

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-7.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-7.tex	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/doc/latex/etoc/etocsnippet-7.tex	2021-07-13 20:02:42 UTC (rev 59917)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `etocsnippet-7.tex'
 %% generated by the `filecontentsdef' environment
-%% from source `etoc' on 2020/05/15.
+%% from source `etoc' on 2021/07/13.
 %%
 \begingroup % we start a group to keep the style changes local
 \newlength{\tocleftmargin}    \setlength{\tocleftmargin}{5cm}

Modified: trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx	2021-07-13 20:02:42 UTC (rev 59917)
@@ -2,27 +2,26 @@
 % 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: <15-05-2020 at 19:18:31 CEST>}%
+\def\etocdtxtimestamp {Time-stamp: <13-07-2021 at 10:15:28 CEST>}%
 %</none>
 %<*!readme>
 %%
 %% Package: etoc
-%% Version: 1.09c-2020/05/15
+%% Version: 1.09d
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2020 Jean-Francois Burnol
+%% Copyright (C) 2012-2021 Jean-Francois Burnol
 %%                         <jfbu at free dot fr>
-%% Copyright (C) 2014-2020 Christine Roemer
+%% Copyright (C) 2014-2015 Christine Roemer and collaborators
 %%                         <Christine_Roemer at t-online dot de>
-%% and collaborators for the translation into German of the documentation
-%%
+%%               (translation into German of the documentation)
 %</!readme>
 %<*none>
-\def\etocpkgdate        {2020/05/15}
-\def\etocdocdate        {2020/05/15}
-\def\etocpkgversion     {v1.09c}
+\def\etocpkgdate        {2021/07/13}
+\def\etocdocdate        {2021/07/13}
+\def\etocpkgversion     {v1.09d}
 \def\etocpkgdescription {Completely customisable TOCs (JFB)}
-\def\etocDEpkgdate      {15.05.2020}% METTRE À JOUR À CHAQUE BUMP!
-\def\etocDEdocdate      {15.05.2020}
+\def\etocDEpkgdate      {13.07.2021}% METTRE À JOUR À CHAQUE BUMP!
+\def\etocDEdocdate      {13.07.2021}
 \def\etocDEDEdocdate    {09.04.2015}%
 \def\etocDEDEpkgversion {v1.08d}%
 % Definition of \etocLicense
@@ -33,11 +32,12 @@
     \catcode32=13\catcode`\\=12^^Brelax^^A
 ^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A
 {% Package: etoc
-% Version: 1.09c-2020/05/15
+% Version: 1.09d
 % License: LPPL 1.3c
-% Copyright (C) 2012-2020 Jean-Francois Burnol <jfbu at free dot fr>
-% Copyright (C) 2014-2020 Christine Roemer <Christine_Roemer at t-online dot de>
-% and collaborators for the translation into German of the documentation
+% Copyright (C) 2012-2021 Jean-Francois Burnol <jfbu at free dot fr>
+% Copyright (C) 2014-2015 Christine Roemer and collaborators
+%                         <Christine_Roemer at t-online dot de>
+%               (translation into German of the documentation)
 %
 %     This Work may be distributed and/or modified under the
 %     conditions of the LaTeX Project Public License, in its
@@ -67,14 +67,14 @@
 %<*readme>
 <!-- -->
 
-    Source:  etoc.dtx (v1.09c-2020/05/15)
+    Source:  etoc.dtx (v1.09d)
     Author:  Jean-Francois Burnol
     Author:  Christine Roemer et al. (German tranlation)
     Info:    Completely customisable TOCs
     License: LPPL 1.3c
-    Copyright (C) 2012-2020 Jean-Francois Burnol.
-    Copyright (C) 2014-2020 Christine Roemer and collaborators for
-    the translation into German of the documentation.
+    Copyright (C) 2012-2021 Jean-Francois Burnol.
+    Copyright (C) 2014-2015 Christine Roemer and collaborators
+                  (translation into German of the documentation)
     <jfbu at free dot fr>    <Christine_Roemer at t-online dot de>
 
 ABSTRACT
@@ -174,7 +174,20 @@
 RECENT CHANGES
 ==============
 
-v1.09c \[2020/05/05\]
+v1.09d \[2021/07/13\]
+-------------------------
+
+Some minor synching with tableof 1.4c.
+
+Add `\etockeeporiginaltableofcontents` to provide a work-around to a
+compatibility issue with listings's `\lstlistoflistings`, which abuses
+`\tableofcontents` for doing something unrelated to the actual contents.
+Thanks to Denis Bitouzé for report.
+
+Usage: `\usepackage{etoc}\etockeeporiginaltableofcontents`, then
+however you must employ `\etoctableofcontents`, not `\tableofcontents`.
+
+v1.09c \[2020/05/15\]
 ---------------------
 
 Syncs with KOMA-script deprecation of `\iftocfeature`.
@@ -198,136 +211,9 @@
 
 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,
-https://github.com/dbitouze/yathesis/issues/61).
-
-
-v1.08o \[2018/06/15\]
----------------------
-
-Fixed bug showing up if an unnumbered TOC entry starts with a brace,
-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\]
----------------------
-
-Fix to `1.08k`'s introduced incompatibility with KOMA-script
-and tocbasic's `\nonumberline`.
-
-
-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.
-
-Adds `\etocsavedparttocline`, `\etocsavedchaptertocline`,
-`\etocsavedsectiontocline`, ... They can be used in the context of
-the technique explained in section "Another compatibility mode".
-
-Formerly, etoc redefined for the duration of the TOC the memoir
-macro `\chapternumberline` and its likes to have same meaning as
-`\numberline` (of course, not when executed in compatibility mode),
-for the sake of extraction of `\etocnumber`.
-
-New method detects presence of any `\<foo>numberline` macro without
-any change to originals; they can thus be used as is when applying
-the approach of "Another compatibility mode" section from manual.
-
-
-v1.08j \[2017/09/21\]
----------------------
-
-Since `1.08a-2015/03/13` `\etocname`, `\etocnumber`, `\etocpage`
-contain, if hyperref is present and configured for using
-hyperlinks in the TOC, the link destination in already expanded
-form. This means one can use them even if the style closes a
-group (for example from a `&` in a tabular), if `\etocglobaldefs`
-was issued; also one can save their meaning for delayed usage
-(with for example `\LetLtxMacro` as they are robust).
-
-But for some legacy reason `\etoclink`, contrarily to
-`\etocthelink`, was handled differently. Now, `\etoclink` also
-contains the link destination in already expanded form, and can
-thus be used even if the line style issues a `&`, as long as
-`\etocglobaldefs` is issued.
-
-Also, bugs dating back to the early days of the package, but
-surfacing only under relatively rare conditions such as usage
-of hyperref with its option "linktoc=page" got fixed.
-
-
-v1.08i \[2016/09/29\]
----------------------
-
-This fixes an issue dating back to `1.08e-2015/04/17`: under
-`\etocchecksemptiness` regime, some circumstances (such as adding to
-an already compiled document a `\localtableofcontents` before the
-main `\tableofcontents`) created an "`Undefined control sequence`
-`\Etoc at localtop`" error. Thanks to Denis Bitouzé for reporting the
-problem.
-
-On this occasion, `\etocdoesnotcheckemptiness` has been
-added to unset the flag.
-
-A rather more exotic issue was fixed: the emptiness check for
-local tocs could get confused if the `tocdepth` counter was varying
-in some specific ways from inside the `toc` file.
-
-After adding to a document a `\localtableofcontents`, two LaTeX
-passes are needed for etoc to get a chance to print the
-correct local contents. Formerly, etoc issued a Warning on
-the first pass; it now also induces LaTeX into
-announcing "There were undefined references", as this is nearer
-to the end of the log file and console output.
-
-
-v1.08h \[2016/09/25\]
----------------------
-
-New functioning of `\etocsetnexttocdepth`: the tocdepth counter is
-modified only at the time of the table of contents, not before. This
-fixes an issue which arose when `\etocsetnexttocdepth` was used
-multiple times with no intervening table of contents. Thanks to
-Denis Bitouzé for reporting the problem.
-
-The PDF documentation includes about 25 LaTeX code snippets also
-as file attachment annotations, additionally to their verbatim
-typesetting. The ordering of the documentation contents has been
-slightly re-organized.
-
-A previous documentation-only update on 2016/09/09 added a new
-section with the (approximate) translation into etoc lingua of the
-book class toc style, for easy customizability.
-
-
-The latest translation into German of the additions made to the
-documentation dates back to v1.08d \[2015/04/09\].
-
-Thanks to Christine Römer!
+Note: the German version of the documentation was last updated
+at the time of the v1.08d \[2015/04/09\] release.  Since then
+all additions to it have been left in English language.
 %</readme>
 %<*tex>-------------------------------------------------------------------------
 %% run pdflatex thrice on this file etoc.tex to produce the documentation
@@ -1150,6 +1036,7 @@
 etoc-bot-tom-rule-col-or-cmd 
 etoc-bkg-col-or-cmd 
 etoc-framed-mp-hook
+etoc-keep-orig-i-nal-table-of-con-tents
 }
 
 \hyphenation{next-toc-with-tags}
@@ -1372,7 +1259,17 @@
   based on a multi-column format, with, optionally, a ruled title or framed
   contents.
 
-  The \csa{tableofcontents} command may be used arbitrarily many times and it
+  The \csa{tableofcontents} command may be used arbitrarily many times%
+%
+\footnote{Except if \texttt{\string\etockeeporiginaltableofcontents}
+  (\textcolor{Green}{\bfseries New with 1.09d}) is issued in the preamble
+  after package loading. Then the macro \texttt{\string\etoctableofcontents},
+  not \texttt{\string\tableofcontents}, must be used if the \etoc features
+  are to apply to the global TOC. This was added to fix a compatiblity issue
+  with \texttt{listings}'s \texttt{\string\lstlistoflistings}, as it needs the
+  \texttt{\string\tableofcontents} macro to keep its original meaning.}
+%
+ and it
   has a variant \csa{localtableofcontents} which prints tables of contents
   `local' to the current surrounding document unit. An extension of the
   \csa{label}/\csa{ref} syntax allows to reproduce (with another layout) a local
@@ -6102,7 +5999,17 @@
   vordefinierte Stile, die auf der Mehrspaltenansicht mit optionalen,
   unterstrichenen Titeln oder eingerahmten Inhalten basieren.
 
-  Der \csa{tableofcontents}"=Befehl kann beliebig mehrfach benutzt werden. Er hat
+  Der \csa{tableofcontents}"=Befehl kann beliebig mehrfach benutzt werden.%
+%
+\footnote{Except if \texttt{\string\etockeeporiginaltableofcontents}
+  (\textcolor{Green}{\bfseries New with 1.09d}) is issued in the preamble
+  after package loading. Then the macro \texttt{\string\etoctableofcontents},
+  not \texttt{\string\tableofcontents}, must be used if the \etoc features
+  are to apply to the global TOC. This was added to fix a compatiblity issue
+  with \texttt{listings}'s \texttt{\string\lstlistoflistings}, as it needs the
+  \texttt{\string\tableofcontents} macro to keep its original meaning.}
+%
+  Er hat
   die Variante \csa{localtableofcontents}, welche die Inhaltsangabe 'local' zur
   aktuellen Dokumenten"=Sektion ausgibt. Eine Erweiterung der
   \csa{label}/\csa{ref}-Syntax erlaubt die Reproduktion (mit anderem Layout)
@@ -10724,8 +10631,20 @@
 
 \begin{multicols}{2}
 \begin{jfverbatim}
-v1.09c [2020/05/05]^
+v1.09d [2021/07/13]^
 
+   Some minor synching with tableof 1.4c. 
+
+   Add \etockeeporiginaltableofcontents to provide a work-around to a
+   compatibility issue with listings's \lstlistoflistings, which abuses
+   \tableofcontents for doing something unrelated to the actual contents.
+   Thanks to Denis Bitouzé for report.
+
+   Usage: \usepackage{etoc}\etockeeporiginal-tableofcontents, then
+   however you must employ \etoctableofcontents, not \tableofcontents.
+
+~v1.09c [2020/05/15]^
+
    Syncs with KOMA-script deprecation of \iftocfeature.
 
 ~v1.09a, v1.09b [2019/11/17]^
@@ -12692,15 +12611,12 @@
    \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
-% it. I don't globally cancel |\tof at begingroup| and |\tof at endgroup| to leave
-% open for the user the (dubious) possibility of using directly |\tableof|,
-% |\tablenotof| (rather than only the reasonable thing which is
-% |\nexttocwithtags{}{}|).
-%    \begin{macrocode}
-      \let\tof at begingroup\@empty
-      \let\tof at endgroup  \@empty
-%    \end{macrocode}
+% Prior to its release |1.4c|, |tableof| added a group pair via |\tof at begin|
+% and |\tof at finish|. This was removed at |1.4c|. So no need to do anything now
+% here about silencing |\tof at begingroup| and |\tof at endgroup|: they are
+% inserted only in the |tableof| private copy of the |.toc| file which is
+% used by its own table of contents typesetting command.
+%
 % |1.08i| removes definition of |\etoc at startlocaltoc| from here. It is done
 % in |\Etoc at localtableofcontents| or uses its default of |\@gobble|.
 %
@@ -12712,13 +12628,19 @@
       {\let\Etoc at aftertitlehook\@empty\Etoc at table@fcontents}
       {\def\Etoc at aftertitlehook{\etocaftertitlehook}\Etoc at table@fcontents}%
 }% \etoctableofcontents
+%    \end{macrocode}
+% See at end of this file for the explanation of this |1.09d| added saving
+% of original meaning at package loading time.
+%    \begin{macrocode}
+\let\etocoriginaltableofcontents\tableofcontents
 \let\tableofcontents\etoctableofcontents
 \newcommand*\localtableofcontents{%
    \Etoc at openouttoc
    \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
+%    \end{macrocode}
+% Same comment relative to |tableof|. No need to do anything here.
+%    \begin{macrocode}
       \@ifstar
       {\let\Etoc at aftertitlehook\@empty\Etoc at localtable@fcontents}
       {\def\Etoc at aftertitlehook{\etocaftertitlehook}\Etoc at localtable@fcontents}%
@@ -12823,15 +12745,36 @@
     #2\@nobreakfalse % 1.07d: \@nobreakfalse moved here
     \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
-% \etoc is now forced to reset globally |\contentsline|.
+% |\contentsline| was set to |\Etoc at etoccontentsline| by a non-global |\let|,
+% and it will recover its normal value from exiting a scope limiting group.
+% But |tableof| (since |1.4a|) under |\etocglobaldefstrue| does a global
+% redefinition of |\contentsline|.  Its |\tof at finish| then does a global
+% restore of |\contentsline|, but it will be to the \etoc set
+% value. |\tof at finish| is active only if either the table of contents was
+% typeset using |\tableof|, |\tablenotof|, |\tableoftaggedcontents|, or
+% |\nextocwithtags| was used.  If not active it is either undefined (no
+% package |tableof|) or |\@empty|. Prior to |tableof| |1.4c|, the
+% |\tof at finish| closed a group and could be undefined as well, but not if
+% |\etocglobaldefstrue|.
+%
+% \etoc |1.09c| tested here only equality to |\@empty| to decide if it is
+% needed to globally restore |\contentsline| but this meant the global restore
+% was done systematically in case of absence of package |tableof|.
+%
+% If rather than |\@empty| the |\tof at finish| fall-back was |\relax| we could
+% use here |\@ifundefined| to check in one go (matters of speaking because
+% expansion of |\@ifundefined| is not in "one-go"). Maybe I should update
+% |tableof|, but for time being I will simply add an extra test. All this is
+% probably lots of time on irrelevant issue.
 %    \begin{macrocode}
     \ifx\Etoc at global\global
-     \ifx\tof at finish\@empty
-     \else
+     \@ifundefined{tof at finish}
+     {}
+     {\ifx\tof at finish\@empty
+      \else
        \global\let\contentsline\Etoc at savedcontentsline
-     \fi
+      \fi
+     }%
     \fi
     \@gobble\etoc@
 }% end of \Etoc at tableofcontents definition by \etocsettocstyle
@@ -13765,6 +13708,14 @@
 \etocobeydepthtags
 \let\etocaftertochook    \@empty % public for end user.
 \let\etocbeforetitlehook \@empty % new with 1.07m
+%    \end{macrocode}
+% |listings| abuses |\tableofcontents| for its |\lstlistoflistings|. It
+% doesn't seem worth to let my version of |\tableofcontents| have to check for
+% this special circumstance. So at |1.09d|, simply add this (and induced
+% annoying updates to documentation at at least two locations):
+%    \begin{macrocode}
+\def\etockeeporiginaltableofcontents
+   {\let\tableofcontents\etocoriginaltableofcontents}%
 \endinput
 %    \end{macrocode}
 % \MakePercentComment
@@ -13784,7 +13735,7 @@
   Grave accent  \`     Left brace    \{     Vertical bar  \|
   Right brace   \}     Tilde         \~}
 
-\CheckSum{3516}%
+\CheckSum{3513}%
 
 \csname check at checksum\endcsname
 \Finale

Modified: trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty	2021-07-13 20:02:17 UTC (rev 59916)
+++ trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty	2021-07-13 20:02:42 UTC (rev 59917)
@@ -23,17 +23,16 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{etoc}
- [2020/05/15 v1.09c Completely customisable TOCs (JFB)]
+ [2021/07/13 v1.09d Completely customisable TOCs (JFB)]
 %%
 %% Package: etoc
-%% Version: 1.09c-2020/05/15
+%% Version: 1.09d
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2020 Jean-Francois Burnol
+%% Copyright (C) 2012-2021 Jean-Francois Burnol
 %%                         <jfbu at free dot fr>
-%% Copyright (C) 2014-2020 Christine Roemer
+%% Copyright (C) 2014-2015 Christine Roemer and collaborators
 %%                         <Christine_Roemer at t-online dot de>
-%% and collaborators for the translation into German of the documentation
-%%
+%%               (translation into German of the documentation)
 \RequirePackage{multicol}
 \DeclareOption*{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}}
 \ProcessOptions\relax
@@ -782,19 +781,16 @@
    \Etoc at openouttoc
    \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
       {\let\Etoc at aftertitlehook\@empty\Etoc at table@fcontents}
       {\def\Etoc at aftertitlehook{\etocaftertitlehook}\Etoc at table@fcontents}%
 }% \etoctableofcontents
+\let\etocoriginaltableofcontents\tableofcontents
 \let\tableofcontents\etoctableofcontents
 \newcommand*\localtableofcontents{%
    \Etoc at openouttoc
    \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
       {\let\Etoc at aftertitlehook\@empty\Etoc at localtable@fcontents}
       {\def\Etoc at aftertitlehook{\etocaftertitlehook}\Etoc at localtable@fcontents}%
@@ -836,10 +832,13 @@
     #2\@nobreakfalse % 1.07d: \@nobreakfalse moved here
     \Etoc at restoretocdepth  % 1.07g. moved here from before #2 by 1.08
     \ifx\Etoc at global\global
-     \ifx\tof at finish\@empty
-     \else
+     \@ifundefined{tof at finish}
+     {}
+     {\ifx\tof at finish\@empty
+      \else
        \global\let\contentsline\Etoc at savedcontentsline
-     \fi
+      \fi
+     }%
     \fi
     \@gobble\etoc@
 }% end of \Etoc at tableofcontents definition by \etocsettocstyle
@@ -1548,6 +1547,8 @@
 \etocobeydepthtags
 \let\etocaftertochook    \@empty % public for end user.
 \let\etocbeforetitlehook \@empty % new with 1.07m
+\def\etockeeporiginaltableofcontents
+   {\let\tableofcontents\etocoriginaltableofcontents}%
 \endinput
 %%
 %% End of file `etoc.sty'.



More information about the tex-live-commits mailing list.