diff options
author | Karl Berry <karl@freefriends.org> | 2023-07-07 20:41:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-07-07 20:41:06 +0000 |
commit | af43b3481b2677a59255b29915abde95a8875b9f (patch) | |
tree | 12b2d691160c42e617d0a7cf179da3b64475d6b4 /Master/texmf-dist/source | |
parent | 03032c65653ae50066d80c346dbb0af0e7a93e82 (diff) |
koma-script (7jul23)
git-svn-id: svn://tug.org/texlive/trunk@67572 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
21 files changed, 685 insertions, 392 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/doc/common-pagestylemanipulation-de.tex b/Master/texmf-dist/source/latex/koma-script/doc/common-pagestylemanipulation-de.tex index 70ad59f8a35..65e594df52c 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/common-pagestylemanipulation-de.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/common-pagestylemanipulation-de.tex @@ -24,7 +24,7 @@ % ============================================================================ \KOMAProvidesFile{common-pagestylemanipulation-de.tex} - [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + [$Date: 2023-06-16 10:32:27 +0200 (Fr, 16. Jun 2023) $ KOMA-Script guide (common paragraph: Setting up defined page styles)] @@ -442,6 +442,18 @@ automatische Kolumnentitel mit Hilfe von \Macro{MakeUppercase} in Großbuchstaben gewandelt werden (Versalsatz).% }\\[-1.7ex] + \pventry{title}{\IndexOption[indexmain]{markcase~=title}% + \IfThisCommonLabelBase{scrlayer}{% + \ChangedAt{v3.41}{\Package{scrlayer}}}{% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \ChangedAt{v3.41}{\Package{scrlayer-scrpage}}}}{}% + definiert \DescRef{\LabelBase.cmd.MakeMarkcase} so um, dass + automatische Kolumnentitel mit Hilfe von \Macro{MakeTitlecase} + gewandelt werden (\emph{Englischer Titelsatz}). Dabei werden Nummer + und Titel getrennt behandelt. Ist \Macro{MakeTitlecase} wegen eines + zu alten \LaTeX{} Kerns nicht definiert, wird eine Warnung + ausgegeben und die Option ignoriert.% + }\\[-1.7ex] \pventry{used}{\IndexOption[indexmain]{markcase~=used}% definiert \DescRef{\LabelBase.cmd.MakeMarkcase} so um, dass für automatische Kolumnentitel keine automatische Veränderung der diff --git a/Master/texmf-dist/source/latex/koma-script/doc/common-pagestylemanipulation-en.tex b/Master/texmf-dist/source/latex/koma-script/doc/common-pagestylemanipulation-en.tex index c66ecb341b9..f1c8c71a487 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/common-pagestylemanipulation-en.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/common-pagestylemanipulation-en.tex @@ -24,7 +24,7 @@ % ============================================================================ \KOMAProvidesFile{common-pagestylemanipulation-en.tex} - [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + [$Date: 2023-06-16 10:32:27 +0200 (Fr, 16. Jun 2023) $ KOMA-Script guide (common paragraph: Setting up defined page styles)] \translator{Markus Kohm\and Jana Schubert\and Karl Hagen} @@ -410,17 +410,29 @@ \pventry{lower}{\IndexOption[indexmain]{markcase~=lower}% redefines \DescRef{\LabelBase.cmd.MakeMarkcase} to convert the automatic running heads into lower-case letters using - \Macro{MakeLowercase} (lower case typesetting).% - }% + \Macro{MakeLowercase}.% + }\\[-1.7ex] \pventry{upper}{\IndexOption[indexmain]{markcase~=upper}% redefines \DescRef{\LabelBase.cmd.MakeMarkcase} to convert the automatic running heads into upper-case letters using - \Macro{MakeUppercase} (upper case typesetting).% - }% + \Macro{MakeUppercase}.% + }\\[-1.7ex] + \pventry{title}{\IndexOption[indexmain]{markcase~=title}% + \IfThisCommonLabelBase{scrlayer}{% + \ChangedAt{v3.41}{\Package{scrlayer}}}{% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \ChangedAt{v3.41}{\Package{scrlayer-scrpage}}}}{}% + redefines \DescRef{\LabelBase.cmd.MakeMarkcase} to convert the + automatic running heads into title-case using + \Macro{MakeTitlecase}. This is done separately for the number + and the text. If \Macro{MakeTitlecase} is not defined, i.\,e., + because you are using an old \LaTeX{} kernel, you will get a warning + message and the option will be ignored.% + }\\[-1.7ex] \pventry{used}{\IndexOption[indexmain]{markcase~=used}% redefines \DescRef{\LabelBase.cmd.MakeMarkcase} to use automatic running heads without any case changes.% - }% + }\\[-1.7ex] \entry{\PValue{ignoreuppercase}, \PValue{nouppercase}, \PValue{ignoreupper}, \PValue{noupper}}{\IndexOption[indexmain]{markcase~=noupper}% diff --git a/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-de.tex b/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-de.tex index 276d201a380..c60aacda955 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-de.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-de.tex @@ -24,7 +24,7 @@ % ============================================================================ \KOMAProvidesFile{scrbookreportarticle-de.tex} - [$Date: 2023-04-20 10:04:17 +0200 (Do, 20. Apr 2023) $ + [$Date: 2023-05-10 17:45:46 +0200 (Mi, 10. Mai 2023) $ KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl)] \chapter{Die Hauptklassen \Class{scrbook}, \Class{scrreprt}, \Class{scrartcl}} @@ -3253,6 +3253,39 @@ wenn Sie ein Paket verwenden, das in die Generierung von Tabellen- und Abbildungstiteln eingreift und deren Aussehen verändert. Dies sollte selbstverständlich sein, wird aber leider häufig nicht bedacht. +\begin{Declaration} + \begin{Environment}{figure} + \end{Environment} + \begin{Environment}{figure*} + \end{Environment} + \begin{Environment}{figure-} + \end{Environment} + \begin{Environment}{table} + \end{Environment} + \begin{Environment}{table*} + \end{Environment} + \begin{Environment}{table-} + \end{Environment} +\end{Declaration} +Die \KOMAScript-Klassen \Class{scrbook}, \Class{scrreprt} und \Class{scrartcl} +verwenden die in \autoref{sec:tocbasic.declarenewtoc}, +\DescPageRef{tocbasic.cmd.DeclareNewTOC} dokumentierte Anweisung +\DescRef{tocbasic.cmd.DeclareNewTOC} zu Definition der von den Standardklassen +gewohnten Umgebungen \Environment{figure} und +\Environment{table}. Selbstverständlich werden dabei auch die für den +zweispaltigen Modus vorgesehenen Umgebungen \Environment{figure*} und +\Environment{table*} definiert, die für spaltenübergreifende Abbildungen und +Tabellen am Seitenanfang gedacht sind. Da bei der Definition neben der +Einstellung \Option{float} auch +\Option{nonfloat}\ChangedAt{v3.36}{\Class{scrartcl}\and \Class{scrbook}\and + \Class{scrreprt}} verwendet wird, werden außerdem auch die nicht gleitenden +Umgebungen \Environment{figure-} und \Environment{table-} definiert. Diese +können wie die anderen Umgebungen verwendet werden und spannen letztlich eine +\Environment{minipage} mit passendem Abstand davor und danach +auf. Bei\textnote{Achtung!} gemischter Verwendung von gleitenden und nicht +gleitenden Umgebungen ist der Anwender selbst für die korrekte Reihenfolge bei +der Ausgabe und damit bei der Nummerierung verantwortlich.% +\EndIndexGroup \begin{Declaration} \OptionVName{captions}{Einstellung} @@ -3748,13 +3781,18 @@ jedoch eventuell durch das Laden von Paketen wie \end{Example}% In gleicher Weise, wie in obigem Beispiel eine Tabelle innerhalb einer Abbildungsumgebung gesetzt und mit einem Titel versehen wird, könnte man auch -eine nicht gleitende Tabelle außerhalb jeder Gleitumgebung setzen. Auch dabei -sollte in der Regel eine \Environment{minipage} verwendet werden, um zu -verhindern, dass zwischen Überschrift und Tabelle ein Seitenumbruch erfolgen -kann. Zusätzlich sollte man die \Environment{minipage} dann noch in eine -\Environment{flushleft}-Umgebung einbetten, um einerseits einen gefälligen -Abstand zum Text davor und dahinter zu erreichen und andererseits den -Absatzeinzug vor der \Environment{minipage} zu verhindern.% +eine nicht gleitende Tabelle außerhalb jeder Gleitumgebung +setzen. Dabei\ChangedAt{v3.41}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} versucht \KOMAScript{} auch einen Seitenumbruch zwischen +der Überschrift und der Tabelle zu verhindern. Das kann allerdings nicht in +allen Fällen sichergestellt werden. Daher sollte in der Regel eine +\Environment{minipage} verwendet werden, um zu verhindern, dass zwischen +Überschrift und Tabelle ein Seitenumbruch erfolgen kann. Zusätzlich sollte man +die \Environment{minipage} dann noch in eine \Environment{flushleft}-Umgebung +einbetten, um einerseits einen gefälligen Abstand zum Text davor und dahinter +zu erreichen und andererseits den Absatzeinzug vor der \Environment{minipage} +zu verhindern. Einfacher ist natürlich direkt die Umgebung +\DescRef{\LabelBase.env.table-}\IndexEnv{table-} zu verwenden.% \EndIndexGroup diff --git a/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-en.tex b/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-en.tex index 5bff239c300..b5959997639 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-en.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/scrbookreportarticle-en.tex @@ -24,7 +24,7 @@ % ============================================================================ \KOMAProvidesFile{scrbookreportarticle-en.tex} - [$Date: 2023-04-20 10:04:17 +0200 (Do, 20. Apr 2023) $ + [$Date: 2023-05-10 17:45:46 +0200 (Mi, 10. Mai 2023) $ KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl)] \translator{Jens-Uwe Morawski\and Gernot Hassenpflug\and Markus Kohm\and @@ -2972,6 +2972,37 @@ standard classes, no longer work correctly when used with packages that modify the appearance of figure and table captions. This should be self-evident, but it is often overlooked. +\begin{Declaration} + \begin{Environment}{figure} + \end{Environment} + \begin{Environment}{figure*} + \end{Environment} + \begin{Environment}{figure-} + \end{Environment} + \begin{Environment}{table} + \end{Environment} + \begin{Environment}{table*} + \end{Environment} + \begin{Environment}{table-} + \end{Environment} +\end{Declaration} +The KOMA-Script{} classes \Class{scrbook}, \Class{scrreprt}, +and \Class{scrartcl} use the \DescRef{tocbasic.cmd.DeclareNewTOC} statement +documented in \autoref{sec:tocbasic.declarenewtoc}, +\DescPageRef{tocbasic.cmd.DeclareNewTOC} to define the \Environment{figure} +and \Environment{table} environments familiar from the standard classes. Of +course, this also defines the \Environment{figure*} and \Environment{table*} +environments provided for the two-column mode, which are intended for +cross-column figures and tables at the top of the page. Since in addition to +the \Option{float} setting the definition also uses +\Option{nonfloat}\ChangedAt{v3.36}{\Class{scrartcl}\and \Class{scrbook}\and + \Class{scrreprt}}, the non-floating environments \Environment{figure-} and +\Environment{table-} are also defined. These can be used like the other +environments and ultimately span a \Environment{minipage} with appropriate +spacing before and after it. With\textnote{Attention!} mixed use of floating +and non-floating environments, the user himself is responsible for the correct +order in output and thus in numbering.% +\EndIndexGroup \begin{Declaration} \OptionVName{captions}{setting} @@ -3430,12 +3461,17 @@ option. But this feature may be lost if you load the \end{figure}% \end{Example}% You can produce a non-floating table with a caption in the same way as the -table inside a figure environment in the example above. In such a case, a -\Environment{minipage} environment should also be used to avoid page breaks -between the caption and the table. In addition, you should embed the -\Environment{minipage} environment in a \Environment{flushleft} environment -both to achieve a pleasing separation between the surrounding text and to -avoid the paragraph indentation of the \Environment{minipage} environment.% +table inside a figure environment in the example +above. Thereby\ChangedAt{v3.41}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \KOMAScript{} also tries to prevent a page break between +the heading and the table. However, this cannot be ensured in all +cases. Therefore, a \Environment{minipage} environment should also be used to +avoid page breaks between the caption and the table. In addition, you should +embed the \Environment{minipage} environment in a \Environment{flushleft} +environment both to achieve a pleasing separation between the surrounding text +and to avoid the paragraph indentation of the \Environment{minipage} +environment. Of course, it is easier to use the environment +\DescRef{\LabelBase.env.table-}\IndexEnv{table-} directly.% \EndIndexGroup diff --git a/Master/texmf-dist/source/latex/koma-script/doc/scrguide.cls b/Master/texmf-dist/source/latex/koma-script/doc/scrguide.cls index d622ace1e49..7c0a63bdc17 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/scrguide.cls +++ b/Master/texmf-dist/source/latex/koma-script/doc/scrguide.cls @@ -178,7 +178,6 @@ % In future we should use biblatex instead of babelbib, but currently some % things are still missing: % \begin{itemize} -% \item prefix \texttt{CTAN://}, % \item line breaks after the author (but not full \texttt{openbib} style like % \texttt{block=nbpar}), % \item removing language tag \texttt{ngerman} from output. @@ -191,7 +190,18 @@ \newcommand*{\printbibliography}[1][]{\bibliography{scrguide}} \else \RequirePackage[backend=bibtex,style=alphabetic,block=ragged]{biblatex} - \DeclareFieldFormat{url}{\url{#1}} + \DeclareSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \step[fieldsource=url, final=true] + \step[fieldset=verba, origfieldval, final=true] + \step[fieldsource=verba, match=\regexp{CTAN:\/\/}, replace={https://www.ctan.org/}] + } + } + } + \DeclareFieldFormat{url}{% + \href{\thefield{verba}}{\nolinkurl{#1}}% + } \fi \RequirePackage{afterpage} \RequirePackage{makeidx} diff --git a/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-de.tex b/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-de.tex index 4b10d917288..e4683106c19 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-de.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-de.tex @@ -1,6 +1,6 @@ % ====================================================================== % scrlayer-de.tex -% Copyright (c) Markus Kohm, 2013-2022 +% Copyright (c) Markus Kohm, 2013-2023 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -24,7 +24,7 @@ % ============================================================================ \KOMAProvidesFile{scrlayer-de.tex}% - [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + [$Date: 2023-04-25 09:00:44 +0200 (Di, 25. Apr 2023) $ KOMA-Script guide (chapter:scrlayer)] \chapter[{Definition von Ebenen und Seitenstilen mit \Package{scrlayer}}] @@ -734,7 +734,7 @@ Laden von \Package{eso-pic}, definiert ist.% \iffalse% Umbruchkorrekturtext \par Es sei an dieser Stelle darauf hingewiesen, dass man bei Verwendung von Paket -\Package{picture}\IndexPackage{picture}\textnote{\Package{picture}} (siehe +\Package{picture}\IndexPackage{picture}\important{\Package{picture}} (siehe \cite{package:picture}) die Anweisung \Macro{LenToUnit} in der Regel nicht mehr benötigt. Das Paket erweitert die \Environment{picture}-Umgebung und deren Anweisung so, dass man für Koordinaten auch direkt \LaTeX-Längen diff --git a/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-en.tex b/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-en.tex index 94e98463970..c43b1b31203 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-en.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/scrlayer-en.tex @@ -1,6 +1,6 @@ % ====================================================================== % scrlayer-en.tex -% Copyright (c) Markus Kohm, 2013-2022 +% Copyright (c) Markus Kohm, 2013-2023 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -24,7 +24,7 @@ % ============================================================================ \KOMAProvidesFile{scrlayer-en.tex} - [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + [$Date: 2023-04-25 09:00:44 +0200 (Di, 25. Apr 2023) $ KOMA-Script guide (chapter:scrlayer)] \translator{Markus Kohm\and Karl Hagen} @@ -636,7 +636,7 @@ already defined, e.\,g., by loading \Package{eso-pic} before \iffalse% Umbruchkorrekturtext \par It should be noted at this point that using package -\Package{picture}\IndexPackage{picture}\textnote{\Package{picture}} (see +\Package{picture}\IndexPackage{picture}\important{\Package{picture}} (see \cite{package:picture}) supersedes \Macro{LenToUnit} more or less. The package extends environment \Environment{picture} and the picture commands so that you can use \LaTeX{} lengths directly for coordinates.% diff --git a/Master/texmf-dist/source/latex/koma-script/doc/scrlttr2-de.tex b/Master/texmf-dist/source/latex/koma-script/doc/scrlttr2-de.tex index 5ab46d48134..5e528f13d55 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/scrlttr2-de.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/scrlttr2-de.tex @@ -24,7 +24,7 @@ % ============================================================================ \KOMAProvidesFile{scrlttr2-de.tex}% - [$Date: 2023-04-20 10:04:17 +0200 (Do, 20. Apr 2023) $ + [$Date: 2023-04-25 09:00:44 +0200 (Di, 25. Apr 2023) $ KOMA-Script guide (chapter: scrlttr2)] \chapter{Briefe mit Klasse \Class{scrlttr2} oder Paket \Package{scrletter}} @@ -4475,16 +4475,33 @@ Folgeseiten bei \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} im Seitenstil \IndexPagestyle{letter}\important{\DescRef{\LabelBase.pagestyle.letter}} frei. Dazu setzt man den gewünschten Aufbau als \PName{Inhalt} der Variablen\ChangedAt{v3.08}{\Class{scrlttr2}} \Variable{nexthead} -beziehungsweise \Variable{nextfoot}. Innerhalb des Inhalts von -\Variable{nexthead} und \Variable{nextfoot} können beispielsweise mit Hilfe -der \Macro{parbox}-Anweisung (siehe \cite{latex:usrguide}) mehrere Boxen +beziehungsweise \Variable{nextfoot}. + +Da die Seitenstile von \Class{scrlttr2}\important{\Class{scrlttr2}} nicht für +mehrzeilige Köpfe und Füße ausgelegt sind, geben sie die beider Variablen in +einer horizontalen Box aus. Damit sind zunächst weder Absätze noch +Zeilenumbrüche oder ähnliches möglich. Innerhalb des Inhalts von +\Variable{nexthead} und \Variable{nextfoot} können aber beispielsweise mit +Hilfe der \Macro{parbox}-Anweisung (siehe \cite{latex:usrguide}) mehrere Boxen neben- und untereinander gesetzt werden. Einem versierten Anwender sollte es -so möglich sein, eigene Seitenköpfe und "~füße zu gestalten. Natürlich kann +so möglich sein, eigene Seitenköpfe und "~füße zu gestalten. Natürlich kann und sollte im \PName{Inhalt} mit Hilfe von \DescRef{\LabelBase.cmd.usekomavar} -auch auf weitere Variablen zugegriffen werden. Die \PName{Bezeichnung} wird -von \KOMAScript{} bei beiden Variablen nicht genutzt.% -\EndIndexGroup \EndIndexGroup -% +auch auf weitere Variablen zugegriffen werden. + +Als Alternative für mehrzeilige Köpf und Füße bietet sich die Verwendung des +in \autoref{cha:scrlayer-scrpage} beschriebenen Pakets +\Package{scrlayer-scrpage}\IndexPackage{scrlayer-scrpage}% +\important{\Package{scrlayer-scrpage}} an. Das Paket +\Package{scrletter}\important{\Package{scrletter}} verwendet für die +Definition von Seitenstil \DescRef{\LabelBase.pagestyle.letter}% +\IndexPagestyle{letter}\important{\DescRef{\LabelBase.pagestyle.letter}} +ohnehin bereits \Package{scrlayer-scrpage} und ist daher von der genannten +Beschränkung nicht betroffen. + +Die \PName{Bezeichnung} wird von \KOMAScript{} bei beiden Variablen +nicht genutzt.% +\EndIndexGroup% +\EndIndexGroup% \EndIndexGroup diff --git a/Master/texmf-dist/source/latex/koma-script/doc/scrlttr2-en.tex b/Master/texmf-dist/source/latex/koma-script/doc/scrlttr2-en.tex index 8af84810a44..6d7953e5091 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/scrlttr2-en.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/scrlttr2-en.tex @@ -24,7 +24,7 @@ % ============================================================================ \KOMAProvidesFile{scrlttr2-en.tex}% - [$Date: 2023-04-20 10:04:17 +0200 (Do, 20. Apr 2023) $ + [$Date: 2023-04-25 09:00:44 +0200 (Di, 25. Apr 2023) $ KOMA-Script guide (chapter: scrlttr2)] \translator{Harald Bongartz\and Georg Grandke\and Raimund Kohl\and Jens-Uwe @@ -3909,27 +3909,45 @@ available. \Variable{nexthead}% \Variable{nextfoot}% \end{Declaration} -At times, however, you may want to the header or the footer of subsequent pages -to more closely resemble the letterhead page. In these cases, you must dispense -with the predefined options that can be selected with the -\DescRef{\LabelBase.option.pagenumber}\IndexOption{pagenumber} option described above. -Instead, you can customise the header and footer of subsequent pages using the +At times, however, you may want to the header or the footer of subsequent +pages to more closely resemble the letterhead page. In these cases, you must +dispense with the predefined options that can be selected with the +\DescRef{\LabelBase.option.pagenumber}\IndexOption{pagenumber} option +described above. Instead, you can customise the header and footer of +subsequent pages using the \DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}% \important{\DescRef{\LabelBase.pagestyle.headings}, \DescRef{\LabelBase.pagestyle.myheadings}} or -\DescRef{\LabelBase.pagestyle.myheadings}\IndexPagestyle{myheadings} page styles with \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}, -and the \DescRef{\LabelBase.pagestyle.letter}% -\IndexPagestyle{letter}\important{\DescRef{\LabelBase.pagestyle.letter}} page style -with \Package{scrletter}\OnlyAt{\Package{scrletter}}. To do so, you create the -structure you want in the \PName{content} of +\DescRef{\LabelBase.pagestyle.myheadings}\IndexPagestyle{myheadings} page +styles with \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}, and the +\DescRef{\LabelBase.pagestyle.letter}% +\IndexPagestyle{letter}\important{\DescRef{\LabelBase.pagestyle.letter}} page +style with \Package{scrletter}\OnlyAt{\Package{scrletter}}. To do so, you +create the structure you want in the \PName{content} of the\ChangedAt{v3.08}{\Class{scrlttr2}} \Variable{nexthead} or -\Variable{nextfoot} variables. Within the \PName{content} of -\Variable{nexthead} and \Variable{nextfoot} you can, for example, use the \Macro{parbox} -command to place several boxes next to or beneath each other (see \cite{latex:usrguide}). More advanced users should -be able to create their own headers and footers. Of course, you can -and should also make use of additional variables using -\DescRef{\LabelBase.cmd.usekomavar}. \KOMAScript{} does not use the -\PName{description} for either variable. +\Variable{nextfoot} variables. + +Since the page styles of \Class{scrlttr2}\important{\Class{scrlttr2}} are not +designed for multi-line heads and feet the output of both variables is done in +a horizontal box. With this initially neither paragraphs nor line breaks or +similar are possible. But within the \PName{content} of \Variable{nexthead} +and \Variable{nextfoot} you can, for example, use the \Macro{parbox} command +to place several boxes next to or beneath each other (see +\cite{latex:usrguide}). More advanced users should be able to create their own +headers and footers. Of course, you can and should also make use of additional +variables using \DescRef{\LabelBase.cmd.usekomavar}. + +An alternative for multi-line headers and footers it to use the +\Package{scrlayer-scrpage}\IndexPackage{scrlayer-scrpage}% +\important{\Package{scrlayer-scrpage}} package described in +\autoref{cha:scrlayer-scrpage}. The +\Package{scrletter}\important{\Package{scrletter}} package uses for definition +of page style \DescRef{\LabelBase.pagestyle.letter}% +\IndexPagestyle{letter}\important{\DescRef{\LabelBase.pagestyle.letter}} +already \Package{scrlayer-scrpage} anyway and is therefore not affected by the +above restriction. + +\KOMAScript{} does not use the \PName{description} for either variable.% % %Only\textnote{Attention!} for compatibility reason the deprecated commands %\Macro{nexthead}\IndexCmd[indexmain]{nexthead} and @@ -3937,9 +3955,8 @@ and should also make use of additional variables using %releases before 3.08 are also implemented. Nevertheless, you should not use %those.% % -\EndIndexGroup -\EndIndexGroup -% +\EndIndexGroup% +\EndIndexGroup% \EndIndexGroup @@ -4540,3 +4557,4 @@ its documentation.% %%% ispell-local-dictionary: "en_GB" %%% eval: (flyspell-mode 1) %%% End: + diff --git a/Master/texmf-dist/source/latex/koma-script/scrhack.dtx b/Master/texmf-dist/source/latex/koma-script/scrhack.dtx index a8cb84e062c..a08943ed50b 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrhack.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrhack.dtx @@ -21,7 +21,7 @@ % To create `scrhack.sty' run `tex scrhack.dtx'. Using LaTeX instead % of TeX would generate the implementation documentation. % ====================================================================== -%%% From File: $Id: scrhack.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrhack.dtx 4063 2023-06-28 08:28:26Z kohm $ %<package&identify>%%% using: package,identify %<package&option>%%% using: package,option %<package&body>%%% using: package,body @@ -30,9 +30,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-06-28 10:28:26 +0200 (Mi, 28. Jun 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4063 $ \endgroup \ProvidesFile{scrhack.dtx}[\filedate\space\filerevision\space %</dtx> @@ -766,14 +766,19 @@ % % % \begin{macro}{\scr@do@hack@listings} +% \changes{v3.41}{2023/06/28}{patching \cs{lst@MakeCaption} to use +% \cs{ext@lstlisting}} % \begin{command}{\lstlistoflistings} % \cs{scr@do@hack@listings} patches \pkg{listings} to use \pkg*{tocbasic} for % the whole output of the list of listings. This adds several new features to % \pkg{listings}. -% \begin{macro}{\float@addtolists} -% The deprecated macro \cs{float@addtolists} is not needed any longer an will -% be reset to the original definition. But, because \pkg{listings} delays the -% redefinition with \cs{AtBeginDocument} we have to do the same here. +% \begin{macro}{\ext@lstlisting,\lst@MakeCaption,\float@addtolists} +% Macro \cs{ext@lstlisting} is defined, to make \cs{captionof} work with +% argument \texttt{lstlisting}. Additionally \cs{lst@MakeCaption} is patched +% to use the new macro. The deprecated macro \cs{float@addtolists} is not +% needed any longer an will be reset to the original definition. But, because +% \pkg{listings} delays the redefinition with \cs{AtBeginDocument} we have to +% do the same here. % \begin{macrocode} %<*listings&body> \newcommand*{\scr@do@hack@listings}{% @@ -782,6 +787,20 @@ \setuptoc{lol}{chapteratlist}% \PackageInfo{scrhack}{redefining \string\lstlistoflistings}% \renewcommand*{\lstlistoflistings}{\listoftoc[{\lstlistlistingname}]{lol}}% + \providecommand*{\ext@lstlisting}{lol}% + \@tempswafalse + \xpatchcmd\lst@MakeCaption + {\addcontentsline{lol}}% + {\addcontentsline{\ext@lstlisting}}% + {\PackageInfo{scrhack}{patching \string\lst@MakeCaption}\@tempswatrue}% + {\PackageWarning{scrhack}{cannot patch \string\lst@MakeCaption}}% + \@whilesw\if@tempswa\fi{% + \xpatchcmd\lst@MakeCaption + {\addcontentsline{lol}}% + {\addcontentsline{\ext@lstlisting}}% + {}% + {\@tempswafalse}% + }% \AtBeginDocument{% \scr@ifexpected{\float@addtolists}{% \def\float@addtolists##1{\addtocontents{lol}{##1}}% diff --git a/Master/texmf-dist/source/latex/koma-script/scrjura.dtx b/Master/texmf-dist/source/latex/koma-script/scrjura.dtx index a7c05c54273..ee0f36a24ce 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrjura.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrjura.dtx @@ -18,7 +18,7 @@ % % The KOMA-Script bundle consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrjura.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrjura.dtx 4062 2023-06-24 15:55:11Z kohm $ %<identify>%%% (run: identify) %<init>%%% (run: init) %<options>%%% (run: options) @@ -28,9 +28,9 @@ %<*dtx> \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-06-24 17:55:11 +0200 (Sa, 24. Jun 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4062 $ \endgroup \expandafter\ifx\csname ProvidesFile\endcsname\relax \def\ProvidesFile#1[#2]{} @@ -945,13 +945,17 @@ % \end{fontelement} % \begin{counter}{@AbsClause} % \begin{macro}{\theH@AbsClause} +% \changes{v3.41}{2023/06/24}{Ulrike Fischer requested to use \cs{def} instead +% of \cs{newcommand*}} % \begin{command}{\theHClause,\theHSubClause} +% \changes{v3.41}{2023/06/24}{Ulrike Fischer requested to use \cs{def} instead +% of \cs{newcommand*}} % \begin{macrocode} % Here we have some not good tested code for \pkg{hyperref}. \newcounter{@AbsClause} -\newcommand*{\theH@AbsClause}{P-\arabic{@AbsClause}} -\newcommand*{\theHClause}{\theH@AbsClause} -\newcommand*{\theHSubClause}{\theH@AbsClause} +\def\theH@AbsClause{P-\arabic{@AbsClause}} +\def\theHClause{\theH@AbsClause} +\def\theHSubClause{\theH@AbsClause} % \end{macrocode} % \end{command} % \end{macro} @@ -1004,11 +1008,13 @@ % \end{macrocode} % \changes{v0.9f}{2016/02/24}{\cs{protect}\cs{\@nameuse} instead of % \cs{csname}\dots\cs{endcsname}} +% \changes{v3.41}{2023/06/24}{update of \cs{@currentcounter} added} % \begin{macrocode} \protected@edef\theClause{% \protect\@nameuse{\scrjura@env@type @Clauseformat}{\contract@number}% }% \protected@edef\@currentlabel{\theClause}% + \def\@currentcounter{Clause}% \fi \stepcounter{@AbsClause}% \begingroup\expandafter\expandafter\expandafter\endgroup @@ -1059,12 +1065,13 @@ % \end{macro} % % \begin{macro}{\contract@subparagraph} -% \changes{v0.6a}{2012/10/08}{fehlendes \cs{par} ergänzt}%^^A +% \changes{v0.6a}{2012/10/08}{fehlendes \cs{par} ergänzt} % \changes{v0.7}{2013/04/18}{Zähler \texttt{contractAbsoluteClause} wird -% erhöht}%^^A +% erhöht} % \changes{v0.7}{2013/04/28}{Abstand nach der Nummer als Bestandteil der -% Nummer setzen}%^^A -% \changes{v0.9i}{2017/02/23}{Verwendung von \cs{ext@toc}}%^^A +% Nummer setzen} +% \changes{v0.9i}{2017/02/23}{Verwendung von \cs{ext@toc}} +% \changes{v3.41}{2023/06/24}{update of \cs{@currentcounter} added} % Das entspricht bis auf wenige Kleinigkeiten, die Unterparagraphen betreffen, % |\contract@paragraph| % \begin{macrocode} @@ -1094,6 +1101,7 @@ \endgroup \protected@edef\theSubClause{\theClause\contract@number}% \protected@edef\@currentlabel{\theSubClause}% + \def\@currentcounter{SubClause}% \fi \stepcounter{@AbsClause}% \begingroup\expandafter\expandafter\expandafter\endgroup @@ -1340,6 +1348,8 @@ % option} % \begin{counter}{par} % \begin{command}{\thepar,\theHpar} +% \changes{v3.41}{2023/06/24}{Ulrike Fischer requested to use \cs{def} instead +% of \cs{newcommand*}} % \begin{command}{\parformat} % \changes{v0.7}{2013/06/07}{new font element \fnt{parnumber}} % \begin{command}{\parformatseparation} @@ -1358,7 +1368,7 @@ %<*body> \newcounter{par} \renewcommand*{\thepar}{\arabic{par}} -\newcommand*{\theHpar}{\theH@AbsClause-\Roman{par}} +\def\theHpar{\theH@AbsClause-\Roman{par}} \newcommand*{\parformat}{(\thepar)} \newcommand*{\parformatseparation}{\nobreakspace} \newkomafont{parnumber}{} @@ -1810,6 +1820,8 @@ % Numbering of sentences. % \begin{counter}{sentence} % \begin{command}{\thesentence,\theHsentence} +% \changes{v3.41}{2023/06/24}{Ulrike Fischer requested to use \cs{def} instead +% of \cs{newcommand*}} % \begin{macro}{\p@sentence} % \changes{v3.27}{2019/10/09}{adaption for \LaTeX{} 2019-10-01} % The counter is used for numbering the sentences. It is important to add the @@ -1825,7 +1837,7 @@ %<*body> \newcounter{sentence}[par] \renewcommand*{\thesentence}{\arabic{sentence}} -\newcommand*{\theHsentence}{\theHpar-\arabic{sentence}} +\def\theHsentence{\theHpar-\arabic{sentence}} \scr@ifundefinedorrelax{labelformat}{% \renewcommand*{\p@sentence}{\expandafter\p@@sentence} \newcommand*{\p@@sentence}[1]{\p@par{{\par@cite{\thepar}}% diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-basics.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-basics.dtx index 3b205f7ff19..63264a8d3f7 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrkernel-basics.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-basics.dtx @@ -18,7 +18,7 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrkernel-basics.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrkernel-basics.dtx 4051 2023-04-26 16:01:28Z kohm $ %<prepare>%%% (run: prepare) %<option>%%% (run: option) %<body>%%% (run: body) @@ -28,9 +28,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-04-26 18:01:28 +0200 (Mi, 26. Apr 2023) $ \def\filerevision$#1: #2 ${\def\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4051 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrkernel-basics.dtx}% @@ -916,7 +916,13 @@ \@for\CurrentOption:=\@raw@classoptionslist\do{% \scr@trim@spaces\CurrentOption \ifx\CurrentOption\@empty\else - \@ifundefined{ds@\CurrentOption}{% +% \end{macrocode} +% \changes{v3.41}{2023/04/26}{only one step expansion while classic option +% test} +% Because we are using the raw option list, we do only a one step expansion of +% \cs{CurrentOption} here, because a full expansion could break. +% \begin{macrocode} + \@ifundefined{ds@\expandafter\detokenize\expandafter{\CurrentOption}}{% \scr@ifprocess@curroption{#1}{#2}{% \@expandtwoargs\@removeelement{% \expandafter\@remove@eq@value\CurrentOption=\@nil}% @@ -942,7 +948,13 @@ %<*dontusethis> \@for\CurrentOption:=\@curroptions\do{% \scr@trim@spaces\CurrentOption - \@ifundefined{ds@\CurrentOption}{% +% \end{macrocode} +% \changes{v3.41}{2023/04/26}{only one step expansion while classic option +% test} +% Because we are using the raw option list, we do only a one step expansion of +% \cs{CurrentOption} here, because a full expansion could break. +% \begin{macrocode} + \@ifundefined{ds@\expandafter\detokenize\expandafter{\CurrentOption}}{% \@use@ption \scr@ifprocess@curroption{#1}{#2}{}\default@ds }\@use@ption @@ -982,7 +994,13 @@ \else \let\CurrentOption\reserved@a \fi - \@ifundefined{ds@\CurrentOption}{% +% \end{macrocode} +% \changes{v3.41}{2023/04/26}{only one step expansion while classic option +% test} +% Because we are using the raw option list, we do only a one step expansion of +% \cs{CurrentOption} here, because a full expansion could break. +% \begin{macrocode} + \@ifundefined{ds@\expandafter\detokenize\expandafter{\CurrentOption}}{% \@use@ption \scr@ifprocess@curroption{#1}{#2}{}\default@ds }\@use@ption diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-compatibility.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-compatibility.dtx index b3042ab133b..ab2fed77c53 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrkernel-compatibility.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-compatibility.dtx @@ -18,7 +18,7 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrkernel-compatibility.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrkernel-compatibility.dtx 4054 2023-05-10 14:35:36Z kohm $ %<identify>%%% (run: identify) %<init>%%% (run: init) %<option>%%% (run: option) @@ -27,9 +27,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-05-10 16:35:36 +0200 (Mi, 10. Mai 2023) $ \def\filerevision$#1: #2 ${\def\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4054 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrkernel-compatibility.dtx}% @@ -458,6 +458,8 @@ % \changes{v3.39}{2022/10/13}{added} % \begin{macro}{\scr@v@3.40} % \changes{v3.40}{2023/04/17}{added} +% \begin{macro}{\scr@v@3.41} +% \changes{v3.41}{2023/04/24}{added} % \begin{macro}{\scr@v@last} % \changes{v2.9u}{2005/03/05}{added} % Nun die unterschiedlichen möglichen Werte (|\scr@v@last| ist jeweils die @@ -547,7 +549,8 @@ \@namedef{scr@v@3.38}{20} \@namedef{scr@v@3.39}{20} \@namedef{scr@v@3.40}{20} -\@namedef{scr@v@last}{20} +\@namedef{scr@v@3.41}{21} +\@namedef{scr@v@last}{21} % \end{macrocode} % \end{macro} % \end{macro} @@ -635,6 +638,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % \end{option} % \begin{macrocode} %</init> diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-floats.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-floats.dtx index f7c1a126d64..de25f18a5e7 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrkernel-floats.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-floats.dtx @@ -18,16 +18,16 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrkernel-floats.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrkernel-floats.dtx 4054 2023-05-10 14:35:36Z kohm $ %<option>%%% (run: option) %<body>%%% (run: body) %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-05-10 16:35:36 +0200 (Mi, 10. Mai 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4054 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrkernel-floats.dtx}% @@ -865,21 +865,32 @@ % \changes{v2.8j}{2001/07/30}{using \cs{@@makecaption}} % \changes{v2.8q}{2001/11/17}{special treatment of one line captions is optional} % \changes{v2.8q}{2001/11/17}{caption width can be limited} -% \begin{macrocode} +% \changes{v3.41}{2023/05/10}{no page break below caption above or above +% caption below content} +% \begin{command}{\captionnopagebreak} +% \changes{v3.41}{2023/05/10}{new} +% Can be redefined by users to allow page breaks between content and caption. +% \begin{macrocode} +\expandafter\ifnum\scr@v@is@ge{3.41}% + \newcommand*{\captionnopagebreak}{\nopagebreak} +\else + \newcommand*{\captionnopagebreak}{} +\fi \newcommand{\@makecaption}[2]{% \if@captionabove \vskip\belowcaptionskip \else - \vskip\abovecaptionskip + \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak \fi \@@makecaption\@firstofone{#1}{#2}% \if@captionabove - \vskip\abovecaptionskip + \captionnopagebreak\vskip\abovecaptionskip\captionnopagebreak \else \vskip\belowcaptionskip \fi } % \end{macrocode} +% \end{command} % \begin{macro}{\cap@width,\cap@left,\cap@right} % \changes{v2.8q}{2001/11/17}{added} % Multi line captions can printed with a reduced with. If the width is reduced diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-index.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-index.dtx index 9e298cbb63f..44199215b2d 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrkernel-index.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-index.dtx @@ -18,16 +18,16 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrkernel-index.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrkernel-index.dtx 4052 2023-05-05 11:41:51Z kohm $ %<option>%%% (run: option) %<body>%%% (run: body) %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-05-05 13:41:51 +0200 (Fr, 05. Mai 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4052 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrkernel-index.dtx}% @@ -137,6 +137,42 @@ \fi*% } % \end{macrocode} +% \begin{macro}{\idx@@mark,\idx@@forcemark,\idx@@forcemarknumbered} +% \changes{v3.41}{2023/05/05}{new} +% We also need a command to do the mark for the running head to be used if a +% sectioning command without automatic usage of \cs{chaptermark}, +% \cs{sectionmark} or \cs{subsectionmark} is used. For headings with automatic +% usage of \cs{chaptermark}, \cs{sectionmark} or \cs{subsectionmark} it should +% not be used, despite the fact, that this usually would result in not setting +% both marks. The command has the same argument as \cs{idx@@heading}. This is +% the same code, previously used in \cs{idx@heading}. +% \begin{macrocode} +\newcommand*{\idx@@forcemark}[1]{% + \ifidx@leveldown +%<report|book> \addsecmark{#1}% +%<*article> + \begingroup + \value{secnumdepth}=-\maxdimen + \subsectionmark{#1}% + \endgroup +%</article> + \else + \@mkdouble{\MakeMarkcase{#1}}% + \fi +} +\newcommand*{\idx@@forcemarknumbered}[1]{% + \ifidx@leveldown +%<report|book> \sectionmark{#1}% +%<article> \subsectionmark{#1}% + \else +%<report|book> \chaptermark{#1}% +%<article> \sectionmark{#1}% + \fi +} +\newcommand*{\idx@@mark}{} +\let\idx@@mark\idx@@forcemark +% \end{macrocode} +% \end{macro} % \begin{macro}{\idx@leveldowntrue,\idx@leveldownfalse,\ifidx@leveldown} % \changes{v3.18}{2015/06/15}{added} % The boolean switch \cs{ididx@leveldown} is needed to distinguish the heading @@ -171,6 +207,7 @@ %<book|report> \expandafter\chapter \fi*% }% + \let\idx@@mark\idx@@forcemark \or \KOMA@kav@remove{\KOMAClassFileName}{toc}{noindex}% \KOMA@kav@remove{\KOMAClassFileName}{toc}{indexnumbered}% @@ -182,13 +219,14 @@ \KOMA@kav@add{\KOMAClassFileName}{index}{toc}% \renewcommand*{\idx@@heading}{% \ifidx@leveldown -%<article> \expandafter\subsection\expandafter* +%<article> \expandafter\expandafter\expandafter\subsection\expandafter*% %<book|report> \expandafter\addsec \else %<article> \expandafter\addsec %<book|report> \expandafter\addchap \fi }% + \let\idx@@mark\idx@@forcemark \or \KOMA@kav@remove{\KOMAClassFileName}{toc}{noindex}% \KOMA@kav@remove{\KOMAClassFileName}{toc}{indexnumbered}% @@ -207,6 +245,7 @@ %<book|report> \expandafter\chapter \fi }% + \let\idx@@mark\idx@@forcemarknumbered \or \KOMA@kav@remove{\KOMAClassFileName}{index}{leveldown}% \KOMA@kav@remove{\KOMAClassFileName}{index}{standardlevel}% @@ -277,24 +316,17 @@ % \changes{v3.25}{2017/10/13}{using \cs{@mkright} and \cs{@mkdouble}} % \changes{v3.26}{2018/09/03}{usage of \cs{addsecmark} or \cs{subsectionmark} % instead of \cs{@mkright}} +% \changes{v3.41}{2023/05/05}{using \cs{idx@@mark}} +% \changes{v3.41}{2023/05/05}{\cs{cleardoublepage} or \cs{clearpage} only, if +% not \opt{leveldown}} % Macro to make the index heading and preamble. % \begin{macrocode} \newcommand*{\idx@heading}{% -%<report|book> \if@openright\cleardoublepage\else\clearpage\fi% +%<report|book> \ifidx@leveldown\else\if@openright\cleardoublepage\else\clearpage\fi\fi \twocolumn[% %<report|book> \@chaptertolistsfalse \idx@@heading{\indexname}]% - \ifidx@leveldown -%<report|book> \addsecmark{\indexname}% -%<*article> - \begingroup - \c@secnumdepth=-\maxdimen - \subsectionmark{\indexname}% - \endgroup -%</article> - \else - \@mkdouble{\MakeMarkcase{\indexname}}% - \fi + \idx@@mark{\indexname}% } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-pagestyles.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-pagestyles.dtx index 4681df436b5..34184fef429 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrkernel-pagestyles.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-pagestyles.dtx @@ -18,16 +18,16 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrkernel-pagestyles.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrkernel-pagestyles.dtx 4058 2023-06-16 08:32:27Z kohm $ %<option>%%% (run: option) %<body>%%% (run: body) %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-06-16 10:32:27 +0200 (Fr, 16. Jun 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4058 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrkernel-pagestyles.dtx}% @@ -334,13 +334,23 @@ \hb@xt@ \@tempdima{{\hfil\pagemark \if@twoside\else\hfil\fi}}}}\hss}% %<*article> +% \end{macrocode} +% \changes{v3.41}{2023/06/16}{split usage of \cs{MakeMarkcase}} +% From version 3.41 usage of \cs{MakeMarkcase} is split for number and text, +% to also support \cs{MakeTitlecase}. +% \begin{macrocode} \renewcommand*{\sectionmark}[1]{% \if@twoside\expandafter\markboth\else\expandafter\markright\fi - {\MakeMarkcase{\Ifnumbered{section}{\sectionmarkformat}{}##1}}{}}% + {% + \Ifnumbered{section}{\MakeMarkcase{\sectionmarkformat}}{}% + \MakeMarkcase{##1}% + }{}% + }% \renewcommand*{\subsectionmark}[1]{% \if@twoside \markright{% - \MakeMarkcase{\Ifnumbered{subsection}{\subsectionmarkformat}{}##1}% + \Ifnumbered{subsection}{\MakeMarkcase{\subsectionmarkformat}}{}% + \MakeMarkcase{##1}% }% \fi }% @@ -348,17 +358,20 @@ %<*report|book> \renewcommand*{\chaptermark}[1]{% \if@twoside\expandafter\markboth\else\expandafter\markright\fi - {\MakeMarkcase{\Ifnumbered{chapter}{% -%<book> \if@mainmatter - \chaptermarkformat -%<book> \fi - }{}##1}% + {% + \Ifnumbered{chapter}{% +%<book> \if@mainmatter + \MakeMarkcase{\chaptermarkformat}% +%<book> \fi + }{}\MakeMarkcase{##1}% }{}% }% \renewcommand*{\sectionmark}[1]{% \if@twoside - \markright{\MakeMarkcase{\Ifnumbered{section}{\sectionmarkformat}{}% - ##1}}% + \markright{% + \Ifnumbered{section}{\MakeMarkcase{\sectionmarkformat}}{}% + \MakeMarkcase{##1}% + }% \fi }% %</report|book> diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-sections.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-sections.dtx index af0bc89389a..edfbd4d459a 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrkernel-sections.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-sections.dtx @@ -18,7 +18,7 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrkernel-sections.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 4069 2023-06-29 08:55:54Z kohm $ % The runs of run-time file generation: %<preidentify>%%% (run: preidentify) % - everything that is needed before selfidentification of resulting files @@ -40,9 +40,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-06-29 10:55:54 +0200 (Do, 29. Jun 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4069 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrkernel-sections.dtx}% @@ -1184,10 +1184,43 @@ \providecommand*\@currentlabelname{} \FamilyStringKey[.section]{KOMAarg}{tocentry}{\@currenttocentry} \FamilyStringKey[.section]{KOMAarg}{head}{\@currentheadentry} +\IfLTXAtLeastTF{2020/10/01}{% + \NewHook{\KOMAClassName/option/section/reference/fallback}% +}{}% \DefineFamilyKey[.section]{KOMAarg}{reference}{% \scr@ifundefinedorrelax{NR@gettitle}{% \scr@ifundefinedorrelax{GetTitleString}{% - \def\@currentlabelname{#1}% +% \end{macrocode} +% \changes{v3.41}{2023/06/29}{substitute definition of \cs{@currentlabelname} +% changed} +% This case is complicated. Up to \LaTeX{} 2022/11/01 it was good enough to +% use: +% \begin{verbatim} +% \def\@currentlabelname{#1} +% \end{verbatim} +% But from \LaTeX{} 2023/06/01 the kernel definition of \cs{label} +% additionally writes \cs{@currentlabelname} to the \file{aux}-file. So this +% breaks, if \cs{label} is part of the argument, because it results in an +% infinite expansion loop. To avoid this, the code has been changed. To +% remove \cs{label}, \cs{index}, \cs{glossary}. +% \begin{description} +% \item[ToDo:] The current \cs{@currentlabelname} code is only a workaround +% for \href{https://sourceforge.net/p/koma-script/tickets/55/}{issue 55}. +% Maybe using an empty value would be better. But in this case, what to do +% with \cs{TG@gettitle} and \cs{ztitlerefsetup}? +% \end{description} +% \begin{macrocode} + \begingroup + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \scr@ifundefinedorrelax{UseHook}{}{% + \UseHook{\KOMAClassName/option/section/reference/fallback}% + }% + \protected@edef\@currentlabelname{#1}% + \expandafter\expandafter\expandafter\endgroup + \expandafter\def\expandafter\@currentlabelname\expandafter{% + \@currentlabelname}% }{% \GetTitleString{#1}% \let\@currentlabelname\GetTitleStringResult diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-tocstyle.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-tocstyle.dtx index 443d21593b6..144426afb78 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrkernel-tocstyle.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-tocstyle.dtx @@ -18,7 +18,7 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrkernel-tocstyle.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrkernel-tocstyle.dtx 4060 2023-06-20 08:59:01Z kohm $ % The runs of run-time file generation: %<preidentify>%%% (run: preidentify) % - everything that is needed before selfidentification of resulting files @@ -42,9 +42,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-06-20 10:59:01 +0200 (Di, 20. Jun 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4060 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrkernel-tocstyle.dtx}% @@ -1010,8 +1010,10 @@ % \end{macrocode} % \end{macro}^^A \@TOCEntryStyleNeedsCommandByOption % -% \begin{command}{\TOCEntryStyleInitCode,\TOCEntryStyleStartInitCode} +% \begin{command}{\TOCEntryStyleInitCode,\TOCEntryStyleInitCode*, +% \TOCEntryStyleStartInitCode} % \changes{v3.20}{2015/11/25}{added} +% \changes{v3.41}{2023/06/20}{star variant \cs{TOCEntryStyleInitCode*} added} % 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} @@ -1022,12 +1024,13 @@ % \end{description} % \begin{macrocode} %<*body> -\newcommand{\TOCEntryStyleInitCode}[1]{% - \scr@ifundefinedorrelax{scr@dte@#1@init}{% - \expandafter\providecommand\expandafter*% - \csname scr@dte@#1@init\endcsname[1]% +\NewDocumentCommand\TOCEntryStyleInitCode{sm}{% + \IfBooleanT{#1}{\expandafter\let\csname scr@dte@#2@init\endcsname\relax}% + \scr@ifundefinedorrelax{scr@dte@#2@init}{% + \expandafter\newcommand\expandafter*% + \csname scr@dte@#2@init\endcsname[1]% }{% - \expandafter\l@addto@macro@a\csname scr@dte@#1@init\endcsname + \expandafter\l@addto@macro@a\csname scr@dte@#2@init\endcsname }% } \newcommand{\TOCEntryStyleStartInitCode}[1]{% @@ -1039,7 +1042,7 @@ }% } % \end{macrocode} -% \end{command}^^A \TOCEntryStyleInitCode,\TOCEntryStyleStartInitCode +% \end{command}^^A \TOCEntryStyleInitCode … \TOCEntryStyleStartInitCode % \begin{macro}{\@ExecuteTOCEntryStyleInitCode} % \changes{v3.20}{2015/12/04}{added} % Executes the init code of one style. The first argument is the name of the @@ -1096,6 +1099,7 @@ % \begin{command}{\DeclareTOCStyleEntry} % \changes{v3.20}{2015/11/13}{added} % \changes{v3.39}{2022/10/24}{error message about missing options improved} +% \changes{v3.41}{2023/06/20}{usage of style definition files supported} % This user command defines a new ToC entry command. It tests, if all needed % style macros are already defined. Otherwise an error will be shown and the % ToC entry command will not be defined. The arguments are: @@ -1112,6 +1116,16 @@ %<*body> \newcommand*{\DeclareTOCStyleEntry}[3][]{% \scr@ifundefinedorrelax{scr@dte@def@l@#2}{% + \IfFileExists{tocbasic-tocstyle-#2.def}{% + \edef\reserved@a{% + \unexpanded{% + \makeatletter + \input{tocbasic-tocstyle-#2.def}% + \catcode`\@=}\the\catcode`\@\relax + }\reserved@a + }{}% + }{}% + \scr@ifundefinedorrelax{scr@dte@def@l@#2}{% \PackageError{tocbasic}{toc entry style `#2' undefined}{% Somebody told me to define toc entry `#3' with style `#2',\MessageBreak but I do not know style `#2'.\MessageBreak @@ -1229,6 +1243,8 @@ % \changes{v3.20}{2015/11/17}{added} % \begin{macro}{\@DeclareTOCEntryStyle} % \changes{v3.20}{2015/11/17}{added} +% \changes{v3.41}{2023/06/20}{using \cs{TOCEntryStyleInitCode*} instead of +% \cs{TOCEntryStyleInitCode}} % The user command is used to define a new style for ToC entries. The % arguments are: % \begin{description} @@ -1257,7 +1273,7 @@ \TOC@EntryEndHook{##1}% }% }% - \TOCEntryStyleInitCode{#1}{% + \TOCEntryStyleInitCode*{#1}{% \DefineTOCEntryNumberOption{level}{}{tocdepth}{toc entry level}% #2% }% diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-version.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-version.dtx index 87b499e7064..7fc1e7c7848 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrkernel-version.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-version.dtx @@ -18,7 +18,7 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrkernel-version.dtx 4038 2023-04-24 07:06:57Z kohm $ +%%% From File: $Id: scrkernel-version.dtx 4070 2023-07-07 07:08:40Z kohm $ % % ATTENTION: In this file parts of the code and documentation are before the % driver. This must be, because this part of the code is needed by the driver @@ -141,9 +141,9 @@ % therefore the syntax or general structure of the line must not be changed! % \begin{macrocode} %<*!v4> - \@CheckKOMAScriptVersion{2023/04/24 v3.40 KOMA-Script}% + \@CheckKOMAScriptVersion{2023/07/07 v3.41 KOMA-Script}% %</!v4> -%<v4> \@nameuse{@CheckKOMAScriptVersion}{2023/04/24 v3.40 KOMA-Script}% +%<v4> \@nameuse{@CheckKOMAScriptVersion}{2023/07/07 v3.41 KOMA-Script}% \endgroup % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx b/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx index b7909223807..338cdc4403b 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx @@ -18,7 +18,7 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: scrlayer.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: scrlayer.dtx 4058 2023-06-16 08:32:27Z kohm $ %<identify>%%% (run: identify) %<init>%%% (run: init) %<options>%%% (run: options) @@ -28,9 +28,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-06-16 10:32:27 +0200 (Fr, 16. Jun 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4058 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrlayer.dtx}% @@ -311,9 +311,11 @@ % \begin{option}{markcase} % \changes{v3.39}{2022/11/11}{initial dot in member argument of option storage % commands removed} +% \changes{v3.41}{2023/06/16}{new value \texttt{title} to support +% \cs{MakeTitlecase}} % \begin{description} % \item[\texttt{=\meta{setting}}] one of: \texttt{upper}, \texttt{lower}, -% \texttt{used}, or \texttt{ignoreuppercase}. +% \texttt{title}, \texttt{used}, or \texttt{ignoreuppercase}. % \end{description}\noindent % The two options \opt{markuppercase} and \opt{markusedcase} become % deprecated and are replace be the single option \opt{markcase}. Note, @@ -325,9 +327,9 @@ %<interface&scrpage>\scrlayer@AtEndOfPackage{% \begingroup \KOMA@set@ncmdkey{markcase}{reserved@a}{% - {upper}{0},{lower}{1},{used}{2},% - {ignoreuppercase}{3},{nouppercase}{3},% - {ignoreupper}{3},{noupper}{3}% + {upper}{0},{lower}{1},{title}{2},{used}{3},% + {ignoreuppercase}{4},{nouppercase}{4},% + {ignoreupper}{4},{noupper}{4}% }{#1}% \ifx\FamilyKeyState\FamilyKeyStateProcessed \aftergroup\FamilyKeyStateProcessed @@ -340,6 +342,15 @@ \aftergroup\MakeLowercase \aftergroup\scrlayer@forceignoreuppercasefalse \or + \scr@ifundefinedorrelax{MakeTitlecase}{% + \PackageWarning{scrlayer}{`markcase=title' ignored because + \string\MakeTitlecase\space not available}% + \aftergroup\MakeMarkcase + }{% + \aftergroup\MakeTitlecase + }% + \aftergroup\scrlayer@forceignoreuppercasefalse + \or \aftergroup\@firstofone \aftergroup\scrlayer@forceignoreuppercasefalse \else @@ -376,9 +387,11 @@ \KOMA@kav@replacevalue{scrlayer.sty}{markcase}{upper}% \else\ifx\MakeMarkcase\MakeLowercase \KOMA@kav@replacevalue{scrlayer.sty}{markcase}{lower}% - \else\ifx\MakeMarkcase\scr@ignoreuppercase - \KOMA@kav@replacevalue{scrlayer.sty}{markcase}{ignoreuppercase}% -\fi\fi\fi\fi + \else\ifx\MakeMarkcase\MakeTitlecase + \KOMA@kav@replacevalue{scrlayer.sty}{markcase}{title}% + \else\ifx\MakeMarkcase\scr@ignoreuppercase + \KOMA@kav@replacevalue{scrlayer.sty}{markcase}{ignoreuppercase}% +\fi\fi\fi\fi\fi % \end{macrocode} % \begin{macro}{\scrlayer@ignoreuppercase} % We span a group and set \cs{uppercase} and \cs{MakeUppercase} to @@ -784,6 +797,8 @@ % \end{macrocode} % \end{macro}^^A \automark@basics % \begin{macro}{\automark@righthigh} +% \changes{v3.41}{2023/06/16}{split usage of \cs{MakeMarkcase} to support +% \cs{MakeTitlecase}} % Set up the right mark of a higher level, but in single-side layout only if % \opt{autooneside} hasn't been used. Note, that with this definition no % special handling for \KOMAScript's \cs{addchap} and \cs{addsec} is @@ -799,11 +814,11 @@ \expandafter\endgroup \if@tempswa \@mkright{% - \MakeMarkcase{% - \ifnum \c@secnumdepth<\numexpr \csname #1numdepth\endcsname +0\relax - \else\if@mainmatter \csname #1markformat\endcsname\fi\fi - ##1% - }% + \ifnum \c@secnumdepth<\numexpr \csname #1numdepth\endcsname +0\relax + \else + \if@mainmatter \MakeMarkcase{\csname #1markformat\endcsname}\fi + \fi + \MakeMarkcase{##1}% }% \fi }% @@ -832,15 +847,17 @@ % instead of only a left high mark, we set up both marks. % \changes{v3.27}{2019/07/25}{replaced \cs{@empty} by \texttt{\{\}} to avoid % \textsf{babel} issue} +% \changes{v3.41}{2023/06/16}{split usage of \cs{MakeMarkcase} to support +% \cs{MakeTitlecase}} % \begin{macrocode} \expandafter\@mkdouble \fi {% - \MakeMarkcase{% - \ifnum \c@secnumdepth<\numexpr \csname #1numdepth\endcsname +0\relax - \else\if@mainmatter \csname #1markformat\endcsname\fi\fi - ##1% - }% + \ifnum \c@secnumdepth<\numexpr \csname #1numdepth\endcsname +0\relax + \else + \if@mainmatter \MakeMarkcase{\csname #1markformat\endcsname}\fi + \fi + \MakeMarkcase{##1}% }{}% }% }{}% @@ -867,17 +884,17 @@ % \end{macrocode} % Level of left mark is equal to level of right mark. This is % nice and very easy to handle. +% \changes{v3.41}{2023/06/16}{split usage of \cs{MakeMarkcase} to support +% \cs{MakeTitlecase}} % \begin{macrocode} \expandafter\def\csname #2mark\endcsname##1{% \@mkdouble{% - \MakeMarkcase{% - \ifnum \c@secnumdepth<\numexpr - \csname #2numdepth\endcsname +0\relax - \else - \if@mainmatter \csname #2markformat\endcsname\fi - \fi - ##1% - }% + \ifnum \c@secnumdepth<\numexpr + \csname #2numdepth\endcsname +0\relax + \else + \if@mainmatter \MakeMarkcase{\csname #2markformat\endcsname}\fi + \fi + \MakeMarkcase{##1}% }% }% \else @@ -893,25 +910,23 @@ \expandafter\endgroup \if@tempswa \@mkleft{% - \MakeMarkcase{% - \ifnum \c@secnumdepth - < \numexpr\csname #1numdepth\endcsname +0\relax - \else - \if@mainmatter \csname #1markformat\endcsname\fi - \fi - ##1% - }% + \ifnum \c@secnumdepth + < \numexpr\csname #1numdepth\endcsname +0\relax + \else + \if@mainmatter \MakeMarkcase{\csname #1markformat\endcsname}\fi + \fi + \MakeMarkcase{##1}% }% \fi }% \expandafter\def\csname #2mark\endcsname##1{% \@mkboth{}{% - \MakeMarkcase{% - \ifnum \c@secnumdepth - < \numexpr \csname #2numdepth\endcsname +0\relax - \else\if@mainmatter \csname #2markformat\endcsname\fi\fi - ##1% - }% + \ifnum \c@secnumdepth + < \numexpr \csname #2numdepth\endcsname +0\relax + \else + \if@mainmatter \MakeMarkcase{\csname #2markformat\endcsname}\fi + \fi + \MakeMarkcase{##1}% }% }% \fi diff --git a/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx b/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx index 1dc1d7770f2..b9b75070afc 100644 --- a/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx +++ b/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx @@ -18,7 +18,7 @@ % % This work consists of all files listed in MANIFEST.md. % ====================================================================== -%%% From File: $Id: tocbasic.dtx 4032 2023-04-17 09:45:11Z kohm $ +%%% From File: $Id: tocbasic.dtx 4067 2023-06-28 14:37:03Z kohm $ %<identify>%%% (run: identify) %<prepare>%%% (run: prepare) %<option>%%% (run: option) @@ -29,9 +29,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2023-04-17 11:45:11 +0200 (Mo, 17. Apr 2023) $ + \filedate$Date: 2023-06-28 16:37:03 +0200 (Mi, 28. Jun 2023) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 4032 $ + \filerevision$Revision: 4067 $ \endgroup \ProvidesFile{tocbasic.dtx}[\filedate\space\filerevision\space %</dtx> @@ -61,10 +61,9 @@ \file{tocbasic.sty}{% \from{tocbasic.dtx}{package,identify}% \from{tocbasic.dtx}{package,prepare}% - \from{scrkernel-tocstyle.dtx}{package,prepare}% \from{tocbasic.dtx}{package,option}% - \from{scrkernel-tocstyle.dtx}{package,option}% - \from{tocbasic.dtx}{package,body}% + \from{tocbasic.dtx}{package,execoption}% + \from{tocbasic.dtx}{package,body,deprecated}% \from{scrkernel-tocstyle.dtx}{package,body}% \from{scrkernel-tocstyle.dtx}{package,style,gobble}% \from{scrkernel-tocstyle.dtx}{package,style,dottedtocline}% @@ -145,6 +144,28 @@ % out-sourced into file \file{scrkernel-tocbasic.dtx}. % % +% \subsection{Required packages} +% \label{sec:packages} +% +% \changes{v3.41}{2023/06/28}{required packages moved to \texttt{prepare} run} +% \changes{v3.41}{2023/06/28}{\pkg{expl3} and \pkg{xparse} are required} +% Package \pkg*{scrbase} is needed to process all macro options. +% \begin{macrocode} +%<*prepare> +\RequirePackage{scrbase} +%</prepare> +% \end{macrocode} +% +% Now we can load \pkg{xparse} if needed, which also would load \pkg{expl3}: +% \begin{macrocode} +%<*prepare> +\scr@ifundefinedorrelax{NewDocumentCommand}{% + \RequirePackage{xparse}[2018-04-12]% +}{} +%</prepare> +% \end{macrocode} +% +% % \subsection{Options} % \label{sec:options} % @@ -154,28 +175,12 @@ % result in an option clash. Nevertheless, the not existing options are % processed. % \begin{macrocode} -%<*option> +%<*execoption> \ProcessOptions\relax -%</option> +%</execoption> % \end{macrocode} % % -% \subsection{Required packages} -% \label{sec:packages} -% -% Package \pkg*{scrbase} is needed to process all macro options. As long as -% no package options are provided, the \texttt{body}-run is early enough to -% load it. -% \begin{macrocode} -%<*body> -\RequirePackage{scrbase} -%</body> -% \end{macrocode} -% We load it after processing the options, because we don't need it for -% processing options. -% -% -% % \subsection{Unwanted packages} % \label{sec:unpackages} % @@ -272,19 +277,33 @@ % \end{macrocode} % \end{command}^^A \ifattoclist,\Ifattoclist % +% \begin{macro}{\tb@optowner} +% \changes{v3.41}{2023/06/28}{new} +% Several of the following commands use an optional argument for the +% owner. Almost always if the argument is not given but \cs{@currname} is not +% empty \texttt{\cs{@currname}.\cs{@currext}} should be used. If the argument +% is not given but \cs{@currname} is empty, an empty value should be used. And +% if the optional argument is given, it should be used unchanged. So here is a +% helper macro for exactly this logic. Note, that argument here is not +% optional but mandatory and should be an optional argument of +% \cs{NewDocumentCommand}. +% \begin{macrocode} +\newcommand*{\tb@optowner}[1]{% + \IfValueTF{#1}{% + #1% + }{% + \ifx\@currname\@empty\else + \@currname.\@currext% + \fi + }% +} +% \end{macrocode} +% \end{macro} % \begin{command}{\addtotoclist} % \changes{v3.06a}{2010/09/14}{expand the arguments while adding them to the % internal list} -% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by -% \cs{kernel@ifnextchar}} -% \begin{macro}{\@addtotoclist,\scr@addtotoclist} -% \changes{v1.0a}{2008/11/11}{\cs{@addtotoclist} renamed to -% \cs{scr@addtotoclist} because of package \pkg{flowfram}} -% \begin{macro}{\@@addtotoclist,\scr@@addtotoclist} -% \changes{v1.0a}{2008/11/11}{\cs{@@addtotoclist} renamed to -% \cs{scr@@addtotoclist} because of package \pkg{flowfram}} -% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by -% \cs{Ifattoclist}} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % This command adds an extension to the list of toc-files. The first, % optional argument is the class or package name with the corresponding % extension of class or package files. If this argument was omitted @@ -294,19 +313,8 @@ % second, mandatory argument is the extension of the toc-file. NOTE: An % empty first argument is not the same like omitting the first argument! % \begin{macrocode} -\newcommand*{\addtotoclist}{% - \kernel@ifnextchar [%] - \scr@@addtotoclist\scr@addtotoclist -} -\newcommand*{\scr@addtotoclist}{% - \ifx\@currname\@empty - \def\reserved@a{\scr@@addtotoclist[]}% - \else - \edef\reserved@a{\noexpand\scr@@addtotoclist[\@currname.\@currext]}% - \fi - \reserved@a -} -\newcommand*{\scr@@addtotoclist}[2][]{% +\NewDocumentCommand\addtotoclist{om}{% + \edef\reserved@b{\tb@optowner{#1}}% \Ifattoclist{#2}{% \PackageError{tocbasic}{% file extension `#2' cannot be used twice @@ -320,15 +328,15 @@ }% }{% \begingroup - \protected@edef\reserved@a{% + \edef\reserved@a{% \noexpand\g@addto@macro\noexpand\tb@listoftocs{% - \noexpand\do{#2}{#1}}}\reserved@a + \noexpand\do{#2}{\reserved@b}}}\reserved@a \endgroup - \ifx\relax #1\relax\else - \@ifundefined{tb@#1@add@hook}{}{% + \ifx\reserved@b\@empty\else + \@ifundefined{tb@\reserved@b @add@hook}{}{% \edef\reserved@a{% \noexpand\def\noexpand\@currext{#2}% - \noexpand\@nameuse{tb@#1@add@hook}% + \noexpand\@nameuse{tb@\reserved@b @add@hook}% \noexpand\def\noexpand\@currext{\@currext}% }\reserved@a }% @@ -341,7 +349,15 @@ }% } % \end{macrocode} -% \end{macro} +% \begin{macro}[noprint]{\@addtotoclist,\scr@addtotoclist, +% \@@addtotoclist,\scr@@addtotoclist} +% \changes{v1.0a}{2008/11/11}{\cs{@addtotoclist} renamed to +% \cs{scr@addtotoclist} because of package \pkg{flowfram}} +% \changes{v1.0a}{2008/11/11}{\cs{@@addtotoclist} renamed to +% \cs{scr@@addtotoclist} because of package \pkg{flowfram}} +% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by +% \cs{Ifattoclist}} +% \changes{v3.41}{2023/06/28}{removed} % \end{macro} % \end{command} % @@ -371,7 +387,8 @@ % \begin{command}{\AtAddToTocList} % \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by % \cs{kernel@ifnextchar}} -% \begin{macro}{\@AtAddToTocList,\@@AtAddToTocList} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % Action to be done, when adding a toc-file of a known owner. The first % optional argument is the owner. The second, mandatory argument is the % action. While doing the action \cs{@currext} will be the extension of the @@ -386,23 +403,16 @@ % the general hook). But the individual hook will not be processed for % toc-files without any owner! % \begin{macrocode} -\newcommand*{\AtAddToTocList}{% - \kernel@ifnextchar [%] - \@@AtAddToTocList\@AtAddToTocList -} -\newcommand*{\@AtAddToTocList}{% - \ifx\@currname\@empty - \def\reserved@a{\@@AtAddToTocList[]}% - \else - \edef\reserved@a{\noexpand\@@AtAddToTocList[\@currname.\@currext]}% - \fi - \reserved@a -} -\newcommand*{\@@AtAddToTocList}[1][]{% - \@ifundefined{tb@#1@add@hook}{\@namedef{tb@#1@add@hook}{}}{}% - \expandafter\g@addto@macro\csname tb@#1@add@hook\endcsname +\NewDocumentCommand\AtAddToTocList{o}{% + \edef\reserved@a{\tb@optowner{#1}}% + \@ifundefined{tb@\reserved@a @add@hook}% + {\@namedef{tb@\reserved@a @add@hook}{}}% + {}% + \expandafter\g@addto@macro\csname tb@\reserved@a @add@hook\endcsname } % \end{macrocode} +% \begin{macro}[noprint]{\@AtAddToTocList,\@@AtAddToTocList} +% \changes{v3.41}{2023/06/28}{removed} % \end{macro} % \end{command} % @@ -461,117 +471,104 @@ % \begin{command}{\removefromtoclist} % \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by % \cs{kernel@ifnextchar}} -% \begin{macro}{\scr@removefromtoclist,\@removefromtoclist} % \changes{v3.22}{2016/09/06}{missing \cs{global} added} -% \changes{v3.28}{2019/11/22}{\cs{@removefromtoclist} renamed to -% \cs{scr@removefromtoclist}} -% \begin{macro}{\scr@@removefromtoclist,\@@removefromtoclist} -% \changes{v3.22}{2016/09/06}{missing \cs{global} added} -% \changes{v3.28}{2019/11/22}{\cs{@@removefromtoclist} renamed to -% \cs{scr@removefromtoclist}} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % This command will remove an extension from the list of toc-files. If the % first, optional argument is given, the extension will only be removed, if % it was added by the given owner. NOTE: An empty first argument is not the % same like omitting the first argument! % \begin{macrocode} -\newcommand*{\removefromtoclist}{% - \kernel@ifnextchar [%] - \scr@removefromtoclist\scr@@removefromtoclist -} -\newcommand*{\scr@removefromtoclist}[2][]{% - \begingroup - \let\tb@oldlist\tb@listoftocs - \def\do##1##2{% - \edef\reserved@a{##1}% - \ifx\reserved@a\reserved@b - \begingroup - \edef\@currext{##2}% - \edef\reserved@b{#1}% - \ifx\@currext\reserved@b - \else - \g@addto@macro\tb@listoftocs{\do{##1}{##2}}% - \fi - \endgroup - \else - \g@addto@macro\tb@listoftocs{\do{##1}{##2}}% - \fi - }% - \edef\reserved@b{#2}\global\let\tb@listoftocs\@empty - \tb@oldlist - \endgroup -} -\newcommand*{\scr@@removefromtoclist}[1]{% +\NewDocumentCommand\removefromtoclist{om}{% \begingroup \let\tb@oldlist\tb@listoftocs + \edef\reserved@b{#2}% + \global\let\tb@listoftocs\empty \def\do##1##2{% \edef\reserved@a{##1}% \ifx\reserved@a\reserved@b + \IfValueT{#1}{% + \begingroup + \edef\@currext{##2}% + \edef\reserved@b{#1}% + \ifx\@currext\reserved@b + \else + \g@addto@macro\tb@listoftocs{\do{##1}{##2}}% + \fi + \endgroup + }% \else \g@addto@macro\tb@listoftocs{\do{##1}{##2}}% \fi }% - \edef\reserved@b{#1}\global\let\tb@listoftocs\@empty \tb@oldlist \endgroup } % \end{macrocode} -% \end{macro} +% \begin{macro}[noprint]{\scr@removefromtoclist,\@removefromtoclist, +% \scr@@removefromtoclist,\@@removefromtoclist} +% \changes{v3.28}{2019/11/22}{\cs{@removefromtoclist} renamed to +% \cs{scr@removefromtoclist}} +% \changes{v3.28}{2019/11/22}{\cs{@@removefromtoclist} renamed to +% \cs{scr@removefromtoclist}} +% \changes{v3.41}{2023/06/28}{removed} % \end{macro} % \end{command} % % \begin{command}{\doforeachtocfile} -% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by -% \cs{kernel@ifnextchar}} -% \begin{macro}{\@doforeachtocfile,\@@doforeachtocfile} % \changes{v3.09}{2011/03/01}{\cs{@currext} defined using \cs{edef} instead % of \cs{def}} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % This command does the second, mandatory argument for each toc-file at the % list of toc-files. If the first, optional argument was given this will be % done only for the toc-files of that owner. NOTE: An empty first argument % is not the same like omitting the first argument! -% % While processing the second argument \cs{@currext} is the extension of % the toc-file. The second argument will be processed with increased group % level! -% % See \cs{addtoeachtocfile} for an example of usage of % \cs{doforeachtocfile}. % \begin{macrocode} -\newcommand{\doforeachtocfile}{% - \kernel@ifnextchar [%] - \@doforeachtocfile\@@doforeachtocfile -} -\newcommand{\@doforeachtocfile}[2][]{% - \def\do##1##2{% - \edef\reserved@a{#1}\edef\reserved@b{##2}\ifx\reserved@a\reserved@b - \edef\@currext{##1}#2% - \fi - }% - \edef\reserved@a{% - \noexpand\tb@listoftocs - \noexpand\def\noexpand\@currext{\@currext}% - }\reserved@a - \let\do\relax -} -\newcommand{\@@doforeachtocfile}[1]{% - \def\do##1##2{% - \edef\@currext{##1}#1% +\NewDocumentCommand\doforeachtocfile{o+m}{% + \IfValueTF{#1}{% + \def\do##1##2{% + \edef\reserved@a{#1}\edef\reserved@b{##2}% + \ifx\reserved@a\reserved@b \edef\@currext{##1}#2\fi + }% + }{% + \def\do##1##2{\edef\@currext{##1}#2}% }% \edef\reserved@a{% \noexpand\tb@listoftocs \noexpand\def\noexpand\@currext{\@currext}% }\reserved@a - \let\do\relax +% \end{macrocode} +% \changes{v3.41}{2023/05/16}{don't \cs{let}\cs{do}\cs{relax}} +% Former versions of \KOMAScript{} have used |\let\do\relax| to undefined +% \cs{do} after the walk-through. But some packages like \pkg{dynkin-diagrams} +% have had problems using \cs{renewcommand} instead of \cs{def} or \cs{let} to +% change \cs{do}. So from version 3.41 \KOMAScript{} has changed this to +% |\let\do\noexpand|, because this is the default of \LaTeX{} after +% |\begin{document}|. However, this is only a workaround for a +% workaround. Best would be to remove the final change of \cs{do}. But this +% could also break packages. +% \begin{macrocode} + \let\do\noexpand } % \end{macrocode} +% \begin{macro}[noprint]{\@doforeachtocfile,\@@doforeachtocfile} +% \changes{v3.41}{2023/06/28}{removed} % \end{macro} % \end{command} % % \begin{command}{\addtoeachtocfile} % \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by % \cs{kernel@ifnextchar}} -% \begin{macro}{\@addtoeachtocfile,\@@addtoeachtocfile} -% \changes{v3.03b}{2009/06/08}{typo fix at usage of \cs{doforeachtocfile}} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % This command calls \cs{addtocontents} with the section, mandatory % argument for each toc-file at the list of toc-files. If the first, % optional argument was given this will be done only for the toc-files of @@ -579,18 +576,14 @@ % the first argument! And don't forget to protect the commands, that should % not be expanded, at the mandatory argument. % \begin{macrocode} -\newcommand{\addtoeachtocfile}{% - \kernel@ifnextchar [%] - \@addtoeachtocfile\@@addtoeachtocfile -} -\newcommand{\@addtoeachtocfile}[2][]{% +\NewDocumentCommand\addtoeachtocfile{o+m}{% \doforeachtocfile[{#1}]{\addtocontents{\@currext}{#2}}% } -\newcommand{\@@addtoeachtocfile}[1]{% - \doforeachtocfile{\addtocontents{\@currext}{#1}}% -} %</body> % \end{macrocode} +% \begin{macro}[noprint]{\@addtoeachtocfile,\@@addtoeachtocfile} +% \changes{v3.03b}{2009/06/08}{typo fix at usage of \cs{doforeachtocfile}} +% \changes{v3.41}{2023/06/28}{removed} % \end{macro} % \end{command} % @@ -602,22 +595,19 @@ % \begin{command}{\addcontentslinetoeachtocfile} % \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by % \cs{kernel@ifnextchar}} -% \begin{macro}{\@addcontentslinetoeachtocfile,\@@addcontentslinetoeachtocfile} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % Something like a combination of \cs{addtoeachtocfile} and % \cs{addcontentsline}. % \begin{macrocode} %<*body> -\newcommand{\addcontentslinetoeachtocfile}{% - \kernel@ifnextchar [%] - \@addcontentslinetoeachtocfile\@@addcontentslinetoeachtocfile -} -\newcommand{\@addcontentslinetoeachtocfile}[3][]{% - \doforeachtocfile[{#1}]{\addcontentsline{\@currext}{#2}{#3}}% -} -\newcommand{\@@addcontentslinetoeachtocfile}[2]{% - \doforeachtocfile{\addcontentsline{\@currext}{#1}{#2}}% -} +\NewDocumentCommand\addcontentslinetoeachtocfile{omm}{% + \doforeachtocfile[{#1}]{\addcontentsline{\@currext}{#2}{#3}}% +} % \end{macrocode} +% \begin{macro}[noprint]{\@addcontentslinetoeachtocfile, +% \@@addcontentslinetoeachtocfile} +% \changes{v3.41}{2023/06/28}{removed} % \end{macro} % \end{command} % @@ -625,20 +615,14 @@ % \changes{v3.12}{2013/09/24}{added} % \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by % \cs{kernel@ifnextchar}} -% \begin{macro}{\@addxcontentsline} -% \changes{v3.12}{2013/09/24}{added} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % This will be used instead of \cs{addcontentsline} to generate numbered or % not numbered entries to a toc-file. First argument is the toc-file, second % the entry type, e.g., |chapter|, the third is the entry number or empty and % the fourth and last is the entry text. % \begin{macrocode} -\newcommand*{\addxcontentsline}[2]{% - \kernel@ifnextchar [%] - {\@addxcontentsline{#1}{#2}}% - {\@addxcontentsline{#1}{#2}[]}% -} -\newcommand*{\@addxcontentsline}{} -\def\@addxcontentsline#1#2[#3]#4{% +\NewDocumentCommand\addxcontentsline{mmO{}m}{% \scr@ifundefinedorrelax{add#2#1entry}{% \tocbasic@addxcontentsline{#1}{#2}{#3}{#4}% }{% @@ -646,6 +630,10 @@ }% } % \end{macrocode} +% \begin{macro}[noprint]{\@addxcontentsline} +% \changes{v3.12}{2013/09/24}{added} +% \changes{v3.41}{2023/06/28}{removed} +% \end{macro} % \begin{command}{\nonumberline} % \changes{v3.12}{2013/09/24}{added} % Either \cs{relax} or \cs{numberline} depending on the feature @@ -654,21 +642,20 @@ \newcommand*{\nonumberline}{}% % \end{macrocode} % \end{command} -% \begin{command}{\addxcontentsline} +% \begin{macro}{\tocbasic@addxcontentsline} % This may be used to either use a heading type command or the general default % one. You are not allowed to use it in the definition of a heading type % command like \cs{addchaptertocentry}! You may use % \cs{tocbasic@addxcontentsline} at the definition of those commands. % \begin{macrocode} \newcommand*{\tocbasic@addxcontentsline}[4]{% - \if\relax\detokenize{#3}\relax + \IfArgIsEmpty{#3}{% \addcontentsline{#1}{#2}{\protect\nonumberline#4}% - \else + }{% \addcontentsline{#1}{#2}{\protect\numberline{#3}#4}% - \fi + }% } % \end{macrocode} -% \end{command} % \end{macro} % \end{command} % @@ -676,42 +663,22 @@ % \changes{v3.12}{2013/09/24}{added} % \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by % \cs{kernel@ifnextchar}} -% \begin{macro}{\@addxcontentslinetoeachtocfile, -% \@@addxcontentslinetoeachtocfile} -% \changes{v3.12}{2013/09/24}{added} -% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by -% \cs{kernel@ifnextchar}} -% \begin{macro}{\@@@addxcontentslinetoeachtocfile, -% \@@@@addxcontentslinetoeachtocfile} -% \changes{v3.12}{2013/09/24}{added} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % Similar to \cs{addcontentslinetoeachtocfile} using % \cs{addxcontentsline} instead of \cs{addcontentsline}. % \begin{macrocode} -\newcommand{\addxcontentslinetoeachtocfile}{% - \kernel@ifnextchar [%] - \@addxcontentslinetoeachtocfile\@@addxcontentslinetoeachtocfile -} -\newcommand{\@addxcontentslinetoeachtocfile}[2][]{% - \kernel@ifnextchar [%] - {\@@@addxcontentslinetoeachtocfile[{#1}]{#2}}% - {\@@@addxcontentslinetoeachtocfile[{#1}]{#2}[]} -} -\newcommand*{\@@@addxcontentslinetoeachtocfile}{} -\def\@@@addxcontentslinetoeachtocfile[#1]#2[#3]#4{% - \doforeachtocfile[{#1}]{\addxcontentsline{\@currext}{#2}[#3]{#4}}% -} -\newcommand{\@@addxcontentslinetoeachtocfile}[1]{% - \kernel@ifnextchar [%] - {\@@@@addxcontentslinetoeachtocfile{#1}}% - {\@@@@addxcontentslinetoeachtocfile{#1}[]}% -} -\newcommand*{\@@@@addxcontentslinetoeachtocfile}{} -\def\@@@@addxcontentslinetoeachtocfile#1[#2]#3{% - \doforeachtocfile{\addxcontentsline{\@currext}{#1}[{#2}]{#3}}% +\NewDocumentCommand\addxcontentslinetoeachtocfile{omom}{% + \doforeachtocfile[{#1}]{\addxcontentsline{\@currext}{#2}[{#3}]{#4}} } %</body> % \end{macrocode} -% \end{macro} +% \begin{macro}[noprint]{\@addxcontentslinetoeachtocfile, +% \@@addxcontentslinetoeachtocfile, +% \@@@addxcontentslinetoeachtocfile, +% \@@@@addxcontentslinetoeachtocfile} +% \changes{v3.12}{2013/09/24}{added} +% \changes{v3.41}{2023/06/28}{removed} % \end{macro} % \end{command} % @@ -810,7 +777,10 @@ \g@addto@macro\tocbasic@@before@hook{#2}% \else \@ifundefined{tb@#1@before@hook}{% -%<trace> \PackageInfo{tocbasic}{defining new hook before starting `#1'}% +%<*trace> + \PackageInfo{tocbasic}{defining new hook before starting + \IfArgIsEmpty{#1}{any toc}{`#1'}}% +%</trace> \expandafter\global\expandafter\let\csname tb@#1@before@hook\endcsname \@empty }{}% @@ -822,7 +792,10 @@ \g@addto@macro\tocbasic@@after@hook{#2}% \else \@ifundefined{tb@#1@after@hook}{% -%<trace> \PackageInfo{tocbasic}{defining new hook after starting `#1'}% +%<*trace> + \PackageInfo{tocbasic}{defining new hook after starting + \IfArgIsEmpty{#1}{any toc}{`#1'}}% +%</trace> \expandafter\global\expandafter\let\csname tb@#1@after@hook\endcsname \@empty }{}% @@ -933,23 +906,19 @@ % \end{command} % % \begin{command}{\listofeachtoc} +% \changes{v3.03b}{2009/06/08}{typo fix at usage of \cs{doforeachtocfile}} % \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by % \cs{kernel@ifnextchar}} -% \begin{macro}{\@listofeachtoc,\@@listofeachtoc} -% \changes{v3.03b}{2009/06/08}{typo fix at usage of \cs{doforeachtocfile}} +% \changes{v3.41}{2023/06/28}{using \cs{NewDocumentCommand} to not need all +% the helpers} % Another example of using \cs{doforeachtocfile}. % \begin{macrocode} -\newcommand*{\listofeachtoc}{% - \kernel@ifnextchar [%] - \@listofeachtoc\@@listofeachtoc -} -\newcommand{\@listofeachtoc}[1][]{% +\NewDocumentCommand\listofeachtoc{o}{% \doforeachtocfile[{#1}]{\listoftoc{\@currext}}% } -\newcommand{\@@listofeachtoc}[1]{% - \doforeachtocfile{\listoftoc{\@currext}}% -} % \end{macrocode} +% \begin{macro}[noprint]{\@listofeachtoc,\@@listofeachtoc} +% \changes{v3.41}{2023/06/28}{removed} % \end{macro} % \end{command} % @@ -1103,7 +1072,10 @@ % \begin{macrocode} \newcommand{\BeforeTOCHead}[2][]{% \@ifundefined{tb@#1@beforehead@hook}{% -%<trace> \PackageInfo{tocbasic}{defining new hook before heading of `#1'}% +%<*trace> + \PackageInfo{tocbasic}{defining new hook before heading of + \IfArgIsEmpty{#1}{each toc}{`#1'}}% +%</trace> \expandafter\global\expandafter\let\csname tb@#1@beforehead@hook\endcsname \@empty }{}% @@ -1111,7 +1083,10 @@ } \newcommand{\AfterTOCHead}[2][]{% \@ifundefined{tb@#1@afterhead@hook}{% -%<trace> \PackageInfo{tocbasic}{defining new hook after heading of `#1'}% +%<*trace> + \PackageInfo{tocbasic}{defining new hook after heading of + \IfArgIsEmpty{#1}{each toc}{`#1'}}% +%</trace> \expandafter\global\expandafter\let\csname tb@#1@afterhead@hook\endcsname \@empty }{}% @@ -1198,6 +1173,7 @@ % \changes{v3.28}{2019/11/19}{\cs{iftocfeature} renamed to \cs{Iftocfeature}} % We need a test for the features % \begin{macrocode} +%<*deprecated> \providecommand*{\iftocfeature}{% \PackageWarning{tocbasic}{Usage of deprecated command `\string\iftocfeature'.\MessageBreak @@ -1207,6 +1183,7 @@ }% \Iftocfeature } +%</deprecated> \newcommand*{\Iftocfeature}[2]{% \scr@ifundefinedorrelax{tocbasic@#1@feature@#2}{% \expandafter\@secondoftwo |