summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx')
-rw-r--r--macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx545
1 files changed, 265 insertions, 280 deletions
diff --git a/macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx b/macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx
index d5e1f14710..4da01b388d 100644
--- a/macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx
+++ b/macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% ======================================================================
% scrkernel-tocstyle.dtx
-% Copyright (c) Markus Kohm, 2015-2020
+% Copyright (c) Markus Kohm, 2015-2021
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
@@ -19,7 +19,7 @@
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% scrkernel-tocstyle.dtx
-% Copyright (c) Markus Kohm, 2015-2020
+% Copyright (c) Markus Kohm, 2015-2021
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
@@ -54,7 +54,7 @@
% Right brace \} Tilde \~}
%
% \iffalse
-%%% From File: $Id: scrkernel-tocstyle.dtx 3507 2020-06-11 14:57:03Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3613 2021-07-15 12:25:10Z kohm $
% The runs of run-time file generation:
%<preidentify>%%% (run: preidentify)
% - everything that is needed before selfidentification of resulting files
@@ -79,9 +79,9 @@
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
\def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2020-06-11 16:57:03 +0200 (Thu, 11 Jun 2020) $
+ \filedate$Date: 2021-07-15 14:25:10 +0200 (Thu, 15 Jul 2021) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3507 $
+ \filerevision$Revision: 3613 $
\edef\reserved@a{%
\noexpand\endgroup
\noexpand\ProvidesFile{scrkernel-tocstyle.dtx}%
@@ -91,12 +91,12 @@
\reserved@a
% \iffalse
\documentclass[parskip=half-]{scrdoc}
-\usepackage[english,ngerman]{babel}
+\usepackage[main=english,ngerman]{babel}
\CodelineIndex
\RecordChanges
\GetFileInfo{scrkernel-tocstyle.dtx}
\title{\KOMAScript{} \partname\ \texttt{\filename}%
- \footnote{Dies ist Version \fileversion\ von Datei
+ \footnote{This is version \fileversion\ of file
\texttt{\filename}.}}
\date{\filedate}
\author{Markus Kohm}
@@ -109,46 +109,42 @@
%</dtx>
% \fi
%
-% \selectlanguage{ngerman}
-%
-% \section{Verzeichnisstile}
+% \selectlanguage{english}
+% \section{Directory Styles}
%
-% Verzeichnisstile werden derzeit nur in Kooperation mit Gliederungsstilen
-% untersützt. In Zukunft soll das aber mal anders werden. Dann sollen
-% Verzeichnisstile Teil der Grundfunktionalität für Verzeichnisse (Paket
-% \textsf{tocbasic}) werden und auch unabhängig von Gliederungsstilen
-% einsetzbar sein.
+% Directory (or ToC) styles are provided in cooperation with sectioning
+% styles. But they are also part of the basic functions of directories aka
+% tables or lists of contents. In \KOMAScript{} this is handled by package
+% \Package{tocbasic}. See the \KOMAScript{} manuals for more information.
%
% \StopEventually{\PrintIndex\PrintChanges}
%
-% \changes{v3.20}{2015/11/13}{neu und nur bei Vorhandensein verwendet}
+% \changes{v3.20}{2015/11/13}{new}
%
%
-% \subsection{Einstellungen unabhängig von Verzeichnisstilen und doch
-% Grundlage für diese}
+% \subsection{Settings independent from directories but nevertheless basis for
+% them}
%
-% Bis \KOMAScript~3.20 waren die Befehle, die hier definiert werden, Teil der
-% KOMA-Script-Klassen. Allerdings zeigt sich, dass es für die Definition von
-% Verzeichnisstilen von Vorteil ist, wenn diese Definitionen im Paket
-% vorhanden sind.
+% Before \KOMAScript~3.20 the commands here were part of the \KOMAScript{}
+% classes. But now they are part of package \Package{tocbasic}, because they
+% are more basic than only to be used by the \KOMAScript{} classes.
%
% \iffalse
%<*package>
% \fi
%
% \begin{macro}{\numberline}
-% \changes{v3.20}{2016/03/10}{\cs{numberline} wird indirekt über
-% \cs{scr@numberline} definiert}%^^A
+% \changes{v3.20}{2016/03/10}{\cs{numberline} defined indirectly by
+% \cs{scr@numberline}}
% \begin{macro}{\scr@numberline}
-% \changes{v2.3c}{1995/08/06}{\cs{numberline} umdefiniert}%^^A
-% \changes{v3.06}{2010/05/18}{Verwendung von \cs{numberline@prefix} und
-% \cs{numberline@postfix}}%^^A
+% \changes{v2.3c}{1995/08/06}{\cs{numberline} redefined}
+% \changes{v3.06}{2010/05/18}{Usage of\cs{numberline@prefix} and
+% \cs{numberline@postfix}}
% \changes{v3.12}{2013/11/22}{use \cs{numberline@numberformat} only, if the
-% argument expands to a non-empty string}%^^A
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A
-% Dieses Makro wird indirekt im Inhaltsverzeichnis verwendet und muss
-% umdefiniert werden, um Duden, 20.~Auflage, Regel~5 und Regel~6 zu
-% implementieren.
+% argument expands to a non-empty string}
+% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed into \cs{Ifstr}}
+% This macro is used indirectly in the ToC and has to be redefined to fulfil
+% rules~5 and 6 of DUDDEN, 20th edition.
% \begin{macrocode}
%<*body>
\newcommand*{\scr@numberline}[1]{%
@@ -162,11 +158,10 @@
}
% \end{macrocode}
% \begin{macro}{\usetocbasicnumberline}
-% \changes{v3.20}{2016/03/15}{neu}%^^A
-% Dieses Makro testet, ob \cs{numberline} auf \cs{scr@numberline}
-% basiert. Falls das nicht der Fall ist, führt es das optionale Argument aus
-% und führt dann eine entsprechende Umdefinierung statt. Falls es jedoch der
-% Fall ist, lässt es alles unverändert.
+% \changes{v3.20}{2016/03/15}{new}
+% The macro tests, whether \cs{numberline} used \cs{scr@numberline}. If not,
+% the optional argument is executed and a afterwards \cs{numberline} is
+% redefined.
% \begin{macrocode}
\newcommand*{\usetocbasicnumberline}[1][%
\PackageInfo{tocbasic}{Using my definition of `\string\numberline'}%
@@ -175,9 +170,9 @@
\begingroup
\def\scr@numberline##1{\global\@tempswafalse}%
% \end{macrocode}
-% \cs{@tempdima} ist üblicherweise bei \cs{numberline} die Breite der Nummer.
-% Damit zu kleine Werte nicht zu einem Problem werden können, nehme ich hier
-% gleich mal einen richtig großen Wert.
+% For \cs{numberline} \cs{@tempdima} usually is the width reserved for the
+% number. To avoid problems with to low values, we use the maximum value for
+% the test.
% \begin{macrocode}
\@tempdima\maxdimen
\sbox\@tempboxa{\numberline{0}}%
@@ -187,58 +182,55 @@
% \end{macrocode}
% \end{macro}%^^A \usetocbasicnumberline
% \begin{macro}{\numberline@prefix}
-% \changes{v3.06}{2010/05/18}{neu (intern)}%^^A
-% Das ist in der Voreinstellung einfach leer. Es könnte verwendet werden, um
-% etwas vor die Nummer zu setzen oder die Nummer rechtsbündig zu setzen.
+% \changes{v3.06}{2010/05/18}{new (internal)}
+% The default is just empty. It can be used, e.g., to print something before
+% the number or to make the number right aligned.
% \begin{macrocode}
\newcommand*{\numberline@prefix}{}
% \end{macrocode}
% \end{macro}%^^A \numberline@prefix
% \begin{macro}{\numberline@postfix}
% \changes{v3.06}{2010/05/18}{neu (intern)}
-% Das ist in der Voreinstellung einfach \cs{hfil} und dient dazu die Nummer
-% linksbündig zu platzieren.
+% The default is \cs{hfil} to make the number left aligned.
% \begin{macrocode}
\newcommand*{\numberline@postfix}{\hfil}
% \end{macrocode}
% \end{macro}%^^A \numberline@postfix
% \begin{macro}{\numberline@numberformat}
-% \changes{v3.06}{2010/05/18}{neu (intern)}%^^A
+% \changes{v3.06}{2010/05/18}{new (internal)}
% \changes{v3.12}{2013/11/22}{don't output anything, if argument expands to
% an empty string}%^^A
-% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A
-% Das dient in der Voreinstellung dazu, Regel~5 und 6 aus der 20.~Auflage des
-% DUDENs umzusetzen.
+% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed into \cs{Ifstr}}
+% Used to fulfil rules~5 and 6 of DUDEN, 20th edition.
% \begin{macrocode}
\newcommand*{\numberline@numberformat}[1]{%
\Ifstr{#1}{}{}{\numberline@numberprefix#1\numberline@numberpostfix}%
}
% \end{macrocode}
% \begin{macro}{\numberline@numberprefix}
-% \changes{v3.20}{2016/03/15}{neu (intern)}
-% Wird verwendet, um innerhalb von \cs{numberline@numberformat} der Nummer
-% einen Präfix voran zu stellen. Im Gegensatz zu \cs{numberline@prefix} wird
-% dieser nur ausgegeben, wenn das Argument von \cs{numberline@numberformat},
-% also auch das Argument von \cs{numberline} nicht leer ist.
+% \changes{v3.20}{2016/03/15}{new (internal)}
+% Used to prefix the number inside \cs{numberline@numberformat}. In opposite
+% to \cs{numberline@prefix} it is only used, if the argument of
+% \cs{numberline@numberformat} and therefore the argument of \cs{numberline}
+% is not empty.
% \begin{macrocode}
\newcommand*{\numberline@numberprefix}{}
% \end{macrocode}
% \end{macro}%^^A \numberline@numberprefix
% \begin{macro}{\numberline@numberpostfix}
-% \changes{v3.20}{2016/03/15}{neu (intern)}
-% Wird verwendet, um innerhalb von \cs{numberline@numberformat} der Nummer
-% einen Postfix anzuhängen. Im Gegensatz zu \cs{numberline@prefix} wird
-% dieser nur ausgegeben, wenn das Argument von \cs{numberline@numberformat},
-% also auch das Argument von \cs{numberline} nicht leer ist.
+% \changes{v3.20}{2016/03/15}{new (internal)}
+% Used to postfix the number inside \cs{numberline@numberformat}. In opposite
+% to \cs{numberline@prefix} it is only used, if the argument of
+% \cs{numberline@numberformat} and therefore the argument of \cs{numberline}
+% is not empty.
% \begin{macrocode}
\newcommand*{\numberline@numberpostfix}{}
% \end{macrocode}
% \end{macro}%^^A \numberline@numberpostfix
% \end{macro}%^^A \numberline@numberformat
% \begin{macro}{\numberline@box}
-% \changes{v3.06}{2010/05/18}{neu (intern)}
-% Das dient in der Voreinstellung dazu, die Gliederungsnummer in eine Box zu
-% setzen.
+% \changes{v3.06}{2010/05/18}{new (internal)}
+% Is used to put the sectioning number into a box.
% \begin{macrocode}
\newcommand*{\numberline@box}[1]{\hb@xt@\@tempdima{#1}}
%</body>
@@ -262,20 +254,19 @@
%</class>
% \fi
%
-% \subsection{Grundlagen für Verzeichniseintragsstile}
+% \subsection{The basics of the styles}
%
-% Ab \KOMAScript~3.20 halten Stile Einzug in die Verzeichnisse. Der erste
-% Schritt dabei sind die Stile der Verzeichniseinträge. Jeder Stil besteht aus
-% einer Anweisung, mit der ein Verzeichnisbefehl definiert wird und
-% zugehörigen Optionen. Die Optionen dienen dazu, Einstellungen für die
-% einzelnen Verzeichnisbefehle vorzunehmen.
+% From \KOMAScript~3.20 styles are a new basic feature for the entries into
+% the table of contents and other directories. Each style consists of a
+% command that defines the entry command and the corresponding options. The
+% options are used to provide configuration features.
%
% \iffalse
%<*package>
% \fi
%
-% \changes{v3.20}{2015/11/17}{Verzeichnisstile bekommen das
-% \texttt{KOMAarg}-Mitglied \texttt{.dte}}%^^A
+% \changes{v3.20}{2015/11/17}{ToC styles have the \texttt{KOMAarg} member
+% \texttt{.dte}}
% \begin{macrocode}
%<*body>
\DefineFamily{KOMAarg}
@@ -284,28 +275,27 @@
% \end{macrocode}
%
% \begin{macro}{\@DefineTOCEntryOption}
-% \changes{v3.20}{2015/04/10}{neu (intern)}
-% Die Definition der Optionen geschieht mit einer einheitlichen
-% Schnittstelle. Wichtig dabei ist, dass hier nicht tatsächlich die Optionen
-% definiert werden, sondern eine Anweisung, die ihrerseits die Optionen bei
-% Bedarf definiert. Ein solcher Bedarf besteht beispielsweise bei der
-% Definition des Eintragsbefehls selbst. Er besteht aber auch innerhalb von
-% \cs{DeclareSectionCommand}, weil diese Anweisung ebenfalls indirekt
-% Verzeichniseinträge definiert und deshalb die Optionen auswerten können
-% soll. Es gibt folgende Parameter:
+% \changes{v3.20}{2015/04/10}{new (internal)}
+% The definition of the options is done by a general interface. Important is,
+% that the definition of the option is done indirectly, which means: Here we
+% define a command, that defines the options when needed. Note, not only the
+% entry command interface itself but also the sectioning command interface may
+% and should be able to setup options of the entry commands.
+% The parameters:
% \begin{description}
-% \item[\marg{Stil}: \meta{String},] Name des Eintragsstils
-% \item[\marg{Option}: \meta{String},] Name der Option
-% \item[\oarg{Wert}:] der Säumniswert der Option abhängig von der
-% \meta{Definition}
-% \item[\marg{Definition}: \meta{Code},] Definition der Option
+% \item[\marg{style}: \meta{string},] name of the entry style
+% \item[\marg{option}: \meta{string},] name of the option
+% \item[\oarg{value}:] default value of the option depending on the
+% \meta{definition}
+% \item[\marg{definition}: \meta{code},] definition of the option
% \end{description}
% \begin{macro}{\@DefineTOCEntryOptionWithoutDefault}
-% \changes{v3.20}{2015/11/10}{neu (intern)}
+% \changes{v3.20}{2015/11/10}{new (internal)}
% \begin{macro}{\@DefineTOCEntryOptionWithDefault}
-% \changes{v3.20}{2015/11/10}{neu (intern)}
-% Da mit einem optionalen Argument an Position 3 gearbeitet wird, werden zwei
-% Hilfsmakros benötigt.
+% \changes{v3.20}{2015/11/10}{new (internal)}
+% Because of the options argument at position 3 (and because we've made this
+% before \Package{xparse} became part of the \LaTeX{} kernel), we need two
+% auxiliary macros.
% \begin{macrocode}
%<*body>
\newcommand*{\@DefineTOCEntryOption}[2]{%
@@ -331,8 +321,8 @@
% \end{macro}%^^A \@DefineTOCEntryOption
%
% \begin{macro}{\@RelaxTOCEntryOptions}
-% \changes{v3.20}{2015/04/10}{neu (intern)}
-% Setzt alle Optionen der aktuellen Do-Liste zurück auf \cs{relax}.
+% \changes{v3.20}{2015/04/10}{new (internal)}
+% Reset all options of the current do-list back to \cs{relax}.
% \begin{macrocode}
%<*body>
\newcommand*{\@RelaxTOCEntryOptions}{%
@@ -352,7 +342,6 @@
% \end{macrocode}
% \end{macro}%^^A \@RelaxTOCEntryOptions
%
-% \selectlanguage{english}
% \begin{macro}{\@DefineTOCEntryListOption}
% \changes{v3.31}{2020/06/11}{new (internal)}%^^A
% Use \cs{DefineTOCEntryOption} to define an option that represents a list.
@@ -441,46 +430,44 @@
% \end{macrocode}
% \end{macro}%^^A \@DefineTOCEntryListOptionWithDefault
% \end{macro}%^^A \@DefineTOCEntryListOption
-% \selectlanguage{ngerman}
%
% \begin{macro}{\@DefineTOCEntryLengthOption}
-% \changes{v3.20}{2015/12/04}{neu (intern)}%^^A
-% Verwendet \cs{DefineTOCEntryOption}, um eine Option zu definieren, die ein
-% Längenmacro definiert. Es gibt folgende Parameter:
+% \changes{v3.20}{2015/12/04}{new (internal)}
+% Use \cs{DefineTOCEntryOption} to define an option that represents a length
+% macro. The parameters are:
% \begin{description}
-% \item[\marg{Stil}: \meta{String},] Name des Eintragsstils
-% \item[\marg{Option}: \meta{String},] Name der Option
-% \item[\oarg{Wert}: \meta{Länge},] der Säumniswert der Option
-% \item[\marg{Prefix}: \meta{String},] Präfix des zu definierenden Makros
-% \item[\marg{Postfix}: \meta{String},] Postfix des zu definierenden Makros
-% \item[\marg{Erklärung}: \meta{String},] Erklärung der Option
-% \item[\oarg{Init}: \meta{Code},] Initialisierung der Option
+% \item[\marg{style}: \meta{string},] name of the entry style
+% \item[\marg{option}: \meta{string},] name of the option
+% \item[\oarg{value}: \meta{length},] default value of the option
+% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
+% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
+% \item[\marg{explanation}: \meta{string},] short description of the option
+% \item[\oarg{init}: \meta{code},] initialisation code for the option
% \end{description}
-% Zwischen Prefix und Postfix wird bei der späteren, tatsächlichen Definition
-% automatisch \cs{scr@dte@current} eingefügt. Gleichzeitig wird auch noch eine
-% Kopieroption definiert, die sich von der eigentlichen Option dadurch
-% unterscheidet, dass dem Gleichheitszeichen ein Doppelpunkt voran gestellt
-% ist. Der Wert der Kopieroption ist der Name eines anderen Eintrags, dessen
-% Einstellung dann kopiert wird, sofern dieser Eintrag eine entsprechende
-% Einstellung hat.
+% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
+% will be added \cs{scr@dte@current} automatically. This is the name of the
+% entry level, e.g., \texttt{subsection} or \texttt{figure}. Additionally to
+% the option \marg{option} itself a copy option \marg{option}\texttt{:} will
+% be defined. So it seems, that for the copy option a colon is before the
+% equal sign. The value of the copy option has to be the name of another entry
+% level and it copies the value of the same option of that entry
+% level. Additionally an additive option with appended plus sign is
+% defined. It adds the new value to the existing one.
% \begin{macro}{\@DefineTOCEntryLengthOptionWithoutDefault}
-% \changes{v3.20}{2015/11/10}{neu (intern)}%^^A
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
-% \changes{v3.27}{2019/10/03}{es wird gleichzeitig eine Addieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/10}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
+% \changes{v3.27}{2019/10/03}{automatic definition of add option}
% \begin{macro}{\@DefineTOCEntryLengthOptionWithDefault}
-% \changes{v3.20}{2015/11/10}{neu (intern)}%^^A
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
-% \changes{v3.27}{2019/10/03}{es wird gleichzeitig eine Addieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/10}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
+% \changes{v3.27}{2019/10/03}{automatic definition of add option}
% \begin{macro}{\@DefineTOCEntryLengthOptionMacro}
-% \changes{v3.20}{2015/11/10}{neu (intern)}%^^A
+% \changes{v3.20}{2015/11/10}{new (internal)}
% \begin{macro}{\@DefineTOCEntryAddLengthOptionMacro}
-% \changes{v3.27}{2019/10/03}{neu (intern)}%^^A
-% Da mit einem optionalen Argument an Position 3 gearbeitet wird, werden drei
-% Hilfsmakros benötigt.
+% \changes{v3.27}{2019/10/03}{new (internal)}
+% Because of the options argument at position 3 (and because we've made this
+% before \Package{xparse} became part of the \LaTeX{} kernel), we need three
+% auxiliary macros.
% \begin{macrocode}
%<*body>
\newcommand*{\@DefineTOCEntryLengthOption}[2]{%
@@ -573,43 +560,42 @@
% \end{macro}%^^A \@DefineTOCEntryLengthOption
%
% \begin{macro}{\@DefineTOCEntryNumberOption}
-% \changes{v3.20}{2015/12/04}{neu (intern)}
-% Verwendet \cs{DefineTOCEntryOption}, um eine Option zu definieren, die ein
-% Nummernmacro definiert. Es gibt folgende Parameter:
+% \changes{v3.20}{2015/12/04}{new (internal)}
+% Use \cs{DefineTOCEntryOption} to define an option that represents a number
+% macro. The parameters are:
% \begin{description}
-% \item[\marg{Stil}: \meta{String},] Name des Eintragsstils
-% \item[\marg{Option}: \meta{String},] Name der Option
-% \item[\oarg{Wert}:] der Säumniswert der Option
-% \item[\marg{Prefix}: \meta{String},] Präfix des zu definierenden Makros
-% \item[\marg{Postfix}: \meta{String},] Postfix des zu definierenden Makros
-% \item[\marg{Erklärung}: \meta{String},] Erklärung der Option
-% \item[\oarg{Init}: \meta{Code},] Initialisierung der Option
+% \item[\marg{style}: \meta{string},] name of the entry style
+% \item[\marg{option}: \meta{string},] name of the option
+% \item[\oarg{value}: \meta{length},] default value of the option
+% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
+% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
+% \item[\marg{explanation}: \meta{string},] short description of the option
+% \item[\oarg{init}: \meta{code},] initialisation code for the option
% \end{description}
-% Zwischen Prefix und Postfix wird bei der späteren, tatsächlichen Definition
-% automatisch \cs{scr@dte@current} eingefügt. Gleichzeitig wird auch noch eine
-% Kopieroption definiert, die sich von der eigentlichen Option dadurch
-% unterscheidet, dass dem Gleichheitszeichen ein Doppelpunkt voran gestellt
-% ist. Der Wert der Kopieroption ist der Name eines anderen Eintrags, dessen
-% Einstellung dann kopiert wird, sofern dieser Eintrag eine entsprechende
-% Einstellung hat.
+% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
+% will be added \cs{scr@dte@current} automatically. This is the name of the
+% entry level, e.g., \texttt{subsection} or \texttt{figure}. Additionally to
+% the option \marg{option} itself a copy option \marg{option}\texttt{:} will
+% be defined. So it seems, that for the copy option a colon is before the
+% equal sign. The value of the copy option has to be the name of another entry
+% level and it copies the value of the same option of that entry
+% level. Additionally an additive option with appended plus sign is
+% defined. It adds the new value to the existing one.
% \begin{macro}{\@DefineTOCEntryNumberOptionWithoutDefault}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
-% \changes{v3.27}{2019/10/03}{es wird gleichzeitig eine Addieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
+% \changes{v3.27}{2019/10/03}{automatic definition of add option}
% \begin{macro}{\@DefineTOCEntryNumberOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
-% \changes{v3.27}{2019/10/03}{es wird gleichzeitig eine Addieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
+% \changes{v3.27}{2019/10/03}{automatic definition of add option}
% \begin{macro}{\@DefineTOCEntryNumberOptionMacro}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
+% \changes{v3.20}{2015/11/12}{new (internal)}
% \begin{macro}{\@DefineTOCEntryAddNumberOptionMacro}
% \changes{v3.27}{2019/10/03}{neu (intern)}
-% Da mit einem optionalen Argument an Position 3 gearbeitet wird, werden drei
-% Hilfsmakros benötigt.
+% Because of the options argument at position 3 (and because we've made this
+% before \Package{xparse} became part of the \LaTeX{} kernel), we need three
+% auxiliary macros.
% \begin{macrocode}
%<*body>
\newcommand*{\@DefineTOCEntryNumberOption}[2]{%
@@ -690,37 +676,37 @@
% \end{macro}%^^A \@DefineTOCEntryNumberOption
%
% \begin{macro}{\@DefineTOCEntryBooleanOption}
-% \changes{v3.20}{2015/12/04}{neu (intern)}
-% Verwendet \cs{DefineTOCEntryOption}, um eine Option zu definieren, die einen
-% Schalter definiert. Es gibt folgende Parameter:
+% \changes{v3.20}{2015/12/04}{new (internal)}
+% Use \cs{DefineTOCEntryOption} to define an option that represents a boolean
+% switch. The parameters are:
% \begin{description}
-% \item[\marg{Stil}: \meta{String},] Name des Eintragsstils
-% \item[\marg{Option}: \meta{String},] Name der Option
-% \item[\oarg{Wert}:] der Säumniswert der Option
-% \item[\marg{Prefix}: \meta{String},] Präfix des zu definierenden Makros
-% \item[\marg{Postfix}: \meta{String},] Postfix des zu definierenden Makros
-% \item[\marg{Erklärung}: \meta{String},] Erklärung der Option
-% \item[\oarg{Init}: \meta{Code},] Initialisierung der Option
+% \item[\marg{style}: \meta{string},] name of the entry style
+% \item[\marg{option}: \meta{string},] name of the option
+% \item[\oarg{value}: \meta{length},] default value of the option
+% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
+% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
+% \item[\marg{explanation}: \meta{string},] short description of the option
+% \item[\oarg{init}: \meta{code},] initialisation code for the option
% \end{description}
-% Zwischen Prefix und Postfix wird bei der späteren, tatsächlichen Definition
-% automatisch \cs{scr@dte@current} eingefügt. Gleichzeitig wird auch noch eine
-% Kopieroption definiert, die sich von der eigentlichen Option dadurch
-% unterscheidet, dass dem Gleichheitszeichen ein Doppelpunkt voran gestellt
-% ist. Der Wert der Kopieroption ist der Name eines anderen Eintrags, dessen
-% Einstellung dann kopiert wird, sofern dieser Eintrag eine entsprechende
-% Einstellung hat.
+% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
+% will be added \cs{scr@dte@current} automatically. This is the name of the
+% entry level, e.g., \texttt{subsection} or \texttt{figure}. Additionally to
+% the option \marg{option} itself a copy option \marg{option}\texttt{:} will
+% be defined. So it seems, that for the copy option a colon is before the
+% equal sign. The value of the copy option has to be the name of another entry
+% level and it copies the value of the same option of that entry
+% level.
% \begin{macro}{\@DefineTOCEntryBoolOptionWithoutDefault}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
% \begin{macro}{\@DefineTOCEntryBoolOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
% \begin{macro}{\@DefineTOCEntryBoolOptionMacro}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
-% Da mit einem optionalen Argument an Position 3 gearbeitet wird, werden drei
-% Hilfsmakros benötigt.
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% Because of the options argument at position 3 (and because we've made this
+% before \Package{xparse} became part of the \LaTeX{} kernel), we need three
+% auxiliary macros.
% \begin{macrocode}
%<*body>
\newcommand*{\@DefineTOCEntryBooleanOption}[2]{%
@@ -781,37 +767,36 @@
% \end{macro}%^^A \@DefineTOCEntryBooleanOption
%
% \begin{macro}{\@DefineTOCEntryIfOption}
-% \changes{v3.20}{2015/12/06}{neu (intern)}
-% Verwendet \cs{DefineTOCEntryOption}, um eine Option zu definieren, die eine
-% If-Anweisung definiert. Die Option selbst ist dabei eine Schalter-Option. Es
-% gibt folgende Parameter:
+% \changes{v3.20}{2015/12/06}{new (internal)}
+% Use \cs{DefineTOCEntryOption} to define an option that represents an if
+% command. The option itself is a boolean option. The parameters are:
% \begin{description}
-% \item[\marg{Stil}: \meta{String},] Name des Eintragsstils
-% \item[\marg{Option}: \meta{String},] Name der Option
-% \item[\oarg{Wert}:] der Säumniswert der Option
-% \item[\marg{Prefix}: \meta{String},] Präfix des zu definierenden Makros
-% \item[\marg{Postfix}: \meta{String},] Postfix des zu definierenden Makros
-% \item[\marg{Erklärung}: \meta{String},] Erklärung der Option
+% \item[\marg{style}: \meta{string},] name of the entry style
+% \item[\marg{option}: \meta{string},] name of the option
+% \item[\oarg{value}: \meta{length},] default value of the option
+% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
+% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
+% \item[\marg{explanation}: \meta{string},] short description of the option
% \end{description}
-% Zwischen Prefix und Postfix wird bei der späteren, tatsächlichen Definition
-% automatisch \cs{scr@dte@current} eingefügt. Gleichzeitig wird auch noch eine
-% Kopieroption definiert, die sich von der eigentlichen Option dadurch
-% unterscheidet, dass dem Gleichheitszeichen ein Doppelpunkt voran gestellt
-% ist. Der Wert der Kopieroption ist der Name eines anderen Eintrags, dessen
-% Einstellung dann kopiert wird, sofern dieser Eintrag eine entsprechende
-% Einstellung hat.
+% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
+% will be added \cs{scr@dte@current} automatically. This is the name of the
+% entry level, e.g., \texttt{subsection} or \texttt{figure}. Additionally to
+% the option \marg{option} itself a copy option \marg{option}\texttt{:} will
+% be defined. So it seems, that for the copy option a colon is before the
+% equal sign. The value of the copy option has to be the name of another entry
+% level and it copies the value of the same option of that entry
+% level.
% \begin{macro}{\@DefineTOCEntryIfOptionWithoutDefault}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
% \begin{macro}{\@DefineTOCEntryIfOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
% \begin{macro}{\@DefineTOCEntryIfOptionMacro}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
-% Da mit einem optionalen Argument an Position 3 gearbeitet wird, werden drei
-% Hilfsmakros benötigt.
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% Because of the options argument at position 3 (and because we've made this
+% before \Package{xparse} became part of the \LaTeX{} kernel), we need three
+% auxiliary macros.
% \begin{macrocode}
%<*body>
\newcommand*{\@DefineTOCEntryIfOption}[2]{%
@@ -872,44 +857,46 @@
% \end{macro}%^^A \@DefineTOCEntryIfOption
%
% \begin{macro}{\@DefineTOCEntryCommandOption}
-% \changes{v3.20}{2015/11/17}{neu}
-% Verwendet \cs{DefineTOCEntryOption}, um eine Option zu definieren, die ein
-% Macro definiert. Es gibt folgende Parameter:
+% \changes{v3.20}{2015/11/17}{new (internal)}
+% Use \cs{DefineTOCEntryOption} to define an option that represents a
+% macro. The parameters are:
% \begin{description}
-% \item[\marg{Stil}: \meta{String},] Name des Eintragsstils
-% \item[\marg{Option}: \meta{String},] Name der Option
-% \item[\oarg{Wert}:] der Säumniswert der Option
-% \item[\marg{Prefix}: \meta{String},] Präfix des zu definierenden Makros
-% \item[\marg{Postfix}: \meta{String},] Postfix des zu definierenden Makros
-% \item[\oarg{Argumentzahl}: \meta{Nummer},] Anzahl der Argumente des Makros
-% \item[\marg{Erklärung}: \meta{String},] Erklärung der Option
-% \item[\oarg{Init}: \meta{Code},] Initialisierung der Option
+% \item[\marg{style}: \meta{string},] name of the entry style
+% \item[\marg{option}: \meta{string},] name of the option
+% \item[\oarg{value}: \meta{length},] default value of the option
+% \item[\marg{prefix}: \meta{string},] prefix of the name of the macro
+% \item[\marg{postfix}: \meta{string},] postfix of the name of the macro
+% \item[\marg{explanation}: \meta{string},] short description of the option
+% \item[\oarg{init}: \meta{code},] initialisation code for the option
% \end{description}
-% Zwischen Prefix und Postfix wird bei der späteren, tatsächlichen Definition
-% automatisch \cs{scr@dte@current} eingefügt. Gleichzeitig wird auch noch eine
-% Kopieroption definiert, die sich von der eigentlichen Option dadurch
-% unterscheidet, dass dem Gleichheitszeichen ein Doppelpunkt voran gestellt
-% ist. Der Wert der Kopieroption ist der Name eines anderen Eintrags, dessen
-% Einstellung dann kopiert wird, sofern dieser Eintrag eine entsprechende
-% Einstellung hat.
+% Later, when the option is defines, between \meta{prefix} and \meta{postfix}
+% will be added \cs{scr@dte@current} automatically. This is the name of the
+% entry level, e.g., \texttt{subsection} or \texttt{figure}. Additionally to
+% the option \marg{option} itself a copy option \marg{option}\texttt{:} will
+% be defined. So it seems, that for the copy option a colon is before the
+% equal sign. The value of the copy option has to be the name of another entry
+% level and it copies the value of the same option of that entry
+% level. Additionally an appending option with appended plus sign is
+% defined. It appends the new code to the existing one.
% \begin{macro}{\@DefineTOCEntryCommandOptionWithoutDefault}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
+% \changes{v3.20}{2015/11/12}{new (internal)}
% \begin{macro}{\@@DefineTOCEntryCommandOptionWithoutDefault}
-% \changes{v3.20}{2015/11/26}{neu (intern)}
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
+% \changes{v3.27}{2019/10/03}{automatic definition of add option}
% \begin{macro}{\@DefineTOCEntryCommandOptionWithDefault}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
+% \changes{v3.20}{2015/11/12}{new (internal)}
% \begin{macro}{\@@DefineTOCEntryCommandOptionWithDefault}
-% \changes{v3.20}{2015/11/26}{neu (intern)}
-% \changes{v3.27}{2019/10/02}{es wird gleichzeitig eine Kopieroption
-% definiert}%^^A
+% \changes{v3.20}{2015/11/12}{new (internal)}
+% \changes{v3.27}{2019/10/02}{automatic definition of copy option}
+% \changes{v3.27}{2019/10/03}{automatic definition of add option}
% \begin{macro}{\@DefineTOCEntryCommandOptionMacro}
-% \changes{v3.20}{2015/11/12}{neu (intern)}
+% \changes{v3.20}{2015/11/12}{new (internal)}
% \begin{macro}{\@@DefineTOCEntryCommandOptionMacro}
-% \changes{v3.20}{2015/11/26}{neu (intern)}
-% Da mit einem optionalen Argument an Position 3 gearbeitet wird, werden drei
-% Hilfsmakros benötigt.
+% \changes{v3.20}{2015/11/26}{new (internal)}
+% Because of the options argument at position 3 (and because we've made this
+% before \Package{xparse} became part of the \LaTeX{} kernel), we need three
+% auxiliary macros.
% \begin{macrocode}
%<*body>
\newcommand*{\@DefineTOCEntryCommandOption}[2]{%
@@ -1042,19 +1029,19 @@
% \end{macro}%^^A \@DefineTOCEntryCommandOption
%
% \begin{macro}{\@AddToDeclareTOCStyleEntryPreCheckNeeds}
-% \changes{v3.20}{2015/12/06}{neu (intern)}
+% \changes{v3.20}{2015/12/06}{new (internal)}
% \begin{macro}{\@PreToDeclareTOCStyleEntryPreCheckNeeds}
-% \changes{v3.20}{2015/12/06}{neu (intern)}
-% Noch bevor die benötigten Befehle getestet werden, wird in
-% \cs{DeclareTOCStyleEntry} ein Hook ausgeführt. Für das Hinzufügen von Code
-% zu diesem Hook gibt es folgende Parameter:
+% \changes{v3.20}{2015/12/06}{new (internal)}
+% Before the existence of the mandatory commands can be tested in
+% \cs{DeclareTOCStyleEntry}, a hook will be executed. To add code to this hook
+% we have this command with the following parameter:
% \begin{description}
-% \item[\marg{Code}: \meta{Code},] Code, der ausgeführt werden soll.
+% \item[\marg{code}: \meta{code},] code to be executed.
% \end{description}
-% Bitte beachten, dass diese Anweisung im Init-Code von Stilen verwendet wird,
-% also innerhalb von \cs{DeclareTOCEntryStyle}, während der Hook innerhalb
-% von \cs{DeclareTOCStyleEntry} ausgeführt wird. Der Code des Hooks hat ein
-% Argument: Den Namen der Gliederungsebene.
+% Please note, this command is used inside the init code of styles, which
+% means inside \cs{DeclareTOCEntryStyle}, but the hook is inside
+% \cs{DeclareTOCStyleEntry}. The code of the hook has exactly one argument,
+% the name of the ToC entry level.
% \begin{macrocode}
%<*body>
\newcommand{\@AddToDeclareTOCEntryStylePreCheckNeeds}[1]{%
@@ -1071,18 +1058,18 @@
% \end{macro}%^^A \@AddToDeclareTOCStyleEntryPreCheckNeeds
%
% \begin{macro}{\@TOCEntryStyleNeedsCommandByOption}
-% \changes{v3.20}{2015/12/04}{neu (intern)}
-% Fügt einen oder mehrere Befehle der Liste der benötigten Befehle hinzu.
+% \changes{v3.20}{2015/12/04}{new (internal)}
+% Adds one or more commands to the list of mandatory commands. The parameters
+% are:
% \begin{description}
-% \item[\marg{Stil}:] Der Stil \meta{string}, der die Befehle benötigt.
-% \item[\marg{Präfix}:] Präfix \meta{string} des benötigten Befehls.
-% \item[\marg{Postfix}:] Postfix \meta{string} des benötigten Befehls.
-% \item[\marg{Option}:] Die Option \meta{string}, über die dieser Befehl
-% definiert wird.
-% \item[\marg{Erklärung}:] Bedeutung \meta{string} des Befehls.
+% \item[\marg{style}:] The style \meta{string}, that needs the command(s).
+% \item[\marg{prefix}:] Prefix \meta{string} of the mandatory command(s).
+% \item[\marg{postfix}:] Postfix \meta{string} of the mandatory command(s).
+% \item[\marg{Option}:] Option \meta{string}, that defines the command(s).
+% \item[\marg{explanation}:] Short description.
% \end{description}
-% Zwischen Präfix und Postfix wird dann automatisch der Name der
-% Gliederungsebene eingefügt.
+% Between \meta{prefix} and \meta{postfix} will be added the name of the entry
+% level automatically.
% \begin{macrocode}
%<*body>
\newcommand*{\@TOCEntryStyleNeedsCommandByOption}[5]{%
@@ -1096,17 +1083,16 @@
% \end{macro}%^^A \@TOCEntryStyleNeedsCommandByOption
%
% \begin{macro}{\TOCEntryStyleInitCode}
-% \changes{v3.20}{2015/11/19}{neu}
+% \changes{v3.20}{2015/11/19}{new}
% \begin{macro}{\TOCEntryStyleStartInitCode}
-% \changes{v3.20}{2015/11/25}{neu}
-% Führt Befehle aus, bevor ein Verzeichnisbefehl in diesem Stil definiert wird
-% und noch bevor die \emph{needs}-Liste abgearbeitet wird.
-% Argumente sind:
+% \changes{v3.20}{2015/11/25}{new}
+% Executes commands before a ToC entry level command of this style is defined
+% and before the \emph{needs} list will be executed. The parameters are:
% \begin{description}
-% \item[\marg{Stil}:] Der Stil \meta{string} für den die Initialisierung
-% erfolgen soll.
-% \item[\marg{Code}:] Wird zwecks Initialisierung ausgeführt. Innerhalb dieses
-% Codes ist \texttt{\#1} der Name der Verzeichnisebene.
+% \item[\marg{style}:] The style \meta{string} that should be initialised.
+% \item[\marg{code}:] The code that should be executed to initialise the
+% style. The code has one argument \texttt{\#1} which is the name of the ToC
+% entry level.
% \end{description}
% \begin{macrocode}
%<*body>
@@ -1130,26 +1116,24 @@
% \end{macro}%^^A \TOCEntryStyleStartInitCode
% \end{macro}%^^A \TOCEntryStyleInitCode
% \begin{macro}{\@ExecuteTOCEntryStyleInitCode}
-% \changes{v3.20}{2015/12/04}{neu (intern)}
-% Führt den Init-Code eines Stils aus. Das erste Argument ist der Name des
-% Stils, das zweite der Name der Verzeichnisebene. Diesen erhält die
-% Init-Anweisung außerdem als Argument.
+% \changes{v3.20}{2015/12/04}{new (internal)}
+% Executes the init code of one style. The first argument is the name of the
+% style, the second the name of the ToC entry level, which will be used as
+% argument of the init code (see above).
% \begin{macrocode}
\newcommand*{\@ExecuteTOCEntryStyleInitCode}[2]{%
\let\scr@dte@doopts\@empty
% \end{macrocode}
-% \changes{v3.27}{2019/10/02}{Initialisierung von
-% \cs{scr@dte@\meta{Stil}@init}}%^^A
-% Weil die Festlegung, welche Optionen bzw. welche Makros für einen Stil
-% benötigt werden über die Deklaration der Optionen stattfindet und diese
-% Deklaration nicht etwa bei der Festlegung des Stils sondern bei der
-% Zuweisung des Stils an einen Eintrag erfolgt, muss hier auch die do-Liste
-% dieser Information gelöscht werden. Anderenfalls würde sie über alle
-% Einträge desselben Stils ständig anwachsen und damit diverse Einträge
-% mehrfach enthalten. Vermutlich wäre es besser, hier tatsächlich eine Liste
-% je Eintrag statt eine je Stil zu erzeugen, aber so ist es eben nicht. Also
-% wird hier immer wieder die gleiche Liste neu aufgebaut und muss deshalb zu
-% Beginn zurückgesetzt werden.
+% \changes{v3.27}{2019/10/02}{init \cs{scr@dte@\meta{Stil}@init}}
+% Because the definition which options or which macros are needed for a style
+% takes place via the declaration of the options and this declaration does not
+% take place with the definition of the style but with the assignment of the
+% style to an entry, the do list of this information must also be deleted
+% here. Otherwise it would constantly grow over all entries of the same style
+% and thus contain various entries several times. Probably it would be better
+% to actually create a list per entry here instead of one per style, but
+% that's just not how it is. So the same list is always rebuilt here and must
+% therefore be reset at the beginning.
% \begin{macrocode}
\expandafter\let\csname scr@dte@#1@needs\endcsname\relax
\scr@ifundefinedorrelax{scr@dte@#1@init}{}{%
@@ -1183,6 +1167,7 @@
% \end{macrocode}
% \end{macro}%^^A \ExecuteTOCEntryStyleInitCode
%
+% \selectlanguage{ngerman}
% \begin{macro}{\DeclareTOCStyleEntry}
% \changes{v3.20}{2015/11/13}{neu}
% Diese Anweisung definiert einen Verzeichniseintragsbefehl. Dabei wird auch