diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrlfile.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrlfile.sty | 80 |
1 files changed, 68 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty b/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty index a2a4ca5eabb..53ec2056688 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty +++ b/Master/texmf-dist/tex/latex/koma-script/scrlfile.sty @@ -7,19 +7,22 @@ %% scrlfile.dtx (with options: `scrlfile') %% scrlogo.dtx (with options: `logo') %% -%% Copyright (c) 1994-2002 +%% 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. %% --------------------------------------------------------------- %% -%% It may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.2 -%% of this license or (at your option) any later version. +%% This work may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, version 1.3b of the license. %% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.2 or later is part of all distributions of LaTeX -%% version 1999/12/01 or later. +%% http://www.latex-project.org/lppl.txt +%% and version 1.3b 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 @@ -38,7 +41,7 @@ %% standard classes created by The LaTeX3 Project 1994-1996. %% %%% From File: scrlfile.dtx -\def\scrlfileversion{2006/03/28 v2.95} +\def\scrlfileversion{2006/07/19 v2.96} \ProvidesPackage{scrlfile}[% \scrlfileversion\space KOMA-Script package (loading files)] \typeout{Package scrlfile, \csname ver@scrlfile.sty\endcsname% @@ -50,10 +53,63 @@ \IfFileExists{#1}% {#2\@addtofilelist{#1}\@@input \@filef@und}} \renewcommand{\InputIfFileExists}[2]{% - \IfFileExists{#1}{% - \scr@load@hook{before}{#1}% - #2\@addtofilelist{#1}\@@input \@filef@und - \scr@load@hook{after}{#1}}} + \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}{} +\let\scr@loadwithoptions\@loadwithoptions +\renewcommand*{\@loadwithoptions}[3]{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #3.#1-@aliasname\endcsname\relax + \scr@loadwithoptions{#1}{#2}{#3}% + \else + \scr@replacefile@msg{\csname #3.#1-@aliasname\endcsname.#1}{#3.#1}% + \@loadwithoptions{#1}{#2}{\csname #3.#1-@aliasname\endcsname}% + \fi +} +\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 + \scr@onefilewithoptions{#1}[{#2}][{#3}]{#4}% + \else + \scr@replacefile@msg{\csname #1.#4-@aliasname\endcsname.#4}{#1.#4}% + \expandafter\@onefilewithoptions\expandafter{% + \csname #1.#4-@aliasname\endcsname + }[{#2}][{#3}]{#4}% + \fi +} +\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}{inputting `#1' instead of `#2'}% +} \newcommand*{\scr@load@hook}[2]{% \@ifundefined{#2-@#1}{}{% \@nameuse{#2-@#1}% |