summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/etoc/README182
-rw-r--r--Master/texmf-dist/doc/generic/etoc/README.md188
-rw-r--r--Master/texmf-dist/doc/generic/etoc/etoc-DE.pdfbin0 -> 335594 bytes
-rw-r--r--Master/texmf-dist/doc/generic/etoc/etoc.pdfbin0 -> 361750 bytes
-rw-r--r--Master/texmf-dist/doc/latex/etoc/README150
-rw-r--r--Master/texmf-dist/doc/latex/etoc/etoc-DE.pdfbin319641 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/etoc/etoc-DE.tex35
-rw-r--r--Master/texmf-dist/doc/latex/etoc/etoc.pdfbin338156 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/etoc/etoc.tex30
-rw-r--r--Master/texmf-dist/source/generic/etoc/etoc.dtx (renamed from Master/texmf-dist/source/latex/etoc/etoc.dtx)2322
-rw-r--r--Master/texmf-dist/source/generic/etoc/etoc.ins (renamed from Master/texmf-dist/source/latex/etoc/etoc.ins)23
-rw-r--r--Master/texmf-dist/tex/generic/etoc/etoc.sty (renamed from Master/texmf-dist/tex/latex/etoc/etoc.sty)470
12 files changed, 2247 insertions, 1153 deletions
diff --git a/Master/texmf-dist/doc/generic/etoc/README b/Master/texmf-dist/doc/generic/etoc/README
new file mode 100644
index 00000000000..219efa41dc4
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/etoc/README
@@ -0,0 +1,182 @@
+ Source: etoc.dtx (v1.08 2015/03/10)
+ Author: Jean-Francois Burnol
+ Author for German tranlation: Christine Roemer
+ Info: Completely customisable TOCs
+ License: LPPL 1.3c or later
+
+Copyright (C) 2012-2015 Jean-Francois Burnol
+
+Copyright (C) 2014-2015 Christine Roemer and collaborators for the
+translation into German of the documentation.
+
+
+
+ABSTRACT
+
+
+ The etoc package gives to the user complete control on how the entries
+ of the table of contents should be constituted from the _name_,
+ _number_, and _page number_ of each sectioning unit. This goes via the
+ definition of _line styles_ for each sectioning level used in the
+ document. The package provides its own custom line styles. Simpler
+ ones are given as examples in the documentation. The simplest usage
+ will be to take advantage of the layout facilities of packages dealing
+ with list environments.
+
+ Regarding the _global toc display_, etoc provides pre-defined styles
+ based on a multi-column format, with, optionally, a ruled title or
+ framed contents.
+
+ The \tableofcontents command may be used arbitrarily many times and it
+ has a variant \localtableofcontents which prints tables of contents
+ 'local' to the current surrounding document unit. An extension of the
+ \label/\ref syntax allows to reproduce (with another layout) a local
+ table of contents defined somewhere else in the document.
+
+ Via ''depth tags'', one gets an even finer control for each table of
+ contents of which sectioning units it should, or not, display.
+
+ The formatting inherited (and possibly customized by other packages)
+ from the document class will be used when in compatibility mode.
+
+ The assignment of levels to the sectioning units can be changed at any
+ time, and etoc can thus be used in a quite general manner to create
+ custom ''lists of'', additionally to the tables of contents related to
+ the document sectioning units. No auxiliary file is used additionally
+ to the standard .toc file.
+
+
+
+INSTALLATION
+
+
+The simplest is to download
+
+ http://mirrors.ctan.org/install/macros/latex/contrib/etoc.tds.zip
+
+and then run unzip etoc.tds.zip -d <DEST> where <DEST> is a
+TDS-compliant repertory.
+
+Else, to extract the package (.sty) and driver (.tex) files from
+etoc.dtx:
+
+- if etoc.ins is present: etex etoc.ins (or tex etoc.ins)
+- without etoc.ins: etex etoc.dtx (or tex etoc.dtx)
+
+It is also possible to run latex or pdflatex directly on etoc.dtx.
+
+At least three ways to produce etoc.pdf (method (3) is preferred):
+
+(1) latex etoc.dtx (three times), then dvips, then ps2pdf
+
+(2) pdflatex etoc.dtx (three times)
+
+(3) latex etoc.tex (three times), then dvipdfmx
+
+Method (3) produces the smallest pdf files. Options can be set in
+etoc.tex: - scrdoc class options (paper size, font size, ...) - with or
+without source code, - with dvipdfmx or with latex+dvips or pdflatex.
+
+To produce etoc-DE.pdf (German documentation) run tex on etoc.ins or
+etoc.dtx to produce etoc-DE.tex, then compile etoc-DE.tex with latex
+(thrice) then dvipdmx, or set first to 0 in etoc-DE.tex to allow
+compilation with pdflatex.
+
+Um etoc-DE.pdf zu erzeugen ist latex dreimal mit etoc-DE.tex laufen zu
+lassen, dann dvipdfmx mit etoc-DE.dvi. Im Falle von Problemen mit
+dvipdfmx ist auf 0 in etoc-DE.tex zu setzen, dann ist pdflatex dreimal
+mit etoc-DE.tex laufen zu lassen.
+
+Installation:
+
+ etoc.sty -> TDS:tex/latex/etoc/etoc.sty
+ etoc.dtx -> TDS:source/latex/etoc/etoc.dtx
+ etoc.pdf -> TDS:doc/latex/etoc/etoc.pdf
+ etoc-DE.pdf -> TDS:doc/latex/etoc/etoc-DE.pdf
+ README.md -> TDS:doc/latex/etoc/README.md
+
+The other files may be discarded.
+
+
+
+LICENSE
+
+
+ This Work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+
+ and the latest version of this license is in
+
+ http://www.latex-project.org/lppl.txt
+
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+The Authors of this Work are:
+
+- Jean-Francois Burnol for the source code and English documentation,
+ and
+- Christine Roemer and collaborators for the translation into German
+ of the documentation.
+
+ This Work consists of the main source file etoc.dtx and the
+ derived files etoc.sty, etoc.ins, etoc.tex, etoc-DE.tex,
+ etoc.pdf, etoc-DE.pdf, etoc.dvi, etoc-DE.dvi.
+
+
+
+RECENT CHANGES
+
+
+v1.08 [2015/03/10]
+
+ \etocskipfirstprefix may now appear anywhere in the part of a level
+ style.
+
+ New commands \etociffirst, \etocxiffirst, \etocxifnumbered.
+
+ It is now possible to issue line style specifications directly with &
+ and \\ tokens, in order to typeset a TOC as a tabular or longtable
+ with the opening for example in the first argument of \etocsettocstyle
+ and the closing in its second argument.
+
+ It is mandatory for such uses to issue \etocglobaldefs which tells
+ etoc to proceed globally for certain definitions. This is also useful
+ in the context of the inline environments of package enumitem.
+
+ On this occasion, various old parts of the code have been improved.
+
+v1.07n [2015/03/05]
+
+ No more use of \toks@ when etoc constructs \etocthelinkedname etc...
+ Thus \toks@ can be put in the line styles in order to accumulate
+ information. Only useful if it is certain nothing else will change
+ \toks@ either.
+
+ In the documentation: list of main commands now in alphabetic order.
+
+v1.07m [2015/01/23]
+
+ Reading of .toc file is delayed to \begin{document} to account for
+ possible Babel active characters used therein. Thanks to Denis Bitouzé
+ who reported a Babel related problem.
+
+ Improved global toc display emulation under KOMA-script classes.
+
+ New command \etocbeforetitlehook. New command \etocdisplay.
+
+v1.07l [doc of 2014/04/29]
+
+ Added to the documentation an example of use of \etocthelinkedname
+ together with an enumitem inline itemize* environment; moved main TOC
+ to immediately after the title, and license to the first pages.
+
+ Incorporation of the translation into German done on the initiative of
+ Christine Römer by Felix Baral-Weber, Jenny Rothkrämer-Vogt, Daniel
+ Büttner, Claudia Dahl, Christian Otto and Christine Römer (FSU Jena).
+ My grateful thanks to all!
+
diff --git a/Master/texmf-dist/doc/generic/etoc/README.md b/Master/texmf-dist/doc/generic/etoc/README.md
new file mode 100644
index 00000000000..d2d34b77857
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/etoc/README.md
@@ -0,0 +1,188 @@
+% README
+% etoc 1.08
+% 2015/03/10
+
+ Source: etoc.dtx (v1.08 2015/03/10)
+ Author: Jean-Francois Burnol
+ Author for German tranlation: Christine Roemer
+ Info: Completely customisable TOCs
+ License: LPPL 1.3c or later
+
+Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
+
+Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
+ and collaborators for the translation into German of the documentation.
+
+ABSTRACT
+========
+
+>
+ The etoc package gives to the user complete control on how
+ the entries of the table of contents should be constituted
+ from the *name*, *number*, and *page number* of each
+ sectioning unit. This goes via the definition of *line
+ styles* for each sectioning level used in the document. The
+ package provides its own custom line styles. Simpler ones
+ are given as examples in the documentation. The simplest
+ usage will be to take advantage of the layout facilities of
+ packages dealing with list environments.
+>
+ Regarding the *global toc display*, etoc provides
+ pre-defined styles based on a multi-column format, with,
+ optionally, a ruled title or framed contents.
+>
+ The `\tableofcontents` command may be used arbitrarily many
+ times and it has a variant `\localtableofcontents` which
+ prints tables of contents 'local' to the current surrounding
+ document unit. An extension of the `\label/\ref` syntax allows
+ to reproduce (with another layout) a local table of contents
+ defined somewhere else in the document.
+>
+ Via ''depth tags'', one gets an even finer control for each
+ table of contents of which sectioning units it should, or
+ not, display.
+>
+ The formatting inherited (and possibly customized by other
+ packages) from the document class will be used when in
+ compatibility mode.
+>
+ The assignment of levels to the sectioning units can be
+ changed at any time, and etoc can thus be used in a quite
+ general manner to create custom ''lists of'', additionally
+ to the tables of contents related to the document sectioning
+ units. No auxiliary file is used additionally to the
+ standard .toc file.
+
+INSTALLATION
+============
+
+The simplest is to download
+
+> <http://mirrors.ctan.org/install/macros/latex/contrib/etoc.tds.zip>
+
+and then run `unzip etoc.tds.zip -d <DEST>` where `<DEST>` is a
+TDS-compliant repertory.
+
+Else, to extract the package (.sty) and driver (.tex) files from etoc.dtx:
+
+ - if etoc.ins is present: etex etoc.ins (or tex etoc.ins)
+ - without etoc.ins: etex etoc.dtx (or tex etoc.dtx)
+
+It is also possible to run latex or pdflatex directly on etoc.dtx.
+
+At least three ways to produce etoc.pdf (method (3) is preferred):
+
+(1) latex etoc.dtx (three times), then dvips, then ps2pdf
+
+(2) pdflatex etoc.dtx (three times)
+
+(3) latex etoc.tex (three times), then dvipdfmx
+
+Method (3) produces the smallest pdf files.
+Options can be set in etoc.tex:
+ - scrdoc class options (paper size, font size, ...)
+ - with or without source code,
+ - with dvipdfmx or with latex+dvips or pdflatex.
+
+To produce etoc-DE.pdf (German documentation) run tex on etoc.ins
+or etoc.dtx to produce etoc-DE.tex, then compile etoc-DE.tex with
+latex (thrice) then dvipdmx, or set first to 0 \Withdvipdfmx in
+etoc-DE.tex to allow compilation with pdflatex.
+
+Um etoc-DE.pdf zu erzeugen ist latex dreimal mit etoc-DE.tex laufen
+zu lassen, dann dvipdfmx mit etoc-DE.dvi. Im Falle von Problemen
+mit dvipdfmx ist \Withdvidpdfmx auf 0 in etoc-DE.tex zu setzen,
+dann ist pdflatex dreimal mit etoc-DE.tex laufen zu lassen.
+
+Installation:
+
+ etoc.sty -> TDS:tex/latex/etoc/etoc.sty
+ etoc.dtx -> TDS:source/latex/etoc/etoc.dtx
+ etoc.pdf -> TDS:doc/latex/etoc/etoc.pdf
+ etoc-DE.pdf -> TDS:doc/latex/etoc/etoc-DE.pdf
+ README.md -> TDS:doc/latex/etoc/README.md
+
+The other files may be discarded.
+
+LICENSE
+=======
+
+>
+ This Work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+<http://www.latex-project.org/lppl/lppl-1-3c.txt>
+>
+ and the latest version of this license is in
+<http://www.latex-project.org/lppl.txt>
+>
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+The Authors of this Work are:
+
+- Jean-Francois Burnol <jfbu at free dot fr> for the source code and
+ English documentation, and
+- Christine Roemer <Christine_Roemer at t-online dot de> and collaborators
+ for the translation into German of the documentation.
+
+>
+ This Work consists of the main source file etoc.dtx and the
+ derived files etoc.sty, etoc.ins, etoc.tex, etoc-DE.tex,
+ etoc.pdf, etoc-DE.pdf, etoc.dvi, etoc-DE.dvi.
+
+RECENT CHANGES
+==============
+
+v1.08 [2015/03/10]
+
+> `\etocskipfirstprefix` may now appear anywhere in the <start>
+ part of a level style.
+
+> New commands `\etociffirst`, `\etocxiffirst`, `\etocxifnumbered`.
+
+> It is now possible to issue line style specifications directly
+ with `&` and `\\` tokens, in order to typeset a TOC as a tabular
+ or longtable with the opening for example in the first
+ argument of `\etocsettocstyle` and the closing in its second
+ argument.
+
+> It is mandatory for such uses to issue `\etocglobaldefs` which
+ tells etoc to proceed globally for certain definitions. This
+ is also useful in the context of the inline environments of
+ package enumitem.
+
+> On this occasion, various old parts of the code have been
+ improved.
+
+v1.07n [2015/03/05]
+
+> No more use of `\toks@` when etoc constructs `\etocthelinkedname` etc...
+ Thus `\toks@` can be put in the line styles in order to accumulate
+ information. Only useful if it is certain nothing else will change
+ `\toks@` either.
+
+> In the documentation: list of main commands now in alphabetic order.
+
+v1.07m [2015/01/23]
+
+> Reading of .toc file is delayed to `\begin{document}` to account for
+ possible Babel active characters used therein. Thanks to Denis
+ Bitouzé who reported a Babel related problem.
+
+> Improved global toc display emulation under KOMA-script classes.
+
+> New command `\etocbeforetitlehook`. New command `\etocdisplay`.
+
+v1.07l [doc of 2014/04/29]
+
+> Added to the documentation an example of use of `\etocthelinkedname`
+ together with an enumitem inline itemize\* environment; moved main TOC
+ to immediately after the title, and license to the first pages.
+
+> Incorporation of the translation into German done on the initiative
+ of Christine Römer by Felix Baral-Weber, Jenny Rothkrämer-Vogt,
+ Daniel Büttner, Claudia Dahl, Christian Otto and Christine Römer (FSU
+ Jena). My grateful thanks to all!
+
diff --git a/Master/texmf-dist/doc/generic/etoc/etoc-DE.pdf b/Master/texmf-dist/doc/generic/etoc/etoc-DE.pdf
new file mode 100644
index 00000000000..1eef29ff2c0
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/etoc/etoc-DE.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/etoc/etoc.pdf b/Master/texmf-dist/doc/generic/etoc/etoc.pdf
new file mode 100644
index 00000000000..4bf8a133d19
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/etoc/etoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/etoc/README b/Master/texmf-dist/doc/latex/etoc/README
deleted file mode 100644
index b89b7e05e7a..00000000000
--- a/Master/texmf-dist/doc/latex/etoc/README
+++ /dev/null
@@ -1,150 +0,0 @@
-%
-% Package: etoc
-% Version: 1.07n (2015/03/05)
-% Description: Completely customisable TOCs (jfB)
-%
-% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
-% Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
-% and collaborators for the translation into German of the documentation.
-
-% License: LPPL 1.3c or later
-
-% this README: *Abstract*, *Installation*, *License*, *Recent changes*.
-
-ABSTRACT
-========
-
- The etoc package gives to the user complete control on how
- the entries of the table of contents should be constituted
- from the {name}, {number}, and {page number} of each
- sectioning unit. This goes via the definition of {line
- styles} for each sectioning level used in the document. The
- package provides its own custom line styles. Simpler ones
- are given as examples in the documentation. The simplest
- usage will be to take advantage of the layout facilities of
- packages dealing with list environments.
-
- Regarding the {global toc display}, etoc provides
- pre-defined styles based on a multi-column format, with,
- optionally, a ruled title or framed contents.
-
- The \tableofcontents command may be used arbitrarily many
- times and it has a variant \localtableofcontents which
- prints tables of contents `local' to the current surrounding
- document unit. An extension of the \label/\ref syntax allows
- to reproduce (with another layout) a local table of contents
- defined somewhere else in the document.
-
- Via ``depth tags'', one gets an even finer control for each
- table of contents of which sectioning units it should, or
- not, display.
-
- The formatting inherited (and possibly customized by other
- packages) from the document class will be used when in
- compatibility mode.
-
- The assignment of levels to the sectioning units can be
- changed at any time, and etoc can thus be used in a quite
- general manner to create custom ``lists of'', additionally
- to the tables of contents related to the document sectioning
- units. No auxiliary file is used additionally to the
- standard .toc file.
-
-
-INSTALLATION
-============
-
- Extraction of the package (.sty) and driver (.tex) files:
- - if etoc.ins is present: tex etoc.ins
- - without etoc.ins: tex etoc.dtx
-
- It is also possible to run latex/pdflatex directly on etoc.dtx
-
- At least three ways to produce etoc.pdf (method (3) is preferred):
-
- (1) latex etoc.dtx (three times), then dvips, then ps2pdf
- (2) pdflatex etoc.dtx (three times)
- (3) latex etoc.tex (three times), then dvipdfmx
-
- Method (3) produces the smallest pdf files.
- Options can be set in etoc.tex:
- - scrdoc class options (paper size, font size, ...)
- - with or without source code,
- - with dvipdfmx or with latex+dvips or pdflatex.
-
- To produce etoc-DE.pdf (German documentation) run tex on etoc.ins
- or etoc.dtx to produce etoc-DE.tex, then compile etoc-DE.tex with
- latex (thrice) then dvipdmx, or set first to 0 \Withdvipdfmx in
- etoc-DE.tex to allow compilation with pdflatex.
-
- Um etoc-DE.pdf zu erzeugen ist latex dreimal mit etoc-DE.tex laufen
- zu lassen, dann dvipdfmx mit etoc-DE.dvi. Im Falle von Problemen
- mit dvipdfmx ist \Withdvidpdfmx auf 0 in etoc-DE.tex zu setzen,
- dann ist pdflatex dreimal mit etoc-DE.tex laufen zu lassen.
-
- Installation:
-
- etoc.sty -> TDS:tex/latex/etoc/etoc.sty
- etoc.dtx -> TDS:source/latex/etoc/etoc.dtx
- etoc.pdf -> TDS:doc/latex/etoc/etoc.pdf
- etoc-DE.pdf -> TDS:doc/latex/etoc/etoc-DE.pdf
-
- The other files may be discarded.
-
-LICENSE
-=======
-
- This Work may be distributed and/or modified under the
- conditions of the LaTeX Project Public License, either
- version 1.3c of this license or (at your option) any later
- version. This version of this license is in
- http://www.latex-project.org/lppl/lppl-1-3c.txt
- and the latest version of this license is in
- http://www.latex-project.org/lppl.txt
- and version 1.3 or later is part of all distributions of
- LaTeX version 2005/12/01 or later.
-
- The Authors of this Work are:
- Jean-Francois Burnol <jfbu at free dot fr> for the source code and
- English documentation, and
- Christine Roemer <Christine_Roemer at t-online dot de> and collaborators
- for the translation into German of the documentation.
-
- This Work consists of the main source file etoc.dtx and the derived
- files etoc.sty, etoc.ins, etoc.tex, etoc-DE.tex, etoc.pdf, etoc-DE.pdf,
- etoc.dvi, etoc-DE.dvi.
-
-RECENT CHANGES
-==============
-
-v1.07n [2015/03/05]
-
- No more use of \toks@ when etoc constructs \etocthelinkedname etc... Thus
- \toks@ can be put in the line styles in order to accumulate information.
- Only useful if it is certain nothing else will change \toks@ either.
-
- In the documentation: list of main commands now in alphabetic order.
-
-v1.07m [2015/01/23]
-
- Reading of .toc file is delayed to \begin{document} to account for
- possible Babel active characters used therein. Thanks to Denis
- Bitouzé who reported a Babel related problem.
-
- Improved global toc display emulation under KOMA-script classes.
-
- New command \etocbeforetitlehook. New command \etocdisplay.
-
-v1.07l [doc of 2014/04/29]
-
- Added to the documentation an example of use of \etocthelinkedname together
- with an enumitem inline itemize* environment; moved main TOC to immediately
- after the title, and license to the first pages.
-
- Incorporation of the translation into German done on the initiative of
- Christine Römer by Felix Baral-Weber, Jenny Rothkrämer-Vogt, Daniel
- Büttner, Claudia Dahl, Christian Otto and Christine Römer (FSU Jena). My
- grateful thanks to all!
-
-
-
diff --git a/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf b/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf
deleted file mode 100644
index f3ca3f22935..00000000000
--- a/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/etoc/etoc-DE.tex b/Master/texmf-dist/doc/latex/etoc/etoc-DE.tex
deleted file mode 100644
index ca3b686bb08..00000000000
--- a/Master/texmf-dist/doc/latex/etoc/etoc-DE.tex
+++ /dev/null
@@ -1,35 +0,0 @@
-%%
-%% Package: etoc
-%% Version: 1.07n (2015/03/05)
-%% License: LPPL 1.3c or later (see etoc.dtx)
-%% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
-%% Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
-%% and collaborators for the translation into German of the documentation
-%%
-%% run latex thrice on this file etoc-DE.tex then dvipdfmx on etoc-DE.dvi
-%% to produce the German documentation etoc-DE.pdf (without source code).
-%%
-%% possible dvipdfmx warnings (due to hyperlinks extending over page
-%% breaks) may be ignored, but in case of a too old dvipdfmx, it may
-%% be preferable to use pdflatex. For this set \Withdvipdfmx to 0.
-%%
-%% Um etoc-DE.pdf zu erzeugen ist latex dreimal mit etoc-DE.tex laufen
-%% zu lassen, dann dvipdfmx mit etoc-DE.dvi. Im Falle von Problemen
-%% mit dvipdfmx ist \Withdvidpdfmx auf 0 zu setzen, dann ist pdflatex
-%% dreimal mit etoc-DE.tex laufen zu lassen.
-%%
-\chardef\Withdvipdfmx 1 % replace 1 by 0 for using latex+dvips or pdflatex
-\chardef\NoSourceCode 1 % replace 1 by 0 for the doc *with* the source code
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile {etoc-DE.tex}[Driver for etoc German documentation]%
-\PassOptionsToClass {a4paper,fontsize=11pt,twoside,ngerman}{scrdoc}
-\PassOptionsToPackage {english,german}{babel}
-\chardef\ForEnglish 0 % (can NOT be both 1..)
-\chardef\ForDeutsch 1 %
-\input etoc.dtx
-%%% Local Variables:
-%%% mode: latex
-%%% End:
-\endinput
-%%
-%% End of file `etoc-DE.tex'.
diff --git a/Master/texmf-dist/doc/latex/etoc/etoc.pdf b/Master/texmf-dist/doc/latex/etoc/etoc.pdf
deleted file mode 100644
index fa84c20409c..00000000000
--- a/Master/texmf-dist/doc/latex/etoc/etoc.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/etoc/etoc.tex b/Master/texmf-dist/doc/latex/etoc/etoc.tex
deleted file mode 100644
index 3a23520fca9..00000000000
--- a/Master/texmf-dist/doc/latex/etoc/etoc.tex
+++ /dev/null
@@ -1,30 +0,0 @@
-%%
-%% Package: etoc
-%% Version: 1.07n (2015/03/05)
-%% License: LPPL 1.3c or later (see etoc.dtx)
-%% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
-%% Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
-%% and collaborators for the translation into German of the documentation
-%%
-%% run latex thrice on this file etoc.tex then dvipdfmx on etoc.dvi
-%% to produce the documentation etoc.pdf, with source code included.
-%%
-%% possible dvipdfmx warnings (due to hyperlinks extending over page
-%% breaks) may be ignored, but in case of a too old dvipdfmx, it may
-%% be preferable to use pdflatex. Set \Withdvipdfmx to 0 first.
-%%
-\chardef\Withdvipdfmx 1 % replace 1 by 0 for using latex+dvips or pdflatex
-\chardef\NoSourceCode 0 % replace 0 by 1 for the doc *without* the source code
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile {etoc.tex}[Driver for etoc documentation]%
-\PassOptionsToClass {a4paper,fontsize=11pt,twoside}{scrdoc}
-\PassOptionsToPackage {german,english}{babel}
-\chardef\ForEnglish 1 % (can NOT be both 1..)
-\chardef\ForDeutsch 0 %
-\input etoc.dtx
-%%% Local Variables:
-%%% mode: latex
-%%% End:
-\endinput
-%%
-%% End of file `etoc.tex'.
diff --git a/Master/texmf-dist/source/latex/etoc/etoc.dtx b/Master/texmf-dist/source/generic/etoc/etoc.dtx
index 67ad7d51c67..12bb38b9730 100644
--- a/Master/texmf-dist/source/latex/etoc/etoc.dtx
+++ b/Master/texmf-dist/source/generic/etoc/etoc.dtx
@@ -1,21 +1,23 @@
% -*- coding: utf-8; -*-
%<*none>
-{\def\doctimestamp {Time-stamp: <05-03-2015 12:32:16 CET>}%
+{\def\doctimestamp {Time-stamp: <10-03-2015 22:45:02 CET>}%
\def\getdtxtimestamp #1 <#2 #3 #4>{#2 at #3 #4}%
\xdef\etocdtxtimestamp {\expandafter\getdtxtimestamp\doctimestamp }}%
%</none>
+%<*!readme>
%%
%% Package: etoc
-%% Version: 1.07n (2015/03/05)
+%% Version: 1.08 (2015/03/10)
%% License: LPPL 1.3c or later (see etoc.dtx)
%% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
%% Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
%% and collaborators for the translation into German of the documentation
%%
+%</!readme>
%<*insfile>
-\def\etocpkgdate {2015/03/05}
-\def\etocdocdate {2015/03/05}
-\def\etocpkgversion {v1.07n}
+\def\etocpkgdate {2015/03/10}
+\def\etocdocdate {2015/03/10}
+\def\etocpkgversion {v1.08}
\def\etocpkgdescription {Completely customisable TOCs (jfB)}
%</insfile>
%<*none>
@@ -32,7 +34,7 @@
\catcode32=13\catcode`\\=12^^Brelax^^A
^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A
{% Package: etoc
-% Version: 1.07n (2015/03/05)
+% Version: 1.08 (2015/03/10)
% License: LPPL 1.3c or later
% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
% Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
@@ -56,47 +58,207 @@
%
% This Work consists of the main source file etoc.dtx and the derived
% files etoc.sty, etoc.ins, etoc.tex, etoc-DE.tex, etoc.pdf, etoc-DE.pdf,
-% etoc.dvi, etoc-DE.dvi.
+% etoc.dvi, etoc-DE.dvi, README.md.
%
-% Extraction of the package (.sty) and driver (.tex) files:
-% - if etoc.ins is present: tex etoc.ins
-% - without etoc.ins: tex etoc.dtx
-%
-% It is also possible to run latex/pdflatex directly on etoc.dtx
-%
-% At least three ways to produce etoc.pdf (method (3) is preferred):
-%
-% (1) latex etoc.dtx (three times), then dvips, then ps2pdf
-% (2) pdflatex etoc.dtx (three times)
-% (3) latex etoc.tex (three times), then dvipdfmx
-%
-% Method (3) produces the smallest pdf files.
-% Options can be set in etoc.tex:
-% - scrdoc class options (paper size, font size, ...)
-% - with or without source code,
-% - with dvipdfmx or with latex+dvips or pdflatex.
-%
-% To produce etoc-DE.pdf (German documentation) run tex on etoc.ins
-% or etoc.dtx to produce etoc-DE.tex, then compile etoc-DE.tex with
-% latex (thrice) then dvipdmx, or set first to 0 \Withdvipdfmx in
-% etoc-DE.tex to allow compilation with pdflatex.
-%
-% Um etoc-DE.pdf zu erzeugen ist latex dreimal mit etoc-DE.tex laufen
-% zu lassen, dann dvipdfmx mit etoc-DE.dvi. Im Falle von Problemen
-% mit dvipdfmx ist \Withdvidpdfmx auf 0 in etoc-DE.tex zu setzen,
-% dann ist pdflatex dreimal mit etoc-DE.tex laufen zu lassen.
-%
-% Installation:
-%
-% etoc.sty -> TDS:tex/latex/etoc/etoc.sty
-% etoc.dtx -> TDS:source/latex/etoc/etoc.dtx
-% etoc.pdf -> TDS:doc/latex/etoc/etoc.pdf
-% etoc-DE.pdf -> TDS:doc/latex/etoc/etoc-DE.pdf
-%
-% The other files may be discarded.
+% Running tex or etex on etoc.dtx extracts etoc.sty, etoc.ins, etoc.etex,
+% etoc-DE.tex, and README.md. See README.md for further instructions.
+%
+% It is also possible to typeset etoc.dtx directly via latex or pdflatex.
}}%
\iffalse
%</none>
+%<readme>% README
+%<readme>% etoc 1.08
+%<readme>% 2015/03/10
+%<*readme>
+
+ Source: etoc.dtx (v1.08 2015/03/10)
+ Author: Jean-Francois Burnol
+ Author for German tranlation: Christine Roemer
+ Info: Completely customisable TOCs
+ License: LPPL 1.3c or later
+
+Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
+
+Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
+ and collaborators for the translation into German of the documentation.
+
+
+ABSTRACT
+========
+
+>
+ The etoc package gives to the user complete control on how
+ the entries of the table of contents should be constituted
+ from the *name*, *number*, and *page number* of each
+ sectioning unit. This goes via the definition of *line
+ styles* for each sectioning level used in the document. The
+ package provides its own custom line styles. Simpler ones
+ are given as examples in the documentation. The simplest
+ usage will be to take advantage of the layout facilities of
+ packages dealing with list environments.
+>
+ Regarding the *global toc display*, etoc provides
+ pre-defined styles based on a multi-column format, with,
+ optionally, a ruled title or framed contents.
+>
+ The `\tableofcontents` command may be used arbitrarily many
+ times and it has a variant `\localtableofcontents` which
+ prints tables of contents 'local' to the current surrounding
+ document unit. An extension of the `\label/\ref` syntax allows
+ to reproduce (with another layout) a local table of contents
+ defined somewhere else in the document.
+>
+ Via ''depth tags'', one gets an even finer control for each
+ table of contents of which sectioning units it should, or
+ not, display.
+>
+ The formatting inherited (and possibly customized by other
+ packages) from the document class will be used when in
+ compatibility mode.
+>
+ The assignment of levels to the sectioning units can be
+ changed at any time, and etoc can thus be used in a quite
+ general manner to create custom ''lists of'', additionally
+ to the tables of contents related to the document sectioning
+ units. No auxiliary file is used additionally to the
+ standard .toc file.
+
+
+INSTALLATION
+============
+
+The simplest is to download
+
+> <http://mirrors.ctan.org/install/macros/latex/contrib/etoc.tds.zip>
+
+and then run `unzip etoc.tds.zip -d <DEST>` where `<DEST>` is a
+TDS-compliant repertory.
+
+Else, to extract the package (.sty) and driver (.tex) files from etoc.dtx:
+
+ - if etoc.ins is present: etex etoc.ins (or tex etoc.ins)
+ - without etoc.ins: etex etoc.dtx (or tex etoc.dtx)
+
+It is also possible to run latex or pdflatex directly on etoc.dtx.
+
+At least three ways to produce etoc.pdf (method (3) is preferred):
+
+(1) latex etoc.dtx (three times), then dvips, then ps2pdf
+
+(2) pdflatex etoc.dtx (three times)
+
+(3) latex etoc.tex (three times), then dvipdfmx
+
+Method (3) produces the smallest pdf files.
+Options can be set in etoc.tex:
+ - scrdoc class options (paper size, font size, ...)
+ - with or without source code,
+ - with dvipdfmx or with latex+dvips or pdflatex.
+
+To produce etoc-DE.pdf (German documentation) run tex on etoc.ins
+or etoc.dtx to produce etoc-DE.tex, then compile etoc-DE.tex with
+latex (thrice) then dvipdmx, or set first to 0 \Withdvipdfmx in
+etoc-DE.tex to allow compilation with pdflatex.
+
+Um etoc-DE.pdf zu erzeugen ist latex dreimal mit etoc-DE.tex laufen
+zu lassen, dann dvipdfmx mit etoc-DE.dvi. Im Falle von Problemen
+mit dvipdfmx ist \Withdvidpdfmx auf 0 in etoc-DE.tex zu setzen,
+dann ist pdflatex dreimal mit etoc-DE.tex laufen zu lassen.
+
+Installation:
+
+ etoc.sty -> TDS:tex/latex/etoc/etoc.sty
+ etoc.dtx -> TDS:source/latex/etoc/etoc.dtx
+ etoc.pdf -> TDS:doc/latex/etoc/etoc.pdf
+ etoc-DE.pdf -> TDS:doc/latex/etoc/etoc-DE.pdf
+ README.md -> TDS:doc/latex/etoc/README.md
+
+The other files may be discarded.
+
+LICENSE
+=======
+
+>
+ This Work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. This version of this license is in
+<http://www.latex-project.org/lppl/lppl-1-3c.txt>
+>
+ and the latest version of this license is in
+<http://www.latex-project.org/lppl.txt>
+>
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+The Authors of this Work are:
+
+- Jean-Francois Burnol <jfbu at free dot fr> for the source code and
+ English documentation, and
+- Christine Roemer <Christine_Roemer at t-online dot de> and collaborators
+ for the translation into German of the documentation.
+
+>
+ This Work consists of the main source file etoc.dtx and the
+ derived files etoc.sty, etoc.ins, etoc.tex, etoc-DE.tex,
+ etoc.pdf, etoc-DE.pdf, etoc.dvi, etoc-DE.dvi.
+
+RECENT CHANGES
+==============
+
+v1.08 [2015/03/10]
+
+> `\etocskipfirstprefix` may now appear anywhere in the <start>
+ part of a level style.
+
+> New commands `\etociffirst`, `\etocxiffirst`, `\etocxifnumbered`.
+
+> It is now possible to issue line style specifications directly
+ with `&` and `\\` tokens, in order to typeset a TOC as a tabular
+ or longtable with the opening for example in the first
+ argument of `\etocsettocstyle` and the closing in its second
+ argument.
+
+> It is mandatory for such uses to issue `\etocglobaldefs` which
+ tells etoc to proceed globally for certain definitions. This
+ is also useful in the context of the inline environments of
+ package enumitem.
+
+> On this occasion, various old parts of the code have been
+ improved.
+
+v1.07n [2015/03/05]
+
+> No more use of `\toks@` when etoc constructs `\etocthelinkedname` etc...
+ Thus `\toks@` can be put in the line styles in order to accumulate
+ information. Only useful if it is certain nothing else will change
+ `\toks@` either.
+
+> In the documentation: list of main commands now in alphabetic order.
+
+v1.07m [2015/01/23]
+
+> Reading of .toc file is delayed to `\begin{document}` to account for
+ possible Babel active characters used therein. Thanks to Denis
+ Bitouzé who reported a Babel related problem.
+
+> Improved global toc display emulation under KOMA-script classes.
+
+> New command `\etocbeforetitlehook`. New command `\etocdisplay`.
+
+v1.07l [doc of 2014/04/29]
+
+> Added to the documentation an example of use of `\etocthelinkedname`
+ together with an enumitem inline itemize\* environment; moved main TOC
+ to immediately after the title, and license to the first pages.
+
+> Incorporation of the translation into German done on the initiative
+ of Christine Römer by Felix Baral-Weber, Jenny Rothkrämer-Vogt,
+ Daniel Büttner, Claudia Dahl, Christian Otto and Christine Römer (FSU
+ Jena). My grateful thanks to all!
+
+%</readme>
%<*tex>-------------------------------------------------------------------------
%% run latex thrice on this file etoc.tex then dvipdfmx on etoc.dvi
%% to produce the documentation etoc.pdf, with source code included.
@@ -110,7 +272,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile {etoc.tex}[Driver for etoc documentation]%
\PassOptionsToClass {a4paper,fontsize=11pt,twoside}{scrdoc}
-\PassOptionsToPackage {german,english}{babel}
+\PassOptionsToPackage {ngerman,english}{babel}
\chardef\ForEnglish 1 % (can NOT be both 1..)
\chardef\ForDeutsch 0 %
\input etoc.dtx
@@ -136,7 +298,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile {etoc-DE.tex}[Driver for etoc German documentation]%
\PassOptionsToClass {a4paper,fontsize=11pt,twoside,ngerman}{scrdoc}
-\PassOptionsToPackage {english,german}{babel}
+\PassOptionsToPackage {english,ngerman}{babel}
\chardef\ForEnglish 0 % (can NOT be both 1..)
\chardef\ForDeutsch 1 %
\input etoc.dtx
@@ -146,7 +308,7 @@
%</DEtex>-----------------------------------------------------------------------
%<*insfile>---------------------------------------------------------------------
%% Run tex on this file to extract from etoc.dtx:
-%% etoc.sty, etoc.tex, etoc-DE.tex
+%% etoc.sty, etoc.tex, etoc-DE.tex and README.md
%%
%% At least three ways to produce etoc.pdf (method (3) is preferred):
%% (1) latex etoc.dtx (three times), then dvips, then ps2pdf
@@ -171,10 +333,11 @@
%%
%% Installation:
%%
-%% etoc.sty ->TDS:tex/latex/etoc/etoc.sty
-%% etoc.dtx ->TDS:source/latex/etoc/etoc.dtx
-%% etoc.pdf ->TDS:doc/latex/etoc/etoc.pdf
-%% etoc-DE.pdf ->TDS:doc/latex/etoc/etoc-DE.pdf
+%% etoc.sty -> TDS:tex/latex/etoc/etoc.sty
+%% etoc.dtx -> TDS:source/latex/etoc/etoc.dtx
+%% etoc.pdf -> TDS:doc/latex/etoc/etoc.pdf
+%% etoc-DE.pdf -> TDS:doc/latex/etoc/etoc-DE.pdf
+%% README.md -> TDS:doc/latex/etoc/README.md
%%
\input docstrip.tex
\askforoverwritefalse
@@ -182,7 +345,9 @@
\string\NeedsTeXFormat{LaTeX2e}^^J%
\string\ProvidesPackage{etoc}^^J%
\space[\etocpkgdate\space\etocpkgversion\space\etocpkgdescription]}%
-\generate{\nopreamble
+\generate{\nopreamble\nopostamble
+\file{README.md}{\from{etoc.dtx}{readme}}%
+\usepostamble\defaultpostamble
\file{etoc.tex}{\from{etoc.dtx}{tex}}%
\file{etoc-DE.tex}{\from{etoc.dtx}{DEtex}}%
\usepreamble\etocpkgpreamble
@@ -226,7 +391,7 @@
\chardef\NoSourceCode 1 % do not include source code
\chardef\ForEnglish 1 \chardef\ForDeutsch 0
\PassOptionsToClass {a4paper,fontsize=11pt,twoside}{scrdoc}%
- \PassOptionsToPackage {german,english}{babel}%
+ \PassOptionsToPackage {ngerman,english}{babel}%
\else % latex run is on etoc.tex or etoc-DE.tex
\chardef\extractfiles 2 % do not extract files
\fi
@@ -258,7 +423,9 @@
\string\NeedsTeXFormat{LaTeX2e}^^J%
\string\ProvidesPackage{etoc}^^J%
\space[\etocpkgdate\space\etocpkgversion\space\etocpkgdescription]}%
- \generate{\nopreamble
+ \generate{\nopreamble\nopostamble
+ \file{README.md}{\from{etoc.dtx}{readme}}%
+ \usepostamble\defaultpostamble
\file{etoc.ins}{\from{etoc.dtx}{insfile}}%
\file{etoc.tex}{\from{etoc.dtx}{tex}}%
\file{etoc-DE.tex}{\from{etoc.dtx}{DEtex}}%
@@ -312,7 +479,7 @@
\makeatletter
% 2013/03/07.
% This macro allows to conveniently center a line inside a paragraph and still
-% use there in \verb or other commands changing catcodes.
+% use therein \verb or other commands changing catcodes.
% Note: \centerline in LaTeX still uses \hsize and not \linewidth/\columnwidth
\def\@centeredline {\hbox to \linewidth
\bgroup \hss \bgroup
@@ -327,6 +494,9 @@
\afterassignment\@centeredline
\let\next=}
+% pour maintenir les % en début de ligne dans les blocs verbatim
+%
+
\let\original@check@percent\check@percent
\let\check@percent\relax
\makeatother
@@ -336,8 +506,18 @@
% uniformisé finalement, avec quelques exceptions, pour dtx du 3 déc 2013
\def\MacroFont{\ttfamily\small\hyphenchar\font45 \baselineskip11pt\relax}
-% mais \verb fait \ttfamily hardcoded!!! (contrairement au
-% \verbatim@font de latex)
+% ATTENTION: (avec doc.sty ou les classes scrdoc ou ltxdoc)
+%
+% - l'environnement macrocode se fait avec \macro@font qui est le
+% \MacroFont du \begin{document}.
+%
+% - les environnements verbatim utilisent le \MacroFont courant.
+%
+% - \verb utilise un \ttfamily !! et non pas \verbatim@font que l'on
+% peut customiser.
+%
+% - (9 mars 2015) il ne faut PAS commencer des macrocode directement après
+% un \section, il faut un paragraphe (par exemple un \indent\par)
%----
% better \verb pour doc.
@@ -345,6 +525,9 @@
% je rajoute pour { afin que truc{machin puisse avoir hyphénation
% retire \leavemmode, pas nécessaire pour emploi ici
+% NOTE 9 mars 2015. J'ai depuis une version plus aboutie dans xint.dtx
+% mais je laisse ici tel quel.
+
\def\MicroFont{\ttfamily\hyphenchar\font45 }
% modif de \do@noligs: \char`#1} --> \char`#1 }
\makeatletter
@@ -406,49 +589,49 @@
% maintenue je ne sais donc pas exactement ce qui se passe.
\DeclareFontFamily{T1}{txtt}{\hyphenchar\font 45\relax}
-\DeclareFontShape{T1}{txtt}{m}{n}{ %medium
+\DeclareFontShape{T1}{txtt}{m}{n}{ %medium
<->s*[.96] t1xtt%
}{}
-\DeclareFontShape{T1}{txtt}{m}{sc}{ %cap & small cap
+\DeclareFontShape{T1}{txtt}{m}{sc}{ %cap & small cap
<->s*[.96] t1xttsc%
}{}
-\DeclareFontShape{T1}{txtt}{m}{sl}{ %slanted
+\DeclareFontShape{T1}{txtt}{m}{sl}{ %slanted
<->s*[.96] t1xttsl%
}{}
-\DeclareFontShape{T1}{txtt}{m}{it}{ %italic
+\DeclareFontShape{T1}{txtt}{m}{it}{ %italic
<->ssub * txtt/m/sl%
}{}
-\DeclareFontShape{T1}{txtt}{m}{ui}{ %unslanted italic
+\DeclareFontShape{T1}{txtt}{m}{ui}{ %unslanted italic
<->ssub * txtt/m/sl%
}{}
-\DeclareFontShape{T1}{txtt}{bx}{n}{ %bold extended
+\DeclareFontShape{T1}{txtt}{bx}{n}{ %bold extended
<->t1xbtt%
}{}
-\DeclareFontShape{T1}{txtt}{bx}{sc}{ %bold extended cap & small cap
+\DeclareFontShape{T1}{txtt}{bx}{sc}{ %bold extended cap & small cap
<->t1xbttsc%
}{}
-\DeclareFontShape{T1}{txtt}{bx}{sl}{ %bold extended slanted
+\DeclareFontShape{T1}{txtt}{bx}{sl}{ %bold extended slanted
<->t1xbttsl%
}{}
-\DeclareFontShape{T1}{txtt}{bx}{it}{ %bold extended italic
+\DeclareFontShape{T1}{txtt}{bx}{it}{ %bold extended italic
<->ssub * txtt/bx/sl%
}{}
-\DeclareFontShape{T1}{txtt}{bx}{ui}{ %bold extended unslanted italic
+\DeclareFontShape{T1}{txtt}{bx}{ui}{ %bold extended unslanted italic
<->ssub * txtt/bx/sl%
}{}
-\DeclareFontShape{T1}{txtt}{b}{n}{ %bold
+\DeclareFontShape{T1}{txtt}{b}{n}{ %bold
<->ssub * txtt/bx/n%
}{}
-\DeclareFontShape{T1}{txtt}{b}{sc}{ %bold cap & small cap
+\DeclareFontShape{T1}{txtt}{b}{sc}{ %bold cap & small cap
<->ssub * txtt/bx/sc%
}{}
-\DeclareFontShape{T1}{txtt}{b}{sl}{ %bold slanted
+\DeclareFontShape{T1}{txtt}{b}{sl}{ %bold slanted
<->ssub * txtt/bx/sl%
}{}
-\DeclareFontShape{T1}{txtt}{b}{it}{ %bold italic
+\DeclareFontShape{T1}{txtt}{b}{it}{ %bold italic
<->ssub * txtt/bx/it%
}{}
-\DeclareFontShape{T1}{txtt}{b}{ui}{ %bold unslanted italic
+\DeclareFontShape{T1}{txtt}{b}{ui}{ %bold unslanted italic
<->ssub * txtt/bx/ui%
}{}
@@ -464,7 +647,7 @@
\definecolor{BLUE}{RGB}{0,0,255}
\colorlet{niceone}{green!35!blue!75}
-\usepackage {babel} % german and english options have been passed to babel
+\usepackage {babel} % ngerman and english options have been passed to babel
\AtBeginDocument {
\ifnum\ForEnglish=1 \renewcommand\partname{Part}\fi
\addto\captionsenglish{\renewcommand\partname{Part}}
@@ -644,19 +827,18 @@ pdfpagemode=UseOutlines}
{Here are some statistics for this part: it contains \arabic{mycounti}
section\ifnum\value{mycounti}>1 s\fi{} and
\arabic{mycountii} subsection\ifnum\value{mycountii}>1 s\fi. The name of
- the first section is
+ the first section is
``\unhbox\firstnamei{}'' and the corresponding number is
``\unhbox\firstnumberi''. The name of the last section is
``\unhbox\lastnamei{}'' and its number is
``\unhbox\lastnumberi''.
\ifnum\value{mycountii}>0 The name of
- the first subsection is
+ the first subsection is
``\unhbox\firstnameii{}'' and the corresponding number is
``\unhbox\firstnumberii''. The name of the last subsection is
``\unhbox\lastnameii{}'' and its number is
``\unhbox\lastnumberii''.\fi }
\fi
-%--------------------------------UEBERSETZUNG
\ifnum\ForDeutsch=1
\etocsetstyle{section}
{}
@@ -676,13 +858,12 @@ pdfpagemode=UseOutlines}
\glqq\unhbox\lastnamei{}\grqq~und er hat die Nummer
\glqq\unhbox\lastnumberi\grqq.
\ifnum\value{mycountii}>0 Der erste
- Unterabschnitt heißt
+ Unterabschnitt heißt
\glqq\unhbox\firstnameii{}\grqq~und er hat die Nummer
\glqq\unhbox\firstnumberii\grqq. Der Name des letzten Unterabschnitts ist
\glqq\unhbox\lastnameii{}\grqq~und dessen Nummer ist
\glqq\unhbox\lastnumberii\grqq.\fi }%
\fi
-%-------------------------------/UEBERSETZUNG
\etocinline
% october 10, 2013.
\etocsetnexttocdepth {2}%
@@ -711,7 +892,7 @@ pdfpagemode=UseOutlines}
\newcommand\starit[1]{\csa{#1\lowast}}
\newcommand\staritb[1]{\csb{#1}\lowast}
-\hyphenation{toc-depth sec-num-depth}
+\hyphenation{toc-depth sec-num-depth con-tents-line}
\hyphenation{etoc-tan-dard-lines
etoc-de-fault-lines
etoc-toc-lines
@@ -720,6 +901,7 @@ etoc-name
etoc-page
etoc-skip-first-pre-fix
etoc-num-ber
+etoc-if-first
etoc-ifnum-bered
etoc-the-name
etoc-the-num-ber
@@ -756,7 +938,9 @@ etoc-lo-cal-framed
etoc-in-line
etoc-af-ter-ti-tle-hook
etoc-af-ter-con-tentshook
-etoc-af-ter-toc-hook}
+etoc-af-ter-toc-hook
+etoc-skip-first-pre-fix
+etoc-only-on-first}
\hyphenation{
etoc-font-mi-nus-two
@@ -807,6 +991,7 @@ etoc-bot-tom-rule-col-or-cmd
etoc-bkg-col-or-cmd
etoc-framed-mp-hook}
+\hyphenation{next-toc-with-tags}
\frenchspacing
\renewcommand\familydefault\sfdefault
@@ -814,11 +999,9 @@ etoc-framed-mp-hook}
% for illustration only. Not to be recommended in general.
\setcounter{secnumdepth}{4}
-%-------------------------------UEBERSETZUNG
\ifnum\ForDeutsch=1
\renewcommand*{\etocabbrevpagename}{S.~}
\fi
-%-------------------------------/UEBERSETZUNG
\begin{document}\rmfamily
\thispagestyle{empty}
@@ -863,7 +1046,7 @@ etoc-framed-mp-hook}
\begingroup
\etocsetlevel{subsection}{3}
\etocsetlevel{subsubsection}{6}
-\tableofcontents \label{toc:main}
+ \tableofcontents \label{toc:main}
\endgroup
\phantomsection\addcontentsline{toc}{section}{\abstractname}
@@ -937,7 +1120,7 @@ manner: they are made available via the \csb{etocname},
|memoir| classes. Starting with release |1.07k| it is possible to
use \etoc concurrently with package |tocloft|.
-\section{License, installation}
+\section{License}
\begingroup\ttfamily\small\hyphenchar\font -1
\parindent0pt
@@ -1356,7 +1539,6 @@ The code:
\end{verbatim}
\section{Linked list of the main package commands}
-% 16 octobre
\begingroup\raggedcolumns
\advance\linewidth18pt
@@ -1370,6 +1552,7 @@ The code:
\csb{etocdisplay}\par
\csb{etocframedstyle}\par
\csb{etocframed}\par
+ \csb{etociffirst}\par
\csb{etocifnumbered}\par
\csb{etocignoredepthtags}\par
\csb{etocignoretoctocdepth}\par
@@ -1411,6 +1594,7 @@ The code:
\endgroup
+\clearpage
% 15 octobre, je teste les tags
\etocdepthtag.toc {arbitrarily}
@@ -1963,17 +2147,15 @@ coding used.
% on va plutôt faire un \vspace suffisant, cela sera un moindre mal
-\vspace{1cm}
+%\vspace{1cm}
+\clearpage
\etocdepthtag.toc {surprising}
\part{Surprising uses of \etoc}
\label{part:surprising}
\thispartstats %% (pas de sous-section)
-% in dtx of release 1.07h there was here a \thisspecialstats, but it
-% originated from the period when this \part was only a \section. So its
-% effect was not the intended one, basically it had the same effect as this:
\etocstandardlines
\etocsettocstyle {}{}
\localtableofcontents
@@ -2773,9 +2955,10 @@ typesetting:
\item printing the statistics at the start of each Part (see
\autoref{ssec:statistics}) is done using save boxes (so the problem of the
appearance of the links does not arise then).
-\item the typesetting of the TOC as a table (see \autoref{ssec:tocastable});
- there we also will have to issue |\hypersetup{hidelinks}| after having
- collected the names, numbers and page numbers in a token list register.
+\item the typesetting of the TOC as a table in the pre-|1.08| way (see
+ \autoref{ssec:tocastableold}); there we also have to issue
+ |\hypersetup{hidelinks}| after having collected the names, numbers and
+ page numbers in a token list register.
\item and the two additional tree examples in the next section.
\end{itemize}
@@ -2958,8 +3141,243 @@ previous
\end{verbatim}
\end{minipage}
-% \vfill\eject
+\section{The TOC as a table}
+\label{sec:tocastable}
+
+With release |1.08| it is easier to typeset a TOC as a table. It is
+possible to open a tabular in the title part of the TOC (first argument
+to \csb{etocsettocstyle}) and then close it after the contents (second
+argument to \csb{etocsettocstyle}), and specify in the line styles how
+to use the tabulation |&| and tabular end of row |\\|. There are some
+conditions and a few caveats:
+
+\begin{enumerate}
+\item it is mandatory to issue \csb{etocglobaldefs} for \etoc's
+ definitions to have global scope,
+\item use \csb{etocthelinkedname},
+ \csb{etocthelinkednumber} and \csb{etocthelinkedpage} in preference to
+ \csb{etocname}, \csb{etocnumber}, \csb{etocpage}: if |hyperref| is
+ present, this is mandatory, and if it is not present, it does not hurt
+ and gives the same output,
+\item it is impossible to start one of the \meta{start}, \meta{prefix},
+ \meta{contents} or \meta{finish} specification with a sole |\hline|,
+ \emph{i.e.} one not preceded by a |\\| (it is however possible to put
+ |\\| at the end of \meta{prefix} and the |\hline| at the start of
+ \meta{contents}).
+\item as is explained next, it is recommended to use the |\\| at
+ the start of the \meta{prefix} or \meta{contents}
+ specifications to close the \emph{previous} row, not at the end
+ to close the \emph{current} row; when the TOC is a partial one (a
+ \csa{localtableofcontents}) this advice becomes (in almost all
+ situations) mandatory.
+\end{enumerate}
+
+Here is an example of a TOC as a |longtable|, as is possible relatively
+simply now with |1.08|. The code follows.
+
+\begingroup
+\etocglobaldefs % necessary for \etocthename etc... to survive &
+
+% we must use \etocthelinkednumber and not \etocnumber if hyperref is
+% present, because \etocnumber does not incorporate a fully expanded
+% hyperlink destination specification, hence that part gets lost when a
+% & is encountered
+
+% observe the locations of the \\
+\etocsetstyle{part}
+ {}
+ {\\\hline}
+ {\strut\etocthelinkednumber &\bfseries\etocthelinkedname
+ &\etocthelinkedpage }
+ {}
+
+\etocsetstyle{section}
+ {}
+ {\etociffirst{\etocifnumbered{\\\hline}{\\\hline\hline}}{\\}}
+ {\etocthelinkednumber&\etocthelinkedname &\etocthelinkedpage }
+ {}
+
+\etocsetstyle{subsection}
+ {}
+ {\\}
+ {&\makebox[1cm][c]{\etocthelinkednumber}%
+ \parbox[t]{\dimexpr6cm-\tabcolsep\relax}
+ {\sloppy\itshape\etocthelinkedname\strut}%
+ &\itshape\etocthelinkedpage }
+ {}
+
+\etocsettocstyle
+ {\hypersetup{hidelinks}%
+ \begin{longtable}{|>{\bfseries}c|p{7cm}|r|}
+ \hline
+ \multicolumn{3}{|c|}{\Large\bfseries\strut\MakeUppercase{\contentsname}}%
+ }
+ {\\\hline\end{longtable}}
+
+\etocsetnexttocdepth {subsection}
+
+\tableofcontents
+\endgroup
+
+\begin{verbatim}
+\begingroup
+\etocglobaldefs % necessary for \etocthename etc... to survive &
+
+% we must use \etocthelinkednumber and not \etocnumber if hyperref is
+% present, because \etocnumber does not incorporate a fully expanded
+% hyperlink destination specification, hence that part gets lost when a
+% & is encountered
+
+% observe the locations of the \\
+\etocsetstyle{part}
+ {}
+ {\\\hline}
+ {\strut\etocthelinkednumber &\bfseries\etocthelinkedname
+ &\etocthelinkedpage }
+ {}
+
+\etocsetstyle{section}
+ {}
+ {\etociffirst{\etocifnumbered{\\\hline}{\\\hline\hline}}{\\}}
+ {\etocthelinkednumber&\etocthelinkedname &\etocthelinkedpage }
+ {}
+
+\etocsetstyle{subsection}
+ {}
+ {\\}
+ {&\makebox[1cm][c]{\etocthelinkednumber}%
+ \parbox[t]{\dimexpr6cm-\tabcolsep\relax}
+ {\sloppy\itshape\etocthelinkedname\strut}%
+ &\itshape\etocthelinkedpage }
+ {}
+
+\etocsettocstyle
+ {\hypersetup{hidelinks}%
+ \begin{longtable}{|>{\bfseries}c|p{7cm}|r|}
+ \hline
+ \multicolumn{3}{|c|}{\Large\bfseries\strut\strut TABLE OF CONTENTS}%
+ }
+ {\\\hline\end{longtable}}
+
+\etocsetnexttocdepth {subsection}
+
+\tableofcontents
+\endgroup
+\end{verbatim}
+
+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 many cases one may indeed construct
+TOC-as-tables with the |\\| located at the end of the style
+specifications (but almost never for a \csa{localtableofcontents}).
+The problem in the previous example was with the positioning of the
+|\hline|'s.
+
+Due to technical aspects of how \TeX{} constructs alignments any
+definition or assignment done after an |\\| starts a new row, and
+thus makes |\hline| an illegal token (this shows as a |misplaced
+\noalign| error.) Not only does \etoc have to do such definitions
+to construct \csb{etocname} etc..., it is furthermore the case that
+some packages put things in the |.toc| file and as a result there
+is never any guarantee that between two \csa{contentsline} there
+will not be such a token like |\relax| which in the contexts of
+alignments forces \TeX{} to start a cell and thus makes it
+impossible then to insert an |\hline|.
+
+The safest way is to start with an |\\| each line style
+specification. We had a little problem with the fact that we wanted
+parts not only to have a rule above them (easy, they do |\\\hline|)
+but also below them: after each part there is a section, thus the
+section which are first of their kind used the \csb{etociffirst}
+conditional branching. The attentive reader will notice one last
+subtlety: the title was supposed to be followed not by one, but by
+two |\hline|'s.
+
+To solve this we could have used a one-time macro redefining itself, but
+we noticed that the title was followed by the unnumbered Abstract, thus
+the \csb{etocifnumbered} switch came to the rescue.
+
+Last technical note: because we put the |\\| inside the branches, there
+was no need to employ the expandable variants \csb{etocxiffirst} and
+\csb{etocxifnumbered}.
+
+For the hardliner's old way of obtaining the exact same result, see
+\autoref{ssec:tocastableold}.
+
+Here is also a much simpler example. It is a local table of
+contents.
+
+\begin{center}
+\etocsetstyle{section}
+ {}
+ {\etociffirst{\\\hline\hline}{\\\hline}}
+ {\etocthelinkedname&
+ \etocthelinkednumber&
+ \etocthelinkedpage }
+ {}
+
+\etocsettocstyle
+ {\hypersetup{hidelinks}\begin{tabular}{|p{4cm}|c|c|}\hline
+ \multicolumn{1}{|c|}{\bfseries Section}&
+ \bfseries number&
+ \bfseries page}
+ {\\\hline\end{tabular}}
+
+\etocglobaldefs % MANDATORY !!
+\etocsetnexttocdepth{1}
+
+\tableofcontents\ref{toc:overview}
+\end{center}
+
+\begin{verbatim}
+\begin{center}
+\etocsetstyle{section}
+ {}
+ {\etociffirst{\\\hline\hline}{\\\hline}}
+ {\etocthelinkedname&
+ \etocthelinkednumber&
+ \etocthelinkedpage }
+ {}
+
+\etocsettocstyle
+ {\hypersetup{hidelinks}\begin{tabular}{|p{4cm}|c|c|}\hline
+ \multicolumn{1}{|c|}{\bfseries Section}&
+ \bfseries number&
+ \bfseries page}
+ {\\\hline\end{tabular}}
+
+\etocglobaldefs % MANDATORY !!
+\etocsetnexttocdepth{1}
+
+\tableofcontents\ref{toc:overview}
+\end{center}
+\end{verbatim}
+
+\subsection{The commands \csbhyp{etocglobaldefs} and \csbhyp{etoclocaldefs}}
+\label{etocglobaldefs}
+\label{etoclocaldefs}
+
+In \LaTeX{} the meaning of a command defined via |\newcommand\foo{...}| inside
+an environment (or group) vanishes from \TeX's memory on exit from this
+environment (or group). At times however it is needed to make definitions with
+global scope, for this \TeX{} has the primitive prefix |\global|.
+
+By default \etoc's definitions of \csb{etocname} etc... are local. This causes
+problems in certain contexts such as seen here with TOC as tables, but also
+with |enumitem| \emph{inline} variants of its standard environments, because
+the command |\item| then closes a group.
+
+After \csb{etocglobaldefs}, \etoc will make its definitions of \csb{etocname}
+etc... have global scope. For normal use this is not necessary. It does not hurt
+either to activate it systematically.
+
+To return to the default, use \csb{etoclocaldefs}. Note that both
+\csb{etocglobaldefs} and \csb{etoclocaldefs} actions are local to the
+environment or group where they are used.
+
+
+\clearpage
\etocdepthtag.toc {linestyles}
\part{Commands for the toc line styles}
@@ -3057,6 +3475,18 @@ much better to use the further command \csb{etocnumber} inside
the item label, which gives the real thing. The improved
definitions will thus be explained later.
+With this style, one would have
+to be imaginative to design something then for paragraph and
+subparagraph entries! perhaps as superscripts? Well, usually
+one does not need paragraphs and subparagraphs numbered and
+listed in the TOC, so our putative user here chose a design
+where no provision is made for them and added the definitive:
+\begin{verbatim}
+\etocsetstyle{paragraph}{}{}{}{}
+\etocsetstyle{subparagraph}{}{}{}{}
+\end{verbatim}
+This is also the situation with the default package line styles!
+
Each \csb{etocsetstyle} command has five mandatory arguments:\\
\hbox to \linewidth
{\hfil\csb{etocsetstyle}\color{blue}\marg{levelname}%
@@ -3073,37 +3503,35 @@ level toc entry. In the mean-time all entries for that level are
typeset by executing first the \meta{prefix} code and then the
\meta{contents} code.
-
The (robust) commands \csb{etocname}, \csb{etocnumber} and \csb{etocpage} are
-provided
-for use inside the \marg{prefix} and \marg{contents} parts of the
-\csa{etocsetstyle} specification. They represent of course, the name, number, and
-page number of the corresponding toc
-entry. If package |hyperref| is
+provided for use inside the \meta{prefix} and \meta{contents} parts of the
+\csa{etocsetstyle} specification. They represent of course, the name, number,
+and page number of the corresponding toc entry. If package |hyperref| is
active in the document and has added hyperlinks to the TOC data, then these
links are kept in the commands \csa{etocname}, \csa{etocnumber} and
\csa{etocpage} (this last one will have a link only if |hyperref| was passed
-option \emph{linktoc=all}.)
+option \emph{linktoc=all}.)
-\subsection{The \csbhyp{etocskipfirstprefix} command}
+\subsection{The \csbhyp{etocskipfirstprefix} and \csbhyp{etociffirst} commands}
\label{etocskipfirstprefix}
+\label{etociffirst}
+\label{etocxiffirst}
-The chosen |subsubsection| style also uses the command
-\csb{etocskipfirstprefix}, which, if present, \emph{must} be
-the very last one in the \emph{start} code. It instructs to not
-use for the first item the specified ``prefix'' code.
+The chosen |subsubsection| style made use of the command
+\csb{etocskipfirstprefix}, which instructs \etoc to \emph{not} use
+for the first item the specified \meta{prefix} code.\footnote{With
+versions earlier than |1.08| it had to be the very last token in
+the \meta{start} code. It may now appear anywhere therein.}
+
+The command \csb{etociffirst}\marg{YES CODE}\marg{NO CODE} (new
+with |1.08|) is a more flexible way to customize the \meta{prefix}
+(and \meta{contents}) specifications. It executes the \meta{YES
+CODE} branch if this is the first unit at that level (inside a
+lower level) and the \meta{NO CODE} if not. This is a robust
+command which survives to expansion (for example in an |enumitem| label).
+
+The variant \csb{etocxiffirst} does the same, but is expandable.
-With this style, one would have
-to be imaginative to design something then for paragraph and
-subparagraph entries! perhaps as superscripts? Well, usually
-one does not need paragraphs and subparagraphs numbered and
-listed in the TOC, so our putative user here chose a design
-where no provision is made for them and added the definitive:
-\begin{verbatim}
-\etocsetstyle{paragraph}{}{}{}{}
-\etocsetstyle{subparagraph}{}{}{}{}
-\end{verbatim}
-This is also the situation with the default package line styles!
\subsection{The \csbhyp{etocnumber} command}
\label{etocnumber}
@@ -3129,6 +3557,7 @@ without needing an added |\protect|.
\subsubsection{The \csbhyp{etocifnumbered} switch}
\label{etocifnumbered}
+\label{etocxifnumbered}
The \csa{fbox} would give an unaesthetic result in the case of
an unnumbered section (which ended up in the table of
@@ -3163,6 +3592,10 @@ vertical mode'. An additional \csa{par} token in the
\meta{contents} part of the |section| level would have fixed
this: |{...(page \etocpage)\par}|.
+The command \csb{etocifnumbered} is robust; \csb{etocxifnumbered}
+(new with |1.08|) has the same effect but is expandable.
+
+
\subsection{The \csbhyp{etocthename}, \csbhyp{etocthenumber}, and
\csbhyp{etocthepage} commands}
\label{etocthename}
@@ -3228,7 +3661,7 @@ which allows to make a link with an arbitrary name.
All these commands are fragile.
-Example of use\begingroup
+Example of \begingroup
\etocsetstyle {section}
{\begin{itemize*}[itemjoin={{; }}, itemjoin*={{, and }}]}
{\global\let\TmpEtocNumber\etocthelinkednumber
@@ -3238,13 +3671,13 @@ Example of use\begingroup
(\emph{p. \TmpEtocPage})}
{\end{itemize*}.}%
\etocsetnexttocdepth {section}%
- \etocsettocstyle {(a table of contents done as an inline
- \texttt{enumitem} environment): }{}%
+ \etocsettocstyle {a table of contents done as an inline
+ \texttt{enumitem} environment: }{}%
\etocinline\tableofcontents \ref{toc:globalcmds}
\endgroup
\begin{verbatim}
-Example of use\begingroup
+Example of \begingroup
\etocsetstyle {section}
{\begin{itemize*}[itemjoin={{; }}, itemjoin*={{, and }}]}
{\global\let\TmpEtocNumber\etocthelinkednumber
@@ -3255,12 +3688,40 @@ Example of use\begingroup
(\emph{p. \TmpEtocPage})}
{\end{itemize*}.}%
\etocsetnexttocdepth {section}%
- \etocsettocstyle {(a table of contents done as an inline
- \texttt{enumitem} environment): }{}%
+ \etocsettocstyle {a table of contents done as an inline
+ \texttt{enumitem} environment: }{}%
\etocinline\tableofcontents \ref{toc:globalcmds}
\endgroup
\end{verbatim}
+\etoc |1.08| offers a simpler way to the same result:
+\begin{verbatim}
+Example of
+\begingroup\etocglobaldefs % <-- NEW mit etoc 1.08.
+ \etocsetstyle {section}
+ {\begin{itemize*}[itemjoin={{; }}, itemjoin*={{, und }}]}
+ {}
+ {\item [{\bfseries\etocthelinkednumber.}]
+ \etocthelinkedname\ (\emph{p. \etocthelinkedpage })}
+ {\end{itemize*}.}%
+ \etocsetnexttocdepth {section}%
+ \etocsettocstyle {a table of contents done as an inline
+ \texttt{enumitem} environment: }{}%
+ \etocinline\tableofcontents \ref{toc:globalcmds}
+\end{verbatim}
+Example of
+\begingroup\etocglobaldefs % <-- NEW mit etoc 1.08.
+ \etocsetstyle {section}
+ {\begin{itemize*}[itemjoin={{; }}, itemjoin*={{, und }}]}
+ {}
+ {\item [{\bfseries\etocthelinkednumber.}]
+ \etocthelinkedname\ (\emph{p. \etocthelinkedpage })}
+ {\end{itemize*}.}%
+ \etocsetnexttocdepth {section}%
+ \etocsettocstyle {a table of contents done as an inline
+ \texttt{enumitem} environment: }{}%
+ \etocinline\tableofcontents \ref{toc:globalcmds}
+\endgroup
\section{The \csbhyp{etocsetlevel} command}
\label{etocsetlevel}
@@ -3398,6 +3859,7 @@ multi-lingual document, as the |babel| package writes to the |.toc| file the
language changes occurring in the document.
+\clearpage
\etocdepthtag.toc {globalcmds}
\part{Commands for the toc display style}
@@ -3854,6 +4316,8 @@ The code used:
\endgroup
\end{verbatim}
+
+\clearpage
\etocdepthtag.toc {custom}
\part{Using and customizing \etoc}
@@ -4353,6 +4817,7 @@ Regarding colors, generally speaking all color commands inside
\etoc are initially defined to do nothing, and the choice to
use or not colors is left to the user.
+\clearpage
\etocdepthtag.toc {tips}
\part{Tips}
@@ -4691,88 +5156,38 @@ get:
\end{verbatim}
\endgroup
-\subsection{Typesetting the TOC as a table}\label{ssec:tocastable}
-
-Tabular cells create groups; definitions of |\etocname|, |\etocnumber|,
-|\etocpage| made by \etoc are local, thus if the first cell of a row is
-where the |.toc| file line is read and |\etocname| and |\etocnumber|
-get defined, these definitions will be lost after the tabulation character |&|.
-The source code of \etoc does allow the ``begin'' and ``finish'' parts of
-the line styles to open or close groups, but the possibility of a group closed
-by a |&| for
-example in the ``prefix'' part of the line style is not anticipated.
-
-Another, similar, matter regards the redefinition of |\contentsline| made by
-\etoc each time it typesets a TOC. It is done after the first argument to
-\csb{etocsettocstyle} has been executed, hence if this argument opens a tabular,
-the |etoc| redefinition of |\contentsline| will be done in the first cell of the
-first row and get lost thereafter.
-
-Thus one can not typeset a TOC directly as a tabular, with the opening and
-closing specified via |\etocsettocstyle|, and using |&| and |\\| inside the
-level styles.
-
-The \etoc source code could be modified to make some relevant definitions
-global, but I decided against it. Typesetting as a |tabular| (or, rather,
-|longtable|) will appeal only to advanced users, and advanced users can employ
-the technique explained in \autoref{tocastree}. Here is an example, giving again
-a fully hyperlinked table of contents. The code follows, after the table.
-
-\newtoks\toctabletok
-% \newcommand*\appendtotok[2]{% #1=toks variable, #2=macro, expands once #2
-% #1\expandafter\expandafter\expandafter
-% {\expandafter\the\expandafter #1#2}}
-
-\newcommand*\PreparePart{%
- \toks0 \expandafter{\etocthelinkednumber}%
- \toks2 \expandafter{\etocthelinkedname}%
- \toks4 \expandafter{\etocthelinkedpage}%
- \edef\toctablepiece {\noexpand\hline
- \noexpand\strut\the\toks0 &\noexpand\bfseries\the\toks2
- &\the\toks4 \noexpand\\
- \noexpand\hline}%
-}
-
-\newcommand*\PrepareSection{%
- \toks0 \expandafter{\etocthelinkednumber}%
- \toks2 \expandafter{\etocthelinkedname}%
- \toks4 \expandafter{\etocthelinkedpage}%
- \edef\toctablepiece {\the\toks0 &\the\toks2 &\the\toks4 \noexpand\\}%
-}
-
-% new version for 1.07k, 2014/03/06
-\newcommand*{\PrepareSubsection}{%
- \toks0 \expandafter{\etocthelinkednumber}%
- \toks2 \expandafter{\expandafter\itshape\etocthelinkedname\strut}%
- \toks4 \expandafter{\expandafter\itshape\etocthelinkedpage}%
- \edef\toctablepiece{&\noexpand\makebox[1cm][c]{\the\toks0}%
- \noexpand\parbox[t]{\dimexpr6cm-\tabcolsep\relax}
- {\noexpand\sloppy\the\toks2}%
- &\the\toks4 \noexpand\\}%
-}
-
-\etocsetstyle{part}{}{}
- {\PreparePart \appendtotok\toctabletok\toctablepiece}
- {}
-
-\etocsetstyle{section}{}{}
- {\PrepareSection \appendtotok\toctabletok\toctablepiece}
- {}
-
-\etocsetstyle{subsection}{}{}
- {\PrepareSubsection\appendtotok\toctabletok\toctablepiece}
- {}
-
-\etocsettocstyle
- {\toctabletok{\hypersetup{hidelinks}%
- \begin{longtable}{|>{\bfseries}c|p{7cm}|r|}\hline
- \multicolumn{3}{|c|}{\Large\bfseries\strut TABLE OF CONTENTS}%
- \\\hline\hline}}
- {\global\toctabletok\expandafter{\the\toctabletok\hline\end{longtable}}}
-
-\etocsettocdepth {subsection}
-\tableofcontents
-\the\toctabletok
+\subsection{Typesetting the TOC as a table (the old way)}
+\label{ssec:tocastableold}
+
+Due to, among other things, the fact that alignment cells create and close
+groups, and that by default definitions of \csb{etocname}, \csb{etocnumber},
+\csb{etocpage} made by \etoc are local, it was not easy to typeset a TOC as
+table with \etoc, prior to release |1.08|.
+
+Not only \csb{etocname} etc... caused a problem, but also the basic
+redefinition of \csa{contentsline} was made by \etoc only after the
+first argument to \csb{etocsettocstyle} had been executed, hence if this
+argument were to open a tabular, the \etoc redefinition of
+\csa{contentsline} would be done in the first cell of the first row and
+get lost thereafter.
+
+Thus one had to resort to the technique explained in \autoref{tocastree}
+of using the execution of \csa{tableofcontents} as a way to store data
+which was then displayed later.
+
+For the record, here is how the TOC from \autoref{sec:tocastable} was
+coded in the old days. We don't have here the problems with the
+positioning of |\hline|'s we face with the newer method; on the other
+hand we must manipulate token registers which are not familiar to most
+\LaTeX{} users (macros could be used, but would be more cumbersome,
+except perhaps if using the \eTeX{} \csa{unexpanded}).
+
+The method here is the most powerful because it filters out of the
+|.toc| file only the data we want (the other things are not ignored,
+they are executed but hopefully do not create havoc; typically they are
+language changing instructions, or updates to certain counters, etc...),
+and we are less susceptible to fall potential victims of various
+external macros inserted in the |.toc| file by other packages.
\begin{verbatim}
\newtoks\toctabletok
@@ -4785,8 +5200,7 @@ a fully hyperlinked table of contents. The code follows, after the table.
\toks4 \expandafter{\etocthelinkedpage}%
\edef\toctablepiece {\noexpand\hline
\noexpand\strut\the\toks0 &\noexpand\bfseries\the\toks2
- &\the\toks4 \noexpand\\
- \noexpand\hline}%
+ &\the\toks4 \noexpand\\\noexpand\hline}%
}
\newcommand*\PrepareSection{%
\toks0 \expandafter{\etocthelinkednumber}%
@@ -4805,6 +5219,7 @@ a fully hyperlinked table of contents. The code follows, after the table.
&\the\toks4 \noexpand\\}%
}
+\begingroup
\etocsetstyle{part}{}{}{\PreparePart \appendtotok\toctabletok\toctablepiece}{}
\etocsetstyle{section}{}{}{\PrepareSection \appendtotok\toctabletok\toctablepiece}{}
@@ -4820,6 +5235,7 @@ a fully hyperlinked table of contents. The code follows, after the table.
\etocsettocdepth {subsection}
\tableofcontents
\the\toctabletok
+\endgroup
\end{verbatim}
\subsection{Compatibility with other packages}
@@ -4843,9 +5259,19 @@ The |.toc| file remains available
point the file is erased until its contents are again written to the disk by
\LaTeX{} at the end of the compilation.
-\etoc loads the package |multicol|. It is
-|hyperref| aware and hopefully |hyperref| compatible! It
-doesn't matter whether \etoc or |hyperref| is loaded first.
+\etoc loads the package |multicol|.
+
+\etoc requires the |.toc| file to use the |\contentsline| macro (possibly
+patched by other packages). It is thus incompatible with the |beamer| class.
+However, if |beamer| is used in an article mode, i.e., with the article class
+in conjunction with the |beamerarticle| package, then \etoc should work.
+
+\etoc is |hyperref| aware and hopefully |hyperref| compatible: the macros
+\csa{etocname}, \csa{etocnumber}, and \csa{etocpage} contain the |hyperref|
+links, if present (note that the \emph{linktoc=all} option of |hyperref| tells
+it to put a link also in the page number corresponding to a given toc entry).
+For example, the tables of contents of the present document are all fully
+linked. It doesn't matter whether \etoc or |hyperref| is loaded first.
Release |1.07k| adds compatibility with package
|tocloft|:\footnote{\url{http://ctan.org/pkg/tocloft}} steps are
@@ -4908,45 +5334,24 @@ 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.
-\etoc expects the document sectioning units to write their
-data into the file having extension |.toc|, in the form of
-lines containing the \csa{contentsline} command and its
-arguments. The macros \csa{etocname}, \csa{etocnumber}, and
-\csa{etocpage} contain the |hyperref| links, if present (note
-that the \emph{linktoc=all} option of |hyperref| tells it to
-put a link also in the page number corresponding to a given
-toc entry). For example, the tables of contents of the present document are
-all fully linked.
-
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 use simultaneously \etoc and
-{\color{niceone}|tableof|}\footnote{\url{http://ctan.org/pkg/tableof}}. For the
-advanced uses such as what is done in \autoref{ssec:molecule} it is
- important
-to know that |tableof| adds one level of grouping inside the |.toc| file itself.
-So when one needs to make some information \csa{global}, one can not wait to be
-at the level of the second argument of \csa{etocsettocstyle}, as
-|tableof| will already have closed the group then. The \csa{global} things (on
-volatile data) must
-be done at the latest in the \meta{finish} part of the top (or last) sectioning
- level used.
-This only applies of course to \csa{tableofcontents} or
- \csa{localtableofcontents} following the
- \csa{nexttocwithtags}|{required}||{forbidden}| command from |tableof|.
-
-And when the commands
- \csa{tableof} or \csa{tablenotof} of package
- |tableof| are used,
- they typeset the table of contents according to the document class defaults:
- to benefit from the \etoc styles, it is mandatory to use either
- \csa{tableofcontents}, or \csa{localtableofcontents} or one of the other \etoc
- commands, and |tableof (v1.1)| will influence the outcome only if
- \csa{nexttocwithtags}|{required}||{forbidden}| was added before the table of
- contents typesetting command.
+It is possible to use simultaneously \etoc and
+{\color{niceone}|tableof|}\footnote{\url{http://ctan.org/pkg/tableof}}. Release
+|1.08| of \etoc requires at least version |1.4a| of |tableof|. If
+\csb{etocglobaldefs} is put in the preamble, this must be after the loading of
+package |tableof|. {\color{niceone}|tableof|} command \csa{nexttocwithtags}
+should work as expected.
+
+{\color{niceone}|tableof|} commands \csa{tableof}, \csa{tablenotof}, ... will
+typeset the (a priori global) table of contents according to the document
+class defaults, obeying the \etoc depth tags; as explained in the |tableof|
+documentation they do not typeset a TOC title. They should \emph{not} be used
+in case \csb{etocglobaldefs} was issued before, except if its scope has been
+terminated since then, or \csb{etoclocaldefs} has cancelled its influence.
\subsection{\TeX nical matters}
@@ -5108,7 +5513,7 @@ abgerufen werden.
kompatibel zu sein. Seit der Version |1.07k| ist es möglich \etoc
gleichzeitig mit |tocloft| zu benutzen.
-\section{Lizenz, Installation}
+\section{Lizenz}
\begingroup\ttfamily\small\hyphenchar\font -1
\parindent0pt
@@ -5117,7 +5522,6 @@ gleichzeitig mit |tocloft| zu benutzen.
\clearpage
-
\etocsettocdepth {subsection}
\etocdepthtag.toc{overview}
@@ -5532,6 +5936,7 @@ Der Code:
\csb{etocdisplay}\par
\csb{etocframedstyle}\par
\csb{etocframed}\par
+ \csb{etociffirst}\par
\csb{etocifnumbered}\par
\csb{etocignoredepthtags}\par
\csb{etocignoretoctocdepth}\par
@@ -5572,6 +5977,8 @@ Der Code:
\end{multicols}
\endgroup
+
+\clearpage
% 15 octobre, je teste les tags
\etocdepthtag.toc {arbitrarily}
@@ -6099,6 +6506,7 @@ bezieht sich auf seine \hyperref[ssec:tocclone]{Unterabschnitte}, welche für di
Kodierung vorgesehen sind.
+\clearpage
\etocdepthtag.toc {surprising}
\part{Überraschende Anwendungen von \etoc}
\label{part:surprising}
@@ -6894,7 +7302,8 @@ Schriftsatz:
\item Für das Drucken der Statistiken zu Beginn der einzelnen Abschnitte (siehe
\autoref{ssec:statistics}) wurden unbeschädigte Boxen benutzt (das Problem der
Darstellung der Links funktioniert nicht).
-\item Zum Setzen des Inhaltsverzeichnisses als eine Tabelle (siehe \autoref{ssec:tocastable});
+\item Zum Setzen des Inhaltsverzeichnisses als eine Tabelle mit der Methode von
+ \autoref{ssec:tocastableold};
auch dort werden wir |\hypersetup{hidelinks}| setzen, nachdem wir die Namen,
Nummern und Seitennummern in einem symbolischen Listenregister gesetzt haben.
\item Und zwei weitere Baum-Beispiele sind im nächsten Abschnitt.
@@ -7072,8 +7481,242 @@ vorherige \hyperref[toc:forest]{Forest-TOC} auch.
\end{verbatim}
\end{minipage}
-% \vfill\eject
+\section{Das TOC als eine Tabelle}
+\label{sec:tocastable}
+
+\textbf{UEBERSETZUNG NOETIG}
+\begin{otherlanguage}{english}
+With release |1.08| it is easier to typeset a TOC as a table. It is
+possible to open a tabular in the title part of the TOC (first argument
+to \csb{etocsettocstyle}) and then close it after the contents (second
+argument to \csb{etocsettocstyle}), and specify in the line styles how
+to use the tabulation |&| and tabular end of row |\\|. There are some
+conditions and a few caveats:
+
+\begin{enumerate}
+\item it is mandatory to issue \csb{etocglobaldefs} for \etoc's
+ definitions to have global scope,
+\item use \csb{etocthelinkedname},
+ \csb{etocthelinkednumber} and \csb{etocthelinkedpage} in preference to
+ \csb{etocname}, \csb{etocnumber}, \csb{etocpage}: if |hyperref| is
+ present, this is mandatory, and if it is not present, it does not hurt
+ and gives the same output,
+\item it is impossible to start one of the \meta{start}, \meta{prefix},
+ \meta{contents} or \meta{finish} specification with a sole |\hline|,
+ \emph{i.e.} one not preceded by a |\\| (it is however possible to put
+ |\\| at the end of \meta{prefix} and the |\hline| at the start of
+ \meta{contents}).
+\item as is explained next, it is recommended to use the |\\| at
+ the start of the \meta{prefix} or \meta{contents}
+ specifications to close the \emph{previous} row, not at the end
+ to close the \emph{current} row; when the TOC is a partial one (a
+ \csa{localtableofcontents}) this advice becomes (in almost all
+ situations) mandatory.
+\end{enumerate}
+
+Here is an example of a TOC as a |longtable|, as is possible relatively
+simply now with |1.08|. The code follows.
+\end{otherlanguage}
+
+\begingroup
+\etocglobaldefs
+\etocsetstyle{part}
+ {}
+ {\\\hline}
+ {\strut\etocthelinkednumber &\bfseries\etocthelinkedname
+ &\etocthelinkedpage }
+ {}
+\etocsetstyle{section}
+ {}
+ {\etociffirst{\etocifnumbered{\\\hline}{\\\hline\hline}}{\\}}
+ {\etocthelinkednumber&\etocthelinkedname &\etocthelinkedpage }
+ {}
+\etocsetstyle{subsection}
+ {}
+ {\\}
+ {&\makebox[1cm][c]{\etocthelinkednumber}%
+ \parbox[t]{\dimexpr6cm-\tabcolsep\relax}
+ {\sloppy\itshape\etocthelinkedname\strut}%
+ &\itshape\etocthelinkedpage }
+ {}
+\etocsettocstyle
+ {\hypersetup{hidelinks}%
+ \begin{longtable}{|>{\bfseries}c|p{7cm}|r|}
+ \hline
+ \multicolumn{3}{|c|}{\Large\bfseries\strut\MakeUppercase{\contentsname}}%
+ }
+ {\\\hline\end{longtable}}
+\etocsetnexttocdepth {subsection}
+\tableofcontents
+\endgroup
+
+\begin{verbatim}
+UEBERSETZUNG NOETIG
+\begingroup
+\etocglobaldefs % necessary for \etocthename etc... to survive &
+
+% we must use \etocthelinkednumber and not \etocnumber if hyperref is
+% present, because \etocnumber does not incorporate a fully expanded
+% hyperlink destination specification, hence that part gets lost when a
+% & is encountered
+
+% observe the locations of the \\
+\etocsetstyle{part}
+ {}
+ {\\\hline}
+ {\strut\etocthelinkednumber &\bfseries\etocthelinkedname
+ &\etocthelinkedpage }
+ {}
+
+\etocsetstyle{section}
+ {}
+ {\etociffirst{\etocifnumbered{\\\hline}{\\\hline\hline}}{\\}}
+ {\etocthelinkednumber&\etocthelinkedname &\etocthelinkedpage }
+ {}
+
+\etocsetstyle{subsection}
+ {}
+ {\\}
+ {&\makebox[1cm][c]{\etocthelinkednumber}%
+ \parbox[t]{\dimexpr6cm-\tabcolsep\relax}
+ {\sloppy\itshape\etocthelinkedname\strut}%
+ &\itshape\etocthelinkedpage }
+ {}
+
+\etocsettocstyle
+ {\hypersetup{hidelinks}%
+ \begin{longtable}{|>{\bfseries}c|p{7cm}|r|}
+ \hline
+ \multicolumn{3}{|c|}{\Large\bfseries TABLE OF CONTENTS}%
+ }
+ {\\\hline\end{longtable}}
+
+\etocsetnexttocdepth {subsection}
+
+\tableofcontents
+\endgroup
+\end{verbatim}
+
+\textbf{UEBERSETZUNG NOETIG}
+
+\begin{otherlanguage}{english}
+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 many cases one may indeed construct
+TOC-as-tables with the |\\| located at the end of the style
+specifications (but almost never for a \csa{localtableofcontents}).
+The problem in the previous example was with the positioning of the
+|\hline|'s.
+
+Due to technical aspects of how \TeX{} constructs alignments any
+definition or assignment done after an |\\| starts a new row, and
+thus makes |\hline| an illegal token (this shows as a |misplaced
+\noalign| error.) Not only does \etoc have to do such definitions
+to construct \csb{etocname} etc..., it is furthermore the case that
+some packages put things in the |.toc| file and as a result there
+is never any guarantee that between two \csa{contentsline} there
+will not be such a token like |\relax| which in the contexts of
+alignments forces \TeX{} to start a cell and thus makes it
+impossible then to insert an |\hline|.
+
+The safest way is to start with an |\\| each line style
+specification. We had a little problem with the fact that we wanted
+parts not only to have a rule above them (easy, they do |\\\hline|)
+but also below them: after each part there is a section, thus the
+section which are first of their kind used the \csb{etociffirst}
+conditional branching. The attentive reader will notice one last
+subtlety: the title was supposed to be followed not by one, but by
+two |\hline|'s.
+
+To solve this we could have used a one-time macro redefining itself, but
+we noticed that the title was followed by the unnumbered Abstract, thus
+the \csb{etocifnumbered} switch came to the rescue.
+
+Last technical note: because we put the |\\| inside the branches, there
+was no need to employ the expandable variants \csb{etocxiffirst} and
+\csb{etocxifnumbered}.
+
+For the hardliner's old way of obtaining the exact same result, see
+\autoref{ssec:tocastableold}.
+
+Here is also a much simpler example. It is a local table of
+contents.
+\end{otherlanguage}
+
+\begin{center}
+\etocsetstyle{section}
+ {}
+ {\etociffirst{\\\hline\hline}{\\\hline}}
+ {\etocthelinkedname&
+ \etocthelinkednumber&
+ \etocthelinkedpage }
+ {}
+\etocsettocstyle
+ {\hypersetup{hidelinks}\begin{tabular}{|p{4cm}|c|c|}\hline
+ \multicolumn{1}{|c|}{\bfseries Abschnitt}&
+ \bfseries Nummer&
+ \bfseries Seite}
+ {\\\hline\end{tabular}}
+
+\etocglobaldefs % VERPFLICHTEND !!
+\etocsetnexttocdepth{1}
+
+\tableofcontents\ref{toc:overview}
+\end{center}
+
+\begin{verbatim}
+\begin{center}
+\etocsetstyle{section}
+ {}
+ {\etociffirst{\\\hline\hline}{\\\hline}}
+ {\etocthelinkedname&
+ \etocthelinkednumber&
+ \etocthelinkedpage }
+ {}
+
+\etocsettocstyle
+ {\hypersetup{hidelinks}\begin{tabular}{|p{4cm}|c|c|}\hline
+ \multicolumn{1}{|c|}{\bfseries Abschnitt}&
+ \bfseries Nummer&
+ \bfseries Seite}
+ {\\\hline\end{tabular}}
+
+\etocglobaldefs % VERPFLICHTEND !!
+\etocsetnexttocdepth{1}
+
+\tableofcontents\ref{toc:overview}
+\end{center}
+\end{verbatim}
+
+\subsection{Die Befehle \csbhyp{etocglobaldefs} und \csbhyp{etoclocaldefs}}
+\label{etocglobaldefs}
+\label{etoclocaldefs}
+
+\textbf{UEBERSETZUNG NOETIG}
+
+\begin{otherlanguage}{english}
+In \LaTeX{} the meaning of a command defined via |\newcommand\foo{...}| inside
+an environment (or group) vanishes from \TeX's memory on exit from this
+environment (or group). At times however it is needed to make definitions with
+global scope, for this \TeX{} has the primitive prefix |\global|.
+
+By default \etoc's definitions of \csb{etocname} etc... are local. This causes
+problems in certain contexts such as seen here with TOC as tables, but also
+with |enumitem| \emph{inline} variants of its standard environments, because
+the command |\item| then closes a group.
+
+After \csb{etocglobaldefs}, \etoc will make its definitions of \csb{etocname}
+etc... have global scope. For normal use this is not necessary. It does not hurt
+either to activate it systematically.
+
+To return to the default, use \csb{etoclocaldefs}. Note that both
+\csb{etocglobaldefs} and \csb{etoclocaldefs} actions are local to the
+environment or group where they are used.
+\end{otherlanguage}
+
+
+\clearpage
\etocdepthtag.toc {linestyles}
\part{Befehle für die TOC-Linienstile}
@@ -7172,6 +7815,18 @@ wesentlich besser den Befehl \csb{etocnumber} innerhalb des Item-labels zu
verwenden, denn das gibt das richtige Ergebnis. Die verbesserten Definitionen
werden dahingehend später erklärt.
+Mit diesem Stil müsste man so
+einfallsreich sein, etwas zu designen, was nicht mit Abschnitten oder
+Unterabschnitten zu tun hat, vielleicht so etwas wie Superscripte. Nun,
+normalerweise braucht man Abschnitte und Unterabschnitte nicht nummeriert und
+aufgelistet in der TOC, also hat unser vermeintlicher Benutzer ein Design
+gewählt, welches dafür nichts bereitstellt und fügte noch hinzu:
+\begin{verbatim}
+\etocsetstyle{paragraph}{}{}{}{}
+\etocsetstyle{subparagraph}{}{}{}{}
+\end{verbatim}
+Das ist der gleiche Sachverhalt wie mit den Standardlinienstilen!
+
Jeder \csb{etocsetstyle}-Befehl hat fünf notwendige Argumente:\\ \hbox to
\linewidth {\hfil\csb{etocsetstyle}\color{blue}\marg{levelname}%
\marg{start}\marg{prefix}\marg{contents}\marg{finish}\hfil} Die
@@ -7186,7 +7841,7 @@ findet. In der Zwischenzeit werden alle Einträge für dieses Level gesetzt, ind
zuerst der \meta{prefix}-Code und dann der \meta{contents}-Code ausgeführt wird.
Die (robusten) Befehle \csb{etocname}, \csb{etocnumber} und \csb{etocpage} sind
-für die Benutzung innerhalb der \marg{prefix} und \marg{contents}-Teile aus der
+für die Benutzung innerhalb der \meta{prefix} und \meta{contents}-Teile aus der
\csa{etocsetstyle}-Spezifikation. Diese enthalten den Namen, die Nummerierung
und die Seitennummer des entsprechenden toc-Eintrags. Ist das Paket |hyperref|
im Dokument eingebunden, und es existieren Verlinkungen zu den TOC-Daten, dann
@@ -7194,23 +7849,38 @@ werden diese Links in den Befehlen \csa{etocname}, \csa{etocnumber} und
\csa{etocpage} gehalten (Der letzte hat nur einen Link, wenn |hyperref| die
Option \emph{linktoc=all} übergeben wurde).
-\subsection{Der \csbhyp{etoc\-skip\-first\-pre\-fix}-Befehl}
+
+
+\subsection{Die \csbhyp{etocskipfirstprefix} und \csbhyp{etociffirst} Befehle}
\label{etocskipfirstprefix}
+\label{etociffirst}
+\label{etocxiffirst}
+
+% ALTES
+% Der gewählte |subsubsection|-Stil benutzt außerdem den Befehl
+% \csb{etocskipfirstprefix}, welcher -- falls verwendet -- der letzte im
+% \emph{start}-Code sein \emph{muss}. Er sorgt dafür, dass der "`prefix"'-Code
+% nicht für das erste Objekt ausgeführt wird.
+
+\textbf{UEBERSETZUNG NOETIG}
+
+\begin{otherlanguage}{english}
+The chosen |subsubsection| style made use of the command
+\csb{etocskipfirstprefix}, which instructs \etoc to \emph{not} use
+for the first item the specified \meta{prefix} code.\footnote{With
+versions earlier than |1.08| it had to be the very last token in
+the \meta{start} code. It may now appear anywhere therein.}
+
+The command \csb{etociffirst}\marg{YES CODE}\marg{NO CODE} (new
+with |1.08|) is a more flexible way to customize the \meta{prefix}
+(and \meta{contents}) specifications. It executes the \meta{YES
+CODE} branch if this is the first unit at that level (inside a
+lower level) and the \meta{NO CODE} if not. This is a robust
+command which survives to expansion (for example in an |enumitem| label).
+
+The variant \csb{etocxiffirst} does the same, but is expandable.
+\end{otherlanguage}
-Der gewählte |subsubsection|-Stil benutzt außerdem den Befehl
-\csb{etocskipfirstprefix}, welcher -- falls verwendet -- der letzte im
-\emph{start}-Code sein \emph{muss}. Er sorgt dafür, dass der "`prefix"'-Code
-nicht für das erste Objekt ausgeführt wird. Mit diesem Stil müsste man so
-einfallsreich sein, etwas zu designen, was nicht mit Abschnitten oder
-Unterabschnitten zu tun hat, vielleicht so etwas wie Superscripte. Nun,
-normalerweise braucht man Abschnitte und Unterabschnitte nicht nummeriert und
-aufgelistet in der TOC, also hat unser vermeintlicher Benutzer ein Design
-gewählt, welches dafür nichts bereitstellt und fügte noch hinzu:
-\begin{verbatim}
-\etocsetstyle{paragraph}{}{}{}{}
-\etocsetstyle{subparagraph}{}{}{}{}
-\end{verbatim}
-Das ist der gleiche Sachverhalt wie mit den Standardlinienstilen!
\subsection{Der \csbhyp{etocnumber}-Befehl}
\label{etocnumber}
@@ -7235,6 +7905,7 @@ was erklärt, warum er in der Label-Spezifikation benutzt werden kann, ohne
\subsubsection{Der \csbhyp{etocifnumbered}-Schalter}
\label{etocifnumbered}
+\label{etocxifnumbered}
Die \csa{fbox} würde ein unästhetisches Ergebnis bringen im Fall eines nicht
nummerierten Abschnitts (welches beispielsweise im Inhaltsverzeichnis gelandet
@@ -7267,6 +7938,13 @@ Paket-Stil für die "`subsections"' erwartet dann `im Vertikal-Modus' zu starten
Ein zusätzliches \csa{par}-Token im \meta{contents}-Teil des |section|-Levels
hätte das behoben: |{...(page \etocpage)\par}|.
+\textbf{UEBERSETZUNG NOETIG}
+
+\begin{otherlanguage}{english}
+The command \csb{etocifnumbered} is robust; \csb{etocxifnumbered}
+(new with |1.08|) has the same effect but is expandable.
+\end{otherlanguage}
+
\subsection{Die Befehle \csbhyp{etocthename}, \csbhyp{etocthenumber} sowie
\csbhyp{etocthepage}}
\label{etocthename}
@@ -7284,6 +7962,7 @@ Diese Befehle sind aber nicht geschützt, also sollten sie in veränderlichen
Kontexten (zum Beispiel Label-Beschreibungen mit vorangestelltem |\protect|)
verwendet werden.
+
\subsection{Der \csbhyp{etoclink}-Befehl}
\label{etoclink}
@@ -7325,7 +8004,7 @@ welches es erlaubt einen Link mit einem beliebigen Name zu erstellen.
All diese Befehle sind \emph{nicht} robust.
-Beispiel\begingroup
+Beispiel\begingroup\
\etocsetstyle {section}
{\begin{itemize*}[itemjoin={{; }}, itemjoin*={{, und }}]}
{\global\let\TmpEtocNumber\etocthelinkednumber
@@ -7358,6 +8037,34 @@ Beispiel\begingroup
\endgroup
\end{verbatim}
+Mit \etoc |1.08| gibt es ein einfacher Weg zum gleichen Resultat:
+\begin{verbatim}
+Beispiel\begingroup\etocglobaldefs % <-- NEU mit etoc 1.08.
+ \etocsetstyle {section}
+ {\begin{itemize*}[itemjoin={{; }}, itemjoin*={{, und }}]}
+ {}
+ {\item [{\bfseries\etocthelinkednumber.}]
+ \etocthelinkedname\ (\emph{S. \etocthelinkedpage })}
+ {\end{itemize*}.}%
+ \etocsetnexttocdepth {section}%
+ \etocsettocstyle {(ein Inhaltsverzeichnis als eine Inline-%
+ \texttt{enumitem}-Umgebung): }{}%
+ \etocinline\tableofcontents \ref{toc:globalcmds}
+\endgroup
+\end{verbatim}
+Beispiel\begingroup\etocglobaldefs % <-- NEU mit etoc 1.08.
+ \etocsetstyle {section}
+ {\begin{itemize*}[itemjoin={{; }}, itemjoin*={{, und }}]}
+ {}
+ {\item [{\bfseries\etocthelinkednumber.}]
+ \etocthelinkedname\ (\emph{S. \etocthelinkedpage })}
+ {\end{itemize*}.}%
+ \etocsetnexttocdepth {section}%
+ \etocsettocstyle {(ein Inhaltsverzeichnis als eine Inline-%
+ \texttt{enumitem}-Umgebung): }{}%
+ \etocinline\tableofcontents \ref{toc:globalcmds}
+\endgroup
+
\section{Der \csbhyp{etocsetlevel}-Befehl}
\label{etocsetlevel}
@@ -7495,6 +8202,8 @@ Zurück zu Schwarz. Man beachte das diese Bereichsprobleme auch in mehrsprachige
Dokumenten auftauchen, da das |babel|-Paket auftretende Sprachänderungen
ebenfalls in die |.toc|-Datei schreibt.
+
+\clearpage
\etocdepthtag.toc {globalcmds}
\part{Befehle für den toc-Display-Stil}
@@ -7938,6 +8647,8 @@ Zur Erzeugung dieses Inhaltsverzeichnisses wurde folgender Code genutzt:
\endgroup
\end{verbatim}
+
+\clearpage
\etocdepthtag.toc {custom}
\part{\etoc nutzen und an\-passen}
@@ -8430,6 +9141,7 @@ dass sie nichts verändern. Daher kann der Nutzer selbst entscheiden, ob er
Farben nutzen will oder nicht.
+\clearpage
\etocdepthtag.toc {tips}
\part{Tipps}
@@ -8453,7 +9165,7 @@ Farben nutzen will oder nicht.
\fbox{\raisebox{-\fontdimen22\textfont2}
{\color{blue}\parbox{.5\linewidth}
{\normalfont Dieser Text ist vertikal perfekt zentriert
- unter Berücksichtigung der \emph{surrounding horizontal rules.}}}}
+ unter Berücksichtigung der \emph{surrounding horizontal rules.}}}}
\ref{toc:globalcmds}
\end{verbatim}
@@ -8465,7 +9177,7 @@ Farben nutzen will oder nicht.
\fbox{\raisebox{-\fontdimen22\textfont2}
{\color{blue}\parbox{.5\linewidth}
{\normalfont Dieser Text ist vertikal perfekt zentriert
- unter Berücksichtigung der \emph{surrounding horizontal rules.}}}}}
+ unter Berücksichtigung der \emph{surrounding horizontal rules.}}}}}
\ref{toc:globalcmds}
@@ -8558,20 +9270,30 @@ Aber als Erstes der Code von \csa{thispartstats}:\par
\stepcounter{mycountii}%
\sbox{\lastnameii}{\etocname}%
\sbox{\lastnumberii}{\etocnumber}} {}%
- \etocsetstyle{section} {} {}
+ \etocsetstyle{section}
+ {}
+ {}
{\thispartstatsauxi
\stepcounter{mycounti}%
\sbox{\lastnamei}{\etocname}%
\sbox{\lastnumberi}{\etocnumber}}
- {Here are some statistics for this part: it contains \arabic{mycounti}
- section\ifnum\value{mycounti}>1 s\fi{} and \arabic{mycountii}
- subsection\ifnum\value{mycountii}>1 s\fi. The name of the first section is
- \unhbox\firstnamei{} and the corresponding number is \unhbox\firstnumberi.
- The name of the last section is \unhbox\lastnamei{} and its number is
- \unhbox\lastnumberi. The name of the first subsection is \unhbox\firstnameii{}
- and the corresponding number is \unhbox\firstnumberii. The name of the last
- subsection is \unhbox\lastnameii{} and its number is \unhbox\lastnumberii.}%
- \etocinline % cancels the automatic \par automatically before the TOC
+% Hier wird ein Befehl definiert, der fuer jedes Teil ein paar Fakten sammelt
+% und ausgibt.
+ {Zu Beginn wollen wir ein paar Fakten zu diesem Teil nennen. Er enthält
+ \arabic{mycounti} Abschnitt\ifnum\value{mycounti}>1 e\fi{} und
+ \arabic{mycountii} Unterabschnitt\ifnum\value{mycountii}>1 e\fi. Der Name des ersten
+ Abschnitts lautet
+ \glqq\unhbox\firstnamei{}\grqq~und er hat die Gliederungsnummer
+ \glqq\unhbox\firstnumberi\grqq. Der Name des letzten Abschnitts lautet
+ \glqq\unhbox\lastnamei{}\grqq~und er hat die Nummer
+ \glqq\unhbox\lastnumberi\grqq.
+ \ifnum\value{mycountii}>0 Der erste
+ Unterabschnitt heißt
+ \glqq\unhbox\firstnameii{}\grqq~und er hat die Nummer
+ \glqq\unhbox\firstnumberii\grqq. Der Name des letzten Unterabschnitts ist
+ \glqq\unhbox\lastnameii{}\grqq~und dessen Nummer ist
+ \glqq\unhbox\lastnumberii\grqq.\fi }%
+ \etocinline
\etocsettocstyle {}{}
\etocsetnexttocdepth{2}%
\localtableofcontents % to be used at the top level of a Part.
@@ -8593,15 +9315,18 @@ steht hier für die Verwendung in einem Kapitel).
\let\firstsubnumber\etocthelinkednumber
\def\thisspecialstatsaux{}}
\begingroup
- \etocsetstyle{subsection} {} {}
+ \etocsetstyle{subsection}
+ {}
+ {}
{\thisspecialstatsaux
\stepcounter{mycounti}%
\let\lastsubname\etocthelinkedname
\let\lastsubnumber\etocthelinkednumber }
- {Here are some statistics for this section. It contains \arabic{mycounti}
- subsections. The name of its first is \emph{\firstsubname{}} and the
- corresponding number is {\firstsubnumber}. The name of the last
- subsection is \emph{\lastsubname{}} and its number is {\lastsubnumber}.}%
+ {Zu Beginn wollen wir ein paar Fakten zu diesem Teil nennen. Er enthält
+ \arabic{mycounti} Unterabschnitt\ifnum\value{mycounti}>1 e\fi{}. Der Name des ersten
+ Abschnitts lautet\emph{\firstsubname{}} und er hat die Gliederungsnummer
+ {\firstsubnumber}. Der Name des letzten Unterabschnitts lautet
+ \emph{\lastsubname{}} und er hat die Nummer{\lastsubnumber}.}
\etocsettocstyle {}{}
\etocinline
\etocsetnexttocdepth {1}%
@@ -8763,90 +9488,75 @@ es kann leicht recycelt) erhalten wir:
\end{verbatim}
\endgroup
-\subsection{Das TOC als eine Tabelle setzend}\label{ssec:tocastable}
-
-Tabellenzellen erstellen Gruppen; Definitionen von |\etocname|, |\etocnumber|,
-|\etocpage| sind lokal gemacht, also wenn die erste Zelle einer Zeile ist, wo
-die |.toc|-Dateizeile gelesen wird und|\etocname| und |\etocnumber| definiert
-wird, werden diese Definitionen nach dem Tabularzeichen |&| verloren gehen. Der
-Quellcode von \etoc beginnt, die "`Anfangs"'- und "`End"'teile der Linienstile
-zu öffnen oder Gruppen zu schließen, durch ein |&| beispielsweise im
-"`Präfix"'-Teil des Linienstils ist nicht zu erwarten.
+\subsection{Das TOC als eine Tabelle setzend (die alte Weise)}
+\label{ssec:tocastableold}
+
+%%% ALT TEXT:
+% Tabellenzellen erstellen Gruppen; Definitionen von |\etocname|, |\etocnumber|,
+% |\etocpage| sind lokal gemacht, also wenn die erste Zelle einer Zeile ist, wo
+% die |.toc|-Dateizeile gelesen wird und|\etocname| und |\etocnumber| definiert
+% wird, werden diese Definitionen nach dem Tabularzeichen |&|
+% verloren gehen. Der
+% Quellcode von \etoc beginnt, die "`Anfangs"'- und "`End"'teile der Linienstile
+% zu öffnen oder Gruppen zu schließen, durch ein |&| beispielsweise im
+% "`Präfix"'-Teil des Linienstils ist nicht zu erwarten.
+
+% Weiterhin, ähnlich sieht die Sache der Neudefinition von |\contentsline|, made
+% by \etoc , aus, jedesmal wird ein TOC gesetzt. Es wird nach dem
+% ersten Argument
+% getan, wenn \csb{etocsettocstyle} ausgeführt wurde, weil, wenn dieses Argument
+% eine Tabelle öffnet, die |etoc|-Neudefintion der |\contentsline| in die erste
+% Zelle der ersten Zeile getan werden will und danach verloren geht.
+
+% So, mit dem Öffnen und Schließen mit |\etocsettocstyle| und dem
+% Nehmen von |&| |
+% und | innerhalb eines Level-Stils, kann man nicht direkt ein TOC
+% in eine Tabelle
+% setzen.
+
+% Der \etoc -Quellcode könnte geändert werden, zu machen Modifizierungen von
+% einigen relevanten globalen Definitionen, aber ich habe mich dagegen
+% entschieden. Setzen als eine |tabular| (oder später als |longtable|) wird nur
+% fortgeschrittene Anwendern gesucht und fortgeschrittene Anwender können die
+% Technik einsetzen, die in \autoref{tocastree} erklärt wurden. Hier ist ein
+% Beispiel mit einem vollverlinkten Inhaltsverzeichnis. Der Code kommt nach der
+% Tabelle.
+
+
+\textbf{UEBERSETZUNG NOETIG}
+
+\begin{otherlanguage}{english}
+Due to, among other things, the fact that alignment cells create and close
+groups, and that by default definitions of \csb{etocname}, \csb{etocnumber},
+\csb{etocpage} made by \etoc are local, it was not easy to typeset a TOC as
+table with \etoc, prior to release |1.08|.
+
+Not only \csb{etocname} etc... caused a problem, but also the basic
+redefinition of \csa{contentsline} was made by \etoc only after the
+first argument to \csb{etocsettocstyle} had been executed, hence if this
+argument were to open a tabular, the \etoc redefinition of
+\csa{contentsline} would be done in the first cell of the first row and
+get lost thereafter.
+
+Thus one had to resort to the technique explained in \autoref{tocastree}
+of using the execution of \csa{tableofcontents} as a way to store data
+which was then displayed later.
+
+For the record, here is how the TOC from \autoref{sec:tocastable} was
+coded in the old days. We don't have here the problems with the
+positioning of |\hline|'s we face with the newer method; on the other
+hand we must manipulate token registers which are not familiar to most
+\LaTeX{} users (macros could be used, but would be more cumbersome,
+except perhaps if using the \eTeX{} \csa{unexpanded}).
+
+The method here is the most powerful because it filters out of the
+|.toc| file only the data we want (the other things are not ignored,
+they are executed but hopefully do not create havoc; typically they are
+language changing instructions, or updates to certain counters, etc...),
+and we are less susceptible to fall potential victims of various
+external macros inserted in the |.toc| file by other packages.
+\end{otherlanguage}
-Weiterhin, ähnlich sieht die Sache der Neudefinition von |\contentsline|, made
-by \etoc , aus, jedesmal wird ein TOC gesetzt. Es wird nach dem ersten Argument
-getan, wenn \csb{etocsettocstyle} ausgeführt wurde, weil, wenn dieses Argument
-eine Tabelle öffnet, die |etoc|-Neudefintion der |\contentsline| in die erste
-Zelle der ersten Zeile getan werden will und danach verloren geht.
-
-So, mit dem Öffnen und Schließen mit |\etocsettocstyle| und dem Nehmen von |&| |
-und | innerhalb eines Level-Stils, kann man nicht direkt ein TOC in eine Tabelle
-setzen.
-
-Der \etoc -Quellcode könnte geändert werden, zu machen Modifizierungen von
-einigen relevanten globalen Definitionen, aber ich habe mich dagegen
-entschieden. Setzen als eine |tabular| (oder später als |longtable|) wird nur
-fortgeschrittene Anwendern gesucht und fortgeschrittene Anwender können die
-Technik einsetzen, die in \autoref{tocastree} erklärt wurden. Hier ist ein
-Beispiel mit einem vollverlinkten Inhaltsverzeichnis. Der Code kommt nach der
-Tabelle.
-
-
-\newtoks\toctabletok
-% \newcommand*\appendtotok[2]{% #1=toks variable, #2=macro, expands once #2
-% #1\expandafter\expandafter\expandafter
-% {\expandafter\the\expandafter #1#2}}
-
-\newcommand*\PreparePart{%
- \toks0 \expandafter{\etocthelinkednumber}%
- \toks2 \expandafter{\etocthelinkedname}%
- \toks4 \expandafter{\etocthelinkedpage}%
- \edef\toctablepiece {\noexpand\hline
- \noexpand\strut\the\toks0 &\noexpand\bfseries\the\toks2
- &\the\toks4 \noexpand\\
- \noexpand\hline}%
-}
-
-\newcommand*\PrepareSection{%
- \toks0 \expandafter{\etocthelinkednumber}%
- \toks2 \expandafter{\etocthelinkedname}%
- \toks4 \expandafter{\etocthelinkedpage}%
- \edef\toctablepiece {\the\toks0 &\the\toks2 &\the\toks4 \noexpand\\}%
-}
-
-% new version for 1.07k, 2014/03/06
-\newcommand*{\PrepareSubsection}{%
- \toks0 \expandafter{\etocthelinkednumber}%
- \toks2 \expandafter{\expandafter\itshape\etocthelinkedname\strut}%
- \toks4 \expandafter{\expandafter\itshape\etocthelinkedpage}%
- \edef\toctablepiece{&\noexpand\makebox[1cm][c]{\the\toks0}%
- \noexpand\parbox[t]{\dimexpr6cm-\tabcolsep\relax}
- {\noexpand\sloppy\the\toks2}%
- &\the\toks4 \noexpand\\}%
-}
-
-\etocsetstyle{part}{}{}
- {\PreparePart \appendtotok\toctabletok\toctablepiece}
- {}
-
-\etocsetstyle{section}{}{}
- {\PrepareSection \appendtotok\toctabletok\toctablepiece}
- {}
-
-\etocsetstyle{subsection}{}{}
- {\PrepareSubsection\appendtotok\toctabletok\toctablepiece}
- {}
-
-\etocsettocstyle
- {\toctabletok{\hypersetup{hidelinks}%
- \begin{longtable}{|>{\bfseries}c|p{7cm}|r|}\hline
- \multicolumn{3}{|c|}{\Large\bfseries\strut TABLE OF CONTENTS}%
- \\\hline\hline}}
- {\global\toctabletok\expandafter{\the\toctabletok\hline\end{longtable}}}
-
-\etocsettocdepth {subsection}
-\tableofcontents
-\the\toctabletok
\begin{verbatim}
\newtoks\toctabletok
@@ -8858,9 +9568,8 @@ Tabelle.
\toks2 \expandafter{\etocthelinkedname}%
\toks4 \expandafter{\etocthelinkedpage}%
\edef\toctablepiece {\noexpand\hline
- \strut\the\toks0 &\noexpand\bfseries\the\toks2
- &\the\toks4 \noexpand\\
- \noexpand\hline}%
+ \noexpand\strut\the\toks0 &\noexpand\bfseries\the\toks2
+ &\the\toks4 \noexpand\\\noexpand\hline}%
}
\newcommand*\PrepareSection{%
\toks0 \expandafter{\etocthelinkednumber}%
@@ -8879,6 +9588,7 @@ Tabelle.
&\the\toks4 \noexpand\\}%
}
+\begingroup
\etocsetstyle{part}{}{}{\PreparePart \appendtotok\toctabletok\toctablepiece}{}
\etocsetstyle{section}{}{}{\PrepareSection \appendtotok\toctabletok\toctablepiece}{}
@@ -8894,6 +9604,7 @@ Tabelle.
\etocsettocdepth {subsection}
\tableofcontents
\the\toctabletok
+\endgroup
\end{verbatim}
\subsection{Kompatibilität mit anderen Paketen}
@@ -8916,9 +9627,27 @@ Speicher von \etoc getan, bei |\begin{document}|. \footnote{Neu mit |1.07m|.
aus wird die Datei gelöscht bis ihr Inhalt wieder auf die Platte von
\LaTeX{} am Ende der Kompilierung geschrieben wurde.
-\etoc lädt das Paket |multicol|. Es ist
-|hyperref| bekannt und hoffentlich kompatibel mit ihm! Es ist kein Thema, ob
-\etoc vor oder nach |hyperref| geladen wird.
+\etoc lädt das Paket |multicol|.
+
+\etoc erwartet die Sektionierungseinheiten des Dokuments, um ihre Daten in eine
+Datei mit der Endung |.toc| zu schreiben, in Form von Linien, die enthalten den
+\csa{contentsline}-Befehl und dessen Argumente.
+\textbf{UEBERSETZUNG NOETIG}
+\begin{otherlanguage}{english}
+ \etoc requires the |.toc| file to use the |\contentsline| macro (possibly
+ patched by other packages). It is thus incompatible with the |beamer| class.
+ However, if |beamer| is used in an article mode, i.e., with the article
+ class in conjunction with the |beamerarticle| package, then \etoc should
+ work.
+\end{otherlanguage}
+
+Es ist |hyperref| bekannt und hoffentlich kompatibel mit ihm: die Macros
+\csa{etocname}, \csa{etocnumber} und \csa{etocpage} enthalten die
+|hyperref|-Links, wenn vorhanden (Beachten Sie, dass die
+\emph{linktoc=all}-Option von |hyperref| mitteilt, dass ein Link zur
+Seitenzahl zu setzen ist, für ein einen toc-Eintrag.). Beispielsweise sind die
+Inhaltsverzeichnisse des vorliegenden Dokuments komplett verlinkt.
+Es ist kein Thema, ob \etoc vor oder nach |hyperref| geladen wird.
Die Release |1.07k| fügt Kompatibilität mit dem Paket |tocloft| hinzu:
\footnote{\url{http://ctan.org/pkg/tocloft}} Schritte wurden getan, um eine Neudefinition
@@ -8978,40 +9707,28 @@ Zeile, in einen inneren \etoc-Befehl und eine Identifikationszahl in die
|.toc|-Datei aufgenommen wird. Das korrekte Inhaltsverzeichnis wird nur nach dem
nächsten \LaTeX -Lauf angezeigt werden.
-\etoc erwartet die Sektionierungseinheiten des Dokuments, um ihre Daten in eine
-Datei mit der Endung |.toc| zu schreiben, in Form von Linien, die enthalten den
-\csa{contentsline}-Befehl und dessen Argumente. Die Macros \csa{etocname},
-\csa{etocnumber} und \csa{etocpage} enthalten die |hyperref|-Links, wenn
-vorhanden (Beachten Sie, dass die \emph{linktoc=all}-Option von |hyperref|
-mitteilt, dass ein Link zur Seitenzahl zu setzen ist, für ein einen
-toc-Eintrag.). Beispielsweise sind die Inhaltsverzeichnisse des vorliegenden
-Dokuments komplett verlinkt.
-
Es ist möglich (unter Verwendung des Pakets|tocloft| beispielsweise), im
gesamten Dokument die Makros \csa{l@section}, \csa{l@subsection} \ldots{} zu
benutzen und der Effekt wird im nächsten Inhaltsverzeichnis durch den
Kompatibilitätsmodus von \etoc sichtbar werden.
-Es ist möglich, simultan \etoc und
-{\color{niceone}|tableof|}\footnote{\url{http://ctan.org/pkg/tableof}} zu
-nehmen. Für die erweiterte Nutzung, sowas wie das Nehmen von in
-\autoref{ssec:molecule}, ist es wichtig, zu wissen dass |tableof| eine Ebene der
-Gruppierung selbst in die |.toc|-Datei einfügt. Also, wenn man einige
-Information \csa{global} machen möchte, kann man nicht warten, um auf der Ebene
-des zweiten Arguments von \csa{etocsettocstyle} zu sein, |tableof| wird die
-Gruppe dann schon geschlossen haben. Die \csa{global}-Dinge (auf flüchtigen
-Daten) müssen spätestens im letzten Teil der oberen (oder letzten)
-Untergliederungsebene eingeführt sein. Dies gilt natürlich nur für
-\csa{tableofcontents} oder \csa{localtableofcontents} und die folgenden
-\csa{nexttocwithtags}|{erforderlichen}||{verbotenen}| Befehle von |tableof|.
-
-Und wenn die Befehle \csa{tableof} oder \csa{tablenotof} vom Paket |tableof|
-genutzt werden, setzen sie das Inhaltsverzeichnis nach den Standards der
-Dokumentklasse: Um von den \etoc-Stilen zu profitieren, ist es zwingend
-erforderlich, entweder \csa{tableofcontents} oder \csa{localtableofcontents}
-oder einen anderen \etoc-Befehl zu nehmen, und |tableof (v1.1)| wird das
-Ergebnis nur beeinflussen, wenn \csa{nexttocwithtags}|{required}||{forbidden}|
-hinzugefügt wurde, bevor dar Inhaltsverzeichnis-typesetting-Befehl kommt.
+\textbf{UEBERSETZUNG NOETIG}
+
+\begin{otherlanguage}{english}
+It is possible to use simultaneously \etoc and
+{\color{niceone}|tableof|}\footnote{\url{http://ctan.org/pkg/tableof}}. Release
+|1.08| of \etoc requires at least version |1.4a| of |tableof|. If
+\csb{etocglobaldefs} is put in the preamble, this must be after the loading of
+package |tableof|. {\color{niceone}|tableof|} command \csa{nexttocwithtags}
+should work as expected.
+
+{\color{niceone}|tableof|} commands \csa{tableof}, \csa{tablenotof}, ... will
+typeset the (a priori global) table of contents according to the document
+class defaults, obeying the \etoc depth tags; as explained in the |tableof|
+documentation they do not typeset a TOC title. They should \emph{not} be used
+in case \csb{etocglobaldefs} was issued before, except if its scope has been
+terminated since then, or \csb{etoclocaldefs} has cancelled its influence.
+\end{otherlanguage}
\subsection{\TeX -nische Sachen}
@@ -9050,8 +9767,8 @@ bestimmte Anzahl von Durchführungen haben, um für das Dokument das endgültige
Aussehen zu erhalten (mindestens zweimal durchlaufen).
-%%\clearpage %% not useful for current (2014/04/28) German version
+\clearpage
\etocdepthtag.toc {code}
\part{Der Code}
@@ -9100,9 +9817,9 @@ Paketversion ist \texttt{\etocDEpkgversion} von \texttt{\etocDEpkgdate}.
\parskip \tw@\p@ plus 1fil\relax
\let \do \@makeother \dospecials \makestarlowast \catcode`+ \active
\begingroup\lccode`~`+
- \lowercase{\endgroup\def~[##1]{\foreignlanguage{german}{##1}}}%
- \catcode`> \active
- \begingroup\lccode`~`>
+ \lowercase{\endgroup\def~[##1]{\foreignlanguage{ngerman}{##1}}}%
+ \catcode`^ \active
+ \begingroup\lccode`~`^
\lowercase{\endgroup\def~{\nopagebreak}}% ajouté 2014/04/28, oblige à un peu
% plus de mark-up cependant
\catcode`\~\z@
@@ -9130,16 +9847,40 @@ Paketversion ist \texttt{\etocDEpkgversion} von \texttt{\etocDEpkgdate}.
\begin{multicols}{2}
\begin{jfverbatim}
-v1.07n [2015/03/05]>
+v1.08 [2015/03/10]^
+
+ \etocskipfirstprefix may now appear anywhere in the <start>
+ part of a level style.
- No more use of \toks@ when etoc constructs \etocthelinkedname etc... Thus
- \toks@ can be put in the line styles in order to accumulate information.
- Only useful if it is certain nothing else will change \toks@ either.
+ New commands \etociffirst, \etocxiffirst, \etocxifnumbered.
- In the documentation: list of main commands now in alphabetic order.
+ It is now possible to issue line style specifications directly
+ with & and \\ tokens, in order to typeset a TOC as a tabular
+ or longtable with the opening for example in the first
+ argument of \etocsettocstyle and the closing in its second
+ argument.
+ It is mandatory for such uses to issue \etocglobaldefs which
+ tells etoc to proceed globally for certain definitions. This
+ is also useful in the context of the inline environments of
+ package enumitem.
-v1.07m [2015/01/23]>
+ On this occasion, various old parts of the code have been
+ improved.
+
+
+v1.07n [2015/03/05]^
+
+ No more use of \toks@ when etoc constructs \etocthelinkedname
+ etc... Thus \toks@ can be put in the line styles in order to
+ accumulate information. Only useful if it is certain nothing
+ else will change \toks@ either.
+
+ In the documentation: list of main commands now in alphabetic
+ order.
+
+
+v1.07m [2015/01/23]^
Reading of .toc file is delayed to \begin{document} to account for
possible Babel active characters used therein. Thanks to Denis
@@ -9150,7 +9891,7 @@ v1.07m [2015/01/23]>
New command \etocbeforetitlehook. New command \etocdisplay.
-v1.07l [doc of 2014/04/29]>
+v1.07l [doc of 2014/04/29]^
Added to the documentation an example of use of \etocthelinkedname together
with an enumitem inline itemize* environment; moved main TOC to immediately
@@ -9162,7 +9903,7 @@ v1.07l [doc of 2014/04/29]>
grateful thanks to all!
-v1.07l [2014/04/22]>
+v1.07l [2014/04/22]^
Fixes a bug with the 1.07k compatibility layer with tocloft which had broken
the 1.07k (sic) compatibility with memoir (yes, memoir class 1.07k testing
@@ -9172,32 +9913,32 @@ v1.07l [2014/04/22]>
contrarily to the situation with the native tocvsec2.
-v1.07k [2014/03/06]>
+v1.07k [2014/03/06]^
Compatibility with package tocloft; and improved compatibility with
class memoir. Novel TOC example in Overview.
-v1.07j [2013/12/03]>
+v1.07j [2013/12/03]^
Some issues with the documentation formatting (now two-sided) have been
addressed, and a novel documentation section ``Typesetting the TOC as a
table'' has been added. Very minor code change (\Etoc@readtoc).
-v1.07i [2013/10/21]>
+v1.07i [2013/10/21]^
Changes to the \etocmulticolstyle and \etocruledstyle codes
to lessen the risk of a page break after the title (in the one-column case).
-v1.07h [2013/10/16]>
+v1.07h [2013/10/16]^
New commands \etocdepthtag.toc, \etocsettagdepth, \etocobeydepthtags,
\etocignoredepthtags.
-v1.07g [2013/10/13]>
+v1.07g [2013/10/13]^
New commands \etocsettocdepth, \etocsettocdepth.toc,
\etocobeytoctocdepth, \etoc~-ignoretoctocdepth which
@@ -9226,13 +9967,13 @@ v1.07g [2013/10/13]>
dvipdfmx which produces the smallest file).
-v1.07f [2013/03/07]>
+v1.07f [2013/03/07]^
New macros \etocthelinkedname, \etocthelinkednumber,
\etocthelinkedpage, and \etocthelink.
-v1.07e [2013/03/01]>
+v1.07e [2013/03/01]^
Improvements in the package own line styles with
regards to penalties and vertical spaces.
@@ -9243,13 +9984,13 @@ v1.07e [2013/03/01]>
More such examples added 2013/03/03.
-v1.07d [2013/02/24]>
+v1.07d [2013/02/24]^
Minor code improvements and new documentation
section ``Another compatibility mode''.
-v1.07b [2013/02/02]>
+v1.07b [2013/02/02]^
Removal of the \xspace from the macros \etocname,
\etocnumber, \etocpage.
@@ -9257,7 +9998,7 @@ v1.07b [2013/02/02]>
Additional examples in the documentation.
-v1.07 [2013/01/29]>
+v1.07 [2013/01/29]^
New commands:
@@ -9274,7 +10015,7 @@ v1.07 [2013/01/29]>
addition to the tables of contents.
-v1.06 [2012/12/07]>
+v1.06 [2012/12/07]^
The standard macros \l@section etc... are modified only
during the calls to \tableofcontents; they can thus be
@@ -9283,7 +10024,7 @@ v1.06 [2012/12/07]>
by etoc for the TOCs typeset in compatibility mode.
-v1.05 [2012/12/01]>
+v1.05 [2012/12/01]^
\localtableofcontents replaces \tableofcontents~lowast (for
compatibility with the memoir class).
@@ -9292,7 +10033,7 @@ v1.05 [2012/12/01]>
classes.
-v1.04 [2012/11/24]>
+v1.04 [2012/11/24]^
A (possibly local) table of contents can be labeled:
@@ -9304,7 +10045,7 @@ v1.04 [2012/11/24]>
\tableofcontents \ref{toc:1}
-v1.02 [2012/11/18]>
+v1.02 [2012/11/18]^
Initial version.
@@ -9326,6 +10067,19 @@ v1.02 [2012/11/18]>
\section{Ausführung}
\fi
+\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.
+
+% 9 mars 2015
+% Pour rappel on avait dans le préambule:
+% \def\MacroFont{\ttfamily\small\hyphenchar\font45 \baselineskip11pt\relax}
+% ce qui donne donc le \macro@font qui sera utilisé.
+
+
+
\StopEventually{\normalsize
\ifnum\NoSourceCode=1
\ifnum\ForEnglish=1
@@ -9346,7 +10100,7 @@ v1.02 [2012/11/18]>
\fi
\ifnum\ForDeutsch=1
\texttt{\hyphenchar\font-1
- \parindent 0pt\rightskip 0.5cm minus 0.5cm \selectlanguage{german}%
+ \parindent 0pt\rightskip 0.5cm minus 0.5cm \selectlanguage{ngerman}%
Diese Dokumentation wurde ohne Einbeziehung des Quellcodes erstellt. Um
die englische Dokumentation mit dem Quellcode zu produzieren, ist
einzubeziehen: \endgraf
@@ -9367,9 +10121,8 @@ v1.02 [2012/11/18]>
\fi
\end{document}}
-% Writing-up source code comments is hopefully for a future
-% release.
+% November 2012
% I don't want to have to type at this location (far from the top of the
% file) explicitly the package version or version date, as it is
% inconvenient to have to remember to do this when updating the package.
@@ -9416,13 +10169,22 @@ v1.02 [2012/11/18]>
\DeclareOption*{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}}
\ProcessOptions\relax
% \end{macrocode}
-% placeholder for comments
+% |1.08| suppresses |\ifEtoc@part| and defines |\ifEtoc@skipprefix|. It
+% also defines |\etocglobaldefs|, |\etoclocaldefs| and |\Etoc@global|.
% \begin{macrocode}
\newtoks\Etoc@toctoks
\def\Etoc@par{\par}
\def\etocinline{\def\Etoc@par{}}
\let\etocnopar\etocinline
\def\etocdisplay{\def\Etoc@par{\par}}% 1.07m 2015/01/23
+% \end{macrocode}
+% |\etocglobaldefs| should be used only for special things such as TOC as a
+% table; it should be put in a group to limit its scope. If used in the
+% preamble, it must come \emph{after} |tableof| if the later is loaded too.
+% \begin{macrocode}
+\let\Etoc@global\@empty % 1.08 2015/03/10
+\def\etocglobaldefs{\let\Etoc@global\global\let\tof@global\global}
+\def\etoclocaldefs {\let\Etoc@global\@empty\let\tof@global\@empty}
\newif\ifEtoc@jj % book
\newif\ifEtoc@j % part
\newif\ifEtoc@ % chapter
@@ -9436,24 +10198,27 @@ v1.02 [2012/11/18]>
\newif\ifEtoc@parskip % 1.07d
\newif\ifEtoc@tocwithid
\newif\ifEtoc@standard
-\newif\ifEtoc@part
-% \end{macrocode}
-% placeholder for comments
-% \begin{macrocode}
+\newif\ifEtoc@skipprefix % 1.08
+\newif\ifEtoc@isfirst % 1.08
\newif\ifEtoc@localtoc
\newif\ifEtoc@skipthisone
\newif\ifEtoc@stoptoc
\newif\ifEtoc@notactive
-\newcounter{etoc@tocid}
\newif\ifEtoc@mustclosegroup
\def\etoc@{\etoc@}
% \end{macrocode}
% |1.07g| uses a second counter; this could be avoided, but ok, let's not be
% that strict.
% \begin{macrocode}
+\newcounter{etoc@tocid}
\newcounter{etoc@tocdepth}% 1.07g
% \end{macrocode}
-% placeholder for comments
+% |2015/03/08| Why do I use |jj| in the flags and |minustwo| here? and
+% is there an entity full of forgiveness out there to save my soul even
+% if taking into consideration my use of single and doubled |@|'s ?
+% Although I desperately need to waste time I miraculously decided not
+% to change everything today and thus the somewhat dispendious set-up
+% below is maintained.
% \begin{macrocode}
\@ifclassloaded{memoir}{\def\Etoc@minf{-\thr@@}}{\def\Etoc@minf{-\tw@}}
\def\Etoc@@minustwo@@{-\tw@}
@@ -9475,7 +10240,7 @@ v1.02 [2012/11/18]>
\def\Etoc@@four@ {four}
\def\Etoc@@five@ {five}
% \end{macrocode}
-% |1.07g|
+% |1.07g|.
% \begin{macrocode}
\expandafter\def\csname Etoc@-3@@\endcsname {-\thr@@}
\expandafter\let\csname Etoc@-2@@\endcsname \Etoc@@minustwo@@
@@ -9490,12 +10255,14 @@ v1.02 [2012/11/18]>
\let\Etoc@all@@ \Etoc@@five@@
\let\Etoc@none@@ \Etoc@minf
% \end{macrocode}
-% placeholder for comments
+% Versions earlier than |1.08| did |\Etoc@newlevel| in a quite
+% embarrassing way with an |\edef|.
% \begin{macrocode}
\let\Etoc@levellist\@empty
-\def\Etoc@newlevel#1{%
- \def\Etoc@levellist@elt{\noexpand\Etoc@levellist@elt\noexpand}%
- \edef\Etoc@levellist{\Etoc@levellist\Etoc@levellist@elt#1}}
+\def\Etoc@newlevel #1%
+{\expandafter\def\expandafter\Etoc@levellist\expandafter
+ {\Etoc@levellist\Etoc@levellist@elt #1}%
+}
\def\etocsetlevel#1#2{%
\expandafter\Etoc@newlevel\csname l@#1\endcsname
\ifcase#2\relax
@@ -9541,10 +10308,29 @@ v1.02 [2012/11/18]>
\etocsetlevel{paragraph}{4}
\etocsetlevel{subparagraph}{5}
% \end{macrocode}
-% placeholder for comments
+% The first two parameters of |\Etoc@et@hop| are exchanged in |1.08|
+% compared to earlier versions; this is in relation to changes done in
+% |\Etoc@etoccontentsline|.
% \begin{macrocode}
-\def\Etoc@setflags #1{%
- \ifcase #1\relax
+\AtBeginDocument{%
+\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}%
+\@ifpackageloaded{hyperref}{\Etoc@hyperreftrue
+ \def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}%
+ \long\def\Etoc@gobblesixorfive#1#2#3#4#5#6{}}
+ {\def\Etoc@et@hop#1#2#3#4{#2{#3}{#4}#1}%
+ \long\def\Etoc@gobblesixorfive#1#2#3#4#5{}}%
+}
+% \end{macrocode}
+% |2015/03/08| One has to be careful about the |Etoc@end@<level>| user
+% defined macros which may close groups. This has always been the reason
+% for the |\global|'s here and elsewhere.
+%
+% |1.08| uses |\Etoc@level| rather than a |#1| which used to be anyhow always
+% the |\Etoc@tmp|. Now |\Etoc@level| is what was called formerly |\Etoc@tmp|
+% in |\Etoc@etoccontentsline|.
+% \begin{macrocode}
+\def\Etoc@setflags {%
+ \ifcase \Etoc@level
\global\Etoc@vfalse
\global\Etoc@ivfalse
\global\Etoc@iiifalse
@@ -9572,161 +10358,249 @@ v1.02 [2012/11/18]>
\or
\global\Etoc@vtrue
\else
- \ifnum#1=\m@ne
- \global\Etoc@vfalse
- \global\Etoc@ivfalse
- \global\Etoc@iiifalse
- \global\Etoc@iifalse
- \global\Etoc@ifalse
- \global\Etoc@false
+% \end{macrocode}
+% |2015/03/08| I move up the common assignments.
+% \begin{macrocode}
+ \global\Etoc@vfalse
+ \global\Etoc@ivfalse
+ \global\Etoc@iiifalse
+ \global\Etoc@iifalse
+ \global\Etoc@ifalse
+ \global\Etoc@false
+ \ifnum\Etoc@level=\m@ne
\global\Etoc@jtrue
\else
- \global\Etoc@vfalse
- \global\Etoc@ivfalse
- \global\Etoc@iiifalse
- \global\Etoc@iifalse
- \global\Etoc@ifalse
- \global\Etoc@false
\global\Etoc@jfalse
\global\Etoc@jjtrue
\fi
\fi}
% \end{macrocode}
-% placeholder for comments
+% |1.08| This was originally in |\Etoc@etoccontentsline|, intermixed
+% with the definitions of |\Etoc@contents| and |\Etoc@prefix|. Separated
+% here for clarity of code. One has to be careful that this may close
+% groups. The conditionals are all global. The |\Etoc@level| has been
+% |\global\let| to a |\chardef| variable. The final |\else| of the
+% |\ifcase| assumes none of the |\Etoc@end@..| routines modify it,
+% naturally.
% \begin{macrocode}
-\AtBeginDocument{%
-\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}%
-\@ifpackageloaded{hyperref}{\Etoc@hyperreftrue
- \def\Etoc@et@hop#1#2#3#4#5{#1{#3}{#4}{#5}#2}%
- \long\def\Etoc@gobblesixorfive#1#2#3#4#5#6{}}
- {\def\Etoc@et@hop#1#2#3#4{#1{#3}{#4}#2}%
- \long\def\Etoc@gobblesixorfive#1#2#3#4#5{}}%
+\def\Etoc@doends {%
+ \ifcase \Etoc@level
+ \ifEtoc@v \Etoc@end@five\fi
+ \ifEtoc@iv \Etoc@end@four\fi
+ \ifEtoc@iii\Etoc@end@three\fi
+ \ifEtoc@ii \Etoc@end@two\fi
+ \ifEtoc@i \Etoc@end@one\fi
+ \or
+ \ifEtoc@v \Etoc@end@five\fi
+ \ifEtoc@iv \Etoc@end@four\fi
+ \ifEtoc@iii\Etoc@end@three\fi
+ \ifEtoc@ii \Etoc@end@two\fi
+ \or
+ \ifEtoc@v \Etoc@end@five\fi
+ \ifEtoc@iv \Etoc@end@four\fi
+ \ifEtoc@iii\Etoc@end@three\fi
+ \or
+ \ifEtoc@v \Etoc@end@five\fi
+ \ifEtoc@iv\Etoc@end@four\fi
+ \or
+ \ifEtoc@v \Etoc@end@five\fi
+ \or
+ \else
+ \ifEtoc@v \Etoc@end@five \fi
+ \ifEtoc@iv \Etoc@end@four \fi
+ \ifEtoc@iii\Etoc@end@three\fi
+ \ifEtoc@ii \Etoc@end@two \fi
+ \ifEtoc@i \Etoc@end@one \fi
+ \ifEtoc@ \Etoc@end@zero \fi
+ \ifnum \Etoc@level =-\tw@
+ \ifEtoc@j \Etoc@end@minusone\fi
+ \fi
+ \fi
}
% \end{macrocode}
-% Heart of \etoc hack into execution of |.toc| file. It MUST be the case that
-% the file contains |\contentsline {<unit>}...| instructions, with the
-% standard meaning of executing |\l@unit| (perhaps \etoc should not rely on
-% the fact that the |\contentsline| things have their standard meaning). It is
-% the various |\l@unit|'s which are (locally) |\let| to |\Etoc@lxyz| and it is
-% |\Etoc@lxyz| which does the parsing of the arguments in order to extract
-% name, number and page number. Once they are obtained, via the execution of
-% this indirectly hacked |\contentsline|, the code executes the |\Etoc@prefix|
-% and |\Etoc@contents| corresponding to that unit level, according to the user
-% |\etocsetstyle| declarations. Before that the begin part is executed when
-% first encountering that level and the end part will be executed when hitting
-% a more important level.
+% Heart of \etoc hack into execution of |.toc| file. It MUST be the case
+% that the file contains |\contentsline {<unit>}...| instructions, with
+% the standard meaning of executing |\l@unit| (the hyperref
+% modifications are taken into account). It is the various |\l@unit|'s
+% which are (locally) |\let| to |\Etoc@lxyz| and it is |\Etoc@lxyz|
+% which does the parsing of the arguments in order to extract name,
+% number and page number. Once they are obtained, via the execution of
+% this indirectly hacked |\contentsline|, the code executes the
+% |\Etoc@prefix| and |\Etoc@contents| corresponding to that unit level,
+% according to the user |\etocsetstyle| declarations. Before that the
+% begin part is executed when \etoc first encounters that level
+% coming from a higher one and the end part will be executed when
+% hitting a more important level.
+%
+% |\etocskipfirstprefix| was already part of the very first release of
+% \etoc. Up to |1.07n| it was just an elegant |\@thirdofthree| possibly
+% executed just before a |\@firstoftwo{\Etoc@swa{#1}}{\Etoc@swb{#1}}|
+% line. But this made it impossible for me to execute things afer the
+% |begin| parts.
+%
+% Executing stuff before |begin| is now a potential problem because the user
+% can close some group in the |begin| code (this was in fact impossible in
+% versions |<1.08| because this would have erased the definitions of
+% |\Etoc@contents| and |\Etoc@prefix|). Thus I am not so free now to define
+% things before execution of begin, if I allow people to close a group
+% therein, except if I make them global.
+%
+% The mechanism of |\etocskipfirstprefix| made it impossible to add
+% anything at the end of the |begin| codes. Thus I changed it in |1.08|
+% to simply work with a (global) boolean flag. This gives user the
+% freedom to use |\etocskipfirstprefix| anywhere in the |begin| code and
+% it made room for a delimited macro I called |\etoconlyonfirst|. But
+% then I dropped it in favor of definition of the |\etociffirst|
+% conditional.
+%
+% Macros |\Etoc@swa| and |\Etoc@swb| which did the |\Etoc@et@hop| thing have
+% been suppressed, their effect is incorporated to the end of
+% |\Etoc@etoccontentsline|.
% \begin{macrocode}
-\def\Etoc@swa#1{%
- \Etoc@et@hop
- {\Etoc@savedcontentsline{#1}}
- {\Etoc@prefix\Etoc@contents}}
-\def\Etoc@swb#1{%
- \Etoc@et@hop
- {\Etoc@savedcontentsline{#1}}
- {\Etoc@contents}}
-\let\etocskipfirstprefix\@thirdofthree
+\def\etocskipfirstprefix {\global\Etoc@skipprefixtrue }
% \end{macrocode}
-% The |\Etoc@next| at the end does the "begin" part of the corresponding
-% style. The temporary macro |\Etoc@tmp| is used here, it can safely be used
-% also in |\Etoc@lxyz| as it is executed only later, during expansion of
-% |\contentsline|.
+% |2015/03/08| Let's record that |\Etoc@level| used to be called
+% |\Etoc@tmp| in versions earlier than |1.08| (and |\Etoc@tmp| is used
+% in the completely different ulterior |\Etoc@lxyz| context). The code
+% sets it for example to be |\Etoc@section@@| which has been let by
+% |\etocsetlevel| to |\@ne|, thus is always self-terminating in
+% |\ifnum..\fi| contexts.
% \begin{macrocode}
-\def\Etoc@etoccontentsline#1{%
- \global\expandafter\let\expandafter\Etoc@tmp\csname Etoc@#1@@\endcsname
+\def\Etoc@etoccontentsline #1{%
+ \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname
\Etoc@skipthisonefalse
- \let\Etoc@next\Etoc@gobblesixorfive
- \ifnum\Etoc@tmp=\Etoc@@six@@
+ \ifnum\Etoc@level=\Etoc@@six@@
\Etoc@skipthisonetrue
\else
\ifEtoc@localtoc
- \let\Etoc@prenext\relax
+ \let\Etoc@next\relax
\ifEtoc@stoptoc
\Etoc@skipthisonetrue
\fi
- \ifnum\Etoc@tmp<\Etoc@localtop
- \def\Etoc@prenext{\global\Etoc@stoptoctrue}%
+ \ifnum\Etoc@level<\Etoc@localtop
+ \def\Etoc@next{\global\Etoc@stoptoctrue}%
\Etoc@skipthisonetrue
\fi
\ifEtoc@notactive
- \def\Etoc@prenext{\Etoc@setflags{\Etoc@tmp}}%
+ \def\Etoc@next{\Etoc@setflags}%
\Etoc@skipthisonetrue
\fi
- \Etoc@prenext
+ \Etoc@next
\fi
\fi
- \ifnum\c@tocdepth<\Etoc@tmp\relax\else
- \ifEtoc@skipthisone\else
- \global\let\Etoc@next\relax
- \ifcase\Etoc@tmp
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \Etoc@end@two\fi
- \ifEtoc@i \Etoc@end@one\fi
- \ifEtoc@ \else \def\Etoc@next{\Etoc@begin@zero}\fi
- \def\Etoc@contents{\Etoc@contents@zero}%
- \def\Etoc@prefix{\Etoc@prefix@zero}%
- \or
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \Etoc@end@two\fi
- \ifEtoc@i \else \def\Etoc@next{\Etoc@begin@one}\fi
- \def\Etoc@contents{\Etoc@contents@one}%
- \def\Etoc@prefix{\Etoc@prefix@one}%
- \or
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \else \def\Etoc@next{\Etoc@begin@two}\fi
- \def\Etoc@contents{\Etoc@contents@two}%
- \def\Etoc@prefix{\Etoc@prefix@two}%
- \or
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \else \def\Etoc@next{\Etoc@begin@three}\fi
- \def\Etoc@contents{\Etoc@contents@three}%
- \def\Etoc@prefix{\Etoc@prefix@three}%
- \or
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \else \def\Etoc@next{\Etoc@begin@four}\fi
- \def\Etoc@contents{\Etoc@contents@four}%
- \def\Etoc@prefix{\Etoc@prefix@four}%
- \or
- \ifEtoc@v \else \def\Etoc@next{\Etoc@begin@five}\fi
- \def\Etoc@contents{\Etoc@contents@five}%
- \def\Etoc@prefix{\Etoc@prefix@five}%
+ \let\Etoc@next\Etoc@gobblesixorfive
+ \ifnum\c@tocdepth<\Etoc@level
+ \else
+ \ifEtoc@skipthisone
\else
- \ifnum\Etoc@tmp=\m@ne
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \Etoc@end@two\fi
- \ifEtoc@i \Etoc@end@one\fi
- \ifEtoc@ \Etoc@end@zero\fi
- \ifEtoc@j \else \def\Etoc@next{\Etoc@begin@minusone}\fi
- \def\Etoc@contents{\Etoc@contents@minusone}%
- \def\Etoc@prefix{\Etoc@prefix@minusone}%
+% \end{macrocode}
+% |1.08| New way to handle the compatibility mode. One has to worry
+% only for the local tables of contents (in inactive state, which still
+% must be parsed for global level flags) but in this case
+% |\Etoc@setflags| was done above already. Earlier method proceeded with
+% dummy empty line styles.
+% \begin{macrocode}
+ \ifEtoc@standard\let\Etoc@next\@thirdofthree
+ \else
+% \end{macrocode}
+% |2015/03/08| Ever since the first release of \etoc, the code has
+% to be careful that the |\Etoc@end@<level>| user defined macros may
+% close groups. This is the reason why some assignments have to be done
+% globally. The |\let\Etoc@next\Etoc@gobblesixorfive| above could be
+% local, because it is used only in case the stuff below is skipped,
+% inclusive of |\Etoc@doends| which may close groups.
+%
+% Versions |1.08| extracts to a separate macro |\Etoc@doends|. Earlier code
+% did |\global\let\Etoc@next\relax| but we can now give a default |\relax|
+% value to |\Etoc@next| with no need of a |\global| prefix.
+% \begin{macrocode}
+ \Etoc@doends
+% \end{macrocode}
+% |1.08| the |\Etoc@next| will (possibly) execute the |begin| code,
+% \emph{before} |\Etoc@contents| and |\Etoc@prefix| get defined,
+% contrarily to what I did in earlier versions. I still reset the flags
+% before execution of the |begin| codes (although the flags are not
+% supposed to be used therein anyhow).
+%
+% Also the \meta{begin} code does |\Etoc@isfirsttrue|.
+% \begin{macrocode}
+ \let\Etoc@next\@empty
+ \Etoc@global\Etoc@isfirstfalse
+% \end{macrocode}
+% |2015/03/08| If my naming scheme had not been so baroque, I could easily do
+% things in a more concise way here...
+% \begin{macrocode}
+ \ifcase\Etoc@level
+ \ifEtoc@\else \def\Etoc@next{\Etoc@begin@zero}\fi
+ \or
+ \ifEtoc@i\else \def\Etoc@next{\Etoc@begin@one}\fi
+ \or
+ \ifEtoc@ii\else \def\Etoc@next{\Etoc@begin@two}\fi
+ \or
+ \ifEtoc@iii\else \def\Etoc@next{\Etoc@begin@three}\fi
+ \or
+ \ifEtoc@iv\else \def\Etoc@next{\Etoc@begin@four}\fi
+ \or
+ \ifEtoc@v\else \def\Etoc@next{\Etoc@begin@five}\fi
\else
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \Etoc@end@two\fi
- \ifEtoc@i \Etoc@end@one\fi
- \ifEtoc@ \Etoc@end@zero\fi
- \ifEtoc@j \Etoc@end@minusone\fi
- \ifEtoc@jj \else \def\Etoc@next{\Etoc@begin@minustwo}\fi
- \def\Etoc@contents{\Etoc@contents@minustwo}%
- \def\Etoc@prefix{\Etoc@prefix@minustwo}%
+ \ifnum\Etoc@level=\m@ne
+ \ifEtoc@j\else \def\Etoc@next{\Etoc@begin@minusone}\fi
+ \else
+ \ifEtoc@jj\else \def\Etoc@next{\Etoc@begin@minustwo}\fi
\fi
- \fi
- \ifnum\Etoc@tmp=\m@ne\Etoc@parttrue\else\Etoc@partfalse\fi
- \Etoc@setflags{\Etoc@tmp}%
- \fi\fi
+ \fi
+ \Etoc@setflags
+ \Etoc@next
+ \let\Etoc@next\@empty
+% \end{macrocode}
+% |1.08|:
+% \begin{enumerate}
+% \item separates the definition of |\Etoc@prefix| and
+% |\Etoc@contents| from the execution of the |end| parts. And it does
+% the definition with some |\csname|'s.
+%
+% \item implements |\etocskipfirstprefix| with a boolean, this is less slick
+% but more flexible than the earlier method.
+%
+% \item defines the |\etociffirst| conditional.
+%
+% \item has |\Etoc@level| rather than |\Etoc@tmp| and thus we can dispense
+% with the |\ifEtoc@part| switch as we will be able to test the equality
+% |\Etoc@level=-1| inside of |\Etoc@lxyz|.
+%
+% \item adds the |\Etoc@global| prefix.
+% \end{enumerate}
+% \begin{macrocode}
+ \Etoc@global\expandafter\def\expandafter\Etoc@prefix\expandafter
+ {\csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname }%
+ \Etoc@global\expandafter\def\expandafter\Etoc@contents\expandafter
+ {\csname Etoc@contents@\csname Etoc@#1@\endcsname\endcsname }%
+ \ifEtoc@skipprefix \Etoc@global\let\Etoc@prefix\@empty\fi
+ \global\Etoc@skipprefixfalse
+ \fi\fi\fi
+% \end{macrocode}
+% |1.08| modifies the ending to not use the |\Etoc@swa| and |\Etoc@swb|
+% things. With this version, the |\Etoc@next| here is only to gobble
+% everything if it has to (or gobble only the \etoc things, when in
+% compatibility mode).
+%
+% For the record we don't do |\csname l@#1\endcsname| mainly because
+% hyperref patches |\contentsline|.
+%
+% The location where |\Etoc@savedcontentsline| is |\let| to
+% |\contentsline| has been moved with release |1.08| to before the
+% title as set by |\etocsettoctyle|, thus it is now possible to open a
+% tabular in this part. And with the |\Etoc@global| prefix the user may
+% opt for global definitions of |\etocname| and the like, thus use
+% freely |&| and other group closing things. Also, some care has been
+% put into doing only expandable things after expansion of the
+% \meta{prefix} and \meta{contents} parts of a sectioning unit style.
+% \begin{macrocode}
\Etoc@next
- \@firstoftwo{\Etoc@swa{#1}}{\Etoc@swb{#1}}}
+ \Etoc@et@hop{\Etoc@prefix\Etoc@contents}{\Etoc@savedcontentsline{#1}}%
+}
% \end{macrocode}
-% |[2013/03/07]|:
+% |2013/03/07|:
%
% Up to |1.06| \etoc defined only \csa{etocname}, \csa{etocnumber} and
% \csa{etocpage}. The |hyperref| added data is recycled in the simplest manner,
@@ -9757,23 +10631,25 @@ v1.02 [2012/11/18]>
% on the other hand this gives a simple way to insert a space as the first
% token in the paramaters. For \csa{Etoc@again} (which appears later in the
% code), a \csa{@firstofone} construct is however the simplest of all.
+%
+% |2015/03/09|: |1.08| adds |\Etoc@global| prefix.
% \begin{macrocode}
\def\Etoc@lxyz #1#2{%
- \@namedef {etoclink }{\leavevmode}% fall-back
- \let\etocthelink \@empty % fall-back
- \@namedef {etocname }{\leavevmode #1}% fall-back (perhaps linked)
- \def\etocthename {#1}% (if link, will be removed later)
- \def\etocthelinkedname {#1}% will probably get redefined
- \@namedef {etocpage }{\leavevmode #2}% (perhaps linked)
+ \Etoc@global\@namedef {etoclink }{\leavevmode}% fall-back
+ \Etoc@global\let\etocthelink \@empty % fall-back
+ \Etoc@global\@namedef {etocname }{\leavevmode #1}% fall-back (perhaps linked)
+ \Etoc@global\def\etocthename {#1}% (if link, will be removed later)
+ \Etoc@global\def\etocthelinkedname {#1}% will probably get redefined
+ \Etoc@global\@namedef {etocpage }{\leavevmode #2}% (perhaps linked)
\Etoc@getthepage #2\etoc@ % defines also \etocthelinkedpage (and \etoclink)
\Etoc@getnb #1\relax\relax\etoc@ % gets number *and* name, and \etoclink
\ifEtoc@number\else
- \ifEtoc@part
+ \ifnum\Etoc@level=\m@ne
\Etoc@getit #1\hspace\relax\etoc@ % additional job for parts
\fi
\fi}
% \end{macrocode}
-% placeholder for comments
+% |1.08| adds the |\Etoc@global|'s.
% \begin{macrocode}
\def\Etoc@getthepage #1{%
\let\Etoc@next\Etoc@getthepage@nohyp
@@ -9783,8 +10659,8 @@ v1.02 [2012/11/18]>
\Etoc@next #1%
}
\def\Etoc@getthepage@nohyp #1\etoc@ {%
- \def\etocthepage {#1}%
- \def\etocthelinkedpage {#1}%
+ \Etoc@global\def\etocthepage {#1}%
+ \Etoc@global\def\etocthelinkedpage {#1}%
}
% \end{macrocode}
% |1.07k| corrects a bug here with an extra space before |##1| in
@@ -9795,13 +10671,15 @@ v1.02 [2012/11/18]>
% the (not so recommended) possibility to use |\toks@| in the styles, even to
% store information whose scope extends beyond the execution of each
% |\contentsline|.
+%
+% |1.08| adds the |\Etoc@global|'s.
% \begin{macrocode}
\def\Etoc@getthepage@hyp #1#2#3#4#5\etoc@ {%
- \@namedef{etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
- \edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
- \def\etocthepage {#4}%
+ \Etoc@global\@namedef{etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
+ \Etoc@global\def\etocthepage {#4}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkedpage\expandafter
+ \Etoc@global\expandafter\def\expandafter\etocthelinkedpage\expandafter
{\expandafter\hyperlink \Etoc@tmp{#4}}%
}
%
@@ -9821,98 +10699,100 @@ v1.02 [2012/11/18]>
\Etoc@next #1%
}
% \end{macrocode}
-% placeholder for comments
+% |1.08| adds the |\Etoc@global|'s.
% \begin{macrocode}
\def\Etoc@getnb@nohyp #1#2#3\etoc@ {%
\def\Etoc@getname ##1\relax\relax\etoc@ {%
- \@namedef {etocname }{\leavevmode ##1}%
- \def\etocthename {##1}%
- \def\etocthelinkedname {##1}%
+ \Etoc@global\@namedef {etocname }{\leavevmode ##1}%
+ \Etoc@global\def\etocthename {##1}%
+ \Etoc@global\def\etocthelinkedname {##1}%
}%
\ifx #1\numberline
- \@namedef {etocnumber }{\leavevmode #2}%
- \def\etocthenumber {#2}%
- \def\etocthelinkednumber {#2}%
- \Etoc@numbertrue
+ \Etoc@global\@namedef {etocnumber }{\leavevmode #2}%
+ \Etoc@global\def\etocthenumber {#2}%
+ \Etoc@global\def\etocthelinkednumber {#2}%
+ \Etoc@global\Etoc@numbertrue
\Etoc@getname #3\etoc@
\else % then \etocthename and \etocthelinkedname already defined
- \@namedef {etocnumber }{\leavevmode}%
- \let\etocthenumber \@empty
- \let\etocthelinkednumber \@empty
- \Etoc@numberfalse
+ \Etoc@global\@namedef {etocnumber }{\leavevmode}%
+ \Etoc@global\let\etocthenumber \@empty
+ \Etoc@global\let\etocthelinkednumber \@empty
+ \Etoc@global\Etoc@numberfalse
\fi
}
% \end{macrocode}
-% |1.07n| replaces use of |\toks@| by macro |\Etoc@tmp|.
+% |1.07n| replaces use of |\toks@| by macro |\Etoc@tmp|. |1.08| adds
+% the |\Etoc@global|'s.
% \begin{macrocode}
\def\Etoc@getnb@hyp #1#2#3#4#5#6\etoc@ {%
- \def\Etoc@getname ##1\relax\relax\etoc@ {%
- \@namedef {etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
- \def\etocthename {##1}%
- \edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkedname\expandafter
+ \Etoc@global\def\Etoc@getname ##1\relax\relax\etoc@ {%
+ \Etoc@global\@namedef {etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\def\etocthename {##1}%
+ \edef\Etoc@tmp {{#3}}%
+ \Etoc@global\expandafter\def\expandafter\etocthelinkedname\expandafter
{\expandafter\hyperlink \Etoc@tmp{##1}}%
}%
\def\Etoc@getnbr ##1##2##3\etoc@ {%
\ifx ##1\numberline
- \@namedef {etocnumber }{\leavevmode #1{#2}{#3}{##2}#5}%
- \def\etocthenumber {##2}%
+ \Etoc@global\@namedef {etocnumber }{\leavevmode #1{#2}{#3}{##2}#5}%
+ \Etoc@global\def\etocthenumber {##2}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkednumber\expandafter
- {\expandafter\hyperlink \Etoc@tmp{##2}}%
- \Etoc@numbertrue
+ \Etoc@global\expandafter\def\expandafter\etocthelinkednumber
+ \expandafter{\expandafter\hyperlink \Etoc@tmp{##2}}%
+ \Etoc@global\Etoc@numbertrue
\Etoc@getname ##3\etoc@
\else
- \@namedef {etocnumber }{\leavevmode}%
- \let\etocthenumber \@empty
- \let\etocthelinkednumber \@empty
- \Etoc@numberfalse
- \def\etocthename {#4}%
+ \Etoc@global\@namedef {etocnumber }{\leavevmode}%
+ \Etoc@global\let\etocthenumber \@empty
+ \Etoc@global\let\etocthelinkednumber \@empty
+ \Etoc@global\Etoc@numberfalse
+ \Etoc@global\def\etocthename {#4}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkedname\expandafter
- {\expandafter\hyperlink \Etoc@tmp{#4}}%
+ \Etoc@global\expandafter\def\expandafter\etocthelinkedname
+ \expandafter {\expandafter\hyperlink \Etoc@tmp{#4}}%
\fi
}%
- \@namedef {etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
- \edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
+ \Etoc@global\@namedef {etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
\Etoc@getnbr #4\relax\relax\etoc@
}
% \end{macrocode}
-% placeholder for comments
+% |1.08| adds the |\Etoc@global|'s.
% \begin{macrocode}
\def\Etoc@getit@nohyp #1\hspace#2#3\etoc@ {%
\def\Etoc@getname ##1\hspace\relax\etoc@ {%
- \@namedef {etocname }{\leavevmode ##1}%
- \def\etocthename {##1}%
- \def\etocthelinkedname {##1}%
+ \Etoc@global\@namedef {etocname }{\leavevmode ##1}%
+ \Etoc@global\def\etocthename {##1}%
+ \Etoc@global\def\etocthelinkedname {##1}%
}%
\ifx\relax#2\else
- \@namedef {etocnumber }{\leavevmode #1}%
- \def\etocthenumber {#1}%
- \def\etocthelinkednumber {#1}%
- \Etoc@numbertrue
+ \Etoc@global\@namedef {etocnumber }{\leavevmode #1}%
+ \Etoc@global\def\etocthenumber {#1}%
+ \Etoc@global\def\etocthelinkednumber {#1}%
+ \Etoc@global\Etoc@numbertrue
\Etoc@getname #3\etoc@
\fi
}
% \end{macrocode}
-% |1.07n| replaces use of |\toks@| by macro |\Etoc@tmp|.
+% |1.07n| replaces use of |\toks@| by macro |\Etoc@tmp|. |1.08| adds
+% the |\Etoc@global|'s.
% \begin{macrocode}
\def\Etoc@getit@hyp #1#2#3#4#5#6\etoc@ {%
\def\Etoc@getname ##1\hspace\relax\etoc@ {%
- \@namedef {etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
- \def\etocthename {##1}%
+ \Etoc@global\@namedef {etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\def\etocthename {##1}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkedname\expandafter
- {\expandafter\hyperlink \Etoc@tmp{##1}}%
+ \Etoc@global\expandafter\def\expandafter\etocthelinkedname
+ \expandafter{\expandafter\hyperlink \Etoc@tmp{##1}}%
}%
\def\Etoc@getnbr ##1\hspace##2##3\etoc@ {%
\ifx\relax##2\else
- \@namedef {etocnumber }{\leavevmode #1{#2}{#3}{##1}#5}%
- \def\etocthenumber {##1}%
+ \Etoc@global\@namedef {etocnumber }{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\def\etocthenumber {##1}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkednumber\expandafter
- {\expandafter\hyperlink \Etoc@tmp{##1}}%
- \Etoc@numbertrue
+ \Etoc@global\expandafter\def\expandafter\etocthelinkednumber
+ \expandafter{\expandafter\hyperlink \Etoc@tmp{##1}}%
+ \Etoc@global\Etoc@numbertrue
\Etoc@getname ##3\etoc@
\fi
}%
@@ -9934,6 +10814,13 @@ v1.02 [2012/11/18]>
\DeclareRobustCommand*{\etoclink} {}
\DeclareRobustCommand*{\etocifnumbered}
{\ifEtoc@number\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+\expandafter\let\expandafter\etocxifnumbered\csname etocifnumbered \endcsname
+% \end{macrocode}
+% |1.08| defines |\etociffirst|
+\DeclareRobustCommand*{\etociffirst}
+ {\ifEtoc@isfirst\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+\expandafter\let\expandafter\etocxiffirst\csname etociffirst \endcsname
+% \begin{macrocode}
% \end{macrocode}
% |1.07j| modifies |\Etoc@readtoc|.
% \begin{macrocode}
@@ -9981,7 +10868,14 @@ v1.02 [2012/11/18]>
\global\let\Etoc@openouttoc\empty
}
% \end{macrocode}
-% placeholder for comments
+% |1.08| has a new way to handle |\Etoc@standardtrue|.
+%
+% Also the expansion of |\Etoc@levelist| is moved to inside
+% |\Etoc@tableofcontents| as set-up by |\etocsettocstyle|. This opens up
+% the possibility for the user to open a group in the title (for example
+% start a tabular) which would be closed (by the first |&|) sometime
+% later. In combination with |\etocglobaldefs| it will be now much
+% easier to typeset TOC as tables with \etoc!
% \begin{macrocode}
\def\Etoc@toctoc{%
\global\Etoc@vfalse
@@ -9992,22 +10886,6 @@ v1.02 [2012/11/18]>
\global\Etoc@false
\global\Etoc@jfalse
\global\Etoc@jjfalse
-\ifEtoc@standard
- \etoc@setstyle{@minustwo}{}{}{}{}%
- \etoc@setstyle{@minusone}{}{}{}{}%
- \etoc@setstyle{@zero}{}{}{}{}%
- \etoc@setstyle{@one}{}{}{}{}%
- \etoc@setstyle{@two}{}{}{}{}%
- \etoc@setstyle{@three}{}{}{}{}%
- \etoc@setstyle{@four}{}{}{}{}%
- \etoc@setstyle{@five}{}{}{}{}%
-\else
- \def\Etoc@levellist@elt##1{\let##1\Etoc@lxyz}%
- \Etoc@levellist
- \let\booknumberline\numberline
- \let\partnumberline\numberline
- \let\chapternumberline\numberline
-\fi
\the\Etoc@toctoks
\ifEtoc@notactive\else
\ifEtoc@v \Etoc@end@five\fi
@@ -10027,14 +10905,14 @@ v1.02 [2012/11/18]>
\ifEtoc@localtoc
\ifEtoc@notactive
\ifnum #1=#2\relax
- \ifEtoc@jj \let\Etoc@localtop\Etoc@@minusone@@ \fi
- \ifEtoc@j \let\Etoc@localtop\Etoc@@zero@@ \fi
- \ifEtoc@ \let\Etoc@localtop\Etoc@@one@@ \fi
- \ifEtoc@i \let\Etoc@localtop\Etoc@@two@@ \fi
- \ifEtoc@ii \let\Etoc@localtop\Etoc@@three@@ \fi
- \ifEtoc@iii \let\Etoc@localtop\Etoc@@four@@ \fi
- \ifEtoc@iv \let\Etoc@localtop\Etoc@@five@@ \fi
- \ifEtoc@v \let\Etoc@localtop\Etoc@@six@@ \fi
+ \ifEtoc@jj \Etoc@global\let\Etoc@localtop\Etoc@@minusone@@ \fi
+ \ifEtoc@j \Etoc@global\let\Etoc@localtop\Etoc@@zero@@ \fi
+ \ifEtoc@ \Etoc@global\let\Etoc@localtop\Etoc@@one@@ \fi
+ \ifEtoc@i \Etoc@global\let\Etoc@localtop\Etoc@@two@@ \fi
+ \ifEtoc@ii \Etoc@global\let\Etoc@localtop\Etoc@@three@@ \fi
+ \ifEtoc@iii \Etoc@global\let\Etoc@localtop\Etoc@@four@@ \fi
+ \ifEtoc@iv \Etoc@global\let\Etoc@localtop\Etoc@@five@@ \fi
+ \ifEtoc@v \Etoc@global\let\Etoc@localtop\Etoc@@six@@ \fi
\def\Etoc@next{\global\Etoc@notactivefalse
\global\Etoc@vfalse
\global\Etoc@ivfalse
@@ -10076,7 +10954,7 @@ v1.02 [2012/11/18]>
\etocaftertochook % 1.07g
}
% \end{macrocode}
-% |[2013/03/07]|: I discover a \csa{@namedef} trick to construct the
+% |2013/03/07|: I discover a \csa{@namedef} trick to construct the
% \csa{Etoc@again} space delimited macro:\\
% | \@namedef {Etoc@again} {...stuff...}|\\
% Original version was (copied from analogous stuff in |source2e|):\\
@@ -10090,7 +10968,9 @@ v1.02 [2012/11/18]>
\def\Etoc@label#1{\label{#1}\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
\@firstofone{\def\Etoc@again} {\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
% \end{macrocode}
-% placeholder for comments
+% Why |\global| for |\Etoc@notactivefalse|? and not for
+% |\Etoc@localtocfalse|. Must think about this, a pity I did not
+% document it when I was young and intelligent ...
% \begin{macrocode}
\def\Etoc@t@bleofcontents{%
\ifx\Etoc@nexttoken\label
@@ -10129,6 +11009,9 @@ v1.02 [2012/11/18]>
% \end{macrocode}
% |1.07g| defines |\etoctableofcontents| to be able to undo the evil and
% brutal doings of some packages with |\tableofcontents|.
+%
+% |1.08| patches |tableof|'s influence. Version |1.4a| or later of |tableof|
+% is needed.
% \begin{macrocode}
\let\etocaftertitlehook \@empty
\let\etocaftercontentshook \@empty
@@ -10136,60 +11019,109 @@ v1.02 [2012/11/18]>
\Etoc@openouttoc
\Etoc@par
\begingroup % closed in \Etoc@t@bleofcontents or \Etoc@localtableofcontents
- \def\etoc@startlocaltoc##1{\etoc@@startlocaltoc{##1}{\c@etoc@tocid}}%
- \@ifstar
- {\def\Etoc@aftertitlehook{}\Etoc@table@fcontents}
- {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@table@fcontents}}
+% \end{macrocode}
+% No need for tableof extra group level, and furthermore
+% it is better to get rid of it if. However I can't do it globally because I
+% want to leave open for the user the possibility (whose interest is quasi nil
+% however) of using directly |\tableof|, |\tablenotof|, ... and not the only
+% reasonable thing which is |\nexttocwithtags{}{}|.
+% \begin{macrocode}
+ \let\tof@begingroup\@empty
+ \let\tof@endgroup \@empty
+ \def\etoc@startlocaltoc##1{\etoc@@startlocaltoc{##1}{\c@etoc@tocid}}%
+ \@ifstar
+ {\def\Etoc@aftertitlehook{}\Etoc@table@fcontents}
+ {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@table@fcontents}}
\let\tableofcontents\etoctableofcontents
\newcommand*\localtableofcontents{%
\Etoc@openouttoc
\Etoc@par
\begingroup % closed in \Etoc@t@bleofcontents or \Etoc@localtableofcontents
- \@ifstar
- {\def\Etoc@aftertitlehook{}\Etoc@localtable@fcontents}
- {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@localtable@fcontents}}
+ \let\tof@begingroup\@empty
+ \let\tof@endgroup \@empty
+ \@ifstar
+ {\def\Etoc@aftertitlehook{}\Etoc@localtable@fcontents}
+ {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@localtable@fcontents}}
% \end{macrocode}
-% placeholder for comments.
+% |1.08| moves earlier the definitions of |\Etoc@savedcontentsline| as
+% well as |\Etoc@levellist|. It will thus not be operative to do
+% |\etocsetlevel| from inside the title now. But perhaps it will be
+% easier to deal with tables.
+%
+% Also I remove a big |\@firstofone|, and use rather
+% |\Etoc@gobbletoetoc@| for the gobbling case.
+%
+% Also, |1.08| modifies the code to do only expandable things after
+% |\Etoc@toctoc|, in order to allow opening of an alignment in the first
+% argument and closing in the second. Earlier versions had an
+% |\Etoc@@next| initially set to relax after the first |\Etoc@toctoc|. I
+% was in 2012/2013 quite uneasy with the TeX conditionals hence wanted
+% for safety to move the things for the second invocation of
+% |\Etoc@toctoc| after the |\fi\fi\fi|. I could define an |\afterfififi|
+% macro, but it should be ok as it is done here.
% \begin{macrocode}
+\long\def\Etoc@gobbletoetoc@ #1\etoc@ {}
\newcommand\etocsettocstyle[2]{%
\def\Etoc@tableofcontents
-{\ifnum\c@tocdepth>\Etoc@minf
- \let\Etoc@@next\@firstofone\else
- \let\Etoc@@next\@gobble
-\fi
-\Etoc@@next{\etocbeforetitlehook % 1.07m
- \Etoc@storetocdepth % 1.07g
- #1\ifEtoc@parskip\parskip\z@skip\fi %1.07d
- \Etoc@aftertitlehook
- \let\Etoc@savedcontentsline\contentsline
- \let\contentsline\Etoc@etoccontentsline
- \Etoc@toctoc
- \let\Etoc@@next\relax
- \ifEtoc@tocwithid\else
- \ifEtoc@localtoc
+{%
+ \ifnum\c@tocdepth>\Etoc@minf\else
+ \expandafter\Etoc@gobbletoetoc@
+ \fi
+ \etocbeforetitlehook % 1.07m
+ \Etoc@storetocdepth % 1.07g
+ \let\Etoc@savedcontentsline\contentsline % moved up here 1.08
+ \let\contentsline\Etoc@etoccontentsline
+ \ifEtoc@standard
+ \else % moved here from \Etoc@toctoc (1.08)
+ \def\Etoc@levellist@elt####1{\let####1\Etoc@lxyz}%
+ \Etoc@levellist
+ \let\booknumberline\numberline
+ \let\partnumberline\numberline
+ \let\chapternumberline\numberline
+ \fi
+ #1%
+ \ifEtoc@parskip\parskip\z@skip\fi %1.07d
+ \Etoc@aftertitlehook
+ \Etoc@toctoc
+ \ifEtoc@tocwithid\else
+ \ifEtoc@localtoc
\ifEtoc@notactive
- \def\Etoc@@next{\Etoc@localtocfalse
- \global\Etoc@notactivefalse
- \Etoc@toctoc}%
- \fi\fi
+ \Etoc@localtocfalse
+ \global\Etoc@notactivefalse
+ \Etoc@toctoc
+ \fi
\fi
- \Etoc@@next
- \Etoc@resettocdepth % 1.07g
- \etocaftercontentshook
- #2\@nobreakfalse}}} % 1.07d: \@nobreakfalse moved here
+ \fi
+ \etocaftercontentshook
+ #2\@nobreakfalse % 1.07d: \@nobreakfalse moved here
+ \Etoc@resettocdepth % 1.07g. moved here from before #2 by 1.08
% \end{macrocode}
-% placeholder for comments
+% |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|.
+% \begin{macrocode}
+ \ifx\Etoc@global\global\ifx\tof@finish\@empty\else
+ \global\let\contentsline\Etoc@savedcontentsline
+ \fi\fi
+ \@gobble\etoc@
+}% end of \Etoc@tableofcontents definition by \etocsettocstyle
+}
+% \end{macrocode}
+% |2015/03/09| |1.08| hacks the begin parts to update therein the
+% |\ifEtoc@isfirst| flag.
% \begin{macrocode}
\def\etocsetstyle{\Etoc@standardfalse\etoc@setstyle}
\long\def\etoc@setstyle#1#2#3#4#5{%
-\long\expandafter\def
- \csname Etoc@begin@\csname Etoc@#1@\endcsname\endcsname {#2}%
-\long\expandafter\def
- \csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname {#3}%
-\long\expandafter\def
+ \long\expandafter\def
+ \csname Etoc@begin@\csname Etoc@#1@\endcsname\endcsname
+ {#2\Etoc@global\Etoc@isfirsttrue}%
+ \long\expandafter\def
+ \csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname {#3}%
+ \long\expandafter\def
\csname Etoc@contents@\csname Etoc@#1@\endcsname\endcsname {#4}%
-\long\expandafter\def
- \csname Etoc@end@\csname Etoc@#1@\endcsname\endcsname {#5}}
+ \long\expandafter\def
+ \csname Etoc@end@\csname Etoc@#1@\endcsname\endcsname {#5}%
+}
% \end{macrocode}
% placeholder for comments
% \begin{macrocode}
@@ -10980,7 +11912,7 @@ v1.02 [2012/11/18]>
Grave accent \` Left brace \{ Vertical bar \|
Right brace \} Tilde \~}
-\CheckSum{2997}
+\CheckSum{3061}
\csname check@checksum\endcsname
\Finale
diff --git a/Master/texmf-dist/source/latex/etoc/etoc.ins b/Master/texmf-dist/source/generic/etoc/etoc.ins
index 96ed9f4aaf4..7e292525a27 100644
--- a/Master/texmf-dist/source/latex/etoc/etoc.ins
+++ b/Master/texmf-dist/source/generic/etoc/etoc.ins
@@ -1,17 +1,17 @@
%%
%% Package: etoc
-%% Version: 1.07n (2015/03/05)
+%% Version: 1.08 (2015/03/10)
%% License: LPPL 1.3c or later (see etoc.dtx)
%% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
%% Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
%% and collaborators for the translation into German of the documentation
%%
-\def\etocpkgdate {2015/03/05}
-\def\etocdocdate {2015/03/05}
-\def\etocpkgversion {v1.07n}
+\def\etocpkgdate {2015/03/10}
+\def\etocdocdate {2015/03/10}
+\def\etocpkgversion {v1.08}
\def\etocpkgdescription {Completely customisable TOCs (jfB)}
%% Run tex on this file to extract from etoc.dtx:
-%% etoc.sty, etoc.tex, etoc-DE.tex
+%% etoc.sty, etoc.tex, etoc-DE.tex and README.md
%%
%% At least three ways to produce etoc.pdf (method (3) is preferred):
%% (1) latex etoc.dtx (three times), then dvips, then ps2pdf
@@ -36,10 +36,11 @@
%%
%% Installation:
%%
-%% etoc.sty ->TDS:tex/latex/etoc/etoc.sty
-%% etoc.dtx ->TDS:source/latex/etoc/etoc.dtx
-%% etoc.pdf ->TDS:doc/latex/etoc/etoc.pdf
-%% etoc-DE.pdf ->TDS:doc/latex/etoc/etoc-DE.pdf
+%% etoc.sty -> TDS:tex/latex/etoc/etoc.sty
+%% etoc.dtx -> TDS:source/latex/etoc/etoc.dtx
+%% etoc.pdf -> TDS:doc/latex/etoc/etoc.pdf
+%% etoc-DE.pdf -> TDS:doc/latex/etoc/etoc-DE.pdf
+%% README.md -> TDS:doc/latex/etoc/README.md
%%
\input docstrip.tex
\askforoverwritefalse
@@ -47,7 +48,9 @@
\string\NeedsTeXFormat{LaTeX2e}^^J%
\string\ProvidesPackage{etoc}^^J%
\space[\etocpkgdate\space\etocpkgversion\space\etocpkgdescription]}%
-\generate{\nopreamble
+\generate{\nopreamble\nopostamble
+\file{README.md}{\from{etoc.dtx}{readme}}%
+\usepostamble\defaultpostamble
\file{etoc.tex}{\from{etoc.dtx}{tex}}%
\file{etoc-DE.tex}{\from{etoc.dtx}{DEtex}}%
\usepreamble\etocpkgpreamble
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/generic/etoc/etoc.sty
index 22acc4278c8..172af134d4e 100644
--- a/Master/texmf-dist/tex/latex/etoc/etoc.sty
+++ b/Master/texmf-dist/tex/generic/etoc/etoc.sty
@@ -23,10 +23,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{etoc}
- [2015/03/05 v1.07n Completely customisable TOCs (jfB)]
+ [2015/03/10 v1.08 Completely customisable TOCs (jfB)]
%%
%% Package: etoc
-%% Version: 1.07n (2015/03/05)
+%% Version: 1.08 (2015/03/10)
%% License: LPPL 1.3c or later (see etoc.dtx)
%% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr>
%% Copyright (C) 2014-2015 Christine Roemer <Christine_Roemer at t-online dot de>
@@ -40,6 +40,9 @@
\def\etocinline{\def\Etoc@par{}}
\let\etocnopar\etocinline
\def\etocdisplay{\def\Etoc@par{\par}}% 1.07m 2015/01/23
+\let\Etoc@global\@empty % 1.08 2015/03/10
+\def\etocglobaldefs{\let\Etoc@global\global\let\tof@global\global}
+\def\etoclocaldefs {\let\Etoc@global\@empty\let\tof@global\@empty}
\newif\ifEtoc@jj % book
\newif\ifEtoc@j % part
\newif\ifEtoc@ % chapter
@@ -53,14 +56,15 @@
\newif\ifEtoc@parskip % 1.07d
\newif\ifEtoc@tocwithid
\newif\ifEtoc@standard
-\newif\ifEtoc@part
+\newif\ifEtoc@skipprefix % 1.08
+\newif\ifEtoc@isfirst % 1.08
\newif\ifEtoc@localtoc
\newif\ifEtoc@skipthisone
\newif\ifEtoc@stoptoc
\newif\ifEtoc@notactive
-\newcounter{etoc@tocid}
\newif\ifEtoc@mustclosegroup
\def\etoc@{\etoc@}
+\newcounter{etoc@tocid}
\newcounter{etoc@tocdepth}% 1.07g
\@ifclassloaded{memoir}{\def\Etoc@minf{-\thr@@}}{\def\Etoc@minf{-\tw@}}
\def\Etoc@@minustwo@@{-\tw@}
@@ -94,9 +98,10 @@
\let\Etoc@all@@ \Etoc@@five@@
\let\Etoc@none@@ \Etoc@minf
\let\Etoc@levellist\@empty
-\def\Etoc@newlevel#1{%
- \def\Etoc@levellist@elt{\noexpand\Etoc@levellist@elt\noexpand}%
- \edef\Etoc@levellist{\Etoc@levellist\Etoc@levellist@elt#1}}
+\def\Etoc@newlevel #1%
+{\expandafter\def\expandafter\Etoc@levellist\expandafter
+ {\Etoc@levellist\Etoc@levellist@elt #1}%
+}
\def\etocsetlevel#1#2{%
\expandafter\Etoc@newlevel\csname l@#1\endcsname
\ifcase#2\relax
@@ -141,8 +146,16 @@
\etocsetlevel{subsubsection}{3}
\etocsetlevel{paragraph}{4}
\etocsetlevel{subparagraph}{5}
-\def\Etoc@setflags #1{%
- \ifcase #1\relax
+\AtBeginDocument{%
+\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}%
+\@ifpackageloaded{hyperref}{\Etoc@hyperreftrue
+ \def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}%
+ \long\def\Etoc@gobblesixorfive#1#2#3#4#5#6{}}
+ {\def\Etoc@et@hop#1#2#3#4{#2{#3}{#4}#1}%
+ \long\def\Etoc@gobblesixorfive#1#2#3#4#5{}}%
+}
+\def\Etoc@setflags {%
+ \ifcase \Etoc@level
\global\Etoc@vfalse
\global\Etoc@ivfalse
\global\Etoc@iiifalse
@@ -170,147 +183,129 @@
\or
\global\Etoc@vtrue
\else
- \ifnum#1=\m@ne
- \global\Etoc@vfalse
- \global\Etoc@ivfalse
- \global\Etoc@iiifalse
- \global\Etoc@iifalse
- \global\Etoc@ifalse
- \global\Etoc@false
+ \global\Etoc@vfalse
+ \global\Etoc@ivfalse
+ \global\Etoc@iiifalse
+ \global\Etoc@iifalse
+ \global\Etoc@ifalse
+ \global\Etoc@false
+ \ifnum\Etoc@level=\m@ne
\global\Etoc@jtrue
\else
- \global\Etoc@vfalse
- \global\Etoc@ivfalse
- \global\Etoc@iiifalse
- \global\Etoc@iifalse
- \global\Etoc@ifalse
- \global\Etoc@false
\global\Etoc@jfalse
\global\Etoc@jjtrue
\fi
\fi}
-\AtBeginDocument{%
-\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}%
-\@ifpackageloaded{hyperref}{\Etoc@hyperreftrue
- \def\Etoc@et@hop#1#2#3#4#5{#1{#3}{#4}{#5}#2}%
- \long\def\Etoc@gobblesixorfive#1#2#3#4#5#6{}}
- {\def\Etoc@et@hop#1#2#3#4{#1{#3}{#4}#2}%
- \long\def\Etoc@gobblesixorfive#1#2#3#4#5{}}%
+\def\Etoc@doends {%
+ \ifcase \Etoc@level
+ \ifEtoc@v \Etoc@end@five\fi
+ \ifEtoc@iv \Etoc@end@four\fi
+ \ifEtoc@iii\Etoc@end@three\fi
+ \ifEtoc@ii \Etoc@end@two\fi
+ \ifEtoc@i \Etoc@end@one\fi
+ \or
+ \ifEtoc@v \Etoc@end@five\fi
+ \ifEtoc@iv \Etoc@end@four\fi
+ \ifEtoc@iii\Etoc@end@three\fi
+ \ifEtoc@ii \Etoc@end@two\fi
+ \or
+ \ifEtoc@v \Etoc@end@five\fi
+ \ifEtoc@iv \Etoc@end@four\fi
+ \ifEtoc@iii\Etoc@end@three\fi
+ \or
+ \ifEtoc@v \Etoc@end@five\fi
+ \ifEtoc@iv\Etoc@end@four\fi
+ \or
+ \ifEtoc@v \Etoc@end@five\fi
+ \or
+ \else
+ \ifEtoc@v \Etoc@end@five \fi
+ \ifEtoc@iv \Etoc@end@four \fi
+ \ifEtoc@iii\Etoc@end@three\fi
+ \ifEtoc@ii \Etoc@end@two \fi
+ \ifEtoc@i \Etoc@end@one \fi
+ \ifEtoc@ \Etoc@end@zero \fi
+ \ifnum \Etoc@level =-\tw@
+ \ifEtoc@j \Etoc@end@minusone\fi
+ \fi
+ \fi
}
-\def\Etoc@swa#1{%
- \Etoc@et@hop
- {\Etoc@savedcontentsline{#1}}
- {\Etoc@prefix\Etoc@contents}}
-\def\Etoc@swb#1{%
- \Etoc@et@hop
- {\Etoc@savedcontentsline{#1}}
- {\Etoc@contents}}
-\let\etocskipfirstprefix\@thirdofthree
-\def\Etoc@etoccontentsline#1{%
- \global\expandafter\let\expandafter\Etoc@tmp\csname Etoc@#1@@\endcsname
+\def\etocskipfirstprefix {\global\Etoc@skipprefixtrue }
+\def\Etoc@etoccontentsline #1{%
+ \global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname
\Etoc@skipthisonefalse
- \let\Etoc@next\Etoc@gobblesixorfive
- \ifnum\Etoc@tmp=\Etoc@@six@@
+ \ifnum\Etoc@level=\Etoc@@six@@
\Etoc@skipthisonetrue
\else
\ifEtoc@localtoc
- \let\Etoc@prenext\relax
+ \let\Etoc@next\relax
\ifEtoc@stoptoc
\Etoc@skipthisonetrue
\fi
- \ifnum\Etoc@tmp<\Etoc@localtop
- \def\Etoc@prenext{\global\Etoc@stoptoctrue}%
+ \ifnum\Etoc@level<\Etoc@localtop
+ \def\Etoc@next{\global\Etoc@stoptoctrue}%
\Etoc@skipthisonetrue
\fi
\ifEtoc@notactive
- \def\Etoc@prenext{\Etoc@setflags{\Etoc@tmp}}%
+ \def\Etoc@next{\Etoc@setflags}%
\Etoc@skipthisonetrue
\fi
- \Etoc@prenext
+ \Etoc@next
\fi
\fi
- \ifnum\c@tocdepth<\Etoc@tmp\relax\else
- \ifEtoc@skipthisone\else
- \global\let\Etoc@next\relax
- \ifcase\Etoc@tmp
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \Etoc@end@two\fi
- \ifEtoc@i \Etoc@end@one\fi
- \ifEtoc@ \else \def\Etoc@next{\Etoc@begin@zero}\fi
- \def\Etoc@contents{\Etoc@contents@zero}%
- \def\Etoc@prefix{\Etoc@prefix@zero}%
- \or
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \Etoc@end@two\fi
- \ifEtoc@i \else \def\Etoc@next{\Etoc@begin@one}\fi
- \def\Etoc@contents{\Etoc@contents@one}%
- \def\Etoc@prefix{\Etoc@prefix@one}%
- \or
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \else \def\Etoc@next{\Etoc@begin@two}\fi
- \def\Etoc@contents{\Etoc@contents@two}%
- \def\Etoc@prefix{\Etoc@prefix@two}%
- \or
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \else \def\Etoc@next{\Etoc@begin@three}\fi
- \def\Etoc@contents{\Etoc@contents@three}%
- \def\Etoc@prefix{\Etoc@prefix@three}%
- \or
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \else \def\Etoc@next{\Etoc@begin@four}\fi
- \def\Etoc@contents{\Etoc@contents@four}%
- \def\Etoc@prefix{\Etoc@prefix@four}%
- \or
- \ifEtoc@v \else \def\Etoc@next{\Etoc@begin@five}\fi
- \def\Etoc@contents{\Etoc@contents@five}%
- \def\Etoc@prefix{\Etoc@prefix@five}%
+ \let\Etoc@next\Etoc@gobblesixorfive
+ \ifnum\c@tocdepth<\Etoc@level
\else
- \ifnum\Etoc@tmp=\m@ne
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \Etoc@end@two\fi
- \ifEtoc@i \Etoc@end@one\fi
- \ifEtoc@ \Etoc@end@zero\fi
- \ifEtoc@j \else \def\Etoc@next{\Etoc@begin@minusone}\fi
- \def\Etoc@contents{\Etoc@contents@minusone}%
- \def\Etoc@prefix{\Etoc@prefix@minusone}%
+ \ifEtoc@skipthisone
+ \else
+ \ifEtoc@standard\let\Etoc@next\@thirdofthree
+ \else
+ \Etoc@doends
+ \let\Etoc@next\@empty
+ \Etoc@global\Etoc@isfirstfalse
+ \ifcase\Etoc@level
+ \ifEtoc@\else \def\Etoc@next{\Etoc@begin@zero}\fi
+ \or
+ \ifEtoc@i\else \def\Etoc@next{\Etoc@begin@one}\fi
+ \or
+ \ifEtoc@ii\else \def\Etoc@next{\Etoc@begin@two}\fi
+ \or
+ \ifEtoc@iii\else \def\Etoc@next{\Etoc@begin@three}\fi
+ \or
+ \ifEtoc@iv\else \def\Etoc@next{\Etoc@begin@four}\fi
+ \or
+ \ifEtoc@v\else \def\Etoc@next{\Etoc@begin@five}\fi
\else
- \ifEtoc@v \Etoc@end@five\fi
- \ifEtoc@iv \Etoc@end@four\fi
- \ifEtoc@iii \Etoc@end@three\fi
- \ifEtoc@ii \Etoc@end@two\fi
- \ifEtoc@i \Etoc@end@one\fi
- \ifEtoc@ \Etoc@end@zero\fi
- \ifEtoc@j \Etoc@end@minusone\fi
- \ifEtoc@jj \else \def\Etoc@next{\Etoc@begin@minustwo}\fi
- \def\Etoc@contents{\Etoc@contents@minustwo}%
- \def\Etoc@prefix{\Etoc@prefix@minustwo}%
+ \ifnum\Etoc@level=\m@ne
+ \ifEtoc@j\else \def\Etoc@next{\Etoc@begin@minusone}\fi
+ \else
+ \ifEtoc@jj\else \def\Etoc@next{\Etoc@begin@minustwo}\fi
\fi
- \fi
- \ifnum\Etoc@tmp=\m@ne\Etoc@parttrue\else\Etoc@partfalse\fi
- \Etoc@setflags{\Etoc@tmp}%
- \fi\fi
+ \fi
+ \Etoc@setflags
+ \Etoc@next
+ \let\Etoc@next\@empty
+ \Etoc@global\expandafter\def\expandafter\Etoc@prefix\expandafter
+ {\csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname }%
+ \Etoc@global\expandafter\def\expandafter\Etoc@contents\expandafter
+ {\csname Etoc@contents@\csname Etoc@#1@\endcsname\endcsname }%
+ \ifEtoc@skipprefix \Etoc@global\let\Etoc@prefix\@empty\fi
+ \global\Etoc@skipprefixfalse
+ \fi\fi\fi
\Etoc@next
- \@firstoftwo{\Etoc@swa{#1}}{\Etoc@swb{#1}}}
+ \Etoc@et@hop{\Etoc@prefix\Etoc@contents}{\Etoc@savedcontentsline{#1}}%
+}
\def\Etoc@lxyz #1#2{%
- \@namedef {etoclink }{\leavevmode}% fall-back
- \let\etocthelink \@empty % fall-back
- \@namedef {etocname }{\leavevmode #1}% fall-back (perhaps linked)
- \def\etocthename {#1}% (if link, will be removed later)
- \def\etocthelinkedname {#1}% will probably get redefined
- \@namedef {etocpage }{\leavevmode #2}% (perhaps linked)
+ \Etoc@global\@namedef {etoclink }{\leavevmode}% fall-back
+ \Etoc@global\let\etocthelink \@empty % fall-back
+ \Etoc@global\@namedef {etocname }{\leavevmode #1}% fall-back (perhaps linked)
+ \Etoc@global\def\etocthename {#1}% (if link, will be removed later)
+ \Etoc@global\def\etocthelinkedname {#1}% will probably get redefined
+ \Etoc@global\@namedef {etocpage }{\leavevmode #2}% (perhaps linked)
\Etoc@getthepage #2\etoc@ % defines also \etocthelinkedpage (and \etoclink)
\Etoc@getnb #1\relax\relax\etoc@ % gets number *and* name, and \etoclink
\ifEtoc@number\else
- \ifEtoc@part
+ \ifnum\Etoc@level=\m@ne
\Etoc@getit #1\hspace\relax\etoc@ % additional job for parts
\fi
\fi}
@@ -322,15 +317,15 @@
\Etoc@next #1%
}
\def\Etoc@getthepage@nohyp #1\etoc@ {%
- \def\etocthepage {#1}%
- \def\etocthelinkedpage {#1}%
+ \Etoc@global\def\etocthepage {#1}%
+ \Etoc@global\def\etocthelinkedpage {#1}%
}
\def\Etoc@getthepage@hyp #1#2#3#4#5\etoc@ {%
- \@namedef{etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
- \edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
- \def\etocthepage {#4}%
+ \Etoc@global\@namedef{etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
+ \Etoc@global\def\etocthepage {#4}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkedpage\expandafter
+ \Etoc@global\expandafter\def\expandafter\etocthelinkedpage\expandafter
{\expandafter\hyperlink \Etoc@tmp{#4}}%
}
\def\Etoc@getnb #1{%
@@ -349,85 +344,85 @@
}
\def\Etoc@getnb@nohyp #1#2#3\etoc@ {%
\def\Etoc@getname ##1\relax\relax\etoc@ {%
- \@namedef {etocname }{\leavevmode ##1}%
- \def\etocthename {##1}%
- \def\etocthelinkedname {##1}%
+ \Etoc@global\@namedef {etocname }{\leavevmode ##1}%
+ \Etoc@global\def\etocthename {##1}%
+ \Etoc@global\def\etocthelinkedname {##1}%
}%
\ifx #1\numberline
- \@namedef {etocnumber }{\leavevmode #2}%
- \def\etocthenumber {#2}%
- \def\etocthelinkednumber {#2}%
- \Etoc@numbertrue
+ \Etoc@global\@namedef {etocnumber }{\leavevmode #2}%
+ \Etoc@global\def\etocthenumber {#2}%
+ \Etoc@global\def\etocthelinkednumber {#2}%
+ \Etoc@global\Etoc@numbertrue
\Etoc@getname #3\etoc@
\else % then \etocthename and \etocthelinkedname already defined
- \@namedef {etocnumber }{\leavevmode}%
- \let\etocthenumber \@empty
- \let\etocthelinkednumber \@empty
- \Etoc@numberfalse
+ \Etoc@global\@namedef {etocnumber }{\leavevmode}%
+ \Etoc@global\let\etocthenumber \@empty
+ \Etoc@global\let\etocthelinkednumber \@empty
+ \Etoc@global\Etoc@numberfalse
\fi
}
\def\Etoc@getnb@hyp #1#2#3#4#5#6\etoc@ {%
- \def\Etoc@getname ##1\relax\relax\etoc@ {%
- \@namedef {etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
- \def\etocthename {##1}%
- \edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkedname\expandafter
+ \Etoc@global\def\Etoc@getname ##1\relax\relax\etoc@ {%
+ \Etoc@global\@namedef {etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\def\etocthename {##1}%
+ \edef\Etoc@tmp {{#3}}%
+ \Etoc@global\expandafter\def\expandafter\etocthelinkedname\expandafter
{\expandafter\hyperlink \Etoc@tmp{##1}}%
}%
\def\Etoc@getnbr ##1##2##3\etoc@ {%
\ifx ##1\numberline
- \@namedef {etocnumber }{\leavevmode #1{#2}{#3}{##2}#5}%
- \def\etocthenumber {##2}%
+ \Etoc@global\@namedef {etocnumber }{\leavevmode #1{#2}{#3}{##2}#5}%
+ \Etoc@global\def\etocthenumber {##2}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkednumber\expandafter
- {\expandafter\hyperlink \Etoc@tmp{##2}}%
- \Etoc@numbertrue
+ \Etoc@global\expandafter\def\expandafter\etocthelinkednumber
+ \expandafter{\expandafter\hyperlink \Etoc@tmp{##2}}%
+ \Etoc@global\Etoc@numbertrue
\Etoc@getname ##3\etoc@
\else
- \@namedef {etocnumber }{\leavevmode}%
- \let\etocthenumber \@empty
- \let\etocthelinkednumber \@empty
- \Etoc@numberfalse
- \def\etocthename {#4}%
+ \Etoc@global\@namedef {etocnumber }{\leavevmode}%
+ \Etoc@global\let\etocthenumber \@empty
+ \Etoc@global\let\etocthelinkednumber \@empty
+ \Etoc@global\Etoc@numberfalse
+ \Etoc@global\def\etocthename {#4}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkedname\expandafter
- {\expandafter\hyperlink \Etoc@tmp{#4}}%
+ \Etoc@global\expandafter\def\expandafter\etocthelinkedname
+ \expandafter {\expandafter\hyperlink \Etoc@tmp{#4}}%
\fi
}%
- \@namedef {etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
- \edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
+ \Etoc@global\@namedef {etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}%
\Etoc@getnbr #4\relax\relax\etoc@
}
\def\Etoc@getit@nohyp #1\hspace#2#3\etoc@ {%
\def\Etoc@getname ##1\hspace\relax\etoc@ {%
- \@namedef {etocname }{\leavevmode ##1}%
- \def\etocthename {##1}%
- \def\etocthelinkedname {##1}%
+ \Etoc@global\@namedef {etocname }{\leavevmode ##1}%
+ \Etoc@global\def\etocthename {##1}%
+ \Etoc@global\def\etocthelinkedname {##1}%
}%
\ifx\relax#2\else
- \@namedef {etocnumber }{\leavevmode #1}%
- \def\etocthenumber {#1}%
- \def\etocthelinkednumber {#1}%
- \Etoc@numbertrue
+ \Etoc@global\@namedef {etocnumber }{\leavevmode #1}%
+ \Etoc@global\def\etocthenumber {#1}%
+ \Etoc@global\def\etocthelinkednumber {#1}%
+ \Etoc@global\Etoc@numbertrue
\Etoc@getname #3\etoc@
\fi
}
\def\Etoc@getit@hyp #1#2#3#4#5#6\etoc@ {%
\def\Etoc@getname ##1\hspace\relax\etoc@ {%
- \@namedef {etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
- \def\etocthename {##1}%
+ \Etoc@global\@namedef {etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\def\etocthename {##1}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkedname\expandafter
- {\expandafter\hyperlink \Etoc@tmp{##1}}%
+ \Etoc@global\expandafter\def\expandafter\etocthelinkedname
+ \expandafter{\expandafter\hyperlink \Etoc@tmp{##1}}%
}%
\def\Etoc@getnbr ##1\hspace##2##3\etoc@ {%
\ifx\relax##2\else
- \@namedef {etocnumber }{\leavevmode #1{#2}{#3}{##1}#5}%
- \def\etocthenumber {##1}%
+ \Etoc@global\@namedef {etocnumber }{\leavevmode #1{#2}{#3}{##1}#5}%
+ \Etoc@global\def\etocthenumber {##1}%
\edef\Etoc@tmp {{#3}}%
- \expandafter\def\expandafter\etocthelinkednumber\expandafter
- {\expandafter\hyperlink \Etoc@tmp{##1}}%
- \Etoc@numbertrue
+ \Etoc@global\expandafter\def\expandafter\etocthelinkednumber
+ \expandafter{\expandafter\hyperlink \Etoc@tmp{##1}}%
+ \Etoc@global\Etoc@numbertrue
\Etoc@getname ##3\etoc@
\fi
}%
@@ -446,6 +441,10 @@
\DeclareRobustCommand*{\etoclink} {}
\DeclareRobustCommand*{\etocifnumbered}
{\ifEtoc@number\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+\expandafter\let\expandafter\etocxifnumbered\csname etocifnumbered \endcsname
+\DeclareRobustCommand*{\etociffirst}
+ {\ifEtoc@isfirst\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+\expandafter\let\expandafter\etocxiffirst\csname etociffirst \endcsname
\def\Etoc@readtoc {%
\ifeof \Etoc@tf
\else
@@ -491,22 +490,6 @@
\global\Etoc@false
\global\Etoc@jfalse
\global\Etoc@jjfalse
-\ifEtoc@standard
- \etoc@setstyle{@minustwo}{}{}{}{}%
- \etoc@setstyle{@minusone}{}{}{}{}%
- \etoc@setstyle{@zero}{}{}{}{}%
- \etoc@setstyle{@one}{}{}{}{}%
- \etoc@setstyle{@two}{}{}{}{}%
- \etoc@setstyle{@three}{}{}{}{}%
- \etoc@setstyle{@four}{}{}{}{}%
- \etoc@setstyle{@five}{}{}{}{}%
-\else
- \def\Etoc@levellist@elt##1{\let##1\Etoc@lxyz}%
- \Etoc@levellist
- \let\booknumberline\numberline
- \let\partnumberline\numberline
- \let\chapternumberline\numberline
-\fi
\the\Etoc@toctoks
\ifEtoc@notactive\else
\ifEtoc@v \Etoc@end@five\fi
@@ -523,14 +506,14 @@
\ifEtoc@localtoc
\ifEtoc@notactive
\ifnum #1=#2\relax
- \ifEtoc@jj \let\Etoc@localtop\Etoc@@minusone@@ \fi
- \ifEtoc@j \let\Etoc@localtop\Etoc@@zero@@ \fi
- \ifEtoc@ \let\Etoc@localtop\Etoc@@one@@ \fi
- \ifEtoc@i \let\Etoc@localtop\Etoc@@two@@ \fi
- \ifEtoc@ii \let\Etoc@localtop\Etoc@@three@@ \fi
- \ifEtoc@iii \let\Etoc@localtop\Etoc@@four@@ \fi
- \ifEtoc@iv \let\Etoc@localtop\Etoc@@five@@ \fi
- \ifEtoc@v \let\Etoc@localtop\Etoc@@six@@ \fi
+ \ifEtoc@jj \Etoc@global\let\Etoc@localtop\Etoc@@minusone@@ \fi
+ \ifEtoc@j \Etoc@global\let\Etoc@localtop\Etoc@@zero@@ \fi
+ \ifEtoc@ \Etoc@global\let\Etoc@localtop\Etoc@@one@@ \fi
+ \ifEtoc@i \Etoc@global\let\Etoc@localtop\Etoc@@two@@ \fi
+ \ifEtoc@ii \Etoc@global\let\Etoc@localtop\Etoc@@three@@ \fi
+ \ifEtoc@iii \Etoc@global\let\Etoc@localtop\Etoc@@four@@ \fi
+ \ifEtoc@iv \Etoc@global\let\Etoc@localtop\Etoc@@five@@ \fi
+ \ifEtoc@v \Etoc@global\let\Etoc@localtop\Etoc@@six@@ \fi
\def\Etoc@next{\global\Etoc@notactivefalse
\global\Etoc@vfalse
\global\Etoc@ivfalse
@@ -605,54 +588,75 @@
\Etoc@openouttoc
\Etoc@par
\begingroup % closed in \Etoc@t@bleofcontents or \Etoc@localtableofcontents
- \def\etoc@startlocaltoc##1{\etoc@@startlocaltoc{##1}{\c@etoc@tocid}}%
- \@ifstar
- {\def\Etoc@aftertitlehook{}\Etoc@table@fcontents}
- {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@table@fcontents}}
+ \let\tof@begingroup\@empty
+ \let\tof@endgroup \@empty
+ \def\etoc@startlocaltoc##1{\etoc@@startlocaltoc{##1}{\c@etoc@tocid}}%
+ \@ifstar
+ {\def\Etoc@aftertitlehook{}\Etoc@table@fcontents}
+ {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@table@fcontents}}
\let\tableofcontents\etoctableofcontents
\newcommand*\localtableofcontents{%
\Etoc@openouttoc
\Etoc@par
\begingroup % closed in \Etoc@t@bleofcontents or \Etoc@localtableofcontents
- \@ifstar
- {\def\Etoc@aftertitlehook{}\Etoc@localtable@fcontents}
- {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@localtable@fcontents}}
+ \let\tof@begingroup\@empty
+ \let\tof@endgroup \@empty
+ \@ifstar
+ {\def\Etoc@aftertitlehook{}\Etoc@localtable@fcontents}
+ {\let\Etoc@aftertitlehook\etocaftertitlehook\Etoc@localtable@fcontents}}
+\long\def\Etoc@gobbletoetoc@ #1\etoc@ {}
\newcommand\etocsettocstyle[2]{%
\def\Etoc@tableofcontents
-{\ifnum\c@tocdepth>\Etoc@minf
- \let\Etoc@@next\@firstofone\else
- \let\Etoc@@next\@gobble
-\fi
-\Etoc@@next{\etocbeforetitlehook % 1.07m
- \Etoc@storetocdepth % 1.07g
- #1\ifEtoc@parskip\parskip\z@skip\fi %1.07d
- \Etoc@aftertitlehook
- \let\Etoc@savedcontentsline\contentsline
- \let\contentsline\Etoc@etoccontentsline
- \Etoc@toctoc
- \let\Etoc@@next\relax
- \ifEtoc@tocwithid\else
- \ifEtoc@localtoc
+{%
+ \ifnum\c@tocdepth>\Etoc@minf\else
+ \expandafter\Etoc@gobbletoetoc@
+ \fi
+ \etocbeforetitlehook % 1.07m
+ \Etoc@storetocdepth % 1.07g
+ \let\Etoc@savedcontentsline\contentsline % moved up here 1.08
+ \let\contentsline\Etoc@etoccontentsline
+ \ifEtoc@standard
+ \else % moved here from \Etoc@toctoc (1.08)
+ \def\Etoc@levellist@elt####1{\let####1\Etoc@lxyz}%
+ \Etoc@levellist
+ \let\booknumberline\numberline
+ \let\partnumberline\numberline
+ \let\chapternumberline\numberline
+ \fi
+ #1%
+ \ifEtoc@parskip\parskip\z@skip\fi %1.07d
+ \Etoc@aftertitlehook
+ \Etoc@toctoc
+ \ifEtoc@tocwithid\else
+ \ifEtoc@localtoc
\ifEtoc@notactive
- \def\Etoc@@next{\Etoc@localtocfalse
- \global\Etoc@notactivefalse
- \Etoc@toctoc}%
- \fi\fi
+ \Etoc@localtocfalse
+ \global\Etoc@notactivefalse
+ \Etoc@toctoc
+ \fi
\fi
- \Etoc@@next
- \Etoc@resettocdepth % 1.07g
- \etocaftercontentshook
- #2\@nobreakfalse}}} % 1.07d: \@nobreakfalse moved here
+ \fi
+ \etocaftercontentshook
+ #2\@nobreakfalse % 1.07d: \@nobreakfalse moved here
+ \Etoc@resettocdepth % 1.07g. moved here from before #2 by 1.08
+ \ifx\Etoc@global\global\ifx\tof@finish\@empty\else
+ \global\let\contentsline\Etoc@savedcontentsline
+ \fi\fi
+ \@gobble\etoc@
+}% end of \Etoc@tableofcontents definition by \etocsettocstyle
+}
\def\etocsetstyle{\Etoc@standardfalse\etoc@setstyle}
\long\def\etoc@setstyle#1#2#3#4#5{%
-\long\expandafter\def
- \csname Etoc@begin@\csname Etoc@#1@\endcsname\endcsname {#2}%
-\long\expandafter\def
- \csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname {#3}%
-\long\expandafter\def
+ \long\expandafter\def
+ \csname Etoc@begin@\csname Etoc@#1@\endcsname\endcsname
+ {#2\Etoc@global\Etoc@isfirsttrue}%
+ \long\expandafter\def
+ \csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname {#3}%
+ \long\expandafter\def
\csname Etoc@contents@\csname Etoc@#1@\endcsname\endcsname {#4}%
-\long\expandafter\def
- \csname Etoc@end@\csname Etoc@#1@\endcsname\endcsname {#5}}
+ \long\expandafter\def
+ \csname Etoc@end@\csname Etoc@#1@\endcsname\endcsname {#5}%
+}
\def\etocfontminustwo {\normalfont \LARGE \bfseries}
\def\etocfontminusone {\normalfont \large \bfseries}
\def\etocfontzero {\normalfont \large \bfseries}