%PDF- %PDF-
| Direktori : /proc/self/root/usr/share/texlive/texmf-dist/tex/latex/koma-script/ |
| Current File : //proc/self/root/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty |
%%
%% This is file `scrlfile.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% scrlfile.dtx (with options: `scrlfile')
%% scrlogo.dtx (with options: `logo')
%%
%% Copyright (c) 1994-2007
%% Markus Kohm and any individual authors listed elsewhere in this file.
%%
%% This file was generated from file(s) of the KOMA-Script bundle.
%% ---------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, version 1.3c of the license.
%% The latest version of this license is in
%% 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 and of this work.
%%
%% This work has the LPPL maintenance status "author-maintained".
%%
%% The Current Maintainer and author of this work is Markus Kohm.
%%
%% This file may only be distributed together with the files
%% `scrlogo.dtx', `scrlfile.dtx' and `scrlfile.ins'. You may however
%% distribute the files `scrlogo.dtx', `scrlfile.dtx' and `scrlfile.ins'
%% without this file. See also `scrlfile.dtx' for additional information.
%%
%% If this file is a beta version, you are not allowed to distribute it.
%%
%% English and German manuals are part of KOMA-Script bundle.
%% ----------------------------------------------------------
%%
%% A short version of the english manual is at `scrlfile.dtx', too.
%%
%% The KOMA-Script bundle (but maybe not this file) was based upon the
%% LaTeX2.09 Script family created by Frank Neukam 1993 and the LaTeX2e
%% standard classes created by The LaTeX3 Project 1994-1996.
%%
%%% From File: scrlfile.dtx
\def\scrlfileversion{2012/06/15 v3.12}
\ProvidesPackage{scrlfile}[%
\scrlfileversion\space KOMA-Script package (loading files)]
\typeout{Package scrlfile, \csname ver@scrlfile.sty\endcsname%
^^J\@spaces\@spaces\@spaces\@spaces\space\space
Copyright (C) Markus Kohm^^J}
\ExecuteOptions{}
\ProcessOptions\relax
\CheckCommand{\InputIfFileExists}[2]{%
\IfFileExists{#1}%
{#2\@addtofilelist{#1}\@@input \@filef@und}}
\renewcommand{\InputIfFileExists}[2]{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname #1-@alias\endcsname\relax
\expandafter\@secondoftwo
\else
\scr@replacefile@msg{\csname #1-@alias\endcsname}{#1}%
\expandafter\@firstoftwo
\fi
{%
\expandafter\InputIfFileExists\expandafter{\csname
#1-@alias\endcsname}{#2}%
}%
{\IfFileExists{#1}{%
\scr@load@hook{before}{#1}%
#2\@addtofilelist{#1}%
\@@input \@filef@und
\scr@load@hook{after}{#1}%
}}%
}
\newcommand*{\scr@@loadwithoptions}{}
\newcommand*{\scr@loadwithoptions}{}
\let\scr@loadwithoptions\@loadwithoptions
\renewcommand*{\@loadwithoptions}[3]{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname #3.#1-@aliasname\endcsname\relax
\def\scr@@loadwithoptions{\scr@loadwithoptions{#1}{#2}{#3}}%
\else
\scr@replacefile@msg{\csname #3.#1-@aliasname\endcsname.#1}{#3.#1}%
\def\scr@@loadwithoptions{%
\@loadwithoptions{#1}{#2}{\csname #3.#1-@aliasname\endcsname}%
}%
\fi
\scr@@loadwithoptions
}
\newcommand*{\scr@onefilewithoptions}{}
\let\scr@onefilewithoptions\@onefilewithoptions
\def\@onefilewithoptions#1[#2][#3]#4{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname #1.#4-@aliasname\endcsname\relax
\def\scr@@onefilewithoptions{\scr@onefilewithoptions{#1}}%
\else
\scr@replacefile@msg{\csname #1.#4-@aliasname\endcsname.#4}{#1.#4}%
\edef\scr@@onefilewithoptions{%
\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}%
}
\newcommand*{\@replacefilewithext}[3]{%
\expandafter\edef\csname #1.#3-@aliasname\endcsname{#2}%
}
\newcommand*{\ReplacePackage}[2]{%
\@replacefilewithext{#1}{#2}\@pkgextension
}
\newcommand*{\ReplaceClass}[2]{%
\@replacefilewithext{#1}{#2}\@clsextension
}
\newcommand*{\scr@replacefile@msg}[2]{%
\PackageInfo{scrlfile}{inputing `#1' instead of `#2'}%
}
\newcommand*{\scr@load@hook}[2]{%
\@ifundefined{#2-@#1}{}{%
\@nameuse{#2-@#1}%
\expandafter\let\csname #2-@#1\endcsname=\relax}}
\newcommand*{\scr@set@load@hook}[2]{%
\@ifundefined{#2-@#1}{\@namedef{#2-@#1}{}}{}%
\expandafter\g@addto@macro\csname #2-@#1\endcsname}
\newcommand*{\BeforeFile}{\scr@set@load@hook{before}}
\newcommand*{\AfterFile}{\scr@set@load@hook{after}}
\newcommand*{\BeforeClass}[1]{%
\scr@set@load@hook{before}{#1.\@clsextension}}
\newcommand*{\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]{%
\begingroup
\@ifclassloaded{#1}{%
\aftergroup\@secondoftwo
}{%
\aftergroup\@AfterClass
}%
\endgroup
{#1}%
}
\newcommand*{\BeforePackage}[1]{%
\scr@set@load@hook{before}{#1.\@pkgextension}}
\newcommand*{\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]{%
\begingroup
\@ifpackageloaded{#1}{%
\aftergroup\@secondoftwo
}{%
\aftergroup\@AfterPackage
}%
\endgroup
{#1}%
}
\newcommand*{\scrlfile@excludedpackages}{}
\let\scrlfile@excludedpackages\@empty
\newcommand*{\scrlfile@saved@RequirePackage}{}
\newcommand*{\PreventPackageFromLoading}{%
\@ifstar{\@PreventPackageFromLoading\PackageInfo}%
{\@PreventPackageFromLoading\PackageWarning}%
}
\newcommand*{\@PreventPackageFromLoading}[2]{%
\edef\reserved@b{#2}%
\ifx \reserved@b\@empty
#1{scrlfile}{%
\string\PreventPackageFromLoading\space with empty argument\MessageBreak
ignored%
}%
\else
\ifx\scrlfile@excludedpackages\@empty
\let\scrlfile@saved@RequirePackage\RequirePackage
\let\RequirePackage\scrlfile@RequirePackage
\def\reserved@a#2{%
\@latex@error
{\noexpand \usepackage before \string\documentclass}%
{\noexpand \usepackage may only appear in the document
preamble, i.e.,\MessageBreak
between \noexpand\documentclass and
\string\begin{document}.}%
\@gobble}%
\ifx\reserved@a\usepackage\else
\ifx\usepackage\scrlfile@saved@RequirePackage\else
\PackageWarning{scrlfile}{%
Maybe serious problem: unexpected definition of\MessageBreak
\string\usepackage
}%
\fi
\let\usepackage\RequirePackage
\fi
\fi
\expandafter\@for \expandafter\reserved@a\expandafter:\expandafter=%
\reserved@b\do {%
\ifx\reserved@a\@empty\else
\expandafter\@ifpackageloaded\expandafter{\reserved@a}{%
#1{scrlfile}{%
package `\reserved@a' already loaded.\MessageBreak
Cannot prevent it from beeing loaded%
}%
}{%
\edef\scrlfile@excludedpackages{\scrlfile@excludedpackages,%
\reserved@a}%
}%
\fi
}%
\ifx\scrlfile@excludedpackages\@empty
\ResetPreventPackageFromLoading
\fi
\fi
}
\@onlypreamble\PreventPackageFromLoading
\newcommand*{\ResetPreventPackageFromLoading}{%
\let\scrlfile@excludedpackages\@empty
\ifx\RequirePackage\scrlfile@RequirePackage
\ifx\usepackage\RequirePackage
\let\usepackage\scrlfile@saved@RequirePackage
\fi
\let\RequirePackage\scrlfile@saved@RequirePackage
\fi
}
\@onlypreamble\ResetPreventPackageFromLoading
\newcommand*{\StorePreventPackageFromLoading}[1]{%
\let#1\scrlfile@excludedpackages
}
\@onlypreamble\StorePreventPackageFromLoading
\newcommand*{\scrlfile@RequirePackage}[2][]{%
\let\reserved@c\@empty
\@for\reserved@b:=#2\do {%
\begingroup
\@tempswatrue
\@for\reserved@a:=\scrlfile@excludedpackages\do {%
\ifx\reserved@a\reserved@b
\PackageInfo{scrlfile}{Excluding package `\reserved@b'\MessageBreak
from loading}%
\@tempswafalse
\fi
}%
\if@tempswa
\xdef\reserved@c{\reserved@c,\reserved@b}%
\fi
\endgroup
}%
\ifx\reserved@c\@empty
\let\reserved@a\scr@gobbleopt
\else
\edef\reserved@a{\noexpand\scrlfile@saved@RequirePackage[#1]{%
\expandafter\@gobble\reserved@c\@empty}}%
\fi
\reserved@a
}
\newcommand{\scr@gobbleopt}[1][]{}
\AtEndDocument{%
\let\scr@saved@checkend=\@checkend
\renewcommand*{\@checkend}[1]{%
\def\reserved@a{#1}\def\reserved@b{document}%
\scr@saved@checkend{#1}%
\ifx\reserved@a\reserved@b
\let\scr@saved@clearpage=\clearpage
\renewcommand*{\clearpage}{\scr@saved@clearpage
\scr@hook@bcma
\scr@restore@newpage
\let\clearpage=\scr@saved@clearpage}%
\fi%
\let\scr@saved@dofilelist\@dofilelist
\def\@dofilelist{%
\scr@hook@acma
\let\@dofilelist\scr@saved@dofilelist
\scr@saved@dofilelist
}%
}%
}
\newcommand*{\scr@saved@checkend}{}
\newcommand*{\scr@saved@dofilelist}{}
\newcommand*{\scr@redefine@newpage}{%
\let\scr@saved@newpage\newpage
\def\scr@restore@newpage{%
\renewcommand*{\newpage}{%
\PackageWarningNoLine{%
scrlfile%
}{%
\string\newpage\space at main aux file!\MessageBreak
You have output material at the main aux file.\MessageBreak
Note, that the \string\BeforeClosingMainAux\space commands\MessageBreak
are processed before the output from aux file%
}%
\let\newpage\scr@saved@newpage
\newpage
}%
}%
\renewcommand*{\newpage}{%
\PackageError{%
scrlfile%
}{%
\string\newpage\space at \string\BeforeClosingMainAux
}{%
You should never use \string\newpage\space or
\string\clear(double)page or other output material at the\MessageBreak
argument of \string\BeforeClosingMainAux!\MessageBreak
If you'll continue, the \string\newpage\space will be ignored to
avoid corruption of\MessageBreak
every prior use of \string\BeforeClosingMainAux.
}%
}%
}
\newcommand*{\scr@restore@newpage}{}
\newcommand*{\scr@hook@bcma}{}
\newcommand*{\scr@hook@acma}{}
\newcommand*{\BeforeClosingMainAux}{%
\ifx\scr@hook@bcma\@empty
\gdef\scr@hook@bcma{%
\renewcommand*{\BeforeClosingMainAux}[1]{####1}%
\let\protected@write\protected@immediate@write
\scr@redefine@newpage
}%
\fi
\g@addto@macro\scr@hook@bcma%
}
\newcommand*{\AfterReadingMainAux}{%
\ifx\scr@hook@acma\@empty
\gdef\scr@hook@acma{%
\renewcommand*{\AfterReadingMainAux}[1]{####1}%
\let\protected@write\protected@immediate@write
}%
\fi
\g@addto@macro\scr@hook@acma%
}
\long\def\protected@immediate@write#1#2#3{%
\begingroup
#2%
\let\protect\@unexpandable@protect
\edef\reserved@a{\immediate\write#1{#3}}%
\reserved@a
\endgroup
\if@nobreak\ifvmode\nobreak\fi\fi
}
%%% From File: scrlogo.dtx
\@ifundefined{KOMAScript}{%
\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
M\kern.05em A\kern.1em-\kern.1em Script}}}{}
\endinput
%%
%% End of file `scrlfile.sty'.