summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source/scrlfile.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/koma-script/source/scrlfile.dtx')
-rw-r--r--macros/latex/contrib/koma-script/source/scrlfile.dtx189
1 files changed, 95 insertions, 94 deletions
diff --git a/macros/latex/contrib/koma-script/source/scrlfile.dtx b/macros/latex/contrib/koma-script/source/scrlfile.dtx
index c6d2029586..a9a65ef46a 100644
--- a/macros/latex/contrib/koma-script/source/scrlfile.dtx
+++ b/macros/latex/contrib/koma-script/source/scrlfile.dtx
@@ -1,7 +1,7 @@
% \iffalse^^A meta-comment
% ======================================================================
% scrlfile.dtx
-% Copyright (c) Markus Kohm, 2002-2021
+% Copyright (c) Markus Kohm, 2002-2022
%
% This file is part of the work `scrlfile' which is part of the LaTeX2e
% KOMA-Script bundle.
@@ -18,36 +18,15 @@
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in manifest.txt.
-% ----------------------------------------------------------------------
-% scrlfile.dtx
-% Copyright (c) Markus Kohm, 2002-2021
-%
-% Diese Datei ist Teil des Werks `scrlfile', das wiederum Teil des
-% LaTeX2e KOMA-Script Pakets ist.
-%
-% 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.
% ======================================================================
-%
-%%% From File: $Id: scrlfile.dtx 3625 2021-10-31 12:45:26Z kohm $
+%%% From File: $Id: scrlfile.dtx 3688 2022-02-10 08:26:37Z kohm $
%<*dtx>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
\def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2021-10-31 13:45:26 +0100 (Sun, 31 Oct 2021) $
+ \filedate$Date: 2022-02-10 09:26:37 +0100 (Do, 10. Feb 2022) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 2631 $
+ \filerevision$Revision: 3688 $
\edef\reserved@a{%
\noexpand\endgroup
\noexpand\ProvidesFile{scrlfile.dtx}%
@@ -69,6 +48,7 @@
\generate{\usepreamble\defaultpreamble
\file{scrlfile.sty}{%
\from{scrlfile.dtx}{package}%
+ \from{scrlogo.dtx}{logo}%
}%
}
\batchinput{scrlfile-hook.dtx}
@@ -78,27 +58,11 @@
\let\endbatchfile\relax
\fi
\endbatchfile
-\documentclass[parskip=half-]{scrdoc}
-\usepackage[english]{babel}
-\CodelineIndex
-\RecordChanges
-\GetFileInfo{scrlfile.dtx}
-\title{\KOMAScript{} \partname\ \texttt{\filename}%
- \thanks{This file is revision \fileversion\ of file \texttt{\filename}.}}
-\date{\filedate}
-\author{Markus Kohm\thanks{mailto:komascript@gmx.info}}
-
+\documentclass[USenglish]{koma-script-source-doc}
+\usepackage{babel}
+\setcounter{StandardModuleDepth}{1}
\begin{document}
- \maketitle
- \begin{abstract}
- This package is the compatibility layer over \texttt{scrlfile-hook} and
- \texttt{scrlfile-patcholdlatex}. It provides package and class hook
- handling independent from the used \LaTeX{} release.
- \end{abstract}
-
- \tableofcontents
-
- \DocInput{\filename}
+ \DocInput{scrlfile.dtx}
\end{document}
%</dtx>
% \fi^^A meta-comment
@@ -106,44 +70,62 @@
% \changes{v2.95}{2002/06/11}{First version split from hugh scrclass.dtx}
% \changes{v3.24}{2017/05/06}{standalone manual removed}
% \changes{v3.32}{2020/09/11}{new implementation based on
-% \texttt{scrlfile-hook} and \texttt{scrlfile-patcholdlatex}}
+% \pkg*{scrlfile-hook} and \pkg*{scrlfile-patcholdlatex}}
+% \changes{v3.36}{2022/02/03}{switch over from \cls*{scrdoc} to
+% \cls*{koma-script-source-doc}}
+% \changes{v3.36}{2022/02/03}{using \file{scrlogo.dtx} to define the logo}
+%
+% \GetFileInfo{scrlfile.dtx}
+% \title{File Loading Hooks with \href{https://komascript.de}{\KOMAScript}
+% Package \pkg*{scrlfile}}
+% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
+% \date{Revision \fileversion{} of \filedate}
+% \maketitle
+% \begin{abstract}
+% This package is the compatibility layer over \texttt{scrlfile-hook} and
+% \texttt{scrlfile-patcholdlatex}. It provides package and class hook
+% handling independent from the used \LaTeX{} release.
+% \end{abstract}
+% \tableofcontents
%
%
% \section{User Manual}
%
-% For user manual see the \KOMAScript{} manual. Here you can find interim
-% documentation only (before it is added to the \KOMAScript{} manual).
+% You can find the user manual of \pkg*{scrlfile} in the \KOMAScript{} manual,
+% either the German \file{scrguide} or the English \file{scrguien}.
+% Here you can find interim documentation only (before it is added to the
+% \KOMAScript{} manual).
%
% \DescribeOption{withdeprecated}
-% Package option \texttt{withdeprecated} enables the definition of deprecated
+% Package option \opt{withdeprecated} enables the definition of deprecated
% commands \cs{AfterClass+}, \cs{AfterPackage+}, \cs{AfterClass!} and
% \cs{AfterPackage!}. All of them will be emulated by \cs{AfterAtEndOClass*}
% and \cs{AfterAtEndOfPackage*} so they are not completely compatible with the
% original deprecated commands.
%
% Users of classes or package, that use such deprecated commands can load
-% \texttt{scrlfile} already before the class using:
-% \begin{verbatim}
+% \pkg*{scrlfile} already before the class using:
+%\begin{verbatim}
% \RequirePackage[withdeprecated]{scrlfile}
-% \end{verbatim}
-% or adding option \texttt{withdeprecated} to the global options of
+%\end{verbatim}%
+% or adding option \opt{withdeprecated} to the global options of
% \cs{documentclass}. Note, this is not a key-value option. It cannot be
-% changed after loading \texttt{scrlfile}.
+% changed after loading \pkg*{scrlfile}.
%
+% \MaybeStop{\PrintIndex}
%
-% \StopEventually{\PrintIndex\PrintChanges}
+% \section{Implementation of \pkg*{scrlfile}}
%
-% \section{Implementation of \textsf{scrlfile}}
-%
-% We either need to load one of these packages.
+% We need to load one of the packages \pkg*{scrlfile-hook},
+% \pkg*{scrlfile-kook-3.34}, \pkg*{scrlfile-patcholdlatex}.
% \changes{v3.33}{2021/02/09}{do not test for existence of \cs{AddToHook} any
-% longer, but \cs{IfFormatAtLeastTF} and the format version}%
+% longer, but \cs{IfFormatAtLeastTF} and the format version}%
% We cannot do the decision by testing the existence of macro \cs{AddToHook},
-% because package \textsf{latexrelease} does not rollback to prior format
-% versions good enough. Instead of undefining the macro an so really reverting
-% to the definition of \LaTeX{} kernels prior to 2020/10/01 it only redefines
-% it to a do-nothing macro. Because of this and similar issues with
-% \textsf{latexrelease} cannot (or only with provision) be used to simulate a
+% because package \pkg{latexrelease} does not rollback to prior format
+% versions good enough. Instead of undefining the macro and so really
+% reverting to the definition of \LaTeX{} kernels prior to 2020/10/01 it only
+% redefines it to a do-nothing macro. Because of this and similar issues with
+% \pkg{latexrelease} cannot (or only with provision) be used to simulate a
% real old \LaTeX{} kernel, i.e. for testing. So the only valid test for the
% existence of the wanted \cs{AddToHook} would be to test the definite
% definition of \cs{AddToHook} and the existence of the hooks we are
@@ -154,9 +136,10 @@
\RequirePackage{scrlfile-patcholdlatex}%
\RequirePackage{xparse}%
% \end{macrocode}
-% \changes{v3.33}{2021/02/16}{workaround for \textsf{xparse} bug}
-% Explicitly switch of \textsf{expl} syntax because of a
-% \textsf{xparse-2020-10-01} bug in version 2020-02-02.
+% \changes{v3.33}{2021/02/16}{workaround for \pkg{latexrelease} bug}
+% Explicitly switch of \pkg{expl3} syntax because of a
+% \pkg{latexrelease} bug related to the usage of \pkg{xparse-2020-10-01} in
+% version 2020-02-02.
% \changes{v3.35}{2021/10/31}{new variant because of \LaTeX{} kernel change}
% \begin{macrocode}
\ExplSyntaxOff
@@ -171,8 +154,8 @@
\RequirePackage{scrlfile-patcholdlatex}%
\RequirePackage{xparse}%
% \end{macrocode}
-% Explicitly switch of \textsf{expl} syntax because of a
-% \textsf{xparse-2020-10-01} bug in version 2020-02-02.
+% Explicitly switch of \pkg{expl3} syntax because of a
+% \pkg{latexrelease} bug in version 2020-02-02.
% \begin{macrocode}
\ExplSyntaxOff
}%
@@ -180,19 +163,30 @@
% \end{macrocode}
%
% \begin{option}{withdeprecated}
-% \changes{v3.32}{2020/09/11}{new option}
-% Depending on this option we implement addition deprecated commands.
+% \changes{v3.32}{2020/09/11}{added}
+% Depending on this option we implement addition deprecated commands.
% \begin{macrocode}
\DeclareOption{withdeprecated}{%
% \end{macrocode}
%
-% \begin{macro}{\AfterClass+}
-% \begin{macro}{\AfterClass!}
-% \cs{scrlfile@AfterClass} is used to store the original \cs{AfterClass},
-% before redefining \cs{AfterClass} to handle the plus and the exclamation
-% mark variant.
+% \begin{command}[noindex]{\AfterClass+,\AfterClass!}
+% \cs{scrlfile@AfterClass} is used in the sub-packages to store the original
+% \cs{AfterClass} and can be used to redefine \cs{AfterClass} to handle the
+% plus and the exclamation mark variant.
% \begin{macrocode}
\RenewDocumentCommand\AfterClass{}{%
+% \end{macrocode}
+%^^A Hack for correct line numbers in the index:
+%^^A - end environment,
+%^^A - do index entries
+%^^A - fix vertical spaces
+%^^A - restart environment without printing and indexing
+% \end{command}
+% \SpecialMainCommandIndex{\AfterClass+}
+% \SpecialMainCommandIndex{\AfterClass\quotechar!}
+% \vskip-\dimexpr 2.2\baselineskip+\parskip\relax
+% \begin{command}[noindex,noprint]{\AfterClass+,\AfterClass!}
+% \begin{macrocode}
\kernel@ifnextchar +%
{\scrlfile@emulatedeprecated{Class}}%
{%
@@ -202,16 +196,26 @@
}%
}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
+% \end{command}
%
-% \begin{macro}{\AfterPackage+}
-% \begin{macro}{\AfterPackage!}
-% \cs{scrlfile@AfterPackage} is used to store the original \cs{AfterPackage},
-% before redefining \cs{AfterPackage} to handle the plus and the exclamation
-% mark variant.
+% \begin{command}[noindex]{\AfterPackage+,\AfterPackage!}
+% \cs{scrlfile@AfterPackage} is used in the sub-packages to store the original
+% \cs{AfterPackage} and can be used to redefine \cs{AfterPackage} to handle
+% the plus and the exclamation mark variant.
% \begin{macrocode}
\RenewDocumentCommand\AfterPackage{}{%
+% \end{macrocode}
+%^^A Hack for correct line numbers in the index:
+%^^A - end environment,
+%^^A - do index entries
+%^^A - fix vertical spaces
+%^^A - restart environment without printing and indexing
+% \end{command}
+% \SpecialMainCommandIndex{\AfterPackage+}
+% \SpecialMainCommandIndex{\AfterPackage\quotechar!}
+% \vskip-\dimexpr 2.2\baselineskip+\parskip\relax
+% \begin{command}[noindex,noprint]{\AfterPackage+,\AfterPackage!}
+% \begin{macrocode}
\kernel@ifnextchar +%
{\scrlfile@emulatedeprecated{Package}}%
{%
@@ -221,11 +225,10 @@
}%
}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
+% \end{command}
%
% \begin{macro}{\scrlfile@emulatedeprecated}
-% \changes{v3.32}{2020/09/11}{new internal command}
+% \changes{v3.32}{2020/09/11}{added}
% This emulates \cs{AfterClass+}, \cs{AfterPackage+}, \cs{AfterClass!} and
% \cs{AfterPackage!} using \cs{AfterAtEndOfClass} or
% \cs{AfterAtEndOfPackage}. Note, that both, the plus and the exclamation mark
@@ -256,17 +259,15 @@
\ProcessOptions\relax
% \end{macrocode}
%
-% Last but not least this is a \KOMAScript{} package, so we also define the
-% \KOMAScript{} logo:
-% \begin{macrocode}
-\RequirePackage{scrlogo}
-% \end{macrocode}
-%
% \Finale
-%
+% \PrintChanges
+%
% \endinput
-%
% 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: