From 024228db99693079b2ebbc9aff20e89811eb8810 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 5 Apr 2011 23:06:06 +0000
Subject: koma-script (5apr11)

git-svn-id: svn://tug.org/texlive/trunk@21983 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/koma-script/scrlfile.sty  | 55 ++++++++++++++++++++--
 1 file changed, 52 insertions(+), 3 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/koma-script/scrlfile.sty')

diff --git a/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty b/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty
index 6742cb82fdb..7ce524a34c4 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty
@@ -41,7 +41,7 @@
 %% standard classes created by The LaTeX3 Project 1994-1996.
 %% 
 %%% From File: scrlfile.dtx
-\def\scrlfileversion{2011/02/11 v3.08a}
+\def\scrlfileversion{2011/03/09 v3.09}
 \ProvidesPackage{scrlfile}[%
   \scrlfileversion\space KOMA-Script package (loading files)]
 \typeout{Package scrlfile, \csname ver@scrlfile.sty\endcsname%
@@ -98,6 +98,7 @@
       \noexpand\@onefilewithoptions{\csname #1.#4-@aliasname\endcsname}}%
   \fi
   \scr@@onefilewithoptions[{#2}][{#3}]{#4}%
+  \scr@load@hook{lateafter}{#1.#4}%
 }
 \newcommand*{\ReplaceFile}[2]{%
   \expandafter\edef\csname #1-@alias\endcsname{#2}%
@@ -126,7 +127,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]{%
@@ -142,7 +167,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]{%
-- 
cgit v1.2.3

