summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/etoc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-11-19 03:01:37 +0000
committerNorbert Preining <norbert@preining.info>2022-11-19 03:01:37 +0000
commit71a2e00f473ea9e10dd2d9439159a4917afb266f (patch)
treeac3f1206810a83cbff3ceab1be542162f4994d3b /macros/latex/contrib/etoc
parent8141bb63ac908014fe5b6bc7ebed4d2889c014d4 (diff)
CTAN sync 202211190301
Diffstat (limited to 'macros/latex/contrib/etoc')
-rw-r--r--macros/latex/contrib/etoc/README.md10
-rw-r--r--macros/latex/contrib/etoc/etoc.dtx270
-rw-r--r--macros/latex/contrib/etoc/etoc.pdfbin816153 -> 819311 bytes
3 files changed, 163 insertions, 117 deletions
diff --git a/macros/latex/contrib/etoc/README.md b/macros/latex/contrib/etoc/README.md
index 5c46f22d66..b58480ffb9 100644
--- a/macros/latex/contrib/etoc/README.md
+++ b/macros/latex/contrib/etoc/README.md
@@ -1,6 +1,6 @@
<!-- -->
- Source: etoc.dtx (1.09f)
+ Source: etoc.dtx (1.09g)
Author: Jean-Francois Burnol
Info: Completely customisable TOCs
License: LPPL 1.3c
@@ -50,7 +50,7 @@ execute `etex etoc.dtx`.
It is also possible to execute latex or pdflatex directly on etoc.dtx.
-To produce etoc.pdf one can run pdflatex (thrice) directly on etoc.dtx or on
+To produce etoc.pdf one can run pdflatex directly on etoc.dtx or on
the file etoc.tex which was extracted from `etex etoc.dtx` step.
Options can be set in etoc.tex:
@@ -97,6 +97,12 @@ etoc.sty, etoc.tex, etoc.pdf, etoc.dvi.
RECENT CHANGES
==============
+1.09g \[2022/11/17\]
+--------------------
+
+Compatibility hotfix with recent hyperref `7.00u` of `2022-11-13`.
+Thanks to Denis Bitouzé for signaling the breakage to the author.
+
1.09f \[2022/08/30\]
--------------------
diff --git a/macros/latex/contrib/etoc/etoc.dtx b/macros/latex/contrib/etoc/etoc.dtx
index f956e6ee9c..362219028f 100644
--- a/macros/latex/contrib/etoc/etoc.dtx
+++ b/macros/latex/contrib/etoc/etoc.dtx
@@ -2,20 +2,20 @@
% 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: <30-08-2022 at 21:00:50 CEST>}%
+\def\etocdtxtimestamp {Time-stamp: <17-11-2022 at 23:14:36 CET>}%
%</none>
%<*!readme>
%%
%% Package: etoc
-%% Version: 1.09f
+%% Version: 1.09g (DEVELOPMENT)
%% License: LPPL 1.3c
%% Copyright (C) 2012-2022 Jean-Francois Burnol
%% <jfbu at free dot fr>
%</!readme>
%<*none>
-\def\etocpkgdate {2022/08/30}
-\def\etocdocdate {2022/08/30}
-\def\etocpkgversion {1.09f}
+\def\etocpkgdate {2022/11/17}
+\def\etocdocdate {2022/11/17}
+\def\etocpkgversion {1.09g}
\def\etocpkgdescription {Completely customisable TOCs (JFB)}
%% German translation was last udpated on April 2015 and all new material
%% was included since in English. During 2020/2021/2022 emerged a still
@@ -33,7 +33,7 @@
\catcode32=13\catcode`\\=12^^Brelax^^A
^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A
{% Package: etoc
-% Version: 1.09f
+% Version: 1.09g
% License: LPPL 1.3c
% Copyright (C) 2012-2022 Jean-Francois Burnol <jfbu at free dot fr>
%
@@ -60,7 +60,7 @@
%<*readme>
<!-- -->
- Source: etoc.dtx (1.09f)
+ Source: etoc.dtx (1.09g)
Author: Jean-Francois Burnol
Info: Completely customisable TOCs
License: LPPL 1.3c
@@ -110,7 +110,7 @@ execute `etex etoc.dtx`.
It is also possible to execute latex or pdflatex directly on etoc.dtx.
-To produce etoc.pdf one can run pdflatex (thrice) directly on etoc.dtx or on
+To produce etoc.pdf one can run pdflatex directly on etoc.dtx or on
the file etoc.tex which was extracted from `etex etoc.dtx` step.
Options can be set in etoc.tex:
@@ -157,6 +157,12 @@ etoc.sty, etoc.tex, etoc.pdf, etoc.dvi.
RECENT CHANGES
==============
+1.09g \[2022/11/17\]
+--------------------
+
+Compatibility hotfix with recent hyperref `7.00u` of `2022-11-13`.
+Thanks to Denis Bitouzé for signaling the breakage to the author.
+
1.09f \[2022/08/30\]
--------------------
@@ -251,7 +257,7 @@ Syncs with KOMA-script deprecation of `\iftocfeature`.
\chardef\Withdvipdfmx 0 % 0 = pdflatex or latex+dvips, 1 = dvipdfmx
\chardef\NoSourceCode 1 % 0 = include source code, 1 = do not
\NeedsTeXFormat {LaTeX2e}%
- \PassOptionsToClass {a4paper,fontsize=11pt,twoside}{scrartcl}%
+ \PassOptionsToClass {a4paper,fontsize=11pt,twoside}{scrartcl}%
\PassOptionsToPackage {ngerman,english}{babel}%
\else % latex run is on etoc.tex
\chardef\extractfiles 2 % do not extract files, only typeset
@@ -279,15 +285,11 @@ Syncs with KOMA-script deprecation of `\iftocfeature`.
\begingroup
\input docstrip.tex
\askforoverwritefalse
- \def\etocpkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
- \string\NeedsTeXFormat{LaTeX2e}^^J%
- \string\ProvidesPackage{etoc}^^J%
- \space[\etocpkgdate\space v\etocpkgversion\space\etocpkgdescription]}%
\generate{\nopreamble\nopostamble
\file{README.md}{\from{etoc.dtx}{readme}}%
\usepostamble\defaultpostamble
\file{etoc.tex}{\from{etoc.dtx}{tex}}%
- \usepreamble\etocpkgpreamble
+ \usepreamble\defaultpreamble
\file{etoc.sty}{\from{etoc.dtx}{package}}}%
\endgroup
\fi % end of file extraction (from etex/latex/pdflatex run on etoc.dtx)
@@ -340,8 +342,8 @@ Syncs with KOMA-script deprecation of `\iftocfeature`.
{\usepackage{doc}[=v2]}%
% Why on earth do I lose my time doing this?
{\GenericError
- {(xint build doc)\@spaces}%
- {xint build error: %
+ {(etoc build doc)\@spaces}%
+ {etoc build error: %
Your LaTeX installation seems to be broken, format is\MessageBreak
2022-06-01 or later but `doc' package in its `v2' version\MessageBreak
seems to not be available. \space Will try with `doc' but if\MessageBreak
@@ -1738,7 +1740,7 @@ which was inspired from what \LaTeX2e's |\@dottedtocline| macro does.
Here is how it was produced:
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\section{A second example}
@@ -1806,7 +1808,7 @@ layout is a bit like the one of the \hyperref[toc:main]{main document
The code:
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\section{A Beautiful Thesis example}
@@ -1852,7 +1854,7 @@ breaks. Also, they do not worry about potential multi-column use.
\filecontentsexec\foo
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\section{Linked list of the main package commands}
@@ -2053,7 +2055,7 @@ example the table of contents of
\filecontentsexec\foo
We used this: \filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}.tex} In the above example, not
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex} In the above example, not
only did we use |\ref{toc:c}| to print here the distant (local) table of
contents which has been labeled |toc:c| but we added a (possibly confusing)
|\label{toc:d}|. This is done for the down-to-earth reason of being able
@@ -2310,7 +2312,7 @@ this situation:
\clearpage % or anything ending up causing its presence here right before
% the \etocdepthtag.toc
\etocdepthtag.toc{sometag}
- \include{some file starting with sections}
+ \include{some file containing sections}
\end{verbatim}
The tag will end up in the |.toc| file \emph{after} all section headings from
the included file. The cause is that \LaTeX\ inserts immediately in the
@@ -2683,7 +2685,7 @@ they were at the time the TOC is typeset.
\endgroup}
\makeatother
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}-A.tex}
+\attachfile[description={demo \the\value{section}-A}]{etocsnippet-\the\value{section}-A.tex}
One can add to the above arbitrary text formatting commands, for example
replace |\etocpage| by |\textcolor{blue}{\etocpage}|.
@@ -2739,7 +2741,7 @@ This example only has sections and subsections, and the code used in \csa{MyStan
{\etocsavedsectiontocline{\numberline{{\color{cyan}\etocthenumber}}\etocname}{\etocpage}}
{}%
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}-B.tex}
+\attachfile[description={demo \the\value{section}-B}]{etocsnippet-\the\value{section}-B.tex}
Notice the page head-mark added by this standard TOC. Sections and subsections
are printed exactly as in the default (except for the subsections of one
specific user-chosen section and except for the color of the section numbers),
@@ -2887,7 +2889,7 @@ using |pt| as dimensional unit.
}
\makeatother
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}-A.tex}
+\attachfile[description={demo \the\value{section}-A}]{etocsnippet-\the\value{section}-A.tex}
Nota Bene: the code deliberately handles the non-numbered sectioning units
unlike the way of the standard document classes (particularly regarding the
alignment of multi-line headings.)
@@ -2947,7 +2949,7 @@ TOC at end of document one will naturally have to issue again
}% end of \TOClocalstyle
\makeatother
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}-B.tex}
+\attachfile[description={demo \the\value{section}-B}]{etocsnippet-\the\value{section}-B.tex}
As mentioned previously, this handles non-numbered (multi-line) sectioning
units somewhat differently from what happens in the standard document classes.
@@ -3005,7 +3007,7 @@ line styles and some colors added (it has been put in a float which appears
\end{figure}
\endgroup
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}-A.tex}
+\attachfile[description={demo \the\value{section}-A}]{etocsnippet-\the\value{section}-A.tex}
\filecontentsexec\filecontentsheremacro
@@ -3136,7 +3138,7 @@ code is used also for \hyperref[toc:clone]{this other toc}.
(\emph{cf.} \hyperref[toc:clone]{this other toc})}
\end{figure}
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\filecontentsexec\filecontentsheremacro
@@ -3171,10 +3173,10 @@ many matters do not seem to be widely shared).
{\mdseries\etocname}
{}
\etocsetstyle{subsection}
- {\begin{lrbox}{\forsubsections}\upshape\etocskipfirstprefix}
+ {\begin{lrbox}{\forsubsections}\footnotesize\upshape\etocskipfirstprefix}
{; }
{\etocname}
- {\end{lrbox}\footnote{\unhbox\forsubsections.}}
+ {.\end{lrbox}\footnote{\unhbox\forsubsections}}
\etocsetstyle{subsubsection}
{ (\itshape\etocskipfirstprefix}
{, }
@@ -3189,7 +3191,7 @@ many matters do not seem to be widely shared).
The code used:
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\clearpage
@@ -3317,7 +3319,7 @@ Here is the numbered and linked list of all tables of contents which are
displayed within this document: \tableofcontents.
\endgroup
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\endgroup
After |\etocsetstyle{visibletoc}{..}{..}{..}{..}|, all future TOCs (not in
@@ -3396,7 +3398,7 @@ typeset with the following code:
\tableofcontents
\endgroup
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
A related command \csb{etocimmediatetoccontentsline} (and its starred version)
is also provided. For discussion and the meaning of ``immediate'', refer to
@@ -3528,7 +3530,7 @@ The resulting tree has been put in a \hyperref[toc:forest]{float}, which
appears \vpageref[above]{toc:forest}. Here is the
code used for its production:
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
Why |\hypersetup{hidelinks}|? as explained in
\autoref{ssec:hidelinks}, I prefer the links in TOCs not to be
colorized, nor framed, so this document inserts a command
@@ -3625,7 +3627,7 @@ contents of this (or another) document part, only a \csa{sectiontok} and a
\end{tikzpicture}
\end{figure}
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\filecontentsexec\filecontentsheremacro
@@ -3834,14 +3836,14 @@ example I excluded some sections from the display, using the technique of the
appears \vpageref{toc:mindmap}.
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
An interesting alternative is to use \etoc rather to convert the entire TOC
into a TikZ tree (perhaps excluding some parts) and print it out to a file
from which it can be recovered and manipulated directly by the author of the
document. Things written to the |.log| file get broken into lines. Here is a
technique to get non-broken output. Once the \csa{treetok} has been computed
by \etoc (as in the \hyperref[toc:molecule]{molecule} example, or the current
-example), this code snippet will write it out to file with extension
+example), this demo will write it out to file with extension
|.toctree|:
\begin{verbatim}
\newwrite\TOCasTree
@@ -3949,7 +3951,7 @@ as is possible relatively simply now with |1.08|. The code follows.
\filecontentsexec\foo
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}-A.tex}
+\attachfile[description={demo \the\value{section}-A}]{etocsnippet-\the\value{section}-A.tex}
Examining the code above the reader will wonder why the |\\| are
always given first in \meta{prefix+contents} and not, as is more
intuitive, rather last. In some favorable cases (but almost never
@@ -4019,7 +4021,7 @@ contents.
\filecontentsexec\foo
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}-B.tex}
+\attachfile[description={demo \the\value{section}-B}]{etocsnippet-\the\value{section}-B.tex}
\section{A TOC self-adjusting widths for its typesetting}
\label{sec:thirdexampleextra}
@@ -4082,7 +4084,7 @@ automatically the ``numwidths'' used for typesetting the unit numbers in the
}%
\makeatother
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
The optional parameter to \csa{TOCcomputenumwidths} specifies the minimal
indent. In case nothing is numbered you may wish a higher value than |0.5em|.
For each local table of contents to have its own width computations, the macro
@@ -4202,7 +4204,7 @@ obtained in the following manner:%
{\etocname}
{.\hfil\par\endgroup\pagebreak[3]}
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\endgroup
These provisory style definitions rely on the automatic
@@ -4547,7 +4549,7 @@ contents} of this document was typeset following these instructions:
\tableofcontents \label{toc:main}
\endgroup
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
In this way, the subsections used the style originally designed for
subsubsections, the subsubsections were not printed. Without this modification,
the appearance would have been very different: the package line styles were
@@ -5121,7 +5123,7 @@ leaders which are less spread out than in the package default.
\tableofcontents
\endgroup
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\filecontentsexec\filecontentsheremacro
@@ -5342,7 +5344,7 @@ the frame.
\tableofcontents \label{toc:clone} \ref{toc:globalcmds}
\endgroup
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\filecontentsexec\filecontentsheremacro
% 1.07l on the occasion of traduction into German documentation
@@ -5628,7 +5630,7 @@ But first, the code of \csa{thispartstats}:\par
\endgroup
}
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}-A.tex}
+\attachfile[description={demo \the\value{section}-A}]{etocsnippet-\the\value{section}-A.tex}
And now, the variant with macros rather than boxes (this variant as it
stands here is for using within a section).
\begin{filecontentshere}{etocsnippet-\the\value{section}-B.tex}
@@ -5660,7 +5662,7 @@ stands here is for using within a section).
}
\makeatother
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}-B.tex}
+\attachfile[description={demo \the\value{section}-B}]{etocsnippet-\the\value{section}-B.tex}
\section{Using depth tags}
\label{ssec:tocwithdepthtags}
@@ -5755,7 +5757,7 @@ get:
\filecontentsexec\foo
\filecontentsprint\foo
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\section{Typesetting the TOC as a table (the old way)}
\label{ssec:tocastableold}
@@ -5847,7 +5849,7 @@ Note: rather than |\toks| registers it would be easier here to use \eTeX{}
\the\toctabletok
\endgroup
\end{filecontentshere}
-\attachfile{etocsnippet-\the\value{section}.tex}
+\attachfile[description={demo \the\value{section}}]{etocsnippet-\the\value{section}.tex}
\clearpage
\etocdepthtag.toc {etocandworld}
@@ -5974,10 +5976,10 @@ not possible.
having been loaded with the |titles| option.
\end{framed}
-It is possible to customize (using package |tocloft| for
-example) throughout the document the macros \csa{l@section},
-\csa{l@subsection} ... and the effect will be seen in the next
-table of contents typeset by \etoc in compatibility mode.
+It is possible to modify midway in the document the macros \csa{l@section},
+\csa{l@subsection} ... but the effect will be seen only in table of contents
+typeset by \etoc in compatibility mode (and of course after those
+customizations). It will have no effect on true \etoc TOCs.
\subsection{Compatibility with the \texttt{memoir} class}
\label{ssec:memoir}
@@ -6044,8 +6046,8 @@ use \localtoc after a \csa{chapter}. But if you want one after a
\etoc used to be incompatible with package
|tocvsec2|\footnote{\url{http://ctan.org/pkg/tocvsec2}}; it now cohabits, sort
- of, as it deactivates |tocvsec2|'s modification of |\tableofcontents| (done in
- the style above) and also cancels its other |toc|-related macros, but
+ of, as it deactivates |tocvsec2|'s modification of |\tableofcontents|
+ and also cancels its other |toc|-related macros, but
reimplements partially their functionality with \csb{etocsettocdepth.toc}. By
the way, at least two latex runs are necessary for new uses of this command in
a document to have an effect in tables of contents.
@@ -6091,8 +6093,9 @@ groups. All TOCs are typeset inside groups.
When a \localtoc is inserted by the user in the document, a
line containing an \etoc inner command and an identification
-number is added to the |.toc| file. The correct local table of
-contents will be displayed only on the next |latex| run.
+number is added to the |.toc| file on first subsequent compilation.
+The correct local table of
+contents will be displayed only on the second compilation.
\section{Errors and catastrophes}
@@ -6104,12 +6107,12 @@ contents will be displayed only on the next |latex| run.
contents are mutually compatible: in particular the \etoc
default line styles expect each to be started in ``vertical mode''.
- When using multiple \toc commands in a document, one should beware from adding
- typesetting instructions directly in the |.toc| file, as they will be executed
- by \etoc for all TOCs: even for a \localtoc it doesn't matter if that
- instruction seems to concern material outside of its scope, it will get
- executed nevertheless. If absolutely necessary (but this should never be)
- these instructions should be done in such a way that they can be activated or
+ When using multiple \toc commands in a document, one should beware from
+ adding typesetting instructions directly in the |.toc| file, as they will be
+ executed by \etoc for all TOCs: even for a \localtoc it doesn't matter if
+ that instruction seems to concern material outside of its scope, it will get
+ executed nevertheless. If absolutely necessary extra commands in the |.toc|
+ file should be configured in such a way that they can be activated or
deactivated easily from the document source, as need be.
As is usual with toc and labels, after each change, one has
@@ -6196,7 +6199,12 @@ version is \texttt{\etocpkgversion}, of \texttt{\etocpkgdate}.
\def {\ifvmode\advance\jfverbadim.5em\relax\else\expandafter\jfverbaspace\fi}}\x
\makeatother
\begin{jfverbatim}
-1.09f [2022/08/30]^
+1.09g [2022/11/17]^
+
+ Compatibility hotfix with recent hyperref 7.00u of 2022-11-13.
+ Thanks to Denis Bitouzé for signaling the breakage to the author.
+
+~1.09f [2022/08/30]^
No more shipping of a German translation of the documentation,
as it was last updated in April 2015.
@@ -6690,7 +6698,6 @@ version is \texttt{\etocpkgversion}, of \texttt{\etocpkgdate}.
% transférés depuis xint.dtx. Il est doublement obsolète car je rajoute un
% paragraphe de texte de toute façon avant le premier macrocode.
% \indent % !!!!!!!!!!!!!!!!! Lundi 09 mars 2015 à 09:32:22
-% PUTAIN DE BORDEL DE MERDE AVEC CES \trivlist
% il faut faire un paragraphe après \section sinon pas d'espacement
% vertical en sortie de blocs macrocode. Pas évident à trouver, vu que
% je customisais différentes choses qui pouvaient affecter macrocode.
@@ -6973,27 +6980,6 @@ paragraphs which may prove vaguely useful to people not the author.
% date, name, or version. So I extracted this from the real macrocode
% environment (leaving out the \init@crossref.)
-\makeatletter
-\begingroup
-\topsep\MacrocodeTopsep
-\trivlist\parskip\z@\item[]
-\macro@font
-\leftskip\@totalleftmargin \advance\leftskip\MacroIndent
-\rightskip\z@ \parindent\z@ \parfillskip\@flushglue
-\global\@newlistfalse \global\@minipagefalse
-\ifcodeline@index
- \everypar{\global\advance\c@CodelineNo\@ne
- \llap{\theCodelineNo\ \hskip\@totalleftmargin}}%
-\fi
-\string\NeedsTeXFormat\string{LaTeX2e\string}\par
-\string\ProvidesPackage\string{etoc\string}\par
-\noindent\space [\etocpkgdate\space v\etocpkgversion\space\etocpkgdescription]\par
-\nointerlineskip
-\global\@inlabelfalse
-\endtrivlist
-\endgroup
-\makeatother
-
% The catcode hackery next is to avoid to have <*package> to be listed
% in the commented source code...
% (c) 2012/11/19 jf burnol ;-)
@@ -7008,6 +6994,9 @@ paragraphs which may prove vaguely useful to people not the author.
%</none>
%<*package>
% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{etoc}
+[2022/11/17 v1.09g Completely customisable TOCs (JFB)]
\RequirePackage{multicol}
\DeclareOption*{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}}
\ProcessOptions\relax
@@ -7180,14 +7169,67 @@ paragraphs which may prove vaguely useful to people not the author.
%^^A Side note to myself: I see there is now a |\@gobblethree| in latex.ltx and
%^^A I wonder since when. No time to lose on checking that.
%^^A Answer: 2020-02-27 ltdefns.dtx 1.5g |\@gobblethree|: Macro added
+%
+% |1.09g| adapts to |hyperref| depending on
+% whether the latter is at |7.00u| or earlier. Indeed internal changes to
+% |hyperref| at |7.00u| broke \etoc. Thanks to Denis~\textsc{Bitouzé} for
+% reporting the issue.
% \begin{macrocode}
\AtBeginDocument{%
\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}%
-\@ifpackageloaded{hyperref}{\Etoc@hyperreftrue
- \def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}%
- \let\Etoc@gobblefourorthree\@gobblefour}
- {\def\Etoc@et@hop#1#2#3#4{#2{#3}{#4}#1}%
- \long\def\Etoc@gobblefourorthree#1#2#3{}}%
+\@ifpackageloaded{hyperref}{%
+ \Etoc@hyperreftrue
+ \@ifpackagelater{hyperref}{2022/11/13}%
+ {%
+ \def\Etoc@getthepage {%
+ \ifx\Hy@toclinkstart\Etoc@getthepage@token
+ \expandafter\expandafter\expandafter\Etoc@getthepage@hyp
+ \else
+ \expandafter\Etoc@getthepage@nohyp
+ \fi}%
+ \def\Etoc@getnb@a {%
+ \ifx\Hy@toclinkstart\Etoc@getnb@token
+ \expandafter\expandafter\expandafter\Etoc@getnb@hyp
+ \else
+ \expandafter\Etoc@getnb@nohyp
+ \fi}%
+ \def\Etoc@getit {%
+ \ifx\Hy@toclinkstart\Etoc@getit@token
+ \expandafter\expandafter\expandafter\Etoc@getit@hyp
+ \else
+ \expandafter\Etoc@getit@nohyp
+ \fi}%
+ }%
+ {%
+ \def\Etoc@getthepage {%
+ \ifx\hyper@linkstart\Etoc@getthepage@token
+ \expandafter\Etoc@getthepage@hyp
+ \else
+ \expandafter\Etoc@getthepage@nohyp
+ \fi}%
+ \def\Etoc@getnb@a {%
+ \ifx\hyper@linkstart\Etoc@getnb@token
+ \expandafter\Etoc@getnb@hyp
+ \else
+ \expandafter\Etoc@getnb@nohyp
+ \fi}%
+ \def\Etoc@getit {%
+ \ifx\hyper@linkstart\Etoc@getit@token
+ \expandafter\Etoc@getit@hyp
+ \else
+ \expandafter\Etoc@getit@nohyp
+ \fi}%
+ }%
+ \def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}%
+ \let\Etoc@gobblefourorthree\@gobblefour
+ }%
+ {%
+ \let\Etoc@getthepage\Etoc@getthepage@nohyp
+ \let\Etoc@getnb@a\Etoc@getnb@nohyp
+ \let\Etoc@getit \Etoc@getit@nohyp
+ \def\Etoc@et@hop#1#2#3#4{#2{#3}{#4}#1}%
+ \long\def\Etoc@gobblefourorthree#1#2#3{}%
+ }%
\@ifl@t@r\fmtversion{2021/11/15}%
{%
\def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}%
@@ -7629,16 +7671,16 @@ paragraphs which may prove vaguely useful to people not the author.
% |1.08j| fixes an old |\ifx #1\hyperlink@start| bug.
%
% Potential (but rather exotic) brace removal problems avoided at |1.08n|.
+%
+% |1.09g| delays definition of \cs{Etoc@getthepage} to \cs{AtBeginDocument} to
+% check if |hyperref| is at version |7.00u 2022-11-13| or later, as that
+% version replaced \cs{hyper@linkstart} with \cs{protected} macro
+% \cs{Hy@toclinkstart} which furthermore requires one more expansion step.
+% Formerly, the \cs{ifEtoc@hyperref} test was executed via the expansion of
+% \cs{Etoc@getthepage} but now this test is tacitly done only once at begin
+% document to define appropriately \cs{Etoc@getthepage}. Falls back to
+% \cs{Etoc@getthepage@nohyp}.
% \begin{macrocode}
-\def\Etoc@getthepage {%
- \if1\ifEtoc@hyperref
- \ifx\hyper@linkstart\Etoc@getthepage@token1\else0\fi
- \else0\fi
- \expandafter\Etoc@getthepage@hyp
- \else
- \expandafter\Etoc@getthepage@nohyp
- \fi
-}
\def\Etoc@getthepage@nohyp #1\etoc@ {%
\Etoc@global\def\etocthepage {#1}%
\Etoc@global\def\etocthelinkedpage {#1}%
@@ -7706,17 +7748,16 @@ paragraphs which may prove vaguely useful to people not the author.
\Etoc@bracednametrue
\futurelet\Etoc@getnb@token\Etoc@getnb
}
+% \end{macrocode}
+% |1.09g| adds an \cs{Etoc@getnb@a} which defaults to \cs{Etoc@getnb@nohyp}
+% and gets defined only at begin document to adapt to |hyperref| depending on
+% whether the latter is at |7.00u| or earlier.
+% \begin{macrocode}
\def\Etoc@getnb {%
\ifx\Etoc@getnb@token\bgroup
\expandafter\Etoc@getnb@nohyp@nonbr
\else
- \if1\ifEtoc@hyperref
- \ifx\hyper@linkstart\Etoc@getnb@token1\else0\fi
- \else0\fi
- \expandafter\expandafter\expandafter\Etoc@getnb@hyp
- \else
- \expandafter\expandafter\expandafter\Etoc@getnb@nohyp
- \fi
+ \expandafter\Etoc@getnb@a
\fi
}
% \end{macrocode}
@@ -7918,15 +7959,10 @@ paragraphs which may prove vaguely useful to people not the author.
\fi
}
\def\Etoc@getit@nameisbraced {\futurelet\Etoc@getit@token\Etoc@getit }
-\def\Etoc@getit {%
- \if1\ifEtoc@hyperref
- \ifx\hyper@linkstart\Etoc@getit@token1\else0\fi
- \else0\fi
- \expandafter\Etoc@getit@hyp
- \else
- \expandafter\Etoc@getit@nohyp
- \fi
-}
+% \end{macrocode}
+% |1.09g| delays defining \cs{Etoc@getit} to at begin document to adapt to
+% |hyperref| depending on whether the latter is at |7.00u| or earlier.
+% \begin{macrocode}
\def\Etoc@getit@nohyp #1\hspace#2#3\etoc@ {%
\ifx\relax#2%
\else
@@ -8703,7 +8739,11 @@ paragraphs which may prove vaguely useful to people not the author.
\csname Etoc@end@\csname Etoc@#1@\endcsname\endcsname {#5}%
}
% \end{macrocode}
-% placeholder for comments
+% Since the |1.09f 2022/08/30| release, some syntax highlighting is
+% done ; but for some reason the \cs{etocfontone} below is colorized
+% not like others. For |1.09g 2022/11/17| hotfix release due to
+% breaking change in |hyperref 7.00u 2022-11-13| I simply do not have time to
+% investigate the matter... will be for next time. If there is one!
% \begin{macrocode}
\def\etocfontminustwo {\normalfont \LARGE \bfseries}
\def\etocfontminusone {\normalfont \large \bfseries}
diff --git a/macros/latex/contrib/etoc/etoc.pdf b/macros/latex/contrib/etoc/etoc.pdf
index 898865db09..1cf82dd474 100644
--- a/macros/latex/contrib/etoc/etoc.pdf
+++ b/macros/latex/contrib/etoc/etoc.pdf
Binary files differ