summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrlfile.dtx')
-rw-r--r--Master/texmf-dist/source/latex/koma-script/scrlfile.dtx397
1 files changed, 30 insertions, 367 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx b/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
index 54daccbb90b..33406312586 100644
--- a/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
+++ b/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
@@ -1,5 +1,5 @@
-% \CheckSum{785}
-% \iffalse meta-comment
+% \CheckSum{776}
+% \iffalse^^A meta-comment
% ======================================================================
% scrlfile.dtx
% Copyright (c) Markus Kohm, 2002-2017
@@ -40,7 +40,7 @@
%
% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
% ======================================================================
-% \fi
+% \fi^^A meta-comment
%
% \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
@@ -59,16 +59,28 @@
% Right brace \} Tilde \~}
%
% \iffalse
-%%% From File: $Id: scrlfile.dtx 2592 2017-02-16 16:56:10Z kohm $
-%<*driver>
+%%% From File: $Id: scrlfile.dtx 2640 2017-05-08 09:36:55Z kohm $
+%<*dtx>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\ProvidesFile{scrlfile.dtx}[%
-%</driver>
-%<*driver|scrlfile>
+\begingroup
+ \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
+ \filedate$Date: 2017-05-08 11:36:55 +0200 (Mon, 08 May 2017) $
+ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
+ \filerevision$Revision: 2631 $
+ \edef\reserved@a{%
+ \noexpand\endgroup
+ \noexpand\ProvidesFile{scrlfile.dtx}%
+ [\filedate\space\filerevision\space
+ KOMA-Script package source
+ }%
+\reserved@a
+%</dtx>
+%<*dtx|scrlfile>
%<scrlfile>\ProvidesPackage{scrlfile}[%
%!KOMAScriptVersion
- package (loading files)]
-%</driver|scrlfile>
+%<scrlfile> package
+ (loading files)]
+%</dtx|scrlfile>
%<*dtx>
\ifx\documentclass\undefined
\input scrdocstrip.tex
@@ -86,8 +98,6 @@
\let\endbatchfile\relax
\fi
\endbatchfile
-%</dtx>
-%<*driver>
\documentclass[parskip=half-]{scrdoc}
\usepackage[german,english]{babel}
\CodelineIndex
@@ -110,376 +120,29 @@
authors but may also be used by \LaTeX{} users.
\end{abstract}
- \section{Legal Note}
- This is the only part of \KOMAScript{} you are allowed to
- redistribute without all the other files of \KOMAScript. You are
- allowed to redistribute and/or modifie the files
- ``\texttt{scrlogo.dtx}'', ``\texttt{scrlfile.dtx}'' and
- ``\texttt{scrlfile.ins}'' under the conditions of \LaTeX{} Project
- Public License, either version 1.3c of this license or (at your
- option) any later version. The latest version of this license is in
- \mbox{http://www.latex-project.org/lppl.txt} and version 1.3c or
- later is part of all distributions of \LaTeX{} version 2005/12/01 or
- later. You are not allowed to distribute one of the three files
- ``\texttt{scrlogo.dtx}'', ``\texttt{scrlfile.dtx}'' and
- ``\texttt{scrlfile.ins}'' without the others but all these files
- together.
-
- \KOMAScript{} is a versatile bundle of \LaTeX{} classes and
- packages. Large german and english manuals, both with more than
- 200~pages, are part of \KOMAScript{} bundle. You can find a longer
- version of the \textsf{scrlfile}-documentation at the \KOMAScript{}
- manuals.
-
- You can find the latest version of \KOMAScript{} bundle and
- \texttt{scrlfile} at
- \mbox{CTAN:/macros/latex/contrib/supported/koma-script/} in the
- course of which ``CTAN:'' is a short hand synonym for directory
- ``tex-archive'' at every CTAN server and mirror, e.g.\
- \mbox{ftp://ftp.dante.de/tex-archive/}. See
- \mbox{http://www.ctan.org} for a list of CTAN servers and mirrors.
-
\DocInput{\filename}
\end{document}
-%</driver>
+%</dtx>
% \fi
%
% \selectlanguage{english}
%
-% \changes{v2.95}{2002/06/11}{%
-% First version split from hugh scrclass.dtx}
-% \sloppy
-%
-% \section[Hook loading files, packages or classes]{%
-% Hooks loading files, packages or classes\footnote{You'll find a
-% short version of \textsf{scrlfile} documentation here. A longer
-% version may be found at english and german \KOMAScript{} manual.}}
-%
-% The introduction of \LaTeXe{} in 1994 brought many changes in the
-% handling with \LaTeX-extensions. Today the package author has many
-% macros in order to determine if another package or class is employed
-% and whether specific options are used. The author can load other
-% packages or can specify options in the the case the package is loaded
-% later. This has led to the expectation that the order of
-% package-loading will be not important. But this hope has not been
-% fulfilled, since often different packages define or redefine one macro
-% again and again. In such a case the order of package-loading becomes
-% very important. For the user it is sometimes difficult to understand
-% the behaviour and in some cases the user wants only react on the
-% loading of a package. This is also not really simple.
-%
-% Assuming the simple example that loads the package \textsf{longtable}
-% with a \KOMAScript{} document-class employed. The \textsf{longtable}
-% package defines table captions suitable for the standard classes, but
-% the captions are totally unsuitable for documents using \KOMAScript{}
-% and thus the provided configuration commands have no influence. In
-% order to solve this problem the commands which are responsible for the
-% table captions of the \textsf{longtable} package have to be
-% re-defined. But at the moment when the \textsf{longtable} is loaded
-% the \KOMAScript{} class is already processed.
-%
-% The only chance for \KOMAScript{} was to delay the re-definition until
-% the begin of the document with help of the macro |\AtBeginDocument|.
-% If the user wants to change the definitions too, it is recommended to
-% do this in the preamble of the document. But this is impossible since
-% later at |\begin{document}| \KOMAScript will again overwrite the
-% user-definition with its own. Therefore the user has to delay his
-% definition with \verb|\AtBeginDocument| as well.
-%
-% However, \KOMAScript{} shouldn't delay the re-definition until
-% |\begin{document}|. It would be enough to delay until the package
-% \textsf{longtable} has been loaded. But unfortunately the basic
-% \LaTeX{} does not define appropriate commands. The package
-% \textsf{scrlfile} provides redress here.
-%
-% Likewise, it might be conceivable that before a package is loaded one
-% would like to save the definition of a macro in a help-macro, in order
-% to restore its meaning after the package has been loaded. The package
-% \textsf{scrlfile} allows this too.
-%
-% The employment of \textsf{scrlfile} is not limited to package
-% dependencies only. Even dependencies with any other file can be
-% attended. For example the user can be warned if the not uncritical
-% file \texttt{french.ldf} has been loaded.
-%
-% Though the package is particularly interesting for package authors,
-% there are of course applications for normal \LaTeX{} users too.
-% Therefore this chapter gives and explains examples for both groups of
-% users.
-%
-%
-% \DescribeMacro{\BeforeFile}
-% \DescribeMacro{\AfterFile}
-% The command \cs{BeforeFile}\marg{file}\marg{instructions} enables to
-% execute \meta{instructions} the next time the \meta{file} is
-% loaded. In the same way works \cs{AfterFile}, but here the
-% \meta{instructions} will be executed after the \meta{file} has
-% been loaded. If \meta{file} will never be loaded then the
-% \meta{instructions} will never be executed.
-%
-% In order to implement those features \textsf{scrlfile} re-defines
-% the well known \LaTeX{} command \cs{InputIfFileExists}. If this
-% macro has not the expected definition \textsf{scrlfile} gives a
-% warning. This is for the case that in future \LaTeX{} versions the
-% macro can have a different definition or an other package has
-% already re-defined it.
-%
-% The command \cs{InputIfFileExists} is used everytime \LaTeX{} has to
-% load a file. This is independent from whether the actual command
-% was \cs{LoadClass}, \cs{documentclass}, \cs{usepackage},
-% \cs{RequiresPackage}, or \cs{include}. Exclusively the command
-% \begin{verbatim}
-% \input foo
-% \end{verbatim}\vspace{-\baselineskip}%
-% loads the file \meta{foo} without to utilize
-% \cs{InputIfFileExists}. Therefore one should always use
-% \begin{verbatim}
-% \input{foo}
-% \end{verbatim}\vspace{-\baselineskip}%
-% instead. Notice the parentheses surrounding the file name!
-%
-% \DescribeMacro{\BeforeClass}
-% \DescribeMacro{\BeforePackage}
-% The command \cs{BeforeClass}\marg{class}\marg{instructions} and the
-% command \cs{BeforePackage}\marg{package}\marg{instructions} work
-% the same way like the above described \cs{BeforeFile}. The only
-% difference is that the document \meta{class} and the \LaTeX{}
-% \meta{package} are specified with their names and not with their
-% file names. That means the file extensions ``\texttt{.cls}'' and
-% ``\texttt{.sty}'' have to be omitted.
-%
-% \DescribeMacro{\AfterClass}
-% \DescribeMacro{\AfterClass*}
-% \DescribeMacro{\AfterClass+}
-% \DescribeMacro{\AfterClass!}
-% \DescribeMacro{\AfterPackage}
-% \DescribeMacro{\AfterPackage*}
-% \DescribeMacro{\AfterPackage+}
-% \DescribeMacro{\AfterPackage!}
-% The command \cs{AfterClass}\marg{class}\marg{instructions} and the
-% command \cs{AfterPackage}\marg{package}\marg{instructions} work the
-% same way like command \cs{AfterFile}. The only difference is that
-% the document \meta{class} and the \LaTeX{} \meta{package} are
-% specified with their names and not with their file names. That
-% means the file extensions ``\texttt{.cls}'' and ``\texttt{.sty}''
-% have to be omitted. The starred versions execute the
-% \meta{instructions} not only next time the class or package is
-% loaded, but also immediately if the class or package has been loaded
-% already. The plus versions differ from the starred versions by execution
-% first if loading of class of package has been finished. The difference is
-% only valid if A loads B and B uses one of the after commands for A. In all
-% cases the \meta{instructions} will be executed before \cs{AtEndOfClass} or
-% \cs{AtEndOfPackage} calls of the class or package if loading of the class or
-% package was finished not yet. To even execute the \marg{instructions} after
-% those, use the exclamation mark version.
-%
-% \DescribeMacro{\AfterAtEndOfClass}
-% \DescribeMacro{\AfterAtEndOfPackage}
-% The command \cs{AfterAtEndOfClass}\marg{class}\marg{instructions} and the
-% command \cs{AfterAtEndOfPackage}\marg{package}\marg{instructions} work like
-% \cs{AfterClass} and \cs{AfterPackage} but execute the \meta{instructions}
-% after \cs{AtEndOfClass} or \cs{AtEndOfPackage} instructions outside the
-% context of the class or package. There are no star, plus or exclamation mark
-% versions of these commands. Just use \cs{AfterClass!} or \cs{AfterPackage!}
-% if you want to execute the \meta{instructions} if the class or package has
-% been loaded already.
-%
-% \DescribeMacro{\ReplaceInput}
-% The command \cs{ReplaceInput}\marg{name of file to be replaced}\marg{name of
-% replacement file} sets up an replacement. Whenever \LaTeX{} is told to input
-% the file with \meta{name of file to be replaced} it will input the file with
-% \meta{name of replacement file} instead. With this you may even teill \LaTeX
-% to input e.g. ``\texttt{\cs{jobname}.xua}'' instead of
-% ``\texttt{\cs{jobname.aux}}'' using:
-% \begin{verbatim}
-% \ReplaceInput{\jobname.aux}{\jobname.xua}
-% \end{verbatim}\vspace{-\baselineskip}
-% If you replace a replacement file both, the first replaced file and the
-% replacement file will be replaced by the new replacement file. So
-% \begin{verbatim}
-% \ReplaceInput{\jobname.aux}{\jobname.xua}
-% \ReplaceInput{\jobname.xua}{\jobname.uxa}
-% \end{verbatim}\vspace{-\baselineskip}
-% will replace ``\texttt{\cs{jobname}.aux}'' and ``\texttt{\cs{jobname}.xua}''
-% by ``\texttt{\cs{jobname}.uxa}''. But ring replacement like
-% \begin{verbatim}
-% \ReplaceInput{\jobname.aux}{\jobname.xua}
-% \ReplaceInput{\jobname.xua}{\jobname.aux}
-% \end{verbatim}\vspace{-\baselineskip}
-% would result in an stack size error. So you cannot input an already replaced
-% file using \LaTeX{} commands.
-%
-% \DescribeMacro{\ReplaceClass}
-% \DescribeMacro{\ReplacePackage}
-% You should not replace a class or package using \cs{ReplaceInput}. If you do
-% so, you'll get errors because of not matching class names. But you may use
-% \cs{ReplaceClass}\marg{name of class to be replaced}\marg{name of
-% replacement class} and \cs{ReplacePackage}\marg{name of package to be
-% replaced}\marg{name of replacement package} instead. With this commands like
-% \cs{documentclass}\marg{name of class to be replaced} would work like
-% \cs{documentclass}\marg{name of replacement class}. Effected commands are
-% \cs{LoadClass}, \cs{LoadClassWithOptions}, \cs{documentclass},
-% \cs{RequirePackage}, \cs{RequirePackageWithOptions}, \cs{usepackage}.
-%
-% Note: The replacement class or package will be loaded with the same option
-% list the replaced class or package would have been. If you replace a
-% class or package with a class or package that does not know the options of
-% the replaced class or package, you may declare the missing options using
-% \cs{BeforeClass} and \cs{BeforePackage}.
-%
-% If you e.g. want to load package \texttt{newfoo} instead of package
-% \texttt{oldfoo} you may use:
-% \begin{verbatim}
-% \ReplacePackage{oldfoo}{newfoo}
-% \end{verbatim}\vspace{-\baselineskip}
-% And if the old package had an option \texttt{oldopt} but the new package
-% does not you may use
-% \begin{verbatim}
-% \BeforePackage{newfoo}{%
-% \DeclareOption{oldopt}{%
-% \PackageInfo{newfoo}{option ``oldopt'' not supported}%
-% }%
-% }
-% \end{verbatim}\vspace{-\baselineskip}
-% If new option \texttt{newopt} should be used instead of \texttt{oldopt} you
-% may use:
-% \begin{verbatim}
-% \BeforePackage{newfoo}{%
-% \DeclareOption{oldopt}{%
-% \ExecuteOption{newopt}%
-% }%
-% }
-% \end{verbatim}\vspace{-\baselineskip}
-% You may also set new default options using:
-% \begin{verbatim}
-% \BeforePackage{newfoo}{%
-% \DeclareOption{oldopt}{%
-% \ExecuteOption{newopt}%
-% }%
-% \PassOptionsToPackage{newdefoptA,newdefoptB}{newfoo}%
-% }
-% \end{verbatim}\vspace{-\baselineskip}
-% or simply
-% \begin{verbatim}
-% \BeforePackage{newfoo}{%
-% \DeclareOption{oldopt}{%
-% \ExecuteOption{newopt}%
-% }%
-% }
-% \PassOptionsToPackage{newdefoptA,newdefoptB}{newfoo}%
-% \end{verbatim}\vspace{-\baselineskip}
-%
-% Note: To replace classes you have to load \textsf{scrlfile} using
-% \cs{RequirePackage} before loading the class.
-%
-% \DescribeMacro{\UnReplaceInput}%^^A
-% \DescribeMacro{\UnReplacePackage}%^^A
-% \DescribeMacro{\UnReplaceClass}%^^A
-% After defining a replacement of a input file, package, or class (see the
-% previously described commands for information about replacement definition),
-% you may un-define this replacement. The commands expect one argument: the
-% name of the input file, package, or class.
-%
-% \DescribeMacro{\PreventPackageFromLoading}
-% \DescribeMacro{\PreventPackageFromLoading*}
-% \DescribeMacro{\UnPreventPackageFromLoading}
-% \DescribeMacro{\UnPreventPackageFromLoading*}
-% \DescribeMacro{\ResetPreventPackageFromLoading}
-% \DescribeMacro{\StorePreventPackageFromLoading}
-% The command \cs{PreventPackageFromLoading}\oarg{do instead}\marg{package list}
-% does not replace a package by another but prevents packages from beeing
-% loaded even if they should be loaded using \cs{RequirePackage} or
-% \cs{usepackage}. The \meta{package list} is a comma seperated list of
-% packages, that should never be loaded. If you use the command several times,
-% the later \meta{package lists} will be added to the already existing. You
-% may use \cs{ResetPreventPackageFromLoading} to clean the \meta{package
-% list}. If you need to know the packages at the \meta{package list}, you may
-% use \cs{StorePackageFromLoading}\marg{command} to store the current list at
-% macro \meta{command}.
-%
-% The normal version of \cs{PreventPackageFromLoading} with empty argument
-% results in a warning message. The star version
-% \cs{PreventPackageFromLoading*} writes only an info into the log-file, if
-% the argument is empty.
-%
-% Both versions have an optional argument with code, that will be executed
-% instead of loading the package.
-%
-% You may also remove packages from beeing prevented from beeing loaded using
-% \cs{UnPreventPackageFromLoading}\marg{package list}. The star version also
-% cleans the \meta{do instead} code.
-%
-% All these commands are not robust!
-%
-%
-% \DescribeMacro{\BeforeClosingMainAux}
-% The command \cs{BeforeClosingMainAux}\marg{instructions}
-% works different from all the commands above. Is isn't a
-% load-file-hook. Package authors often have the problem, that they
-% need to write something to \texttt{aux}-file after output of the
-% last page. This is often done with:
-% \begin{flushleft}
-% | \AtEndDocument{\if@filesw|\\
-% | \write\@auxout{%|\\
-% | |\texttt{\emph{Write this to aux.}}\\
-% | }%|\\
-% | \fi}|
-% \end{flushleft}
-% But this fails, if the last \cs{shipout} was already done
-% e.g. because of someone used a different solution:
-% \begin{flushleft}
-% | \AtEndDocument{\if@filesw\clearpage|\\
-% | \immediate\write\@auxout{%|\\
-% | |\texttt{\emph{Write this to aux.}}\\
-% | }%|\\
-% | \fi}|
-% \end{flushleft}
-% The best solution would be to immediate write to \texttt{aux}-file
-% just after the \cs{clearpage} and before closing \texttt{aux}-file
-% at \cs{end\{document\}}. That's the goal of
-% \cs{BeforeClosingMainAux}:
-% \begin{flushleft}
-% | \BeforeClosingMainAux{\if@filesw|\\
-% | \immediate\write\@auxout{%|\\
-% | |\texttt{\emph{Write this to aux.}}\\
-% | }%|\\
-% | \fi}|
-% \end{flushleft}
-% This even works, if \cs{clearpage} at \cs{end\{document\}} will not
-% result in \cs{shipout} or if typessetting code\,---\,even
-% \cs{clearpage}\,---\,has been used at \cs{AtEndDocument}.
-%
-% The \cs{BeforeClosingMainAux} hook should not be used for code that
-% does any typesetting since the result of \cs{BeforeClosingMainAux}
-% would be unpredictable.
-%
-% \DescribeMacro{\AfterReadingMainAux}
-% The command \cs{AfterReadingfMainAux}\marg{instructions} works similar to
-% \cs{BeforeClosingMainAux}, but instead of processing instructions before
-% closing the main aux-file, they will be processed after reading the main
-% aux-file at \cs{begin\{document\}}.
-%
-% The \cs{AfterReadingMainAux} hook should not be used for code that does any
-% typesetting since the result of \cs{AfterReadingMainAux} would be
-% unprecitable.
-%
+% \changes{v2.95}{2002/06/11}{First version split from hugh scrclass.dtx}^^A
+% \changes{v3.24}{2017/05/06}{standalone manual removed}^^A
%
% \StopEventually{\PrintIndex\PrintChanges}
%
+% \section{Implementation of \textsf{scrlfile}}
+%
% \iffalse
%<*scrlfile>
% \fi
%
% \subsection{Preamble}
%
-% First of all we show the package and version at terminal and
-% log-file:
-% \begin{macrocode}
-\typeout{Package scrlfile, \csname ver@scrlfile.sty\endcsname%
- ^^J\@spaces\@spaces\@spaces\@spaces\space\space
- Copyright (C) Markus Kohm^^J}
-% \end{macrocode}
-%
+% \changes{v3.24}{2017/05/06}{Preamble sub-section removed}^^A
+% Since \KOMAScript~3.24 we do not longer output version information into the
+% \texttt{log}-file.
%
% \subsection{Options}
%