From 0ed751b519767644acb5a04091a3a91e845d3acf Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 9 Apr 2015 22:39:24 +0000 Subject: etoc (9apr15) git-svn-id: svn://tug.org/texlive/trunk@36752 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/etoc/etoc.dtx | 751 ++++++++++++++------------- 1 file changed, 383 insertions(+), 368 deletions(-) (limited to 'Master/texmf-dist/source/latex/etoc/etoc.dtx') diff --git a/Master/texmf-dist/source/latex/etoc/etoc.dtx b/Master/texmf-dist/source/latex/etoc/etoc.dtx index 0833e571269..2f0abe59445 100644 --- a/Master/texmf-dist/source/latex/etoc/etoc.dtx +++ b/Master/texmf-dist/source/latex/etoc/etoc.dtx @@ -1,13 +1,13 @@ % -*- coding: utf-8; -*- %<*none> -{\def\doctimestamp {Time-stamp: <28-03-2015 10:10:25 CET>}% +{\def\doctimestamp {Time-stamp: <09-04-2015 17:33:38 CEST>}% \def\getdtxtimestamp #1 <#2 #3 #4>{#2 at #3 #4}% \xdef\etocdtxtimestamp {\expandafter\getdtxtimestamp\doctimestamp }}% % %<*!readme> %% %% Package: etoc -%% Version: 1.08b (2015/03/18; doc of 2015/03/28) +%% Version: 1.08d (2015/04/09) %% License: LPPL 1.3c or later (see etoc.dtx) %% Copyright (C) 2012-2015 Jean-Francois Burnol %% @@ -17,9 +17,9 @@ %% % %<*insfile> -\def\etocpkgdate {2015/03/18} -\def\etocdocdate {2015/03/28} -\def\etocpkgversion {v1.08b} +\def\etocpkgdate {2015/04/09} +\def\etocdocdate {2015/04/09} +\def\etocpkgversion {v1.08d} \def\etocpkgdescription {Completely customisable TOCs (jfB)} % %<*none> @@ -36,7 +36,7 @@ \catcode32=13\catcode`\\=12^^Brelax^^A ^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A {% Package: etoc -% Version: 1.08b (2015/03/18; doc of 2015/03/28) +% Version: 1.08d (2015/04/09) % License: LPPL 1.3c or later % Copyright (C) 2012-2015 Jean-Francois Burnol % Copyright (C) 2014-2015 Christine Roemer @@ -71,7 +71,7 @@ %<*readme> - Source: etoc.dtx (v1.08b 2015/03/18; doc of 2015/03/28) + Source: etoc.dtx (v1.08d 2015/04/09) Author: Jean-Francois Burnol Author: Christine Roemer et al. (German tranlation) Info: Completely customisable TOCs @@ -197,6 +197,20 @@ etoc.pdf, etoc-DE.pdf, etoc.dvi, etoc-DE.dvi. RECENT CHANGES ============== +v1.08d \[2015/04/09\] +--------------------- + +Translation into German of the additions made to the documentation +for the 1.08x series of releases. + +Thanks to Christine Römer! + +v1.08c \[2015/03/30\] +--------------------- + +- removed a few unneeded `\long` from the code. +- removed use of `\arabic` at one location of the code, as it may get + redefined by some language modules for `babel` or `polyglossia`. v1.08b \[2015/03/18\] --------------------- @@ -233,7 +247,8 @@ v1.08 \[2015/03/10\] `\etocskipfirstprefix` may now appear anywhere in the `` part of a level style. -New commands `\etociffirst`, `\etocxiffirst`, `\etocxifnumbered`. +New commands `\etociffirst`, `\etocxiffirst`, `\etocxifnumbered`, +`\etocglobaldefs` and `\etoclocaldefs`. It is now possible to issue line style specifications directly with `&` and `\\` tokens, in order to typeset a TOC as a tabular @@ -767,7 +782,7 @@ pdfpagemode=UseOutlines} % Here we can use \partname as we do the documentation for English or German. % Careful with the customization of \partname done by scrdoc class ! \renewcommand{\etocpartname}{\partname} -% see the \AtBeginDocuments with \addto\captionsngerman etc... +% see the \AtBeginDocument with \addto\captionsngerman etc... \ifnum\ForDeutsch=1 \renewcommand*{\etocabbrevpagename}{S.~} @@ -3585,12 +3600,12 @@ conditions and a few caveats: \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. +\item as is explained next, it is recommended to put the + |\\| at the start of the \meta{prefix} or \meta{contents} + specifications in order to close the \emph{previous} row, rather + that at the end with the idea to close the \emph{current} row; + and when the TOC is a partial one (a \csa{localtableofcontents}) this + is (in almost all situations) mandatory. \end{enumerate} Here is an example of a TOC as a |longtable|, as is possible relatively @@ -3674,11 +3689,11 @@ simply now with |1.08|. The code follows. 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 +intuitive, rather last. In some favorable cases (but almost never +for local tables of contents) 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. +specifications. 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 @@ -3691,18 +3706,20 @@ 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. +The safest way is thus to start with an |\\| each line style +specification in order to close the \emph{previous} table row. 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, and it is these +sections which are used to insert the missing |\hline| +(this is done with the help of the \csb{etociffirst} +conditional). + +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 @@ -7630,22 +7647,13 @@ aber es gab Probleme mit den Hyper"=Links. Kein solches Problem entsteht mit |forest| oder mit der nativen Syntax |tikz| für Bäume (die im nächsten Abschnitt dargestellt sind).} -\textbf{UEBERSETZUNG NOETIG} -\begin{otherlanguage}{english} - The commands \csa{etocname}, etc\dots, are robust, it is easier to work with - \csa{etocthelinkednumber}, \csa{etocthelinkedname}, and - \csa{etocthelinkedpage} which contain the same information in an easier - accessible form. -\end{otherlanguage} -% ALT: -% Die Hyper-Link-Informationen von \etoc setzen innen -% \csa{etocname}, etc. \ldots, aber es ist nur ein Zeiger, nicht lagerungsfähig -% für die spätere Verwendung; aber das Paket bietet \csa{etocthelinkednumber}, -% \csa{etocthelinkedname} und \csa{etocthelinkedpage}, deren Inhalte enthalten den -% Hyper-Link in einer Form, die gespeichert und später wiederverwendet werden -% können. - -Aus diesem |forest|"=Baum haben wir ganz besondere \etoc"=Stile für Abschnitte und +Die Befehle \csa{etocname}, etc\dots sind robust. Es ist einfacher +mit \csa{etocthelinkednumber}, \csa{etocthelinkedname} und +\csa{etocthelinkedpage}, das die gleichen Informationen in einer +einfacher zugänglichen Form enthält. + +Aus diesem |forest|"=Baum haben wir ganz besondere \etoc"=Stile +für Abschnitte und Unterabschnitte konzipiert. Sie verwenden ein symbolisches Listenregister mit dem Namen |\treetok| und ein Makro |\appendtotok|, deren Aufgabe es ist, zu einer bestimmten symbolischen Listenvariablen den Inhalt eines Makros als @@ -7998,16 +8006,15 @@ vorherige \hyperref[toc:forest]{Forest-TOC} auch. \section{Das TOC als ein TikZ Mind"=Map} \label{sec:mindmap} -\textbf{UEBERSETZUNG NOETIG} - -\begin{otherlanguage}{english} -This is in the same spirit as the ``molecule'' example. The use of the \eTeX{} -primitive \csa{unexpanded} will simplify the code.\footnote{The ``molecule'' -example was added to this documentation on |2013/03/03|. The ``mindmap'' -example was motivated on |2015/03/11| by -\url{http://tex.stackexchange.com/a/232584/4686}. Further help was then obtained via -\url{http://tex.stackexchange.com/q/232816/4686} and this led to the -\hyperref[toc:mindmaptitlepage]{title page} which is a further example.} +Das ist in dem gleichen Sinn wie das "`Molekül"'-Beispiel. Die +Verwendung des \eTeX -Primitivs-\csa{unexpanded} vereinfacht den +Code.\footnote{das "`Molekül"'-Beispiel wurde am |2015/03/11| in +diese Dokumentation aufgenommen . Das "`Mindmap"''-Beispiel wurde +motiviert von \url{http://tex.stackexchange.com/a/232584/4686}. +Weitere Hilfe kam damals via +\url{http://tex.stackexchange.com/q/232816/4686} und dies führte +zu dem weiteren Beispiel \hyperref[toc:mindmaptitlepage]{title +page}.} \begingroup %\newtoks\treetok @@ -8121,11 +8128,11 @@ example was motivated on |2015/03/11| by \end{figure} \endgroup -It is difficult to get everything to fit on one page. However \csa{resizebox} -comes to the rescue. And it preserves hyperlinks. Nevertheless for this -example I excluded some sections from the display, using the technique of the -\etoc \hyperref[etocdepthtag.toc]{depth tags}. The fully hyperlinked TOC -appears \vpageref{toc:mindmap}. +Es ist schwierig, alles auf eine Seite einzupassen. Da kommt \csa{resizebox} +zur Hilfe, das auch Hyperlings bewahrt. Dennoch habe ich für dieses Beispiel +einige Abschnitte von der Anzeige ausgeschlossen, dafür nehmend die Technik von +\etoc \hyperref[etocdepthtag.toc]{depth tags}. Das vollverlinkte TOC erscheint +hier \vpageref{toc:mindmap}. \begin{verbatim} \begingroup @@ -8241,56 +8248,56 @@ appears \vpageref{toc:mindmap}. \endgroup \end{verbatim} -An interesting alternative is to use \etoc rather to convert the entire TOC -into a TikZ tree (perhaps excluding some parts) and print it out to a file -from which it can be recovered and manipulated directly by the author of the -document. Things written to the |.log| file get broken into lines. Here is a -technique to get non-broken output. Once the \csa{treetok} has been computed -by \etoc (as in the \hyperref[toc:molecule]{molecule} example, or the current -example), this code snippet will write it out to file with extension -|.toctree|: +Eine interessante Alternative zur Verwendung von \etoc ist, das +gesamte TOC in einen TikZ-Baum zu konvertieren (vielleicht mit +Ausnahme einiger Teile) und in eine Datei zu drucken, von der es +zurückgewonnen und durch den Autor direkt bearbeitet werden kann. +Dinge, stehend in der |.log|-Datei, verschaffen zerbrochene +Zeilen. Hier gibt es eine Technik, um zu nicht zerbrechenden +Zeilen zu kommen. Sobald \csa{treetok} von \etoc berechnet wurde +(wie im \hyperref[toc:molecule]{molecule}-Beispiel oder dem +aktuellen Beispiel), wird dieses folgende Code-Schnipsel +ausgegeben zur Dateierweiterung \begin{verbatim} \newwrite\TOCasTree \immediate\openout\TOCasTree=\jobname.toctree \immediate\write\TOCasTree{\the\treetok}% \end{verbatim} -The author can then copy it from there and customize it manually to get a -suitable tikz picture. - -\end{otherlanguage} +Der Autor kann sie von dort aus kopieren und +manuell anpassen, um ein geignetes TikZ-Bild zu erhalten. \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: +Mit der Veröffentlichung-|1.08| ist es einfacher geworden, das TOC +als Tabelle zu setzen. Es ist nun möglich, eine Tabelle im +Titel-Teil des TOC zu eröffnen (das erste Argument zu +\csb{etocsettocstyle}) und zu schließen nach dem Inhalt (zweites +Argument von \csb{etocsettocstyle}) und es ist auch möglich, +Linienstile wie in Tabularen |&| und Tabellen am Ende der Zeilen +|\\| zu nehmen. Es gibt einige Bedingungen und ein paar +Einschränkungen: \begin{enumerate} -\item it is mandatory to issue \csb{etocglobaldefs} for \etoc's - definitions to have global scope, -\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 +\item Es ist notwendig, \csb{etocglobaldefs} auszugeben für + \etoc-Definitionen, um einen globalen Skopus zu haben. +\item Es ist unmöglich, mit einer \meta{start}-, \meta{prefix}-, + \meta{contents}- oder \meta{finish}-Spezifikation mit einer + einzigen |\hline| zu beginnen, \emph{d.\,h.} eine nicht mit einem + |\\| vorausgehende (es ist aber möglich zu setzen |\\| am Ende + eines \meta{prefix} und von |\hline| am Beginn von \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. +\item So ist als nächstes zu erläutern, dass es empfehlenswert + ist, |\\| am Beginn der \meta{prefix}- oder + \meta{contents}-Spezifikationen zu verwenden, um die + \emph{vorherige} Reihe abzuschließen, nicht um die \emph{aktuelle} + Reihe zu beenden; wenn das TOC ein partielles (ein + \csa{localtableofcontents}) ist, wird dieser Ratschlag zur Pflicht + (in fast allen Situationen). \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} +Hier ein Beispiel eines TOCs als ein |longtable|. \begingroup \etocglobaldefs @@ -8325,11 +8332,10 @@ simply now with |1.08|. The code follows. \endgroup \begin{verbatim} -UEBERSETZUNG NOETIG \begingroup -\etocglobaldefs % necessary for \etocname etc... to survive & +\etocglobaldefs % notwendig für \etocname etc... um zu überleben & -% observe the locations of the \\ +% Beachten Sie die Positionierung der \\ \etocsetstyle{part} {} {\\\hline} @@ -8366,51 +8372,51 @@ UEBERSETZUNG NOETIG \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}. +Beim Untersuchen des Codes wird sich der Leser fragen, warum die +|\\| immer zuerst in \meta{prefix+contents} und nicht, wie es +intuitiver ist, ziemlich später gegeben wird. In vielen Fällen +kann man in der Tat die TOC-als-Tabellen mit |\\|, die am Ende der +Stilspezifikationen lokalisiert sind (aber fast nie für ein +\csa{localtableofcontents}) konstruieren. Das Problem bei dem +vorhergehenden Beispiel war die Positionierung der |\hline|'s. + +Aufgrund der technischen Aspekte, wie \TeX{} die Ausrichtung jeder +Definition oder Festsetzung definiert, nach einem |\\| beginnt +eine neue Reihe und so erzeugt |\hline| ein illegales Token (das +sieht aus wie ein |misplaced \noalign| Fehler). \etoc hat nicht +nur solche Definitionen um \csb{etocname} etc. \ldots{} zu +konstruieren, sondern es ist auch der Fall, dass einige Pakete +Dinge in die |.toc|-Datei tun und in der Folge gibt es keine +Garantie dafür, dass zwischen zwei \csa{contentsline} kein solches +Token wie |\relax| ist, wie in den Kontexten von "`alignments +forces"' macht es \TeX{} unmöglich, um eine Zelle zu beginnen, +dann setzen Sie eine |\hline|. + +Der sicherste Weg ist, jede Linienspezifikation zu beginnen mit +einem |\\|. Wir hatten ein kleines Problem mit dem Fakt, dass wir +Teile wollten, die nicht nur eine Regel darüber haben (einfach, +sie machen |\\\hline|), sondern auch darunter: Nach jedem Teil ist +ein Abschnitt, und es sind diese Abschnitte, die verwendet werden, +um die fehlende |\hline| einzufügen (dies wird unter Vorbehalt mit +Hilfe der \csb{etociffirst}-Bedingung getan). + +Der aufmerksame Leser wird eine letzte Feinheit bemerken: Dem +Titel, so wurde vermutet, sollten nicht eine sondern zwei +|\hline|'s folgen. Um dieses Problem zu lösen, könnten wir ein +einmaliges Makro verwenden, das sich redefiniert, aber wir +bemerkten, dass dem Titel ein nicht nummeriertes Abstrakt folgte, +mit dem \csb{etocifnumbered}-Schalter kam die Rettung. + +Eine letzte technische Anmerkung: Weil wir |\\| in die Äste setzen +setzen, bestand keine Notwendigkeit, die erweiterten Varianten +\csb{etocxiffirst} und \csb{etocxifnumbered} einzustellen. + +Für die Hardliner ist der alte Weg zur Erlangung des exakt +gleichen Resultats hier zu sehen \autoref{ssec:tocastableold}. + +Hier ist auch ein viel einfacheres Beispiel. Es ist ein lokales +Inhaltsverzeichnis. -Here is also a much simpler example. It is a local table of -contents. -\end{otherlanguage} \begin{center} \etocsetstyle{section} @@ -8458,27 +8464,30 @@ contents. \label{etocglobaldefs} \label{etoclocaldefs} -\textbf{UEBERSETZUNG NOETIG} +In \LaTeX{} verschwindet die Bedeutung eines Befehls, definiert +via |\newcommand\foo{...}| in einer Umgebung (oder Gruppe), vom +\TeX-Speicher beim Austritt aus dieser Umgebung (oder Gruppe). +Manchmal ist es jedoch erforderlich, Definitionen mit globaler +Reichweite zu geben, für diese hat \TeX{} primitive Präfixe +|\global|. -\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|. +Standardmäßig sind die \etoc-Definitionen von \csb{etocname} etc. +\ldots{} lokal, Dies verursacht Probleme in bestimmten +Zusammenhängen, nicht nur wie hier bei TOCs als Tabellen, sondern +auch mit |enumitem|-\emph{inline}-Varianten der +Standardumgebungen, weil der Befehl |\item| dann eine Gruppe +schließt. -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. +Nach \csb{etocglobaldefs} wird \etoc seine Definitionen von +\csb{etocname} etc. \ldots{} vornehmen, sie haben eine globale +Reichweite. Für den normalen Gebrauch ist das nicht notwendig. Es +tut nicht weh, beides systematisch zu aktivieren. -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. +Um zur Standardeinstellung zurückzukehren, nehmen Sie +\csb{etoclocaldefs}. Beachten Sie, dass beide, +\csb{etocglobaldefs} and \csb{etoclocaldefs}, lokal für die +Umgebung oder Gruppe sind, in der sie verwendet werden. -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 @@ -8621,30 +8630,23 @@ Option \emph{linktoc=all} übergeben wurde). \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. +Der gewählte |subsubsection|-Stil machte dies, angewiesen von dem +Befehl \csb{etocskipfirstprefix}, der \etoc befielt, für den +ersten Punkt \emph{nicht} den angepassten \meta{prefix}-Code zu +nehmen. \footnote{Mit der Version vor |1.08| musste es das letzte +Zeichen im \meta{start}-Code sein. Es kann dort nun überall +erscheinen.} -\textbf{UEBERSETZUNG NOETIG} +Der Befehl \csb{etociffirst}\marg{YES CODE}\marg{NO CODE} (neu mit +|1.08|) ist eine flexiblere Möglichkeit, die \meta{prefix}- (und +\meta{contents})-Spezifikationen anzupassen. Er führt die +\meta{YES CODE}-Verzweigung aus, wenn dies die erste Einheit auf +dieser Ebene (innerhalb einer Unterstufe) ist und \meta{NO CODE}, +wenn nicht. Dies ist ein robuster Befehl, der Erweiterungen +(beispielsweise in einem |enumitem|-Label) überlebt. -\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} +Die Variante \csb{etocxiffirst} macht das Gleiche, aber sie ist +erweiterbar. \subsection{Der \csbhyp{etocnumber}"=Befehl} @@ -8703,12 +8705,8 @@ Paket"=Stil für die "`subsections"' erwartet dann `im Vertikal"=Modus' zu start 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} +Der Befehl \csb{etocifnumbered} ist robust; \csb{etocxifnumbered} +(neu für |1.08|) hat den gleiche Effekt, aber er ist expandierbar. \subsection{Die Befehle \csbhyp{etocthename}, \csbhyp{etocthenumber} sowie \csbhyp{etocthepage}} @@ -8767,12 +8765,9 @@ Ebenfalls bereit gestellt mit ähnlichen Funktionen: \csa{etocthelinkednumber}, zu dieser Seitenzahl hinzugefügt hat) und \csa{etocthelink}\marg{linkname}, welches es erlaubt einen Link mit einem beliebigen Name zu erstellen. -All diese Befehle sind \emph{nicht} robust. -\textbf{UEBERSETZUNG NOETIG} -\begin{otherlanguage}{english} - In fact starting with |1.08a|, \csa{etocname} -is exactly the robust variant of \csa{etocthelinkedname}. -\end{otherlanguage} +All diese Befehle sind \emph{nicht} robust. In der Tat wurde mit +|1.08a| \csa{etocname} als robuste Variante von +\csa{etocthelinkedname} gestartet. Veralteter Beispiel\begingroup\ \etocsetstyle {section} @@ -9191,16 +9186,14 @@ berücksichtigt werden. \subsubsection{Die Befehle \csbhyp{etocarticlestyle}, \csbhyp{etocbookstyle}, \dots} -\textbf{UEBERSETZUNG NOETIG} -\begin{otherlanguage}{english} - These are the commands used internally by \etoc in compatibility mode - depending on the document class. For example \csa{etocarticlestyle} uses - |\section*{\contentsname}| (and puts marks in the page) whereas - \csa{etocbookstyle} uses |\chapter*{\contentsname}|. It can prove useful to - issue \csa{etocarticlestyle} for a \csa{localtableofcontents} inside a - chapter, in |book| class and compatibility mode for the global TOC display - style. -\end{otherlanguage} +Dies sind Befehle, die abhängig von der Dokumentenklasse intern +von \etoc im Kompatibilitätsmodus verwendet werden. Beispielsweise +nimmt \csa{etocarticlestyle} |\section*{\contentsname}| (und setzt +Markierungen in die Seite), während \csa{etocbookstyle} +|\chapter*{\contentsname}| nimmt. Es kann nützlich sein, +\csa{etocarticlestyle} für ein \csa{localtableofcontents} in der +|book|-Klasse und im Kompatibilitätsmodus für den globalen +TOC-Anzeige-Stil zu nehmen. \subsection{Der Befehl \csbhyp{etocinline}} \label{etocinline} @@ -9582,9 +9575,10 @@ weniger Platz einnimmt als der Paketstandard. Standardlinienstil von \etoc nutzt, wobei die Abschnitte wie Kapitel und die Unterabschnitte wie Abschnitte gesetzt wurden. }}} \etocdefaultlines -\renewcommand{\etocpartname}{\partname}% UEBERSETZUNG NOETIG -% <1.08b had \partname by default but this does not work well with frenchb -% hence the default is now simply Part. Here we can use \partname or Teil. +\renewcommand{\etocpartname}{\partname}% +% <1.08b hat \partname als Standard, aber dies arbeitet nicht gut mit frenchb +% daher ist der Standard jetzt nun einfach Teil. Für die deutsche Sprache +% können wir \partname oder Teil nehmen. \etocsetnexttocdepth{1} \begingroup \etocsetlevel{section}{0} @@ -9655,9 +9649,9 @@ bequem mittels \csa{renewcommand} anpassen: {\hbox{\normalfont\normalsize\hbox to 2ex {\hss.\hss}}} \newcommand*\etocabbrevpagename{p.~} % muss der Sprache angepasst werden % deutsche Nutzer: \renewcommand*\etocabbrevpagename{S.~} -\newcommand*\etocpartname{Part} % prior to v1.08b, was \partname -% but this didn't make sense e.g. with babel+frenchb whose \frenchpartname -% takes into account the value of the part counter. UEBERSETZUNG NOETIG. +\newcommand*\etocpartname{Part} % früher, vor v1.08b, war \partname +% aber dies macht keinen Sinn, z.\,B. mit babel+frenchb deren \frenchpartname +% nimmt in den Account den Wert des Teilzählers. \newcommand*\etocbookname{Book} % muss der Sprache angepasst werden \end{verbatim} @@ -10281,74 +10275,48 @@ es kann leicht recycelt) erhalten wir: \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. - -Note: rather than |\toks| registers it would be easier here to use \eTeX{} -\csa{unexpanded} primitive. See for example \autoref{sec:mindmap}. -\end{otherlanguage} +Aufgrund, unter anderem, der Tatsache, dass die Ausrichtung Zellen +kreiert und Gruppen schließt und dass durch standardmäßige +Definitionen von \csb{etocname}, \csb{etocnumber} und +\csb{etocpage} durch \etoc lokal sind, war es nicht leicht, ein +TOC als Tabelle mit \etoc zu setzen, vor der Freigabe von Version +|1.08|. + +Nicht nur \csb{etocname} etc. \ldots{} verursachte ein Problem, +sondern auch die grundlegende Redefinition von \csa{contentsline}, +die von \etoc erst nach dem ersten Argument von +\csb{etocsettocstyle} gemacht wurde, ist beseitigt worden; +folglich, wenn dieses Argument in einer Tabelle geöffnet wurde, +würde die \etoc-Redefinition von \csa{contentsline} in der ertsen +Zelle der ersten Reihe durchgeführt werden und danach verloren +gehen. + +So musste man auf die Technik zurückgreifen, die in +\autoref{tocastree} erklärt wurde, auf die Verwendung der +Festlegung von \csa{tableofcontents} als eine Möglichkeit, Daten +zu speichern, die später gezeigt wurde. + +Für das Protokoll, dies ist, wie das TOC in +\autoref{sec:tocastable} in der Vergangenheit codiert wurde. Hier +haben wir nicht das Problem mit der Positionierung der |\hline|s; +wir sind konfrontiert mit dem neueren Verfahren. Andererseits +müssen wir Zeichenregister manipulieren, die den meisten \LaTeX +-Nutzern nicht bekannt sind (Makros könnten verwendet werden, doch +das würde umständlich sein, außer vielleicht mit Hilfe von \eTeX{} +\csa{nicht expandiert}). + +Die Methode hier ist die stärkste, weil sie aus der |.toc|-Datei +nur die Daten herausfiltert, die wir wollen (die anderen Dinge +werden nicht ignoriert, sie werden ausgeführt, jedoch ohne +hoffentlich Chaos zu schaffen; typisch sind dafür die Sprache von +Anleitungen zu ändern oder Updates von bestimmten Schaltern +(counters), etc. \ldots ). Und wir sind weniger anfällig, +potentielle Opfer von verschiedenen Fallen bei externen Makros +innerhalb der |.toc|-Datei aus anderen Paketen stammend. + +Hinweis: Anstatt |\toks|-Register wäre es hier einfacher, \eTeX{} +zu verwenden, \csa{ nicht expandierte} Primitive. Sehen Sie dazu +zum Beispiel \autoref{sec:mindmap}. \begin{verbatim} @@ -10425,14 +10393,13 @@ Speicher von \etoc getan, bei |\begin{document}|. \footnote{Neu mit |1.07m|. \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} + +\etoc erfordert von der |.toc|-Datei, das |\contentsline|-Makro zu +verwenden (möglicherweise von anderen Paketen belegt). So ist es +inkompatibel mit der |beamer|-Klasse. Wie auch immer, wenn +|beamer|im article-Modus verwendet wird, d.\,h. die article-Klasse +in Verbindung mit dem |beamerarticle|-Paket, dann sollte \etoc +arbeiten. Es ist |hyperref| bekannt und hoffentlich kompatibel mit ihm: die Macros \csa{etocname}, \csa{etocnumber} und \csa{etocpage} enthalten die @@ -10505,23 +10472,23 @@ 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. -\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} +Es ist möglich, \etoc und {\color{niceone}|tableof|} +\footnote{\url{http://ctan.org/pkg/tableof}} gleichzeitig zu +verwenden. Die Veröffentlichung |1.08| von \etoc benötigt +mindestens die Version|1.4a| von |tableof|. Wenn man +\csb{etocglobaldefs} in die Präambel aufgenommen hat, muss dies +nach dem Laden des Pakets |tableof| sein. Der +{\color{niceone}|tableof|}-Befehl \csa{nexttocwithtags} sollte, +wie erwartet, funktionieren. + +Die {\color{niceone}|tableof|}-Befehle \csa{tableof}, +\csa{tablenotof}, \ldots{} werden das Inhaltsverzeichnis (a priori +global) nach den Standards der Dokumentklasse setzen, gehorchend +den \etoc-Tiefenauszeichnungen, wie erklärt in der +|tableof|-Dokumentation, sie setzen keinen TOC-Titel. Sie sollten +\emph{nicht} verwendet werden im Fall, wenn |tableof| vorher +ausgegeben wurde; es sei denn, ihr Skopus wurde da beendet oder +\csb{etoclocaldefs} hat seine Einflussnahme abgebrochen. \subsection{\TeX -nische Sachen} @@ -10619,6 +10586,7 @@ Paketversion ist \texttt{\etocDEpkgversion} von \texttt{\etocDEpkgdate}. % plus de mark-up cependant \catcode`\~\z@ \footnotesize\normalfont\baselineskip10pt\relax + \def\v{\vskip\baselineskip v}% ajouté 2015/05/09; faudra trouver mieux. \frenchspacing \obeyspaces \jf@xverbatim } \begingroup @@ -10642,20 +10610,40 @@ Paketversion ist \texttt{\etocDEpkgversion} von \texttt{\etocDEpkgdate}. \begin{multicols}{2} \begin{jfverbatim} -v1.08b [2015/03/18]^ +v1.08d [2015/04/09]^ + + Translation into German of the additions made to the documentation + for the 1.08x series of releases. + + Thanks to Christine Römer! + + +~v1.08c [2015/03/30]^ + + - removed a few unneeded \long from the code. + + - removed use of \arabic at one location of the code, as it may get + redefined by some language modules for babel or polyglossia. + + +~v1.08b [2015/03/18]^ Bug fixes: + - extra space token removed from `\localtableofcontents` (showed only for inline TOCs.) + - \etocpartname (a macro used by the package own default line styles) was defined to be \partname, but this is not compatible at least with babel+french context. Now simply expands to Part. + - some problems fixed in the German documentation. + - [2015/03/28] some more problems fixed in the documentation. Added mention of \etocarticlestyle and \etocbookstyle. -v1.08a [2015/03/13]^ +~v1.08a [2015/03/13]^ \etocname, \etocnumber and \etocpage are now the robust variants of \etocthelinkedname, \etocthelinkednumber and @@ -10670,12 +10658,13 @@ v1.08a [2015/03/13]^ manner. -v1.08 [2015/03/10]^ +~v1.08 [2015/03/10]^ \etocskipfirstprefix may now appear anywhere in the part of a level style. - New commands \etociffirst, \etocxiffirst, \etocxifnumbered. + New commands \etociffirst, \etocxiffirst, \etocxifnumbered, + \etocglobaldefs and \etoclocaldefs. It is now possible to issue line style specifications directly with & and \\ tokens, in order to typeset a TOC as a tabular @@ -10692,7 +10681,7 @@ v1.08 [2015/03/10]^ improved. -v1.07n [2015/03/05]^ +~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 @@ -10703,7 +10692,7 @@ v1.07n [2015/03/05]^ order. -v1.07m [2015/01/23]^ +~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 @@ -10714,7 +10703,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 @@ -10726,7 +10715,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 @@ -10736,32 +10725,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 @@ -10790,13 +10779,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. @@ -10807,13 +10796,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. @@ -10821,7 +10810,7 @@ v1.07b [2013/02/02]^ Additional examples in the documentation. -v1.07 [2013/01/29]^ +~v1.07 [2013/01/29]^ New commands: @@ -10838,7 +10827,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 @@ -10847,7 +10836,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). @@ -10856,7 +10845,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: @@ -10868,7 +10857,7 @@ v1.04 [2012/11/24]^ \tableofcontents \ref{toc:1} -v1.02 [2012/11/18]^ +~v1.02 [2012/11/18]^ Initial version. @@ -10944,6 +10933,23 @@ v1.02 [2012/11/18]^ \fi \end{document}} +% 9 avril 2015 (1.08d) pour forcer indentation après macrocode +% par un effet particulier si avant macrocode un enumerate, inefficient, +% mais vraiment pas envie d'investiguer. +% +% l'esthétique est un peu douteuse mais je laisse ? + +% non finalement je supprime + +% \makeatletter +% \def\endmacrocode{% +% \ifpm@module \endgroup \pm@modulefalse \fi +% \everypar{}% +% \global\@inlabelfalse +% \endtrivlist\@endpefalse % <<-- ajouté +% \close@crossref} +% \makeatother + % November 2012 % I don't want to have to type at this location (far from the top of the @@ -11241,8 +11247,9 @@ v1.02 [2012/11/18]^ \fi } % \end{macrocode} -% Heart of \etoc hack into execution of |.toc| file. It MUST be the case -% that the file contains |\contentsline {}...| instructions, with +% Heart of \etoc hack into execution of |.toc| file. The |.toc| +% file must contain (at least indirectly via expansion) +% |\contentsline {}...| 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| @@ -11258,7 +11265,7 @@ v1.02 [2012/11/18]^ % |\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 +% line. But this made it impossible for me to execute things after the % |begin| parts. % % Executing stuff before |begin| is now a potential problem because the user @@ -11282,7 +11289,7 @@ v1.02 [2012/11/18]^ % \begin{macrocode} \def\etocskipfirstprefix {\global\Etoc@skipprefixtrue } % \end{macrocode} -% |2015/03/08| Let's record that |\Etoc@level| used to be called +% |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 @@ -11423,21 +11430,19 @@ v1.02 [2012/11/18]^ \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, prefixing it with \csa{leavevmode}. The included +% \csa{Hy@tocdestname} is (was, see below |1.07f| and |1.08a|) left +% unexpanded. We have to spend some time with delimited macros to dis-entangle +% the |.toc| data, and reconstruct the possible |hyperref| data. If the page +% number is not hyperlinked, \csa{etocpage} does \emph{not} add the link found +% possibly in the name. % -% Up to |1.06| \etoc defined only \csa{etocname}, \csa{etocnumber} and -% \csa{etocpage}. The |hyperref| added data is recycled in the simplest manner, -% prefixing it with \csa{leavevmode}. The included \csa{Hy@tocdestname} is left -% unexpanded. We have to spend some time with delimited macros to -% dis-entangle the |.toc| data, and reconstruct the possible |hyperref| -% data. If -% the page number is not hyperlinked, \csa{etocpage} does \emph{not} add the -% link found possibly in the name. -% -% Then |1.07| added \csa{etocthename}, \csa{etocthenumber}, \csa{etocthepage} -% which are left fragile and do not have the links data, and -% \csa{etoclink}\marg{linkname} which is robust and reconstructs an arbitrarily -% named link. +% |1.07| adds \csa{etocthename}, \csa{etocthenumber}, \csa{etocthepage} which +% are left fragile and do not have the links data, and +% \csa{etoclink}\marg{linkname} which is robust and reconstructs an +% arbitrarily named link. % % A need (for things like building up a token list to be used in a % |tikzpicture|) arose later to have some form of the link which could be @@ -11447,23 +11452,23 @@ v1.02 [2012/11/18]^ % \csa{etocthelinkednumber}, \csa{etocthelinkedpage}, \csa{etocthelink}: they % use \csa{hyperlink} with an expanded \csa{Hy@tocdestname}. % -% |1.08a|: I delayed from |2013/03/07| to release |1.08a| of |2015/03/13| the -% obvious decision to convert \csa{etocname}, etc ... to be the robust -% versions of \csa{etocthelinkedname}, etc ..., for sentimental reason. But -% the earlier variants contained the hyperref destination in unexpanded form. -% % |1.07f| also adds \csa{leavevmode} to \csa{etoclink} which % should have been done earlier, as it was included in \csa{etocname} etc... -% -% attention, \csa{@namedef}|{A}{B}| and not \csa{@namedef}|{A} {B}| !! +% attention, \csa{@namedef}|{A}{B}| and not \csa{@namedef}|{A} {B}| !! % 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. +% |1.08| adds |\Etoc@global| prefix (|2015/03/09|). % -% |2015/03/13|: |1.08a| drops the original constructions of |\etocname| etc... -% which contained an unexpanded hyperref destination. +% |1.08a| drops the original constructions of |\etocname| etc... The obvious +% decision to convert \csa{etocname}, etc ... to be the robust versions of +% \csa{etocthelinkedname}, etc ... was delayed two years (from |1.07f +% 2013/03/07| to |1.08a 2015/03/13|) for sentimental reason. But the original +% versions contained the hyperref destination only in unexpanded form, this +% forced to use \csa{etocthelinkedname}, etc... in cases when the thing had to +% be stored for delayed use. Now the user can do this directly with +% \csa{etocname}, \csa{etocnumber}, \csa{etocpage}. % \begin{macrocode} \def\Etoc@lxyz #1#2{% \Etoc@global\@namedef {etoclink }{\leavevmode}% fall-back @@ -11723,7 +11728,8 @@ v1.02 [2012/11/18]^ % \end{macrocode} % Slightly better coded in |1.08b|. Had some bad experiences with TeX % conditionals back in 2011/2012 when I started LaTeX programming, and the -% code was a remnant of extra cautious attitude. +% code was a remnant of extra cautious attitude. Also, now +% \csa{etoc@@startlocaltoc} is expandable if it does nothing. % \begin{macrocode} \def\etoc@@startlocaltoc#1#2{% \ifEtoc@localtoc @@ -11831,6 +11837,12 @@ v1.02 [2012/11/18]^ \fi\fi\fi\Etoc@next} % \end{macrocode} % |1.07g| for consistency Etoc@ prefix added. +% +% |1.08c| does not use |\arabic| in the |\addtocontents| since I have seen +% that in some circumstances (for some right to left languages with +% polyglossia or babel), one can not rely on |\arabic| having its default +% definition. As the number written here will be used later in an \csa{ifnum}, I +% should not have used it in the first place (done |2015/03/30|). % \begin{macrocode} \def\Etoc@table@fcontents{% \refstepcounter{etoc@tocid}% @@ -11838,7 +11850,7 @@ v1.02 [2012/11/18]^ \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} \def\Etoc@localtable@fcontents{% \refstepcounter{etoc@tocid}% - \addtocontents{toc}{\string\etoc@startlocaltoc{\arabic{etoc@tocid}}}% + \addtocontents{toc}{\string\etoc@startlocaltoc{\the\c@etoc@tocid}}% \Etoc@tocwithidtrue \futurelet\Etoc@nexttoken\Etoc@t@bleofcontents} % \end{macrocode} @@ -11855,11 +11867,11 @@ v1.02 [2012/11/18]^ \Etoc@par \begingroup % closed in \Etoc@t@bleofcontents or \Etoc@localtableofcontents % \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{}{}|. +% No need for the |tableof| extra group level, even it is better to get rid of +% it. I don't globally cancel |\tof@begingroup| and |\tof@endgroup| to leave +% open for the user the (dubious) possibility of using directly |\tableof|, +% |\tablenotof| (rather than only the reasonable thing which is +% |\nexttocwithtags{}{}|). % \begin{macrocode} \let\tof@begingroup\@empty \let\tof@endgroup \@empty @@ -11943,19 +11955,22 @@ v1.02 [2012/11/18]^ }% 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. +% |1.08| hacks the begin parts to update therein the |\ifEtoc@isfirst| flag +% (|2015/03/09|). +% +% |1.08c| removes unneeded |\long| from the |\def|'s inside |\etoc@setstyle| +% (|2015/03/29|). % \begin{macrocode} \def\etocsetstyle{\Etoc@standardfalse\etoc@setstyle} \long\def\etoc@setstyle#1#2#3#4#5{% - \long\expandafter\def + \expandafter\def \csname Etoc@begin@\csname Etoc@#1@\endcsname\endcsname {#2\Etoc@global\Etoc@isfirsttrue}% - \long\expandafter\def + \expandafter\def \csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname {#3}% - \long\expandafter\def + \expandafter\def \csname Etoc@contents@\csname Etoc@#1@\endcsname\endcsname {#4}% - \long\expandafter\def + \expandafter\def \csname Etoc@end@\csname Etoc@#1@\endcsname\endcsname {#5}% } % \end{macrocode} @@ -12772,7 +12787,7 @@ v1.02 [2012/11/18]^ Grave accent \` Left brace \{ Vertical bar \| Right brace \} Tilde \~} -\CheckSum{3028} +\CheckSum{3025} \csname check@checksum\endcsname \Finale -- cgit v1.2.3