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.dtx96
1 files changed, 91 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx b/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
index 63dfbd63ba2..a5a742de4c2 100644
--- a/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
+++ b/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{514}
+% \CheckSum{593}
% \iffalse meta-comment
% ======================================================================
% scrlfile.dtx
@@ -64,7 +64,7 @@
%%% From File: scrlfile.dtx
%<*driver|scrlfile|load>
% \fi
-\def\scrlfileversion{2011/02/11 v3.08a}
+\def\scrlfileversion{2011/03/09 v3.09}
% \iffalse
%</driver|scrlfile|load>
%<*driver>
@@ -246,8 +246,12 @@
%
% \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
@@ -257,7 +261,24 @@
% 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.
+% 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
@@ -549,6 +570,7 @@
\noexpand\@onefilewithoptions{\csname #1.#4-@aliasname\endcsname}}%
\fi
\scr@@onefilewithoptions[{#2}][{#3}]{#4}%
+ \scr@load@hook{lateafter}{#1.#4}%
}
% \end{macrocode}
% \end{macro}
@@ -632,11 +654,21 @@
% \begin{macro}{\AfterFile}
% \begin{macro}{\BeforeClass}
% \begin{macro}{\AfterClass}
+% \begin{macro}{\AfterAtEndOfClass}
% \begin{macro}{\@AfterClass}
+% \begin{macro}{\@@AfterClass}
+% \changes{v3.09}{2011/03/08}{new (internal)}
+% \begin{macro}{\@@@AfterClass}
+% \changes{v3.09}{2011/03/09}{new (internal)}
% \begin{macro}{\@sAfterClass}
% \begin{macro}{\BeforePackage}
% \begin{macro}{\AfterPackage}
+% \begin{macro}{\AfterAtEndOfPackage}
% \begin{macro}{\@AfterPackage}
+% \begin{macro}{\@@AfterPackage}
+% \changes{v3.09}{2011/03/08}{new (internal)}
+% \begin{macro}{\@@@AfterPackage}
+% \changes{v3.09}{2011/03/09}{new (internal)}
% \begin{macro}{\@sAfterPackage}
% These macros add stuff to a load-file-hook of a file, class or
% package. First argument is the name of the file (with extension),
@@ -652,7 +684,31 @@
\newcommand*{\BeforeClass}[1]{%
\scr@set@load@hook{before}{#1.\@clsextension}}
\newcommand*{\AfterClass}{%
- \@ifstar {\@sAfterClass}{\@AfterClass}}
+ \@ifstar {\@sAfterClass}{%
+ \@ifnextchar +\@@AfterClass{%
+ \@ifnextchar !\@@@AfterClass\@AfterClass
+ }%
+ }%
+}
+\newcommand*{\@@@AfterClass}[2]{%
+ \begingroup\ifx\csname #2.\@clsextension-h@@k\endcsname\relax
+ \aftergroup\@sAfterClass
+ \else
+ \aftergroup\AfterAtEndOfClass
+ \fi
+ \endgroup{#2}%
+}
+\newcommand*{\AfterAtEndOfClass}[1]{%
+ \scr@set@load@hook{lateafter}{#1.\@clsextension}}
+\newcommand*{\@@AfterClass}[2]{%
+ \begingroup
+ \expandafter\ifx\csname #2.\@clsextension-h@@k\endcsname\relax
+ \aftergroup\@sAfterClass
+ \else
+ \aftergroup\@AfterClass
+ \fi
+ \endgroup{#2}%
+}
\newcommand*{\@AfterClass}[1]{%
\scr@set@load@hook{after}{#1.\@clsextension}}
\newcommand*{\@sAfterClass}[1]{%
@@ -668,7 +724,31 @@
\newcommand*{\BeforePackage}[1]{%
\scr@set@load@hook{before}{#1.\@pkgextension}}
\newcommand*{\AfterPackage}{%
- \@ifstar {\@sAfterPackage}{\@AfterPackage}}
+ \@ifstar {\@sAfterPackage}{%
+ \@ifnextchar +\@@AfterPackage{%
+ \@ifnextchar !\@@@AfterPackage\@AfterPackage
+ }%
+ }%
+}
+\newcommand*{\@@@AfterPackage}[2]{%
+ \begingroup\ifx\csname #2.\@pkgextension-h@@k\endcsname\relax
+ \aftergroup\@sAfterPackage
+ \else
+ \aftergroup\AfterAtEndOfPackage
+ \fi
+ \endgroup{#2}%
+}
+\newcommand*{\AfterAtEndOfPackage}[1]{%
+ \scr@set@load@hook{lateafter}{#1.\@pkgextension}}
+\newcommand*{\@@AfterPackage}[2]{%
+ \begingroup
+ \expandafter\ifx\csname #2.\@pkgextension-h@@k\endcsname\relax
+ \aftergroup\@sAfterPackage
+ \else
+ \aftergroup\@AfterPackage
+ \fi
+ \endgroup{#2}%
+}
\newcommand*{\@AfterPackage}[1]{%
\scr@set@load@hook{after}{#1.\@pkgextension}}
\newcommand*{\@sAfterPackage}[1]{%
@@ -692,6 +772,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\PreventPackageFromLoading}
% \changes{v3.08}{2010/11/04}{New}