summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source/scrhack.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/koma-script/source/scrhack.dtx')
-rw-r--r--macros/latex/contrib/koma-script/source/scrhack.dtx776
1 files changed, 333 insertions, 443 deletions
diff --git a/macros/latex/contrib/koma-script/source/scrhack.dtx b/macros/latex/contrib/koma-script/source/scrhack.dtx
index 1a75956680..dc1ea8b087 100644
--- a/macros/latex/contrib/koma-script/source/scrhack.dtx
+++ b/macros/latex/contrib/koma-script/source/scrhack.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% ======================================================================
% scrhack.dtx
-% Copyright (c) Markus Kohm, 2008-2021
+% Copyright (c) Markus Kohm, 2008-2022
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
@@ -20,48 +20,8 @@
%
% To create `scrhack.sty' run `tex scrhack.dtx'. Using LaTeX instead
% of TeX would generate the implementation documentation.
-% ----------------------------------------------------------------------
-% scrhack.dtx
-% Copyright (c) Markus Kohm, 2008-2021
-%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
-% Version 1.3c, verteilt und/oder veraendert werden.
-% Die neuste Version dieser Lizenz ist
-% http://www.latex-project.org/lppl.txt
-% und Version 1.3c ist Teil aller Verteilungen von LaTeX
-% Version 2005/12/01 oder spaeter und dieses Werks.
-%
-% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
-% (allein durch den Autor verwaltet).
-%
-% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
-%
-% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
-%
-% `scrhack.sty' kann durch den Aufruf `tex scrhack.dtx' erzeugt
-% werden. Bei Verwendung von LaTeX statt TeX wird hingegen die
-% Implementierungsdokumentation erzeugt.
% ======================================================================
-% \fi
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
-% \iffalse
-%%% From File: $Id: scrhack.dtx 3602 2021-06-03 17:24:02Z kohm $
+%%% From File: $Id: scrhack.dtx 3690 2022-02-10 09:59:31Z kohm $
%<package&identify>%%% using: package,identify
%<package&option>%%% using: package,option
%<package&body>%%% using: package,body
@@ -70,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: 2021-06-03 19:24:02 +0200 (Thu, 03 Jun 2021) $
+ \filedate$Date: 2022-02-10 10:59:31 +0100 (Do, 10. Feb 2022) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 1962 $
+ \filerevision$Revision: 3690 $
\endgroup
\ProvidesFile{scrhack.dtx}[\filedate\space\filerevision\space
%</dtx>
@@ -168,83 +128,79 @@
\let\endbatchfile\relax
\fi
\endbatchfile
-\documentclass[parskip=half-]{scrdoc}
-\usepackage[english,ngerman]{babel}
-\usepackage[T1]{fontenc}
-\usepackage{lmodern}
-\newcommand*{\Environment}[1]{\texttt{\mbox{#1}}}
-\CodelineIndex
-\RecordChanges
+\documentclass[USenglish]{koma-script-source-doc}
+\usepackage{babel}
+\setcounter{StandardModuleDepth}{2}
\begin{document}
-\GetFileInfo{scrhack.dtx}
-\DocInput{scrhack.dtx}
+ \DocInput{scrhack.dtx}
\end{document}
%</dtx>
%\fi
%
-% \selectlanguage{english}
-%
-% \let\PName\meta
-% \let\Parameter\marg
-% \providecommand*{\PParameter}[1]{\texttt{\{#1\}}}
-% \providecommand*{\Counter}[1]{\texttt{\mbox{#1}}}
-% \providecommand*{\Option}[1]{\texttt{#1}}
-% \providecommand*{\OptionValue}[2]{\texttt{\mbox{#1=}\linebreak[3]\mbox{#2}}}
-% \let\PValue\texttt
-%
-% \title{\KOMAScript{} \partname\ \texttt{\filename}%
-% \thanks{This file is version \fileversion\ of \texttt{\filename}.}}
-% \date{\filedate}
-% \author{Markus Kohm\thanks{mailto:komascript(at)gmx.info}}
+% \changes{v3.03}{2009/03/12}{first version ever}
+% \changes{v3.36}{2022/02/08}{switch over from \cls*{scrdoc} to
+% \cls*{koma-script-source-doc}}
+% \changes{v3.36}{2022/02/08}{require package \pkg*{scrlogo} instead of
+% defining \cs{KOMAScript}}
+% \changes{v3.36}{2022/02/08}{whole implementation documentation in English}
+%
+% \GetFileInfo{scrhack.dtx}
+% \title{Patching Third-Party Packages using
+% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrhack}}
+% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
+% \date{Revision \fileversion{} of \filedate}
% \maketitle
% \begin{abstract}
-% Some packages from other authors may have problems with \KOMAScript{}. In
+% Some packages from other authors may have problems with \KOMAScript{}. In
% my opinion some packages could be improved. With some packages this makes
% only sense, if \KOMAScript{} was used. With some other packages the
% package author has another opinion. Sometimes proposals was never
-% answered. Package \Package{scrhack} contains all those improvement
-% proposals for other packages. This means, \Package{scrhack} redefines
-% macros of packages from other authors! The redefinitions are only
-% activated, if those packages were loaded. Users may prevent
-% \Package{scrhack} from redefining macros of individual packages.
+% answered. Package \pkg*{scrhack} contains all those improvement proposals
+% for other packages. This means, \pkg*{scrhack} redefines macros of packages
+% from other authors! The redefinitions are only activated, if those
+% packages were loaded. Users may prevent \pkg*{scrhack} from redefining
+% macros of individual packages.
% \end{abstract}
% \tableofcontents
%
-% \selectlanguage{ngerman}
-% \StopEventually{\PrintIndex\PrintChanges}
-% \changes{v3.03}{2009/03/12}{erste Version des Pakets}%^^A
+% \section{User Manual}
%
-% \section{Implementation of \Package{scrhack}}
+% You can find the user manuals of \pkg*{scrhack} in the \KOMAScript{} manual,
+% either the German \file{scrguide} or the English \file{scrguien}.
%
-% \changes{v3.04b}{2009/08/05}{Die Reihenfolge von Anweisungen und Optionen
-% grundlegend geändert, um das Paket \textsf{scrhack} unabhängiger von der
-% Reihenfolge beim Laden von Paketen zu machen.}%^^A
+% \MaybeStop{\PrintIndex}
%
-% \subsection{Optionen}
+% \section{Implementation of \pkg*{scrhack}}
%
-% \iffalse
-%<*package&option>
-% \fi
+% \changes{v3.04b}{2009/08/05}{order of commands/macros and options changed}
%
-% Das Paket bedient sich \cs{KOMAoptions} etc. aus \textsf{scrkbase} (dieses
-% wird übrigens direkt per \texttt{scrkbase.dtx} geladen).
+% \subsection{Optionen}
%
-% Per Option kann gewählt werden, welche Manipulationen geladen werden
-% sollen. Alle diese Optionen können jedoch nur bis zum Laden des
-% entsprechenden Pakets oder dem Laden von \textsf{scrhack} gesetzt
-% werden (es zählt, was später kommt). Anschließend sind sie wirkungslos.
+% The package uses \cs{KOMAoptions} of \pkg*{scrkbase}, which is loaded by
+% (virtual) \file{scrkbase.ins}.
%
-% \subsection{Verwendete Anweisungen}
+% The options allow the selection of the used manipulations of other
+% packages. But all these options are valid only until both \pkg*{scrhack} and
+% the other package has been loaded. Later settings are invalid.
%
-% \iffalse
-%</package&option>
+%
+% \subsection{Used Macros and Commands}
+% \label{sec:macros}
+% \begin{macrocode}
%<*package&body>
-% \fi
+% \end{macrocode}
%
% \begin{macro}{\scr@ifexpected}
-% Wenn die im ersten Argument angegebene Anweisung nach Ausführung der im
-% zweiten Argument angegebenen Anweisungen unverändert ist, dann soll das
-% dritte Argument ausgeführt werden, sonst das vierte.
+% Mentioned to do (re)definitions only, if local execution of code does not
+% change a command. Concrete, if (local) execution of \marg{test code} of
+% \begin{quote}
+% \cs{scr@ifexpected}\marg{command}\marg{test code}\marg{then
+% code}\marg{else code}
+% \end{quote}
+% would not result in a change of \cs{\meta{command}}, the \marg{then code}
+% will be executed, otherwise the \marg{else code}.
+% \begin{description}\item[Note:] \meta{test code} must not have any global
+% side effect!\end{description}
% \begin{macrocode}
\newcommand{\scr@ifexpected}[2]{%
\begingroup
@@ -261,16 +217,29 @@
% \end{macro}
%
% \begin{macro}{\scr@hack@load}
-% Wenn die Datei mit dem Namen des zweiten Arguments und der Endung des ersten
-% Arguments so geladen wurde, dass \LaTeX{} eine Versionsinfo dazu gespeichert
-% hat, dann soll zusätzlich der entsprechende Hack geladen werden.
+% Conditionally loading of a hack file.
+% \begin{quote}
+% \cs{scr@hack@load}\marg{extension}\marg{basename}\marg{hack}%
+% \marg{true code}\marg{false code}
+% \end{quote}
+% The first two arguments \marg{} and \marg{extension} and \marg{basename} are
+% same to the internal\LaTeX{} kernel command \cs{@ifl@aded}. With \LaTeX{}
+% from 2021/11/15 we even could use \cs{@ifl@aded} for the test, because it is
+% not restricted to the preamble any more. But because it is restricted with
+% older \LaTeX{} kernels, we test the definition of
+% \cs{ver@}\meta{basename}\texttt{.}\meta{extension}. If it is defined, we
+% also test the definition of \cs{ver@}\meta{basename}\texttt{.hak}. If this
+% is not defined, \file{\meta{hack}.hak} is loaded and \meta{true code} is
+% executed. Otherwise \meta{false code} is executed. This means: A hack file
+% is only loaded, if a class or package (or other file with version) has
+% already been loaded, but the hack file has not already been loaded.
% \begin{macrocode}
\newcommand*{\scr@hack@load}[2]{%
\expandafter\ifx\csname ver@#2.#1\endcsname\relax
\expandafter\@secondoftwo
\else
% \end{macrocode}
-% Allerdings wird jeder Hack nur genau einmal geladen:
+% Load a hack only once.
% \begin{macrocode}
\expandafter\ifx\csname ver@#2.hak\endcsname\relax
\expandafter\expandafter\expandafter\@firstoftwo
@@ -291,45 +260,42 @@
% \end{macrocode}
% \end{macro}
%
-% \iffalse
+% \begin{macrocode}
%</package&body>
-% \fi
-%
-% \subsection{Der \textsf{hyperref}-Hack}
+% \end{macrocode}
+%
+% \subsection{The \pkg*{hyperref} hack}
%
-% \textsf{hyperref} setzt den Anker zu der Stern-Variante einer Überschrift
-% hinter die Überschrift, während es bei der nicht Stern-Variante den Anker
-% auch dann vor die Überschrift setzt, wenn die Überschrift aufgrund von
-% \texttt{secnumdepth} nicht nummeriert wird. Der Hack setzt den Anker
-% einheitlich vor die Überschrift.
+% Package \pkg{hyperref} places the anchor of the star variant of a heading
+% after the heading, but the anchor of the normal variant before the heading
+% even if the heading is not numbered because of the value of
+% \cnt{secnumdepth}. The hack changes this to more consistent placing always
+% before the heading.
%
% \begin{option}{hyperref}
-% \changes{v3.12}{2013/03/05}{Signalisierung mit
-% \cs{FamilyKeyStateProcessed}}%^^A
-% \changes{v3.17}{2015/03/09}{Defaulteinstellung mit
-% \cs{KOMAExecuteOptions}}%^^A
+% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
+% \changes{v3.17}{2015/03/09}{defaults by \cs{KOMAExecuteOptions}}
% \begin{macrocode}
%<*package&option>
\KOMA@ifkey{hyperref}{@scrhack@hyperref}%
\KOMAExecuteOptions{hyperref=true}%
%</package&option>
-%<*package&body>
% \end{macrocode}
-% \changes{v3.04b}{2009/11/09}{\textsf{hyperref}-Hack wird früher geladen}%^^A
-% \changes{v3.17}{2015/03/09}{Neuere \textsf{hyperref}-Version deaktiviert
-% ggf. Option \texttt{hyperref}}%^^A
-% \changes{v3.18}{2015/05/22}{Neuere \KOMAScript-Versionen deaktivieren
-% ggf. Option \texttt{hyperref}}%^^A
-% Hier muss ein wenig trickreicher gearbeitet werden, weil \textsf{hyperref}
-% die Treiberdatei per \cs{AtEndOfPackage} lädt und der Hack erst danach
-% installiert werden darf. Mit \cs{AfterPackage*} alleine, würde der Hack aber
-% vor dem Laden der Treiberdatei installiert. Dafür können wir aber sicher
-% sein, dass ein innerhalb von \cs{AfterPackage*} aufgerufenes
-% \cs{AtEndOfPackage} garantiert nach dem Laden der Treiberdatei ausgeführt
-% wird. Das funktioniert auch noch, wenn \textsf{hyperref} bereits geladen
-% wurde. In dem Fall wird der Code einfach nach dem Ende von \textsf{scrhack}
-% statt nach dem Ende von \textsf{hyperref} ausgeführt.
+% \changes{v3.04b}{2009/11/09}{loading \pkg{hyperref} hack earlier}
+% \changes{v3.17}{2015/03/09}{auto deactivation for newer versions of
+% \pkg{hyperref}}
+% \changes{v3.18}{2015/05/22}{newer versions of \KOMAScript{} classes also
+% deactivate the the hack}
+% This is a little bit tricky, because \pkg{hyperref} loads the driver file
+% via \cs{AtEndOfPackage} and the hack cannot be loaded before loading the
+% driver file. Using \cs{AfterPackage*} would not be good enough therefore,
+% because it would load the hack before the driver file. But using
+% \cs{AtEndOfPackage} inside \cs{AfterPackage*} should delay the loading
+% enough. This also works, if \pkg{hyperref} has already been loaded. In this
+% case the code will be executed at the end of \pkg*{scrhack} instead of
+% \pkg{hyperref}. This is no problem.
% \begin{macrocode}
+%<*package&body>
\BeforePackage{hyperref}{%
\scr@ifundefinedorrelax{hy@insteadofrefstepcounter}{}{%
\PackageInfo{scrhack}{hyperref hack deactivated because of\MessageBreak
@@ -361,16 +327,13 @@
% \end{option}
%
%
-% \begin{macro}{\@schapter}
-% \begin{macro}{\@spart}
-% \begin{macro}{\@ssect}
-% Eigentlich wird hier gar nicht \texttt{hyperref.sty} verändert, sondern
-% diverse Treiberdateien. Sobald das Paket \textsf{hyperref} geladen ist, ist
-% auch die passende Treiberdatei geladen und außerdem sind alle
-% Treiberdateien, die entsprechende Definitionen vornehmen, gleichermaßen
-% betroffen. Also kann der entsprechende Patch einfach erfolgen, wenn hyperref
-% geladen ist (was bereits von \cs{scr@hack@load} getestet wurde). Es muss
-% also nur noch sichergestellt werden, dass die umzudefinierenden Macros
+% \begin{macro}{\@schapter,\@spart,\@ssect}
+% We do not hack \pkg{hyperref} itself, but the driver files. After loading
+% \pkg{hyperref} the driver file is also loaded. Moreover, all driver files
+% that re-define these commands have to be patched also. So the patch is
+% related to the loading of \pkg{hyperref} instead of every single driver
+% file. This have already been tested by \cs{scr@hack@load}. So we just have
+% to test, whether the definition of these commands are the expected one.
% derzeit den erwarteten Inhalt haben.
% \begin{macrocode}
%<*hyperref&body>
@@ -477,26 +440,24 @@
%</hyperref&body>
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
%
-% \subsection{Der \textsf{floatrow}-Hack}
+% \subsection{The \pkg*{floatrow} hack}
%
-% Das \textsf{floatrow}-Paket verwendet das Makro \cs{float@listhead} zum
-% Setzen der Überschriften. Dies wird seit \KOMAScript~3 nicht mehr empfohlen
-% und fliegt demnächst komplett aus der Unterstützung. Stattdessen wird
-% empfohlen, dass Pakete \textsf{tocbasic} unterstützen. Der Aufwand dafür ist
-% sehr gering und wird mit vielen neuen Möglichkeiten belohnt.
+% Package \pkg{floatrow} insists in using \cs{float@listhead} for the setting
+% of the headings. This is not recommended any longer since \KOMAScript~2.95
+% from July 2006! The \KOMAScript{} classes will remove the support for
+% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
+% effort to do so, it very small and I do not understand, why package authors
+% are not willing to use it. Because the benefit would be a lot.
%
-% Dieser Hack rüstet die \textsf{tocbasic}-Unterstützung für \textsf{floatrow}
-% nach.
+% This hack adds \pkg*{tocbasic} usage to \pkg{floatrow}. Nevertheless it is
+% more complicated than adding \pkg*{tocbasic} support into \pkg{floatrow}.
%
% \begin{option}{floatrow}
-% \changes{v3.12}{2013/03/05}{Signalisierung mit \cs{FamilyKeyStateProcessed}}
-% \changes{v3.17}{2015/03/09}{Defaulteinstellung mit
-% \cs{KOMAExecuteOptions}}
-% \changes{v3.34}{2021/06/03}{Deaktivierung des \textsf{float}-Hacks}
+% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
+% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
+% \changes{v3.34}{2021/06/03}{deactivation of the \pkg{float} hack}
% \begin{macrocode}
%<*package&option>
\KOMA@ifkey{floatrow}{@scrhack@floatrow}
@@ -517,17 +478,16 @@
% \end{option}
%
%
-% \begin{macro}{\DeclareNewFloatType}
-% Über die Anweisung \cs{DeclareNewFloatType} wird eine neue Gleitumgebung
-% definiert. Hier muss die neue Erweiterung aus dem dritten Argument
-% \textsf{tocbasic} bekannt gemacht werden.
-% \begin{macro}{\listof}
-% Über die Anweisung \cs{listof} wird ein Verzeichnis für Gleitumgebungen
-% ausgegeben. Hier muss schlicht die entsprechende Anweisung von
-% \textsf{tocbasic} verwendet werden.
+% \begin{command}{\DeclareNewFloatType,\listof}
+% \changes{v3.25}{2018/03/16}{using \cs{DeclareTOCStyleEntry}}
+% Command \cs{DeclareNewFloatType} is used to define a new float
+% environment. We have to add registration of the file extension (third
+% argument) with \pkg*{tocbasic}.
+% Command \cs{listof} outputs the list of the float environments. Here we
+% just use the corresponding macro of \pkg*{tocbasic}.
% \begin{macro}{\float@addtolists}
-% Diese Anweisung wird nicht länger benötigt und daher auf die ursprüngliche
-% Definition zurückgesetzt.
+% The deprecated macro \cs{float@addtolists} is not needed any longer an will
+% be reset to the original definition.
% \begin{macrocode}
%<*floatrow&body>
\scr@ifexpected{\DeclareNewFloatType}{%
@@ -557,14 +517,11 @@
\RequirePackage{tocbasic}%
\PackageInfo{scrhack}{redefining \string\DeclareNewFloatType}%
% \end{macrocode}
-% Eigentlich wäre es besser, wie im \textsf{float}-Hack einen Test
-% vorzuschalten, ob die Dateiendung bereits in Gebrauch ist. Aber das würde
-% voraussetzen, dass die Reihenfolge der Anweisungen geändert wird. Dazu
-% stecke ich aber im Code von \textsf{floatrow} zu wenig
-% drin. (\emph{\foreignlanguage{english}{Note: It would be better to first
-% test, if the new extension is already in use like done at the
-% \textsf{float} hack. But I don't know the \textsf{floatrow} code good
-% enough to make such a change!}})
+% \begin{description}
+% \item[Note:] It would be better to first test, if the new extension is
+% already in use like done at the \pkg{float} hack. But I don't know the
+% \pkg{floatrow} code good enough to make such a change!
+% \end{description}
% \begin{macrocode}
\renewcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
\expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
@@ -574,16 +531,6 @@
{\expandafter\noexpand\csname #1name\endcsname\nobreakspace
\expandafter\noexpand\csname the#1\endcsname}%
\@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
-% \end{macrocode}
-% \changes{v3.25}{2018/03/16}{Verwendung von \cs{DeclareTOCStyleEntry}}%^^A
-% Bis Version 3.24 wurde hier nun wie üblich |\l@#1| unter Verwendung von
-% \cs{@dottedtocline} definiert:
-% \begin{verbatim}
-% \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
-% \end{verbatim}
-% Da aber \Package{tocbasic} inzwischen diese schöne Schnittstelle für die
-% Verzeichniseinträge bietet, verwenden wir die hier nun auch:
-% \begin{macrocode}
\DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]{default}{#1}%
\caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
\xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
@@ -598,9 +545,6 @@
\@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
\@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l@figure
\@ifundefined{l@#1}{%
-% \end{macrocode}
-% Siehe die Anmerkung zur Verwendung von \cs{DeclareTOCStyleEntry} oben.
-% \begin{macrocode}
\DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]
{default}{#1}%
}{}%
@@ -632,26 +576,24 @@
%</floatrow&body>
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
+% \end{command}
%
%
-% \subsection{Der \textsf{float}-Hack}
+% \subsection{The \pkg*{float} hack}
%
-% Das \textsf{float}-Paket verwendet das Makro \cs{float@listhead} zum
-% Setzen der Überschriften. Dies wird seit \KOMAScript~3 nicht mehr empfohlen
-% und fliegt demnächst komplett aus der Unterstützung. Stattdessen wird
-% empfohlen, dass Pakete \textsf{tocbasic} unterstützen. Der Aufwand dafür ist
-% sehr gering und wird mit vielen neuen Möglichkeiten belohnt.
+% Package \pkg{float} insists in using \cs{float@listhead} for the setting
+% of the headings. This is not recommended any longer since \KOMAScript~2.95
+% from July 2006! The \KOMAScript{} classes will remove the support for
+% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
+% effort to do so, it very small and I do not understand, why package authors
+% are not willing to use it. Because the benefit would be a lot.
%
-% Dieser Hack rüstet die \textsf{tocbasic}-Unterstützung für \textsf{float}
-% nach.
+% This hack adds \pkg*{tocbasic} usage to \pkg{float}. Nevertheless it is
+% more complicated than adding \pkg*{tocbasic} support into \pkg{float}.
%
% \begin{option}{float}
-% \changes{v3.12}{2013/03/05}{Signalisierung mit
-% \cs{FamilyKeyStateProcessed}}%^^A
-% \changes{v3.17}{2015/03/09}{Defaulteinstellung mit
-% \cs{KOMAExecuteOptions}}%^^A
+% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
+% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
% \begin{macrocode}
%<*package&option>
\KOMA@ifkey{float}{@scrhack@float}%
@@ -670,19 +612,18 @@
% \end{option}
%
%
-% \begin{macro}{\newfloat}
+% \begin{command}{\newfloat}
% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by
-% \cs{Ifattoclist}}%^^A
-% Über die Anweisung \cs{newfloat} wird eine neue Gleitumgebung
-% definiert. Hier muss die neue Erweiterung aus dem dritten Argument
-% \textsf{tocbasic} bekannt gemacht werden.
-% \begin{macro}{\listof}
-% Über die Anweisung \cs{listof} wird ein Verzeichnis für Gleitumgebungen
-% ausgegeben. Hier muss schlicht die entsprechende Anweisung von
-% \textsf{tocbasic} verwendet werden.
+% \cs{Ifattoclist}}
+% \changes{v3.25}{2018/03/16}{using \cs{DeclareTOCStyleEntry}}
+% We have to add registration of the file extension (third argument of
+% \cs{newfloat}) with \pkg*{tocbasic}.
+% \begin{command}{\listof}
+% Command \cs{listof} outputs the list of the float environments. Here we
+% just use the corresponding macro of \pkg*{tocbasic}.
% \begin{macro}{\float@addtolists}
-% Diese Anweisung wird nicht länger benötigt und daher auf die ursprüngliche
-% Definition zurückgesetzt.
+% The deprecated macro \cs{float@addtolists} is not needed any longer an will
+% be reset to the original definition.
% \begin{macrocode}
%<*float&body>
\scr@ifexpected{\newfloat}{%
@@ -746,16 +687,6 @@
\@ifundefined{ext@#1}{\float@error{#1}}{%
\@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l@figure
\@ifundefined{l@#1}{%
-% \end{macrocode}
-% \changes{v3.25}{2018/03/16}{Verwendung von \cs{DeclareTOCStyleEntry}}%^^A
-% Bis Version 3.24 wurde hier nun wie üblich |\l@#1| unter Verwendung von
-% \cs{@dottedtocline} definiert:
-% \begin{verbatim}
-% \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
-% \end{verbatim}
-% Da aber \Package{tocbasic} inzwischen diese schöne Schnittstelle für die
-% Verzeichniseinträge bietet, verwenden wir die hier nun auch:
-% \begin{macrocode}
\DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]
{default}{#1}%
}{}%
@@ -787,26 +718,25 @@
%</float&body>
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
+% \end{command}
+% \end{command}
%
%
-% \subsection{Der \textsf{listings}-Hack}
+% \subsection{The \pkg*{listings} hack}
%
-% Das \textsf{listings}-Paket verwendet das Makro \cs{float@listhead} zum
-% Setzen der Überschriften. Dies wird seit \KOMAScript~3 nicht mehr empfohlen
-% und fliegt demnächst komplett aus der Unterstützung. Stattdessen wird
-% empfohlen, dass Pakete \textsf{tocbasic} unterstützen. Der Aufwand dafür ist
-% sehr gering und wird mit vielen neuen Möglichkeiten belohnt.
+% Package \pkg{listing} insists in using \cs{float@listhead} for the setting
+% of the headings. This is not recommended any longer since \KOMAScript~2.95
+% from July 2006! The \KOMAScript{} classes will remove the support for
+% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The
+% effort to do so, it very small and I do not understand, why package authors
+% are not willing to use it. Because the benefit would be a lot.
%
-% Dieser Hack rüstet die \textsf{tocbasic}-Unterstützung für \textsf{listings}
-% nach.
+% This hack adds \pkg*{tocbasic} usage to \pkg{listings}. Nevertheless it is
+% more complicated than adding \pkg*{tocbasic} support into \pkg{listings}.
%
% \begin{option}{listings}
-% \changes{v3.12}{2013/03/05}{Signalisierung mit
-% \cs{FamilyKeyStateProcessed}}%^^A
-% \changes{v3.17}{2015/03/09}{Defaulteinstellung mit
-% \cs{KOMAExecuteOptions}}%^^A
+% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}}
+% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}}
% \begin{macrocode}
%<*package&option>
\KOMA@ifkey{listings}{@scrhack@listings}
@@ -826,13 +756,14 @@
%
%
% \begin{macro}{\scr@do@hack@listings}
-% \begin{macro}{\lstlistoflistings}
-% Über dieses Macro wird das Verzeichnis der Listings gesetzt. Die gesamte
-% Funktionalität dafür kann \Package{tocbasic} überlassen werden.
+% \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}
-% Diese Anweisung wird nicht länger benötigt und daher auf die ursprüngliche
-% Definition zurückgesetzt. Da \Package{listings} ihre Definition mit
-% \Macro{AtBeginDocument} verzögert, muss dies hier ebenfalls geschehen.
+% 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}{%
@@ -863,13 +794,13 @@
}%
}%
% \end{macrocode}
-% \changes{v3.30}{2020/04/01}{setzen von \cs{@captype} ergänzt}%^^A
-% Ab Version~3.30 wird zusätzlich \cs{lst@makecaption} um das Setzen von
-% \cs{@captype} auf \texttt{lstlisting} ergänzt. Dadurch wird auch die
-% Verwendung von \cs{raggedlstlistingcaption} ermöglicht, falls dieses
-% definiert wird. Die Umdefinierung erfolgt in Form einer Erweiterung der
-% Definition aus \textsf{listings}. Das sollte so lange funktionieren, solange
-% die Anweisung in \textsf{listings} keine Argumente hat.
+% \begin{macro}{\lst@makecaption}
+% \changes{v3.30}{2020/04/01}{setting of \cs{@captype} added}
+% From version~3.30 setting of \cs{@captype} to \texttt{lstlisting} is added
+% to \cs{lst@makecaption}. This adds support for usage of
+% \cs{raggedlstlistingcaption} (if the user or a package author defines
+% it). The change is a little bit dangerous, because it will break, if
+% \pkg{listings} would add an argument to \cs{lst@makecaption}.
% \begin{macrocode}
\expandafter\def\expandafter\lst@makecaption\expandafter{%
\expandafter\def\expandafter\@captype\expandafter{%
@@ -917,22 +848,28 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{command}
% \end{macro}
%
%
%
-% \subsection{Der \textsf{nomencl}-Hack}
+% \subsection{The \pkg*{nomencl} hack}
%
-% Das \textsf{nomencl}-Paket harmoniert eigentlich nur in einer Kleinigkeit
-% bezüglich des Eintrags in das Inhaltsverzeichnis nicht sehr gut mit
-% \KOMAScript-Klassen bzw. Paket \textsf{tocbasic}. Allerdings kann es von den
-% Vorteilen von \textsf{tocbasic} auch in weiterer Hinsicht profitieren.
+% With package \pkg{nomencl} and the \KOMAScript{} classes there is only a
+% small disharmony between relating the ToC entry. Nevertheless the package
+% can benefit from using \pkg*{tocbasic}.
%
-% Dieser Hack rüstet weitgehende \textsf{tocbasic}-Unterstützung für
-% \textsf{nomencl} nach. Dafür wird Paket \textsf{xpatch} verwendet.
+% This hack adds \pkg*{tocbasic} usage to \pkg{nomencl}. This is done using
+% \pkg{xpatch} Nevertheless it is much more complicated than adding real
+% \pkg*{tocbasic} support into \pkg{nomencl}. The mess is, that every new
+% release of \pkg{nomencl} changes the kind of ``support'' of
+% \pkg*{tocbasic}. For some versions there isn't any such support. Other
+% versions use \pkg*{tocbasic} if it has been loaded. Other versions need an
+% option to activate usage of \pkg*{tocbasic}. So don't expect that the
+% following hack does the correct thing for every version of \pkg{nomencl}!
%
% \begin{option}{nomencl}
-% \changes{v3.23}{2017/03/31}{neue Option für neuen Hack}%^^A
+% \changes{v3.23}{2017/03/31}{added}
% \begin{macrocode}
%<*package&option>
\RequirePackage{xpatch}%
@@ -949,19 +886,22 @@
}
%</package&body>
% \end{macrocode}
-% \end{option}%^^A nomencl
-%
-% \begin{macro}{\thenomenclature}
-% \changes{v3.23}{2017/03/31}{Umgebung \texttt{thenomenclature} wird
-% gepatcht}%^^A
-% Statt die Fallunterscheidung aus der Originaldefinition direkt hier
-% nachzubilden, patchen wir diese komplett heraus und ersetzen sie durch eine
-% neue Anweisung.
+% \end{option}^^A nomencl
+%
+% \begin{command}{\thenomenclature}
+% \changes{v3.23}{2017/03/31}{added}
+% Instead of using the several definitions by cases of the several versions of
+% \pkg{nomencl} we use a patch, that should remove all such cases and use
+% \pkg*{tocbasic} always.
% \begin{macrocode}
%<*nomencl&body>
\RequirePackage{tocbasic}
% \end{macrocode}
-% With \Package{nomencl} > 5.0 this should be all.
+% With \pkg{nomencl} > 5.0 this should be all.
+% Unfortunately is isn't, because newer versions of \pkg{nomencl} need option
+% \opt{tocbasic} to be set. Good luck: It is the default. So the chances
+% are good, that with new versions of \pkg{nomencl} usage of \pkg*{tocbasic} is
+% the default.
% \begin{macrocode}
\@ifpackagelater{nomencl}{2019/01/01}{%
\PackageInfo{scrhack}{only `tocbasic' loaded for `nomencl'}%
@@ -988,8 +928,8 @@
\PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
}{%
% \end{macrocode}
-% \changes{v3.26b}{2019/01/23}{new \textsf{nomencl} 5.0}%^^A
-% From \textsf{nomencl} 5.0 another code is used if the nomenclature is a
+% \changes{v3.26b}{2019/01/23}{new \pkg{nomencl} 5.0}
+% From \pkg{nomencl} 5.0 another code is used if the nomenclature is a
% chapter. So we need another patch:
% \begin{macrocode}
\xpatchcmd{\thenomenclature}{%
@@ -1009,7 +949,7 @@
\PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
}{%
% \end{macrocode}
-% \changes{v3.26b}{2019/01/23}{prepared for hoply comming \textsf{nomencl}}%^^A
+% \changes{v3.26b}{2019/01/23}{prepared for hoply comming \pkg{nomencl}}
% But this code is also wrong, because it breaks manual running heads, e.g.,
% of page style \texttt{myheadings}. So I hope, there will be another code,
% that needs a somehow different patch:
@@ -1031,8 +971,8 @@
\PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
}{%
% \end{macrocode}
-% \changes{v3.25}{2019/01/23}{emergency patch added}%^^A
-% \changes{v3.30}{2020/02/25}{spurious space in warning message removed}%^^A
+% \changes{v3.25}{2019/01/23}{emergency patch added}
+% \changes{v3.30}{2020/02/25}{spurious space in warning message removed}
% If this also does not work, we try an emergency patch, that could break
% things.
% \begin{macrocode}
@@ -1062,14 +1002,14 @@
}
%</nomencl&body>
% \end{macrocode}
-% \end{macro}%^^A \thenomenclature
+% \end{command}^^A \thenomenclature
%
% \begin{macro}{\scr@hack@nomencl@head}
-% \changes{v3.23}{2017/03/31}{Überschrift für \texttt{thenomenclature} unter
-% Verwendung von \textsf{tocbasic}}%^^A
-% \changes{v3.31}{2020/07/08}{internal \cs{list@fname} eliminated}%^^A
-% Im Gegensatz zu Gleitumgebungen benötigen wir hier keine Gruppe, weil
-% \texttt{thenomenclature} bereits die Gruppe bereitstellt.
+% \changes{v3.23}{2017/03/31}{heading of \env{thenomenclature} by
+% \pkg*{tocbasic}}
+% \changes{v3.31}{2020/07/08}{internal \cs{list@fname} eliminated}
+% We don't need an extra group, because \env{thenomenclature} already adds the
+% group.
% \begin{macrocode}
%<*nomencl&body>
\newcommand*{\scr@hack@nomencl@head}{%
@@ -1079,20 +1019,19 @@
}
%</nomencl&body>
% \end{macrocode}
-% Es ist ggf. noch zu beachten, dass von den ganzen Haken, die
-% \textsf{tocbasic} bereitstellt, für dieses Verzeichnis natürlich nur die
-% Überschriftenhaken zum Einsatz kommen. Verzeichnishaken können zwar
-% definiert werden, kommen aber nie zur Anwendung.
-% \end{macro}%^^A \scr@hack@nomencl@head
+% \begin{description}
+% \item[Note:] Only the heading hooks of \pkg*{tocbasic} are used. The other
+% hooks can be set, but would never be used!
+% \end{description}
+% \end{macro}^^A \scr@hack@nomencl@head
%
% \begin{macro}{\if@intoc}
-% \changes{3.23}{2017/03/31}{Reaktion auf \cs{if@intoc}}
-% Natürlich muss jetzt noch auf \textsf{nomencl}'s Option \texttt{intoc}
-% reagiert werden, also entsprechend der Option das \textsf{tocbasic}
-% Feature \texttt{totoc} passend gesetzt werden. Etwaige Änderungen des
-% Features sind also erst nach dem Laden von \textsf{nomencl} und
-% \textsf{scrhack} möglich. Spätere Änderungen von \cs{if@intoc} werden
-% außerdem nicht berücksichtigt.
+% \changes{3.23}{2017/03/31}{support of \cs{if@intoc}}
+% Generally we have to support \pkg{nomencl}'s option \opt{intoc} and the
+% switch \cs{if@intoc}. This is done by (un-)setting \pkg*{tocbasic} feature
+% \texttt{totoc}. So additional changes of the feature can be done at first
+% after loading both, \pkg{nomencl} and \pkg*{scrhack}. Moreover, later changes
+% of \cs{if@intoc} are not recognized.
% \begin{macrocode}
%<*nomencl&body>
\if@intoc
@@ -1103,19 +1042,18 @@
% \end{macro}
%
%
-% \subsection{Der \textsf{setspace}-Hack}
+% \subsection{The \pkg*{setspace} hack}
%
-% Das \textsf{setspace}-Paket verwendet \cs{@ptsize} auf ungünstige Art, indem
-% es davon ausgeht, dass es immer eine ganze Zahl enthält. Das ist aber bei
-% \KOMAScript{} keineswegs zwingend. Außerdem ist der Wert für \texttt{11pt}
-% falsch, weil \LaTeX{} in diesem Fall tatsächlich eine 10,95\,pt-Schrift mit
-% einem Zeilenabstand von 13,6\,pt einstellt. Damit wäre der korrekte Wert für
-% \cs{onehalfspacing} beispielsweise:
+% Package \pkg{setspace} internally uses \cs{@ptsize} in a way, that only
+% works as long as \cs{@ptsize} is an integer. But because \KOMAScript{}
+% supports non integer font sizes, \cs{@ptsize} can also contain non-integer
+% values. Moreover for \opt{11pt}, \LaTeX{} does not use a 11\,pt font but
+% a 10.95\,pt font with a \len{baselineskip} of 13.6\,pt, the correct factor
+% for, e.g., \cs{onehalfspacing} would be:
% \[ 10{,}95\,\mathrm{pt} \dot 1{,5} / 13{,}6\,\mathrm{pt} \equiv 1{,}208 \]
-% Tatsächlich stellt \textsf{setspace} aber einen Wert von 1,213 ein, was
-% einer effektiven Schriftgröße von 11\,pt entsprechen würde. Ebenso stellt es
-% den aktuellen Abstand bei \cs{onehalfspacing} nicht relativ zur aktuellen
-% Schriftgröße ein, sondern zur Grundschriftgröße. Damit erhält man bei
+% But \pkg{setspace} uses 1.213, which would be correct for 11\,pt. Moreover
+% the factor is always relative to the base font size and not the current font
+% size. Because of this
% \begin{verbatim}
% \documentclass[10pt]{article}
% \usepackage{setspace}
@@ -1126,7 +1064,7 @@
% baselineskip: \the\baselineskip
% \end{document}
% \end{verbatim}
-% einen anderen Abstand als bei
+% results in another \len{baselineskip} than:
% \begin{verbatim}
% \documentclass[11pt]{article}
% \usepackage{setspace}
@@ -1137,15 +1075,14 @@
% baselineskip: \the\baselineskip
% \end{document}
% \end{verbatim}
-% obwohl beide Male dieselbe Schriftgröße verwendet wird. Streng genommen
-% müsste also bei jeder Änderung der Schriftgröße der Wert Abstand angepasst
-% werden. So weit geht dieser Hack nicht. Stattdessen wird der Wert abhängig
-% von der tatsächlichen Schriftgröße und dem tatsächlichen Basisabstand beim
-% Aufruf der Anweisungen eingestellt. Das ergibt immerhin in den obigen
-% Beispielen gleiche Ergebnisse.
+% despite both examples use the same font size. So, to make it absolutely
+% correct, the factor would have to change with every change of the font
+% size. But the hack also does not do so. It just calculates the factor
+% depending on the base font size an the current font size. This is enough to
+% have the same \len{baselineskip} with both of the examples above.
%
% \begin{option}{setspace}
-% \changes{v3.17}{2015/04/16}{Neu}%^^A
+% \changes{v3.17}{2015/04/16}{added}
% \begin{macrocode}
%<*package&option>
\KOMA@ifkey{setspace}{@scrhack@setspace}
@@ -1164,10 +1101,10 @@
% \end{option}
%
%
-% \begin{macro}{\onehalfspacing}
-% \changes{v3.17}{2015/04/16}{Neu}%^^A
-% Über diese Anweisung wird der eineinhalbzeilige Satz eingestellt. Ein auf
-% drei Nachkommastellen genauer Wert erscheint mir ausreichend genau.
+% \begin{command}{\onehalfspacing}
+% \changes{v3.17}{2015/04/16}{added}
+% This selects the one half line spacing. I think, a factor with three digits
+% for the decimals should be enough.
% \begin{macrocode}
%<*setspace&body>
\scr@ifexpected{\onehalfspacing}{%
@@ -1193,11 +1130,11 @@
Maybe you are using a unsupported setpace version}%
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\doublespacing}
-% \changes{v3.17}{2015/04/16}{Neu}%^^A
-% Über diese Anweisung wird der zweizeilige Satz eingestellt. Ein auf
-% drei Nachkommastellen genauer Wert erscheint mir ausreichend genau.
+% \end{command}
+% \begin{command}{\doublespacing}
+% \changes{v3.17}{2015/04/16}{new}
+% This selects the double line spacing. I think, a factor with three digits
+% for the decimals should be enough.
% \begin{macrocode}
\scr@ifexpected{\doublespacing}{%
\long\def\doublespacing{%
@@ -1223,28 +1160,26 @@
}
%</setspace&body>
% \end{macrocode}
-% \end{macro}
+% \end{command}
%
%
-% \subsection{Der \textsf{lscape}-Hack}
-% \changes{v3.18a}{2015/07/07}{Neuer \textsf{lscape}-Hack}%^^A
+% \subsection{The \pkg*{lscape} hack}
+% \changes{v3.18a}{2015/07/07}{\pkg{lscape} hack added}
+%
+% The package does change \len{textheight} inside \env{landscape} to the prior
+% value of \len{textwidth}, nevertheless is does not change \len{textwidth} to
+% the prior value of \len{textheight}. This is at least inconsistent. After
+% asking him, David~Carlisle answered, that he does not change
+% \len{textwidth}, because this could result in problems. Therefore it is very
+% strange, that he does change \cs{textheight}, despite this also to problems,
+% e.g., with packages \pkg{showframe} or \pkg*{scrlayer}. So the patch here
+% also keeps \len{textheight} unchanged. This also has to take care for
+% \pkg{pdflscape}. The patches are done using \pkg{xpatch}.
%
-% Das \textsf{lscape}-Paket setzt innerhalb der
-% \texttt{landscape}-Umgebung die Länge \cs{textheight} auf den Wert
-% von \cs{textwidth} obwohl es auf der anderen Seite \cs{textwidth}
-% nicht auf den Wert von \cs{textheight} setzt. Das ist inkonsequent. Da
-% David~Carlisle außerdem angibt, dass \cs{textwidth} nicht verändert wird,
-% weil das zu Problemen führen konnte, ist es unverständlich, dass
-% \cs{textheight} verändert wird, obwohl das ebenfalls zu Problemen führen
-% kann, beispielsweise für \textsf{showframe} oder \textsf{scrpage}. Daher
-% verändere ich die Definition so, dass auch \cs{textheight} unverändert
-% bleibt. Dabei muss allerdings auch \textsf{pdflscape} berücksichtigt
-% werden. Das ist am einfachsten mit \textsf{xpatch}.
%
% \begin{option}{lscape}
-% \changes{v3.18a}{2015/07/07}{Neue Option für neuen Hack}%^^A
-% \changes{v3.20}{2016/05/07}{\textsf{xpatch} wird bereits im Optionenteil
-% geladen}%^^A
+% \changes{v3.18a}{2015/07/07}{added}
+% \changes{v3.20}{2016/05/07}{loading \pkg{xpatch} in option part already}
% \begin{macrocode}
%<*package&option>
\RequirePackage{xpatch}%
@@ -1264,25 +1199,25 @@
% \end{macrocode}
% \end{option}
%
-% \begin{macro}{\landscape}
-% \changes{v3.18a}{2015/07/07}{Neu}%^^A
-% \changes{v3.20}{2016/05/07}{\textsf{xpatch} wird bereits im Optionenteil
-% geladen}%^^A
-% Über diese Anweisung wird die \texttt{landscape}-Umgebung von
-% \textsf{lscape} gestartet. Genau diese muss gepatcht werden. Dafür wird das
-% Paket \textsf{xpatch} benötigt. Da der Patch nur geladen wird, wenn die
-% Option dafür gesetzt ist, kann die Option daher nur ein- und ausgeschaltet
-% werden, wenn sie bis zum Laden des Pakets aktiviert wurde.
+% \begin{command}{\landscape}
+% \changes{v3.18a}{2015/07/07}{added}
+% \changes{v3.20}{2016/05/07}{loading \pkg{xpatch} in option part already}
+% This command is the beginning of environment \env{landscape}. This has to be
+% patched using \pkg{xpatch}.
+% \begin{description}
+% \item[Note:] This is a load time option and cannot be changed after loading
+% the package!
+% \end{description}
% \begin{macrocode}
%<*lscape&body>
\xpatchcmd{\landscape}{\textheight=\vsize}{%
\if@scrhack@lscape
% \end{macrocode}
-% \changes{v3.18a}{2015/08/11}{Patchen von \cs{@outputpage}}%^^A
-% Es gibt allerdings in der Tat eine Stelle, an der ein verändertet Wert von
-% \cs{textheight} benötigt wird. Das ist wenn innerhalb von \cs{@outputpage}
-% der Wert von \cs{@colht} reinitialisiert wird. Also wird das entsprechend
-% auch noch hinein gepatcht.
+% \begin{macro}{\@outputpage}
+% \changes{v3.18a}{2015/08/11}{added}
+% Here the changed value of \len{textheight} is needed for initialization of
+% \cs{@colht}. So we patch it to use the new internal \len{scr@LT@textheight}
+% instead of \len{textheight}.
% \begin{macrocode}
\scrh@LT@textheight=\vsize
\let\scrh@LT@outputpage\@outputpage
@@ -1299,17 +1234,17 @@
\@scrhack@lscapefalse
}
% \end{macrocode}
-% \begin{Length}{\scrh@LT@textheight}
-% \changes{v3.18a}{2015/08/11}{neue Länge (intern)}%^^A
+% \begin{ilength}{\scrh@LT@textheight}
+% \changes{v3.18a}{2015/08/11}{new}
% \begin{macrocode}
\newlength{\scrh@LT@textheight}
%</lscape&body>
% \end{macrocode}
-% \end{Length}%^^A \scrh@LT@textheight
-% \end{macro}%^^A \landscape
+% \end{ilength}^^A \scrh@LT@textheight
+% \end{macro}^^A \@outputpage
+% \end{command}^^A \landscape
%
%
-% \selectlanguage{english}
% \subsection{The standard classes sections hack}
% \label{sec:standardsections}
% The \emph{standard classes sections hack} differs from each other
@@ -1337,15 +1272,11 @@
}
%</package&body>
% \end{macrocode}
-% \end{option}%^^A standardsections
-%
-% \begin{macro}{\part}
-% \begin{macro}{\chapter}
-% \begin{macro}{\section}
-% \begin{macro}{\subsection}
-% \begin{macro}{\subsubsection}
-% \begin{macro}{\paragraph}
-% \begin{macro}{\subparagraph}
+% \end{option}^^A standardsections
+%
+% \begin{command}{\part,\chapter,
+% \section,\subsection,\subsubsection,
+% \paragraph,\subparagraph}
% The hack redefines all these commands to a definition copied from the
% standard \LaTeX{} classes version v1.4i. Copyright of this code is by the
% \LaTeX3{} Project. The complete, unmodified code can be found on
@@ -1379,7 +1310,8 @@
}{}
\scr@ifundefinedorrelax{chapter}{%
% \end{macrocode}
-% It seems to be an article class, so we use the code from \textsf{article}.
+% It seems to be an article class, so we use the code from
+% \href{http://mirrors.ctan.org/macros/latex/base/classes.dtx}{\cls*{article}}.
% \begin{macrocode}
\scr@ifundefinedorrelax{c@part}{\newcounter{part}}{}%
\scr@ifundefinedorrelax{c@section}{\newcounter{section}}{}%
@@ -1737,13 +1669,7 @@
}%
}% End of the derived code.
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+% \end{command}
%
% \begin{macro}{\@startsection}
% \KOMAScript{} classes redefine this internal \LaTeX{} kernel macro. In this
@@ -1762,11 +1688,9 @@
\fi
}
% \end{macrocode}
-% \end{macro}%^^A \@startsection
+% \end{macro}^^A \@startsection
%
-% \begin{macro}{\@sect}
-% \begin{macro}{\@ssect}
-% \begin{macro}{\@xsect}
+% \begin{macro}{\@sect,\@ssect,\@xsect}
% All these should be resetted to their original definitions stored in
% \cs{scr@latex@\dots}.
% \begin{macrocode}
@@ -1798,18 +1722,12 @@
\fi
}
% \end{macrocode}
-% \end{macro}%^^A \@xsect
-% \end{macro}%^^A \@ssect
-% \end{macro}%^^A \@sect
-%
-% \begin{macro}{\DeclareSectionCommand}
-% \begin{macro}{\RedeclareSectionCommand}
-% \begin{macro}{\DeclareNewSectionCommand}
-% \begin{macro}{\ProvideSectionCommand}
-% \begin{macro}{\DeclareSectionCommands}
-% \begin{macro}{\RedeclareSectionCommands}
-% \begin{macro}{\DeclareNewSectionCommands}
-% \begin{macro}{\ProvideSectionCommands}
+% \end{macro}^^A \@xsect,\@ssect,\@sect
+%
+% \begin{command}{\DeclareSectionCommand,\RedeclareSectionCommand,
+% \DeclareNewSectionCommand,\ProvideSectionCommand,
+% \DeclareSectionCommands,\RedeclareSectionCommands,
+% \DeclareNewSectionCommands,\ProvideSectionCommands}
% These \KOMAScript{} commands do not make sense any longer after forced
% redefinition of \cs{part} \dots{} \cs{subparagraph}. They even would not
% work correctly after resetting, e.g., \cs{@startsection}. So best reaction
@@ -1831,25 +1749,17 @@
\let\ProvideSectionCommands\undefined
}
% \end{macrocode}
-% \begin{macro}{\scr@chapter@before@hyperref@patch}
-% \begin{macro}{\scr@chapter@after@hyperref@patch}
-% Now, definitions without respecting \textsf{hyperref} are used, so
-% \textsf{hyperref} should again be able to patch them. So the hack should
+% \begin{macro}{\scr@chapter@before@hyperref@patch,
+% \scr@chapter@after@hyperref@patch}
+% Now, definitions without respecting \pkg{hyperref} are used, so
+% \pkg{hyperref} should again be able to patch them. So the hack should
% deactivate the patch deactivation of the \KOMAScript{} classes.
% \begin{macrocode}
\let\scr@chapter@before@hyperref@patch\relax
\let\scr@chapter@after@hyperref@patch\relax
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}%^^A \DeclareSectionCommand
+% \end{command}
%
% \begin{macro}{\scr@osectarg}
% The \KOMAScript{} classes use this macro to store how to use the optional
@@ -1887,11 +1797,10 @@
}%
}
% \end{macrocode}
-% \end{macro}%^^A \scr@activate@xsection
-% \end{macro}%^^A \scr@osectarg
+% \end{macro}^^A \scr@activate@xsection
+% \end{macro}^^A \scr@osectarg
%
-% \begin{macro}{\partformat}
-% \begin{macro}{\chapterformat}
+% \begin{command}{\partformat,\chapterformat}
% Most \cs{\dots format} macros of \KOMAScript{} are still used, because of
% the redefinition of \cs{@seccntformat}. But \cs{part} and \cs{chapter} are
% defined without using them.
@@ -1911,14 +1820,10 @@
}%
}
% \end{macrocode}
-% \end{macro}%^^A \chapterformat
-% \end{macro}%^^A \partformat
-%
-% \begin{macro}{\sectionformat}
-% \begin{macro}{\subsectionformat}
-% \begin{macro}{\subsubsectionformat}
-% \begin{macro}{\paragraphformat}
-% \begin{macro}{\subparagraphformat}
+% \end{command}^^A \chapterformat,\partformat
+%
+% \begin{command}{\sectionformat,\subsectionformat,\subsubsectionformat,
+% \paragraphformat,\subparagraphformat}
% All these commands have to be resetted to not use the automatic dot and to
% add a \cs{quad} instead of an \cs{enskip}.
% \begin{macrocode}
@@ -1963,17 +1868,11 @@
\renewcommand*{\subparagraphformat}{\thesubparagraph\quad}%
}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+% \end{command}
%
-% \begin{macro}{\partlineswithprefixformat}
-% \begin{macro}{\chapterlineswithprefixformat}
-% \begin{macro}{\chapterlinesformat}
-% \begin{macro}{\sectionlinesformat}
-% \begin{macro}{\sectioncatchphraseformat}
+% \begin{command}{\partlineswithprefixformat,
+% \chapterlineswithprefixformat,\chapterlinesformat,
+% \sectionlinesformat,\sectioncatchphraseformat}
% These \KOMAScript{} commands are not used any longer.
% \begin{macrocode}
\scr@ifundefinedorrelax{partlineswithprefixformat}{}{%
@@ -1997,11 +1896,7 @@
}%
}
% \end{macrocode}
-% \end{macro}%^^A \sectioncatchphraseformat
-% \end{macro}%^^A \sectionlinesformat
-% \end{macro}%^^A \chapterlinesformat
-% \end{macro}%^^A \chapterlineswithprefixformat
-% \end{macro}%^^A \partlineswithprefixformat
+% \end{command}^^A \partlineswithprefixformat …
%
% \begin{option}{headings}
% The \KOMAScript{} option does not make sense any longer. So it is
@@ -2016,10 +1911,10 @@
\KOMA@kav@removekey{.\KOMAClassFileName}{headings}%
}
% \end{macrocode}
-% \end{option}%^^A headings
+% \end{option}^^A headings
%
% \begin{macro}{\scr@class@titlesec@warning}
-% The warning about loading \textsf{titlesec} has to be changes, because we do
+% The warning about loading \pkg{titlesec} has to be changes, because we do
% not expect errors any longer.
% \begin{macrocode}
\def\scr@class@titlesec@warning{%
@@ -2033,32 +1928,27 @@
}
%</standardsections&body>
% \end{macrocode}
-% \end{macro}%^^A \scr@class@titlesec@warning
-% \selectlanguage{ngerman}%^^A
+% \end{macro}^^A \scr@class@titlesec@warning
%
-% \subsection{Optionen ausführen}
+% \subsection{Executing options}
%
-% Zum Schluss noch die Optionen ausführen. Im Paket wird diese Anweisung
-% allerdings vor den Anweisungen der Hacks und den Anweisungen aus dem
-% Abschnitt »Verwendete Anweisungen« stehen.
+% Last but not least the options have to be processed. In the generated
+% package this will be done before the commands of \autoref{sec:macros}.
% \begin{macrocode}
%<*package&option>
\KOMAProcessOptions\relax
%</package&option>
% \end{macrocode}
%
-%
% \Finale
+% \PrintChanges
%
\endinput
-%
-% end of file `scrhack.dtx'
-%%% Local Variables:
-%%% mode: doctex
-%%% mode: flyspell
-%%% coding: utf-8
-%%% ispell-local-dictionary: "en_GB"
-%%% TeX-master: t
-%%% End:
-
-% LocalWords: eineinhalbzeilige
+% Local Variables:
+% mode: doctex
+% ispell-local-dictionary: "en_US"
+% eval: (flyspell-mode 1)
+% TeX-master: t
+% TeX-engine: luatex-dev
+% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
+% End: