diff options
author | Karl Berry <karl@freefriends.org> | 2006-08-20 00:02:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-08-20 00:02:10 +0000 |
commit | 524b07990fd2040ab6ce24b015b9a2bd4544a3c1 (patch) | |
tree | 93d7c1e1089e6c5df66ce81b57ed93482321baaa /Master/texmf-dist/tex/latex/koma-script/scrkbase.sty | |
parent | affc79c45bfab740028ac1e6b8480c5465a42b01 (diff) |
koma-script 2.95b, using provided texmf zip
git-svn-id: svn://tug.org/texlive/trunk@1990 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrkbase.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrkbase.sty | 541 |
1 files changed, 541 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrkbase.sty b/Master/texmf-dist/tex/latex/koma-script/scrkbase.sty new file mode 100644 index 00000000000..0f2579aa369 --- /dev/null +++ b/Master/texmf-dist/tex/latex/koma-script/scrkbase.sty @@ -0,0 +1,541 @@ +%% +%% This is file `scrkbase.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% scrkvers.dtx (with options: `package,scrkbase') +%% scrkbase.dtx (with options: `package,option') +%% scrlfile.dtx (with options: `load') +%% scrkbase.dtx (with options: `package,body') +%% scrlogo.dtx (with options: `logo') +%% +%% Copyright (c) 1994-2006 +%% 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 under the conditions of the +%% LaTeX Project Public License in the version distributed together +%% with KOMA-Script, see file `lppl.txt' or `lppl-de.txt'. +%% +%% This file may only be distributed together with a copy of the +%% KOMA-Script bundle. You may however distribute the +%% KOMA-Script bundle without all such generated files. See also +%% `lppl.txt' or `lppl-de.txt' for additional information. +%% +%% The list of files belonging to KOMA-Script distribution is given in +%% the file `manifest.txt'. See also `lppl.txt' or `lppl-de.txt' 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. +%% ---------------------------------------------------------- +%% +%% See `README'. +%% +%% 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: scrkvers.dtx +\begingroup + \makeatletter + \ifx\KOMAScriptVersion\undefined + \newcommand*{\@CheckKOMAScriptVersion}[1]{% + \gdef\KOMAScriptVersion{#1}% + }% + \else + \newcommand*{\@CheckKOMAScriptVersion}[1]{% + \def\@tempa{#1}% + \ifx\KOMAScriptVersion\@tempa\else + \@latex@warning@no@line{% + \noexpand\KOMAScriptVersion\space is + `\KOMAScriptVersion',\MessageBreak + but `#1' was expected!\MessageBreak + You should not use classes, packages or files + from\MessageBreak + different KOMA-Script versions% + }% + \fi + } + \fi + \@CheckKOMAScriptVersion{2006/07/30 v2.95b KOMA-Script}% +\endgroup +%%% From File: scrkbase.dtx +\ProvidesPackage{scrkbase}[% + \KOMAScriptVersion\space package (basics and keyval use)] +%%% From File: scrlfile.dtx +\def\scrlfileversion{2006/03/28 v2.95} +\edef\@tempa{\noexpand\RequirePackage{scrlfile}[\scrlfileversion]} +\@tempa +%%% From File: scrkbase.dtx +\RequirePackage{keyval} +\begingroup + \def\@tempa#1=#2=#3\relax{% + \KV@@sp@def\@tempa{#1}% + \ifx\@tempa\@empty\else + \expandafter\let\expandafter\@tempc + \csname\KV@prefix\@tempa\endcsname + \ifx\@tempc\relax + \KV@errx + {\@tempa\space undefined}% + \else + \ifx\@empty#3\@empty + \KV@default + \else + \KV@@sp@def\@tempb{#2}% + \expandafter\@tempc\expandafter{\@tempb}\relax + \fi + \fi + \fi} + \@check@eq\KV@split\@tempa +\endgroup +\def\KV@split#1=#2=#3\relax{% + \KV@@sp@def\@tempa{#1}% + \ifx\@tempa\@empty\else + \expandafter\let\expandafter\@tempc + \csname\KV@prefix\@tempa\endcsname + \ifx\@tempc\relax + \scr@KV@errx{\@tempa}% + \else + \ifx\@empty#3\@empty + \KV@default + \else + \KV@@sp@def\@tempb{#2}% + \expandafter\@tempc\expandafter{\@tempb}\relax + \fi + \fi + \fi} +\CheckCommand*{\KV@default}{% + \expandafter\let\expandafter\@tempb + \csname\KV@prefix\@tempa @default\endcsname + \ifx\@tempb\relax + \KV@err{No value specified for \@tempa}% + \else + \@tempb\relax + \fi} +\renewcommand*{\KV@default}{% + \expandafter\let\expandafter\@tempb + \csname\KV@prefix\@tempa @default\endcsname + \ifx\@tempb\relax + \scr@KV@err{\@tempa}% + \else + \@tempb\relax + \fi} +\newcommand*{\scr@KV@errx}[1]{% + \expandafter\ifx\csname\KV@prefix nokey\endcsname\relax + \KV@errx{#1\space undefined}% + \else + \csname\KV@prefix nokey\endcsname{#1}% + \fi +} +\newcommand*{\scr@KV@err}[1]{% + \expandafter\ifx\csname\KV@prefix noval\endcsname\relax + \KV@err{No value specified for #1}% + \else + \csname\KV@prefix noval\endcsname{#1}% + \fi +} +\newif\if@atdocument +\AtBeginDocument{\@atdocumenttrue} +\@onlypreamble\@atdocumentrue +\@onlypreamble\@atdocumentfalse +\newcommand{\ifundefined}[1]{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand{\ifnotundefined}[1]{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi +} +\newcommand\ifstr[2]{% + \begingroup\edef\@tempa{#1}\edef\@tempb{#2}% + \ifx\@tempa\@tempb + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi +} +\newcommand\ifnumber[1]{% + \begingroup\@tempswafalse\let\scr@next\test@number + \expandafter\scr@next#1\scr@next + \if@tempswa + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi +} +\newcommand*{\test@number}[1]{% + \ifx \scr@next#1 + \let\scr@next\relax + \else + \@tempcnta=\expandafter\expandafter\expandafter\number + \expandafter`#1\relax + \ifnum \@tempcnta>47 + \ifnum \@tempcnta<58 + \@tempswatrue + \else\@tempswafalse\fi + \else\@tempswafalse\fi + \if@tempswa\else\let\scr@next\gobble@till@scr@next\fi + \fi + \scr@next +} +\newcommand*{\gobble@till@scr@next}{} +\def\gobble@till@scr@next#1\scr@next{} +\newcommand{\ifdimen}[1]{% + \begingroup\@tempswatrue\let\scr@next\test@posdimen + \expandafter\test@dimen#1\scr@next + \if@tempswa + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi +} +\newcommand*{\test@dimen}[1]{% + \ifx -#1\else\ifx +#1\else + \def\scr@next{\let\scr@next\test@posdimen\scr@next#1}\fi\fi + \scr@next +} +\newcommand*{\test@posdimen}[1]{% + \ifx \scr@next#1% + \@tempswafalse\let\scr@next\relax + \else + \if .#1\else\if ,#1\else + \@tempcnta=% + \expandafter\expandafter\expandafter\number\expandafter`#1\relax + \ifnum \@tempcnta>47 + \ifnum \@tempcnta<58 + \else\def\scr@next{\test@dimunt#1}\fi + \else\def\scr@next{\test@dimunt#1}\fi + \fi\fi + \fi + \scr@next +} +\newcommand*{\test@dimunt}{} +\def\test@dimunt#1\scr@next{% + \expandafter\test@trueunt#1truetrue\test@trueunt +} +\newcommand*{\test@trueunt}{} +\def\test@trueunt#1true#2true#3\test@trueunt{% + \edef\@tempa{#1} + \ifx\@tempa\@empty\test@@ifdimunt{#2}\else\test@@ifdimunt{#1}\fi +} +\newcommand*\test@@ifdimunt[1]{% + \@tempswafalse + \ifstr{#1}{pt}{\@tempswatrue}{% + \ifstr{#1}{pc}{\@tempswatrue}{% + \ifstr{#1}{in}{\@tempswatrue}{% + \ifstr{#1}{bp}{\@tempswatrue}{% + \ifstr{#1}{cm}{\@tempswatrue}{% + \ifstr{#1}{mm}{\@tempswatrue}{% + \ifstr{#1}{dd}{\@tempswatrue}{% + \ifstr{#1}{cc}{\@tempswatrue}{% + \ifstr{#1}{sp}{\@tempswatrue}{}% + }% + }% + }% + }% + }% + }% + }% + }% +} +\newcommand*{\let@as@internal@defined}[1]{ + \@ifundefined{#1}{% + \begingroup + \expandafter\def\expandafter\@tempa + \expandafter{\csname scr@#1\endcsname} + \expandafter\def\expandafter\@tempb + \expandafter{\csname #1\endcsname} + \expandafter\expandafter\expandafter\endgroup + \expandafter\expandafter\expandafter\let\expandafter\@tempb\@tempa + }{% + \PackageInfo{% + scrkbase% + }{% + \expandafter\string\csname #1\endcsname\space already + defined.\MessageBreak + If \expandafter\string\csname #1\endcsname\space does not behave + like\MessageBreak + it was described at the KOMA-Script manual, try to\MessageBreak + load `scrkbase.sty' earlier or find out at which\MessageBreak + package or class \expandafter\string\csname #1\endcsname\space + was defined before\@gobble + }% + }% +} +\newcommand{\scr@ifpdftex}{\ifnotundefined{pdftexversion}} +\let@as@internal@defined{ifpdftex} +\BeforePackage{pdfcprot}{\let\ifpdftex\relax} +\AfterPackage{pdfcprot}{\let@as@internal@defined{ifpdftex}} +\newcommand{\scr@ifvtex}{\ifnotundefined{VTeXversion}} +\let@as@internal@defined{ifvtex} +\newcommand{\scr@ifpdfoutput}{% + \ifundefined{pdfoutput}{% + \ifundefined{OpMode}{% + \expandafter\@secondoftwo% + }{% + \ifnum\OpMode=1 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% + }{% + \ifnum\pdfoutput>0 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% +}% +\let@as@internal@defined{ifpdfoutput} +\newcommand*{\scr@ifpsoutput}{% + \ifnotundefined{if@dvips}{% + \if@dvips + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }{% + \ifnotundefined{OpMode}{% + \ifnum\OpMode=2 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }{% + \expandafter\@secondoftwo + }% + }% +} +\let@as@internal@defined{ifpsoutput} +\newcommand*{\scr@ifdvioutput}{% + \ifundefined{pdfoutput}{% + \ifundefined{OpMode}{% + \expandafter\@firstoftwo + }{% + \ifnum\OpMode=0 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% + }{% + \ifnum\pdfoutput=0 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% +} +\let@as@internal@defined{ifdvioutput} +\newcommand*{\DeclareKeyValOption}[2][% + \ifx\@currext\@clsextension\OptionNotUsed\else\@unkownoptionerror\fi +]{% + \DeclareOption*{ + \expandafter\let\expandafter\@KV@saved@nokey + \csname KV@#2@nokey\endcsname + \@namedef{KV@#2@nokey}{#1\@gobble}% + \@expandtwoargs\setkeys{#2}\CurrentOption + \expandafter\let\csname KV@#2@nokey\endcsname\@KV@saved@nokey + }% +} +\newcommand*{\Pr@cessL@calKeyValOptions}[1]{% + \edef\@curroptions{\@ptionlist{\@currname.\@currext}}% + \ifx\@curroptions\@empty\else + \expandafter\let\expandafter\@KV@saved@nokey\csname KV@#1@nokey\endcsname + \@namedef{KV@#1@nokey}{\in@false\@gobble}% + \@for\CurrentOption:=\@curroptions\do{% + \ifx\CurrentOption\@empty\else + \in@true\@expandtwoargs\setkeys{#1}\CurrentOption + \ifin@ + \ifx\@currext\@clsextension + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + \else + \@expandtwoargs\@removeelement\CurrentOption + \@curroptions\@curroptions + \fi + \fi + \fi + }% + \let\CurrentOption\@empty + \ifx\@currext\@clsextension\else + \expandafter\let\csname opt@\@currname.\@currext\endcsname\@curroptions + \fi + \expandafter\let\csname KV@#1@nokey\endcsname\@KV@saved@nokey + \fi +} +\newcommand*{\Pr@cessGl@balKeyValOptions}[1]{% + \ifx\@currext\@clsextension\else + \expandafter\let\expandafter\@KV@saved@nokey + \csname KV@#1@nokey\endcsname + \@namedef{KV@#1@nokey}{\in@false\@gobble}% + \@for\CurrentOption:=\@classoptionslist\do{% + \ifx\CurrentOption\@empty\else + \in@true\@expandtwoargs\setkeys{#1}\CurrentOption + \ifin@ + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + \fi + \fi + }% + \let\CurrentOption\@empty + \expandafter\let\csname KV@#1@nokey\endcsname\@KV@saved@nokey + \fi +} +\newcommand*{\ProcessKeyValOptions}[1]{% + \Pr@cessGl@balKeyValOptions{#1}% + \Pr@cessL@calKeyValOptions{#1}% +} +\newcommand*{\ProcessAllOptions}{% + \@ifstar\@Pr@cessAll@pti@ns\Pr@cessAll@pti@ns +} +\newcommand*{\@Pr@cessAll@pti@ns}[1]{% + \ProcessKeyValOptions{#1}\ProcessOptions* +} +\newcommand*{\Pr@cessAll@pti@ns}[1]{% + \ProcessKeyValOptions{#1}\ProcessOptions\relax +} +\newcommand*{\KOMA@key}{\define@key{KOMA}} +\newcommand*{\KOMAoptions}[1]{% + \setkeys{KOMA}{#1}% +} +\KOMA@key{nokey}{% + \PackageError{% + scrkeyval% + }{% + unknown KOMA option `#1'% + }{% + You've tried to use the KOMA option `#1'.\MessageBreak + But there is no KOMA option with that name.\MessageBreak + See the manual of KOMA-Script for information about known KOMA + options.% + }% +}% +\KOMA@key{noval}{% + \PackageError{% + scrkbase% + }{% + KOMA option `#1' needs a value% + }{% + You've tried to use the KOMA option `#1' without a + value.\MessageBreak + But this option has no default value, so you have to set a + value.\MessageBreak + See the manual of KOMA-Script for information about the option and + all known\MessageBreak + values.% + }% +}% +\newcommand*{\KOMA@unknown@keyval}[3]{% + \PackageError{% + scrkbase% + }{% + KOMA option `#1' has no value `#2'% + }{% + You've tried to set option `#1' to value `#2'.\MessageBreak + But allowed values are only:\MessageBreak + #3.\MessageBreak + See the KOMA-Script manual for more information.% + }% +} +\newcommand*{\KOMA@ifkey}[2]{% + \@ifundefined{if#2}{% + \expandafter\newif\csname if#2\endcsname + }{}% + \KOMA@key{#1}[true]{\KOMA@set@ifkey{#1}{#2}{##1}}% +} +\newcommand*{\KOMA@set@ifkey}[3]{% + \ifstr{#3}{true}{\@nameuse{#2true}}{% + \ifstr{#3}{on}{\@nameuse{#2true}}{% + \ifstr{#3}{yes}{\@nameuse{#2true}}{% + \ifstr{#3}{false}{\@nameuse{#2false}}{% + \ifstr{#3}{off}{\@nameuse{#2false}}{% + \ifstr{#3}{no}{\@nameuse{#2false}}{% + \KOMA@unknown@keyval{#1}{#3}{% + `true', `on', `yes', `false', `off', `no'% + }% + }% + }% + }% + }% + }% + }% +} +\newcommand*{\KOMA@ncmdkey}[1]{% + \@ifnextchar [%] + {\KOMA@@ncmdkey{#1}}{\KOMA@@ncmdkey{#1}[]}% +} +\newcommand*{\KOMA@@ncmdkey}{} +\def\KOMA@@ncmdkey#1[#2]#3#4{% + \ifx\relax#2\relax\else + \@namedef{KV@KOMA@#1@default\expandafter}\expandafter{% + \csname KV@KOMA@#1\endcsname{#2}% + }% + \fi + \@ifundefined{#3}{\@namedef{#3}{0}}% + \KOMA@key{#1}{\KOMA@set@ncmdkey{#1}{#3}{#4}{##1}}% +} +\newcommand*{\KOMA@set@ncmdkey}[4]{% + \begingroup + \edef\@searched{#4}% + \let\@tempa=\@empty + \let\@tempb=\@empty + \@tempswafalse + \@for\@valuelist:=#3\do{% + \if@tempswa\else + \edef\@tempc{\expandafter\@firstoftwo\@valuelist}% + \edef\@tempa{\@tempa\@tempb`\@tempc'}% + \edef\@tempb{, }% + \ifx\@tempc\@searched + \@tempswatrue + \edef\@tempa{\expandafter\@secondoftwo\@valuelist}% + \fi + \fi + }% + \if@tempswa + \edef\@tempa{\endgroup + \noexpand\@namedef{#2}{\@tempa}% + }% + \else + \KOMA@unknown@keyval{#1}{#4}{\@tempa}% + \let\@tempa=\endgroup + \fi + \@tempa +} +\newcommand*{\KOMA@DeclareObsoleteOption}[3][\@gobbletwo]{% + \DeclareOption{#2}{\KOMA@UseObsolete{option}{#1}{#2}{#3}}% +} +\newcommand*{\KOMA@UseObsolete}[4]{% + #2{% + scrkbase% + }{% + You've used the obsolete #1 `#3'.\MessageBreak + \protect\KOMAoptions{#4} will be used instead.\MessageBreak + You should do this change too% + }% + \KOMAoptions{#4}% +} +\newcommand*{\KOMA@newobsoletecommand}[3][\@gobbletwo]{% + \newcommand*{#2}{\KOMA@UseObsolete{command}{#1}{\string#2}{#3}}% +} +%%% 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 `scrkbase.sty'. |