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/scrlttr2.cls | |
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/scrlttr2.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls | 2984 |
1 files changed, 1565 insertions, 1419 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls b/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls index 156984b84a5..b3adea55192 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls +++ b/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls @@ -4,248 +4,503 @@ %% %% The original source files were: %% -%% scrclass.dtx (with options: `class,scrlettr') -%% scrlogo.dtx +%% scrkvers.dtx (with options: `class,letter') +%% scrkbase.dtx (with options: `load') +%% scrkcomp.dtx (with options: `class,letter,option') +%% scrkmisc.dtx (with options: `class,letter,option') +%% scrklco.dtx (with options: `class,letter,option') +%% scrklang.dtx (with options: `class,letter,option') +%% scrkfont.dtx (with options: `class,letter,option') +%% scrkvars.dtx (with options: `class,letter,option') +%% scrkplen.dtx (with options: `class,letter,option') +%% scrktare.dtx (with options: `class,letter,option') +%% scrkpar.dtx (with options: `class,letter,option') +%% scrkpage.dtx (with options: `class,letter,option') +%% scrkfloa.dtx (with options: `class,letter,option') +%% scrkftn.dtx (with options: `class,letter,option') +%% scrklist.dtx (with options: `class,letter,option') +%% scrknpap.dtx (with options: `class,letter,option') +%% scrkcile.dtx (with options: `class,letter,option') +%% scrkmisc.dtx (with options: `class,letter,execoption') +%% scrkcomp.dtx (with options: `class,letter,body') +%% scrkfont.dtx (with options: `class,letter,body') +%% scrkmisc.dtx (with options: `class,letter,body') +%% scrklco.dtx (with options: `class,letter,body') +%% scrklang.dtx (with options: `class,letter,body') +%% scrkvars.dtx (with options: `class,letter,body') +%% scrkplen.dtx (with options: `class,letter,body') +%% scrktare.dtx (with options: `class,letter,body') +%% scrkpar.dtx (with options: `class,letter,body') +%% scrkpage.dtx (with options: `class,letter,body') +%% scrkfloa.dtx (with options: `class,letter,body') +%% scrkftn.dtx (with options: `class,letter,body') +%% scrklist.dtx (with options: `class,letter,body') +%% scrknpap.dtx (with options: `class,letter,body') +%% scrkcile.dtx (with options: `class,letter,body') +%% scrlogo.dtx (with options: `logo') %% -%% Copyright (C) 1994-2004 Markus Kohm. +%% Copyright (c) 1994-2006 +%% Markus Kohm and any individual authors listed elsewhere in this file. %% -%% All rights reserved. For further copyright information see the file -%% LEGAL.TXT or LEGALDE.TXT. +%% This file was generated from file(s) of the KOMA-Script bundle. +%% --------------------------------------------------------------- %% -%% This file is part of the LaTeX2e 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'. %% -%% The KOMA-Script bundle bases on the Script-family created by -%% Frank Neukam 1993 and the standard documents classes created -%% by the LaTeX3-Team 1994-1996. -%% ------------------------------------------------------------------------ +%% 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. %% -%% This system is distributed in the hope that it will be useful, -%% but WITHOUT ANY WARRANTY; without even the implied warranty of -%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +%% 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. %% -%% IMPORTANT NOTICE: +%% English and German manuals are part of KOMA-Script bundle. +%% ---------------------------------------------------------- %% -%% For error reports in case of UNCHANGED versions see documentation. +%% See `README'. %% -%% Please do not request updates from us directly. Distribution is -%% done through Mail-Servers, Mailboxes and TeX organizations. +%% 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. %% -%% You are not allowed to change this file. -%% -%% You are allowed to distribute this file under the condition that -%% it is distributed together with all files mentioned in readme.txt -%% and liesmich.txt. See LEGAL.TXT or LEGALDE.TXT for further -%% information. -%% -%% If you receive only some of these files from someone, complain! -%% -%% You are NOT ALLOWED to distribute this file alone. -%% -\NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{% +%%% 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 +\newcommand*{\KOMAClassName}{% scrlttr2% - } - [2004/09/16 v2.9t LaTeX2e KOMA - document class] -\RequirePackage{keyval} -\newcommand*{\KOMA@key}{\define@key{KOMA}} -\newcommand*{\KOMAoptions}[1]{% - \@ifundefined{scr@save@KV@errx}{% - \let\scr@save@KV@errx=\KV@errx - \renewcommand*{\KV@errx}[1]{% - \ClassError{% - scrlttr2% - }{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.}}% - \setkeys{KOMA}{#1}% - \let\KV@errx=\scr@save@KV@errx - \let\scr@save@KV@errx=\relax +} +\newcommand*{\ClassName}{% + letter% +} +\ProvidesClass{\KOMAClassName}[% + \KOMAScriptVersion\space document class (\ClassName)% +] +%%% From File: scrkbase.dtx +\RequirePackage{scrkbase}[\KOMAScriptVersion] +%%% From File: scrkcomp.dtx +\newcommand*{\scr@compatibility}{0} +\KOMA@key{version}[last]{% + \ifundefined{scr@v@#1}{% + \def\scr@compatibility{0}% + \ClassWarningNoLine{\KOMAClassName}{% + You have set option `version' to value `#1', but\MessageBreak + this value of version is not supported.\MessageBreak + Because of this, version was set to `first'% + }% }{% - \setkeys{KOMA}{#1}% - }\ignorespaces% + \edef\scr@compatibility{\@nameuse{scr@v@#1}}% + }% } -\newcommand*{\AfterProcessOptions@hook}{} -\newcommand*{\AfterProcessOptions}[1]{% - \g@addto@macro{\AfterProcessOptions@hook}{#1}% +\AtEndOfClass{% + \KOMA@key{version}[]{% + \ClassError{\KOMAClassName}{% + Option `version' too late% + }{% + Option `version' may be set only while loading the class.\MessageBreak + But you've tried to set it up later.% + }% + }% } -\newcommand*{\@setif}[3][]{% - \begingroup% - \edef\@tempa{#1} - \ifx\@tempa\@empty\def\@tempc{@#2}\else\def\@tempc{#1}\fi - \edef\@tempa{#3}\def\@tempb{on}\ifx\@tempa\@tempb - \def\@tempa{true}% - \else\def\@tempb{off}\ifx\@tempa\@tempb - \def\@tempa{false}% - \fi\fi% - \@ifundefined{\@tempc\@tempa}{% - \ClassError{% - scrlttr2% - }{You've used an unknown switch or value}{% - You've tried to set switch `#2' to value `#3', but there's - either no\MessageBreak% - switch `#2' defined or `#3' is not a switch - value.\MessageBreak% - Allowed switch values are `true', `false', `on', - `off'\@setif@alsoerr.} - \let\@tempa\endgroup - }{% - \edef\@tempa{\endgroup\noexpand\@nameuse{\@tempc\@tempa}} - } +\@namedef{scr@v@first}{0} +\@namedef{scr@v@2.9}{0} +\@namedef{scr@v@2.9t}{0} +\@namedef{scr@v@2.9u}{1} +\@namedef{scr@v@2.95}{2} +\@namedef{scr@v@last}{2} +%%% From File: scrkmisc.dtx +\KOMA@key{draft}[true]{% + \KOMA@set@ifkey{draft}{@tempswa}{#1}% + \if@tempswa + \setlength{\overfullrule}{5pt}% + \else + \setlength{\overfullrule}{\z@}% + \fi +} +\KOMA@DeclareObsoleteOption[\PackageInfo]{final}{draft=false} +%%% From File: scrklco.dtx +\newcommand*{\lco@test}{% + \IfFileExists{\CurrentOption.lco}{% + \let\scr@pti@nerr@r\@gobble + \expandafter\AtEndOfClass\expandafter{\expandafter\LoadLetterOption + \expandafter{\CurrentOption}}% + }% +} +\AtEndOfClass{\LoadLetterOption{DIN}} +%%% From File: scrklang.dtx +\newif\if@orgdate\@orgdatetrue +\KOMA@key{numericaldate}[true]{% + \if@orgdate\@orgdatefalse\else\@orgdatetrue\fi + \KOMA@set@ifkey{numericaldate}{@orgdate}{#1}% + \if@orgdate\@orgdatefalse\else\@orgdatetrue\fi +} +\KOMA@DeclareObsoleteOption[\PackageInfo]{scrdate}{numericaldate=true} +\KOMA@DeclareObsoleteOption[\PackageInfo]{orgdate}{numericaldate=false} +%%% From File: scrkfont.dtx +\newcommand*\@ptsize{% + 2% +} +\newcommand*{\@pt@scan}{% + \expandafter\@pt@@scan\CurrentOption pt\@pt@@scan% +} +\newcommand*{\@pt@@scan}{} +\def\@pt@@scan #1pt#2\@pt@@scan{% + \ifstr{#2}{pt}{% + \ifnumber{#1}{% + \KOMA@UseObsolete{option}{\PackageInfo}{#1#2}{fontsize=#1#2}% + }{\@headlines}% + }{\@headlines}% +} +\KOMA@key{fontsize}{% + \begingroup + \setlength{\@tempdima}{#1}% + \addtolength{\@tempdima}{-10\p@}% + \edef\@tempa{\endgroup\noexpand\renewcommand*\noexpand\@ptsize{% + \strip@pt\@tempdima}}% \@tempa - \let\@setif@alsoerr=\@empty - } -\newcommand*{\@setif@alsoerr}{} -\newcommand*{\@setxif}[5][]{% - \begingroup% - \edef\@tempa{#1} - \ifx\@tempa\@empty\def\@tempc{@#2}\else\def\@tempc{#1}\fi - \@ifundefined{\@tempc true}{% - \ClassError{% - scrlttr2% - }{You've used an unknown switch}{% - You've tried to set switch `#2' to value `#3', but - there's no\MessageBreak - switch `#2' defined.} - \let\@tempa\endgroup +} +\@onlypreamble\KV@KOMA@fontsize +%%% From File: scrkvars.dtx +%%% From File: scrkplen.dtx +%%% From File: scrktare.dtx +\newcommand*{\@BCOR}{\expandafter\@@BCOR\CurrentOption BCORBCOR\@@BCOR} +\newcommand*{\@@BCOR}{} +\def\@@BCOR #1BCOR#2BCOR#3\@@BCOR{% + \ifstr{#1}{}{% + \ifstr{#3}{BCOR}{% + \PassOptionsToPackage{BCOR#2}{typearea}% + }{\scr@pti@nerr@r}% + }{\scr@pti@nerr@r}% +} +\newcommand*{\@DIV}{\expandafter\@@DIV\CurrentOption DIVDIV\@@DIV} +\newcommand*{\@@DIV}{} +\def\@@DIV #1DIV#2DIV#3\@@DIV{% + \edef\@tempa{#1}\ifx\@tempa\@empty + \edef\@tempa{#3}\def\@tempb{DIV}\ifx\@tempa\@tempb + \PassOptionsToPackage{DIV#2}{typearea}% + \else\scr@pti@nerr@r\fi + \else\@BCOR\fi +} +\newcommand{\@headlines}{% + \expandafter\@@headlines\CurrentOption headlines\@@headlines% +} +\newcommand*{\@@headlines}{} +\def\@@headlines #1headlines#2\@@headlines{ + \edef\@tempa{#2}\edef\@tempb{headlines}\ifx\@tempa\@tempb + \PassOptionsToPackage{#1headlines}{typearea} + \else\@DIV\fi +} +\newcommand*{\x@paper}{% + \expandafter\x@@paper\CurrentOption paper\x@@paper% +} +\newcommand*{\x@@paper}{} +\def\x@@paper #1#2paper#3\x@@paper{% + \ifstr{#3}{paper}{% + \ifnumber{#2}{% + \ifstr{#1}{a}{% + \PassOptionsToPackage{#1#2#3}{typearea}% }{% - \edef\@tempa{#3}\edef\@tempb{#4}\ifx\@tempa\@tempb - \edef\@tempa{\endgroup\noexpand\@nameuse{\@tempc true}} - \else\def\@tempb{#5}\ifx\@tempa\@tempb - \edef\@tempa{\endgroup\noexpand\@nameuse{\@tempc false}} - \else - \ClassError{% - scrlttr2% - }{You've used an unknown switch value}{% - You've tried to set switch `#2' to value `#3', but allowed - switch\MessageBreak - values are `#4', `#5'\@setif@alsoerr\space only.} - \let\@tempa\endgroup - \fi\fi% - } - \@tempa - \let\@setif@alsoerr=\@empty - } -\newcommand*{\@setnumstate}[4]{% + \ifstr{#1}{b}{% + \PassOptionsToPackage{#1#2#3}{typearea}% + }{% + \ifstr{#1}{c}{% + \PassOptionsToPackage{#1#2#3}{typearea}% + }{% + \ifstr{#1}{d}{% + \PassOptionsToPackage{#1#2#3}{typearea}% + }{\scr@pti@nerr@r}% + }% + }% + }% + }{\scr@pti@nerr@r}% + }{% + \@pt@scan + }% +} +\newcommand*{\scr@pti@nerr@r}{ + \OptionNotUsed +} +\KOMA@key{twoside}[true]{% + \KOMA@set@ifkey{twoside}{@twoside}{#1}% + \if@twoside\@mparswitchtrue\else\@mparswitchfalse\fi% + \csname recalctypearea\endcsname +} +\KOMA@DeclareObsoleteOption[\PackageInfo]{oneside}{twoside=false} +%%% From File: scrkpar.dtx +\newcommand*{\setparsizes}[3]{% + \edef\f@parindent{\the\parindent}% + \edef\f@parskip{\the\parskip}% + \edef\f@parfillskip{\the\parfillskip}% + \def\scr@parindent{#1}% + \def\scr@parskip{#2}% + \def\scr@parfillskip{#3}% + \def\par@update{\let\par@update\default@par@update\par@updaterelative}% +} +\newcommand*{\f@parindent}{\the\parindent} +\newcommand*{\f@parskip}{\the\parskip} +\newcommand*{\f@parfillskip}{\the\parfillskip} +\AtEndOfClass{% + \edef\f@parindent{\the\parindent}% + \edef\f@parskip{\the\parskip}% + \edef\f@parfillskip{\the\parfillskip}% +} +\newcommand*{\par@update}{} +\let\par@update\relax +\newcommand*{\default@par@update}{} +\let\default@par@update\relax +\newcommand*{\scr@parindent}{1em} +\newcommand*{\scr@parskip}{\z@} +\newcommand*{\scr@parfillskip}{\z@ \@plus 1fil} +\KOMA@key{parskip}[true]{% \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}% + \KOMA@set@ncmdkey{parskip}{@tempa}{% + {false}{0},{off}{0},{no}{0},% + {full-}{1},% + {half-}{2},% + {full}{3},{true}{3},{on}{3},{yes}{3},% + {half}{4},% + {full+}{5},% + {half+}{6},% + {full*}{7},% + {half*}{8},% + {relative}{9},% + {absolute}{10},% + }{#1}% + \ifcase\number\@tempa% 0 + \endgroup + \setparsizes{1em}{\z@ \@plus \p@}{\z@ \@plus 1fil}% + \or% 1 + \endgroup + \setparsizes{\z@}{\baselineskip \@plus .1\baselineskip}{% + \z@ \@plus 1fil}% + \or% 2 + \endgroup + \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{% + \z@ \@plus 1fil}% + \or%3 + \endgroup + \setparsizes{\z@}{\baselineskip \@plus .1\baselineskip}{% + 1em \@plus 1fil}% + \or%4 + \endgroup + \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{% + 1em \@plus 1fil}% + \or%5 + \endgroup + \setparsizes{\z@}{\baselineskip \@plus .1\baselineskip}{% + .3333\linewidth\@plus 1fil}% + \or%6 + \endgroup + \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{% + .3333\linewidth \@plus 1fil}% + \or%7 + \endgroup + \setparsizes{\z@}{\baselineskip \@plus .1\baselineskip}{% + .25\linewidth \@plus 1fil}% + \or%8 + \endgroup + \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{% + .25\linewidth \@plus 1fil}% + \or%9 + \endgroup + \ifx\par@updaterelative\undefined + \expandafter\AtEndOfClass + \else + \expandafter\@firstofone + \fi + {% + \ifx\par@update\default@par@update + \let\par@update\par@updaterelative \fi + \let\default@par@update=\par@updaterelative + }% + \or%10 + \endgroup + \ifx\par@updaterelative\undefined + \expandafter\AtEndOfClass + \else + \expandafter\@firstofone \fi - } - \if@tempswa - \edef\@tempa{\endgroup - \noexpand\renewcommand*{\noexpand#1}{\@tempa}} - \else - \ClassError{% - scrlttr2% - }{You've used an unknown option value}{% - You've tried to set option `#2' to value `#4', - but allowed values\MessageBreak - are only:\MessageBreak - \@tempa.}% - \let\@tempa=\endgroup - \fi - \@tempa - } -\newcommand*{\@ObsoleteOption}[1]{% - \ClassWarningNoLine{% - scrlttr2% - }{% - You've used the obsolete option `\CurrentOption'.\MessageBreak - I'm using option `#1' instead.\MessageBreak - You should do this change also} - \KOMAoptions{#1} + {% + \ifx\par@update\default@par@update + \let\par@update\relax + \fi + \let\default@par@update=\relax + }% + \else% sonst + \endgroup + \fi } -\newcommand*{\@ObsoleteCommand}[2]{% - \ClassWarning{% - scrlttr2% - }{% - You`ve used the obsolete command `\string#1'.\MessageBreak - I`m using `\string\KOMAoptions{#2}' instead.\MessageBreak - You should do this change also} - \KOMAoptions{#2} -} -\KOMA@key{BCOR}{\PassOptionsToPackage{BCOR#1}{typearea}} -\KOMA@key{DIV}{\PassOptionsToPackage{DIV#1}{typearea}} -\KOMA@key{headlines}{\PassOptionsToPackage{#1headlines}{typearea}} -\KOMA@key{paper}{\PassOptionsToPackage{#1paper}{typearea}} -\DeclareOption{a4paper}{\@ObsoleteOption{paper=a4}} -\DeclareOption{a5paper}{\@ObsoleteOption{paper=a5}} -\DeclareOption{b5paper}{\@ObsoleteOption{paper=b5}} -\DeclareOption{letterpaper}{\@ObsoleteOption{paper=letter}} -\DeclareOption{legalpaper}{\@ObsoleteOption{paper=legal}} -\DeclareOption{executivepaper}{\@ObsoleteOption{paper=executive}} +\KOMA@DeclareObsoleteOption[\PackageInfo]{parskip-}{parskip=full-} +\KOMA@DeclareObsoleteOption[\PackageInfo]{parskip+}{parskip=full+} +\KOMA@DeclareObsoleteOption[\PackageInfo]{parskip*}{parskip=full*} +\KOMA@DeclareObsoleteOption[\PackageInfo]{halfparskip}{parskip=half} +\KOMA@DeclareObsoleteOption[\PackageInfo]{halfparskip-}{parskip=half-} +\KOMA@DeclareObsoleteOption[\PackageInfo]{halfparskip+}{parskip=half+} +\KOMA@DeclareObsoleteOption[\PackageInfo]{halfparskip*}{parskip=half*} +\KOMA@DeclareObsoleteOption[\PackageInfo]{parindent}{parskip=false} +%%% From File: scrkpage.dtx \newif\if@hsl -\KOMA@key{headsepline}[true]{\@setif{hsl}{#1}}% -\AfterProcessOptions{% - \if@hsl\PassOptionsToPackage{headinclude}{typearea}\fi} -\DeclareOption{headnosepline}{% - \@ObsoleteOption{headsepline=false}% - } +\KOMA@key{headsepline}[true]{% + \KOMA@set@ifkey{headsepline}{@hsl}{#1}% + \@ifpackageloaded{typearea}{% + \KOMAoptions{headinclude=#1}% + }{% + \PassOptionsToPackage{typearea}{headinclude=#1}% + }% +} +\KOMA@DeclareObsoleteOption[\PackageInfo]{headnosepline}{headsepline=false} \newif\if@fsl -\KOMA@key{footsepline}[true]{\@setif{fsl}{#1}}% -\AfterProcessOptions{% - \if@fsl\PassOptionsToPackage{footinclude}{typearea}\fi} -\DeclareOption{footnosepline}{% - \@ObsoleteOption{footsepline=false}% - } -\newif\if@mincl -\DeclareOption{mpinclude}{% - \@mincltrue - \ClassWarning{scrlttr2}{% - You should not use option `mpinclude' with this\MessageBreak - class} - } -\DeclareOption{mpexclude}{ - \@minclfalse - \ClassWarning{scrlttr2}{% - You should not use option `mpexclude' with this\MessageBreak - class} - } +\KOMA@key{footsepline}[true]{% + \KOMA@set@ifkey{footsepline}{@fsl}{#1}% + \@ifpackageloaded{typearea}{% + \KOMAoptions{footinclude=#1}% + }{% + \PassOptionsToPackage{typearea}{footinclude=#1}% + }% +} +\KOMA@DeclareObsoleteOption[\PackageInfo]{footnosepline}{footsepline=false} +\KOMA@key{cleardoublepage}{% + \begingroup% + \def\@tempc{% + \endgroup% + \KOMA@unkown@keyval{cleardoublepage}{#1}{% + 'current' or any defined pagestyle e.g. 'empty','plain'}% + }% + \ifstr{#1}{current}{% + \let\cleardoublepage\cleardoublestandardpage + }{% + \ifnotundefined{ps@#1}{% + \def\@tempc{\endgroup% + \def\cleardoublepage{\cleardoublepageusingstyle{#1}}% + }% + }{}% + }% + \@tempc +} +\newcommand*{\cleardoublestandardpage}{} +\let\cleardoublestandardpage\cleardoublepage +\newcommand*{\cleardoublepageusingstyle}[1]{\clearpage + {\thispagestyle{#1}\cleardoublestandardpage}} +\newcommand*{\cleardoubleemptypage}{\cleardoublepageusingstyle{empty}} +\newcommand*{\cleardoubleplainpage}{\cleardoublepageusingstyle{plain}} +\KOMA@DeclareObsoleteOption[\PackageInfo]{cleardoubleempty}{% + cleardoublepage=empty% +} +\KOMA@DeclareObsoleteOption[\PackageInfo]{cleardoubleplain}{% + cleardoublepage=plain% +} +\KOMA@DeclareObsoleteOption[\PackageInfo]{cleardoublestandard}{% + cleardoublepage=standard% +} +%%% From File: scrkfloa.dtx +%%% From File: scrkftn.dtx +%%% From File: scrklist.dtx +%%% From File: scrknpap.dtx \newcommand*{\@alignfrom}{0} -\KOMA@key{fromalign}{% - \@setnumstate{\@alignfrom}{fromalign}{% - {left}{0},% - {center}{1},{centered}{1},{middle}{1},% - {right}{2},% - {no}{10000},{false}{10000},{off}{10000}}{#1}% - } +\KOMA@ncmdkey{fromalign}{@alignfrom}{% + {left}{0},% + {center}{1},{centered}{1},{middle}{1},% + {right}{2},% + {no}{10000},{false}{10000},{off}{10000}% +} \newcommand*{\@rulefrom}{0} -\KOMA@key{fromrule}[below]{% - \@setnumstate{\@rulefrom}{fromrule}{% - {false}{0},{no}{0},{off}{0},{aftername}{1},% - {below}{2},{afteraddress}{2},{true}{2},{yes}{2},{on}{2}% +\KOMA@ncmdkey{fromrule}[below]{@rulefrom}{% + {false}{0},{no}{0},{off}{0},{aftername}{1},% + {below}{2},{afteraddress}{2},{true}{2},{yes}{2},{on}{2}% +} +\KOMA@ifkey{fromphone}{@phone} +\KOMA@ifkey{fromfax}{@fax} +\KOMA@ifkey{fromemail}{@email} +\KOMA@ifkey{fromurl}{@www} +\KOMA@ifkey{fromlogo}{@logo} +\newif\if@afield\@afieldtrue +\KOMA@ifkey{addrfield}{@afield} +\newif\if@baddr\@baddrtrue +\KOMA@ifkey{backaddress}{@baddr} +\newif\if@bigloc +\KOMA@key{locfield}[wide]{% + \begingroup + \KOMA@set@ncmdkey{locfield}{@tempa}{{wide}{0},{narrow}{1}}{#1}% + \ifcase\@tempa + \endgroup + \@biglocfalse + \else + \endgroup + \@bigloctrue + \fi +} +\DeclareOption{wlocfield}{\@ObsoleteOption{locfield=wide}} +\DeclareOption{slocfield}{\@ObsoleteOption{locfield=narrow}} +\newif\if@fold\@foldtrue +\KOMA@ifkey{foldmarks}{@fold} +\newif\if@refwide +\KOMA@key{refline}[wide]{% + \begingroup + \KOMA@set@ncmdkey{refline}{@tempa}{{wide}{0},{narrow}{1}}{#1}% + \ifcase\@tempa + \endgroup + \@refwidefalse + \else + \endgroup + \@refwidetrue + \fi +} +\newif\if@subj +\newif\if@subjafter +\KOMA@key{subject}{% + \begingroup + \KOMA@set@ncmdkey{locfield}{@tempa}{% + {titled}{0},% + {untitled}{1},% + {afteropening}{2},% + {beforeopening}{3}% }{#1}% - } -\newif\if@phone -\KOMA@key{fromphone}[true]{\@setif{phone}{#1}}% -\newif\if@fax -\KOMA@key{fromfax}[true]{\@setif{fax}{#1}}% -\newif\if@email -\KOMA@key{fromemail}[true]{\@setif{email}{#1}}% -\newif\if@www -\KOMA@key{fromurl}[true]{\@setif{www}{#1}}% -\newif\if@logo -\KOMA@key{fromlogo}[true]{\@setif{logo}{#1}}% + \ifcase\@tempa + \endgroup + \@subjtrue + \or + \endgroup + \@subjfalse + \or + \endgroup + \@subjaftertrue + \else + \endgroup + \@subjafterfalse + \fi +} +\KOMA@ifkey{enlargefirstpage}{@enlargefp} \newcommand*{\@pageat}{4} \KOMA@key{pagenumber}{% \begingroup - \@setnumstate{\@tempa}{pagenumber}{% + \KOMA@set@ncmdkey{pagenumber}{@tempa}{% {no}{-1},{off}{-1},{false}{-1},% {topleft}{0},{headleft}{0},% {topmiddle}{1},{topcenter}{1},{topcentered}{1},% @@ -257,7 +512,7 @@ {botright}{5},{footright}{5},% {top}{10},{head}{10},{bot}{11},{foot}{11},% {left}{20},{middle}{21},{center}{21},{centered}{21},{right}{22}% - }{#1}% + }{#1}% \ifnum\@tempa<10 \edef\@tempa{\endgroup\edef\noexpand\@pageat{\@tempa}}% \else @@ -274,7 +529,7 @@ \ifnum\@pageat>2 \edef\@pageat{3}% \else - \edef\@pageat{0} + \edef\@pageat{0}% \fi \@tempcnta\@tempa \advance\@tempcnta by -20 @@ -283,696 +538,56 @@ \fi \fi \@tempa - } -\newcommand*\@ptsize{% - 2% - } -\KOMA@key{fontsize}{% - \begingroup - \setlength{\@tempdima}{#1} - \addtolength{\@tempdima}{-10\p@} - \edef\@tempa{\endgroup\noexpand\renewcommand*\noexpand\@ptsize{% - \strip@pt\@tempdima}} - \@tempa - } -\DeclareOption{10pt}{% - \@ObsoleteOption{fontsize=10pt} - } -\DeclareOption{11pt}{% - \@ObsoleteOption{fontsize=11pt} - } -\DeclareOption{12pt}{% - \@ObsoleteOption{fontsize=12pt} - } -\KOMA@key{twoside}[true]{\@setif{twoside}{#1}% - \if@twoside\@mparswitchtrue\else\@mparswitchfalse\fi} -\DeclareOption{oneside}{% - \@ObsoleteOption{twoside=false} - } -\KOMA@key{draft}[true]{% - \begingroup - \let\@drafttrue=\@tempswatrue - \let\@draftfalse=\@tempswafalse - \@setif{draft}{#1} - \if@tempswa - \global\setlength{\overfullrule}{5\p@} - \else - \global\setlength{\overfullrule}{\z@} - \fi - \endgroup - } -\DeclareOption{final}{% - \@ObsoleteOption{draft=false} - } -\newif\if@enlargefp -\KOMA@key{enlargefirstpage}[true]{% - \@setif[@enlargefp]{enlargefirstpage}{#1}} -\newif\if@parskip -\newcommand*{\scr@parskip}{\setlength{\parskip}{\z@}} -\newcommand*{\scr@parfillskip}{\setlength{\parfillskip}{\z@}} -\newcommand*{\@parskip@indent}{} -\KOMA@key{parskip}[true]{% - \begingroup% - \@tempcnta=-1\edef\@tempa{#1}% - \def\@tempb{false}\ifx\@tempa\@tempb\@tempcnta=0\fi - \def\@tempb{off}\ifx\@tempa\@tempb\@tempcnta=0\fi - \def\@tempb{full-}\ifx\@tempa\@tempb\@tempcnta=1\fi - \def\@tempb{half-}\ifx\@tempa\@tempb\@tempcnta=2\fi - \def\@tempb{full}\ifx\@tempa\@tempb\@tempcnta=3\fi - \def\@tempb{true}\ifx\@tempa\@tempb\@tempcnta=3\fi - \def\@tempb{on}\ifx\@tempa\@tempb\@tempcnta=3\fi - \def\@tempb{half}\ifx\@tempa\@tempb\@tempcnta=4\fi - \def\@tempb{full+}\ifx\@tempa\@tempb\@tempcnta=5\fi - \def\@tempb{half+}\ifx\@tempa\@tempb\@tempcnta=6\fi - \def\@tempb{full*}\ifx\@tempa\@tempb\@tempcnta=7\fi - \def\@tempb{half*}\ifx\@tempa\@tempb\@tempcnta=8\fi - \let\@tempa\endgroup - \ifnum \@tempcnta <\z@\relax - \ClassError{% - scrlttr2% - }{You've used an unknown option value}{% - You've tried to set option `parskip' to value `#1', but - allowed values\MessageBreak - are `full-', `full', `full+', `full*', `half-', - `half', `half+',\MessageBreak - `half*', `false' and `off' only.\MessageBreak - You may also use `on' instead of `full'.}% - \else\ifnum \@tempcnta =\z@ - \def\@tempa{\endgroup\@parskipfalse\@parskip@indent}% - \else - \let\@tempb=\relax\let\@tempc=\relax - \ifodd \@tempcnta - \def\@tempb{\def\noexpand\scr@parskip{% - \noexpand\setlength{\parskip}{\baselineskip}% - \noexpand\addtolength{\parskip}{% - \z@ \@plus .1\baselineskip}}}% - \else - \def\@tempb{\def\noexpand\scr@parskip{% - \noexpand\setlength{\parskip}{.5\baselineskip}% - \noexpand\addtolength{\parskip}{% - \z@ \@plus .5\baselineskip}}}% - \fi - \advance\@tempcnta by \m@ne - \divide\@tempcnta by \tw@ - \ifcase\@tempcnta - \def\@tempc{\def\noexpand\scr@parfillskip{% - \noexpand\setlength{\parfillskip}{\z@ \@plus 1fil}}}% - \or - \def\@tempc{\def\noexpand\scr@parfillskip{% - \noexpand\setlength{\parfillskip}{1em \@plus 1fil}}}% - \or - \def\@tempc{\def\noexpand\scr@parfillskip{% - \noexpand\setlength{\parfillskip}{.3333\linewidth}% - \noexpand\addtolength{\parfillskip}{\z@ \@plus 1fil}}}% - \or - \def\@tempc{\def\noexpand\scr@parfillskip{% - \noexpand\setlength{\parfillskip}{.25\linewidth}% - \noexpand\addtolength{\parfillskip}{\z@ \@plus 1fil}}}% - \fi - \edef\@tempa{% - \endgroup\noexpand\@parskiptrue\@tempb\@tempc% - \noexpand\@parskip@indent}% - \fi - \fi - \@tempa - } -\newcommand*{\cleardoublestandardpage}{} -\let\cleardoublestandardpage\cleardoublepage -\newcommand*{\cleardoubleemptypage}{\clearpage% - {\thispagestyle{empty}\cleardoublestandardpage}} -\newcommand*{\cleardoubleplainpage}{\clearpage% - {\thispagestyle{plain}\cleardoublestandardpage}} -\DeclareOption{cleardoubleempty}{% - \@ObsoleteOption{cleardoublepage=empty}} -\DeclareOption{cleardoubleplain}{% - \@ObsoleteOption{cleardoublepage=plain}} -\DeclareOption{cleardoublestandard}{% - \@ObsoleteOption{cleardoublepage=standard}} -\KOMA@key{cleardoublepage}{% - \begingroup% - \def\@tempc{% - \endgroup% - \ClassError{% - scrlttr2% - }{You've used an unknown switch value}{% - You've tried to set switch `cleardoublepage' to value - `#1', but\MessageBreak - allowed switch values are `emtpy', `plain' and - `standard' only.}} - \edef\@tempa{#1}% - \def\@tempb{empty}\ifx\@tempa\@tempb% - \def\@tempc{\endgroup% - \let\cleardoublepage\cleardoubleemptypage}\fi - \def\@tempb{plain}\ifx\@tempa\@tempb% - \def\@tempc{\endgroup% - \let\cleardoublepage\cleardoubleplainpage}\fi - \def\@tempb{standard}\ifx\@tempa\@tempb% - \def\@tempc{\endgroup% - \let\cleardoublepage\cleardoublestandardpage}\fi - \@tempc} -\newif\if@afield\@afieldtrue -\KOMA@key{addrfield}[true]{\@setif[@afield]{addrfield}{#1}} -\newif\if@baddr\@baddrtrue -\KOMA@key{backaddress}[true]{\@setif[@baddr]{backaddress}{#1}} -\newif\if@subj -\newif\if@subjafter -\KOMA@key{subject}[true]{% - \begingroup - \edef\@tempa{#1}% - \def\@tempb{afteropening}% - \ifx\@tempa\@tempb\endgroup\@subjaftertrue - \else - \def\@tempb{beforeopening}% - \ifx\@tempa\@tempb\endgroup\@subjafterfalse - \else - \endgroup\def\@setif@alsoerr{, `afteropening' and - `beforeopening'\MessageBreak}% - \@setxif[@subj]{subject}{#1}{titled}{untitled}% - \fi - \fi - } -\newif\if@bigloc -\KOMA@key{locfield}[wide]{\@setxif[@bigloc]{locfield}{#1}{wide}{narrow}} -\DeclareOption{wlocfield}{\@ObsoleteOption{locfield=wide}} -\DeclareOption{slocfield}{\@ObsoleteOption{locfield=narrow}} -\newif\if@fold\@foldtrue -\KOMA@key{foldmarks}[true]{\@setif[@fold]{foldmarks}{#1}} -\newif\if@orgdate\@orgdatetrue -\KOMA@key{numericaldate}[true]{% - \if@orgdate\@orgdatefalse\else\@orgdatetrue\fi - \@setif[@orgdate]{numericaldate}{#1} - \if@orgdate\@orgdatefalse\else\@orgdatetrue\fi } -\DeclareOption{scrdate}{\@ObsoleteOption{numericaldate=true}} -\DeclareOption{orgdate}{\@ObsoleteOption{numericaldate=false}} -\newif\if@refwide -\KOMA@key{refline}[wide]{\@setxif[@refwide]{refline}{#1}{wide}{narrow}} - \DeclareOption*{% - \let\scr@save@KV@errx=\KV@errx% - \IfFileExists{\CurrentOption.lco}{% - \begingroup\edef\@tempa{\endgroup% - \noexpand\AtEndOfClass{% - \noexpand\LoadLetterOption{\CurrentOption}}% - }% - \@tempa\let\KV@errx\@gobble - }{% - \renewcommand*{\KV@errx}[1]{\OptionNotUsed} - } - \expandafter\KOMAoptions\expandafter{\CurrentOption} - \let\KV@errx=\scr@save@KV@errx% - \let\scr@save@KV@errx=\relax% - } +%%% From File: scrkcile.dtx +%%% From File: scrkmisc.dtx +\DeclareKeyValOption[% + \let\scr@pti@nerr@r + \OptionNotUsed + \lco@test + \x@paper +]{KOMA} +\KOMAoptions{% + draft=false,headsepline=false,footsepline=false,parskip=false% + ,twoside=false% +} \ExecuteOptions{% } \ProcessOptions\relax -\AfterProcessOptions@hook -\let\AfterProcessOptions@hook=\undefined -\RequirePackage{scrlfile} -\newif\if@restonecol +%%% From File: scrkcomp.dtx +\expandafter\ifnum \@nameuse{scr@v@2.95}>\scr@compatibility + \newcommand*{\@setif}[2][]{% + \begingroup + \edef\@tempa{#1}\ifx\@tempa\@empty + \def\@tempa{\KOMA@set@ifkey{#2}{@#2}}% + \else + \def\@tempa{\KOMA@set@ifkey{#2}{#1}}% + \fi + \expandafter\endgroup\@tempa + }% +\fi +%%% From File: scrkfont.dtx \@tempcnta=10 -\advance\@tempcnta by\@ptsize\relax +\advance\@tempcnta by\@ptsize \xdef\@tempa{% -size% -\the\@tempcnta.clo} + size% + \the\@tempcnta.clo} \InputIfFileExists{\@tempa}{}{% - \ClassError - {scrlttr2} - {File `\@tempa' not found!\MessageBreak - This error is fatal!} - {To every fontsize you want to select by class option,\MessageBreak - you need a corresponding - size-class-option-file declaring all\MessageBreak - the macros based on fontsize.\MessageBreak - Ask a wizzard for more information or use another - fontsize.\MessageBreak - You cannot continue!} - \batchmode \csname @@end\endcsname \end -} -\KOMA@key{fontsize}{% - \begingroup - \setlength{\@tempdima}{#1} - \addtolength{\@tempdima}{-10\p@} - \ifnum \@tempdima=\@ptsize - \else - \ClassError{% - scrlttr2% - }{option `fontsize' not allowed\MessageBreak - after loading sizeX.clo file}{% - Maybe you've used option `fontsize' at - \string\KOMAoptions.\MessageBreak - You should set this option at \string\documentclass.} - \fi - \endgroup - } -\newcommand*{\scr@file@date@version}{} -\def\scr@file@date@version#1/#2/#3 #4 #5\@nil{#1/#2/#3 #4} -\RequirePackage{typearea}[\expandafter\expandafter\expandafter% - \scr@file@date@version\csname ver@% - scrlttr2% - .cls\endcsname\@nil] -\if@twoside - \addtolength{\oddsidemargin}{\evensidemargin} - \addtolength{\oddsidemargin}{-\ta@bcor} - \setlength{\evensidemargin}{.5\oddsidemargin} - \setlength{\oddsidemargin}{\evensidemargin} - \addtolength{\oddsidemargin}{\ta@bcor} -\fi -\KOMA@key{BCOR}{\typearea[{#1}]{last}} -\KOMA@key{DIV}{\typearea[current]{#1}} -\KOMA@key{headlines}{% - \def\ta@hh{#1\baselineskip}% - \typearea[current]{last}} -\KOMA@key{paper}{% - \begingroup - \edef\@tempc{\noexpand\@tempswatrue% - \noexpand\ifdim\paperwidth=\the\paperwidth\noexpand\else% - \noexpand\@tempswafalse\noexpand\fi% - \noexpand\ifdim\paperheight=\the\paperheight\noexpand\else% - \noexpand\@tempswafalse\noexpand\fi% - } - \edef\@tempa{#1}% - \def\@tempb{letter}\ifx\@tempa\@tempb% - \setlength{\paperheight}{11in}\setlength{\paperwidth}{8.5in}% - \else\def\@tempb{legal}\ifx\@tempa\@tempb% - \setlength{\paperheight}{14in}\setlength{\paperwidth}{8.5in}% - \else\def\@tempb{executive}\ifx\@tempa\@tempb% - \setlength{\paperheight}{10.5in}\setlength{\paperwidth}{7.25in}% - \else% - \def\ta@opt@err{% - \ClassError{% - scrlttr2% - }{papersize `#1' undefined}{% - You've told me to set KOMA option `paper' to value - `#1',\MessageBreak - but the value `#1' is not allowed to this - option.\MessageBreak - See the KOMA-Script manual for informations about known - papersizes.}% - } - \let\@headlines\ta@opt@err% - \x@@paper #1paperpaper\x@@paper% - \fi\fi\fi - \@tempc% - \if@tempswa% - \ClassInfo{% - scrlttr2% - }{% - change to already set paper size ignored% - } - \let\@tempc\endgroup% - \else% - \ClassWarning{% - scrlttr2% - }{% - you're changing paper size after loading package\MessageBreak - `typearea'. This may be dangerous.\MessageBreak - You should set paper size only at \string\documentclass\space - not\MessageBreak - with \string\KOMAoptions% - } - \edef\@tempc{\endgroup% - \setlength{\paperwidth}{\the\paperwidth}% - \setlength{\paperheight}{\the\paperheight}% - \noexpand\typearea[current]{last}} - \fi - \@tempc% - } -\setlength{\lineskip}{\p@} -\setlength{\normallineskip}{\p@} -\g@addto@macro{\@listi}{\@list@extra} -\let\@listI=\@listi -\g@addto@macro{\@listii}{\@list@extra} -\g@addto@macro{\@listiii}{\@list@extra} -\newcommand*{\add@extra@listi}[1]{% - \expandafter\let\csname #1@listi\endcsname=\@listi - \def\@listi{\csname #1@listi\endcsname\@list@extra}% -} -\g@addto@macro{\footnotesize}{\protect\add@extra@listi{ftns}} -\g@addto@macro{\small}{\protect\add@extra@listi{sml}} -\newcommand*{\@list@extra}{} -\renewcommand*{% - \@parskip@indent}{% - \if@parskip - \setlength{\parindent}{\z@}% - \scr@parskip - \scr@parfillskip - \renewcommand*{\@list@extra}{% - \topsep\z@ \parsep\parskip \itemsep\z@}% - \else - \setlength{\parindent}{1em}% - \setlength{\parskip}{\z@ \@plus \p@}% - \setlength{\parfillskip}{\z@ \@plus 1fil}% - \renewcommand*{\@list@extra}{}% - \fi -}% -\@parskip@indent -\AtBeginDocument{% - \if@parskip\ifdim\parfillskip=\z@ \scr@parfillskip\fi\fi -} -\@lowpenalty = 51 -\@medpenalty =151 -\@highpenalty =301 -\newcommand*{\@firsthead}{\noindent% - \parbox[b]{\useplength{firstheadwidth}} - {\centering\usekomafont{fromaddress}{% - \ifkomavarempty{fromname}{}{% - {\usekomafont{fromname}% - {\ignorespaces\usekomavar{fromname}}}\\[-8pt] - \rule{\useplength{firstheadwidth}}{.4pt}\\ - }% - \ifkomavarempty{fromaddress}{}{% - \ignorespaces\usekomavar{fromaddress}% - }% - }% + \ClassError{\KOMAClassName}{% + File `\@tempa' not found!\MessageBreak + This error is fatal!% + }{% + To every fontsize you want to select by class + option,\MessageBreak + you need a corresponding + size-class-option-file declaring all\MessageBreak + the macros based on fontsize.\MessageBreak + Ask a wizzard for more information or use another + fontsize.\MessageBreak + You cannot continue!% }% - } -\newcommand*{\@gen@firsthead}{% - \ifcase\@alignfrom - \renewcommand*{\@firsthead}{\noindent - \parbox[b]{\textwidth}{\raggedright - {\usekomafont{fromname}\strut\ignorespaces - \usekomavar{fromname}% - {% - \ifnum\@rulefrom=1\\[-.5\baselineskip]% - \setlength{\@tempdima}{\useplength{fromrulewidth}}% - \ifdim\@tempdima=\z@ - \setlength{\@tempdima}{\textwidth}% - \if@logo - \settowidth{\@tempdimb}{\usekomavar{fromlogo}}% - \addtolength{\@tempdima}{-\@tempdimb}% - \fi - \fi - \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% - \fi - }% - \\}% - {\usekomafont{fromaddress}\strut\ignorespaces - \usekomavar{fromaddress}% - \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi% - \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi% - \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi% - \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi% - \ifnum\@rulefrom=2\\[-.5\baselineskip]% - \setlength{\@tempdima}{\useplength{fromrulewidth}}% - \ifdim\@tempdima=\z@ - \setlength{\@tempdima}{\textwidth}% - \fi - \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% - \fi - \\ - }% - }% - \if@logo - \llap{\usekomavar{fromlogo}}% - \fi - }% - \or - \renewcommand*{\@firsthead}{\noindent - \parbox[b]{\textwidth}{\centering - {\usekomafont{fromname}\strut\ignorespaces - \usekomavar{fromname}% - {% - \ifnum\@rulefrom=1\\[-.5\baselineskip]% - \setlength{\@tempdima}{\useplength{fromrulewidth}}% - \ifdim\@tempdima=\z@ - \setlength{\@tempdima}{\textwidth}% - \fi - \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% - \fi - }% - \\ - }% - {\usekomafont{fromaddress}\strut\ignorespaces - \usekomavar{fromaddress}% - \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi% - \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi% - \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi% - \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi% - \ifnum\@rulefrom=2\\[-.5\baselineskip]% - \setlength{\@tempdima}{\useplength{fromrulewidth}}% - \ifdim\@tempdima=\z@ - \setlength{\@tempdima}{\textwidth}% - \fi - \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% - \fi - \\ - }% - }% - }% - \or - \renewcommand*{\@firsthead}{\noindent - \if@logo - \rlap{\usekomavar{fromlogo}}% - \fi - \parbox[b]{\textwidth}{\raggedleft - {\usekomafont{fromname}\strut\ignorespaces - \usekomavar{fromname}% - {% - \ifnum\@rulefrom=1\\[-.5\baselineskip]% - \setlength{\@tempdima}{\useplength{fromrulewidth}}% - \ifdim\@tempdima=\z@ - \setlength{\@tempdima}{\textwidth}% - \if@logo - \settowidth{\@tempdimb}{\usekomavar{fromlogo}}% - \addtolength{\@tempdima}{-\@tempdimb}% - \fi - \fi - \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% - \fi - }% - \\ - }% - {\usekomafont{fromaddress}\strut\ignorespaces - \usekomavar{fromaddress}% - \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi% - \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi% - \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi% - \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi% - \ifnum\@rulefrom=2\\[-.5\baselineskip]% - \setlength{\@tempdima}{\useplength{fromrulewidth}}% - \ifdim\@tempdima=\z@ - \setlength{\@tempdima}{\textwidth}% - \fi - \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% - \fi - \\ - }% - }% - }% - \fi - } -\newcommand*{\@firstfoot}{} -\newcommand*{\@nexthead}{% - \rlap{\parbox[c]{\textwidth}{\raggedright\strut - \ifnum\@pageat=0\pagemark\else\leftmark\fi\strut}}% - \parbox[c]{\textwidth}{% - \centering\strut - \ifcase\@pageat - \rightmark - \or - \pagemark - \or - \rightmark - \fi\strut}% - \llap{\parbox[c]{\textwidth}{\raggedleft\strut - \ifcase\@pageat - \leftmark - \or - \rightmark - \or - \pagemark - \else - \rightmark - \fi\strut}}% - }% -\newcommand*{\@nextfoot}{% - \ifnum\@pageat>2 - \parbox[c]{\textwidth}{% - \ifcase\@pageat\or\or\or\raggedright\or\centering\or\raggedleft\fi - \strut\pagemark% - }% - \fi + \batchmode \csname @@end\endcsname \end } -\newcommand*{\pagemark}{{\usekomafont{pagenumber}\pagename\ \thepage}} -\renewcommand*{\ps@plain}{% - \renewcommand*{\@evenhead}{% - \vbox{\vbox{\hsize=\textwidth\hbox to\textwidth{% - \parbox[b]{\textwidth}{\strut - \ifnum\@pageat>-1 - \ifnum\@pageat<3 - \ifcase\@pageat\raggedright\or\centering\or\raggedleft\fi - \pagemark - \else - \hfill - \fi - \else - \hfill - \fi}% - }% - \if@hsl\kern1pt\rule{\textwidth}{.4pt}\fi - }% - }% - }% - \let\@oddhead\@evenhead% - \renewcommand*{\@evenfoot}{% - \parbox[t]{\textwidth}{% - \if@fsl - {% - \raggedright% - \vskip-\baselineskip\vskip.4pt - \hrulefill\\ - }% - \fi - \ifnum\@pageat>2 - \ifcase\@pageat\or\or\or\raggedright\or\centering\or\raggedleft\fi - \strut\pagemark - \else - \hfill - \fi - }% - }% - \let\@oddfoot\@evenfoot - } -\newcommand*{\ps@headings}{% - \let\@mkboth=\markboth - \renewcommand*{\@evenhead}{% - \vbox{% - \vbox{\hsize=\textwidth\hbox to\textwidth{\headfont\@nexthead}}% - \if@hsl\kern1pt\rule{\textwidth}{.4pt}\fi% - }% - }% - \let\@oddhead\@evenhead% - \renewcommand*{\@evenfoot}{% - \parbox[t]{\textwidth}{% - \if@fsl - {% - \raggedright% - \vskip-\baselineskip\vskip.4pt - \hrulefill\\ - }% - \fi - \vbox{\hsize=\textwidth\hbox to\textwidth{\headfont\@nextfoot}}% - }% - }% - \let\@oddfoot\@evenfoot - } -\newcommand*{\ps@myheadings}{% - \ps@headings\let\@mkboth=\@gobbletwo - } -\let\@mkboth=\@gobbletwo -\setlength\arraycolsep{5\p@} -\setlength\tabcolsep{6\p@} -\setlength\arrayrulewidth{.4\p@} -\setlength\doublerulesep{2\p@} -\setlength\tabbingsep{\labelsep} -\setlength{\skip\@mpfootins}{\skip\footins} -\setlength\fboxsep{3\p@} -\setlength\fboxrule{.4\p@} -\renewcommand*\theequation{% - \@arabic\c@equation} -\if@twocolumn - \setlength{\leftmargini}{2em} -\else - \setlength{\leftmargini}{2.5em} -\fi -\setlength{\leftmarginii}{2.2em} -\setlength{\leftmarginiii}{1.87em} -\setlength{\leftmarginiv}{1.7em} -\if@twocolumn - \setlength{\leftmarginv}{.5em} - \setlength{\leftmarginvi}{.5em} -\else - \setlength{\leftmarginv}{1em} - \setlength{\leftmarginvi}{1em} -\fi -\setlength{\leftmargin}{\leftmargini} -\setlength{\labelsep}{.5em} -\setlength{\labelwidth}{\leftmargini} -\addtolength{\labelwidth}{-\labelsep} -\@beginparpenalty=-\@lowpenalty -\@endparpenalty =-\@lowpenalty -\@itempenalty =-\@lowpenalty -\renewcommand*\theenumi{\@arabic\c@enumi} -\renewcommand*\theenumii{\@alph\c@enumii} -\renewcommand*\theenumiii{\@roman\c@enumiii} -\renewcommand*\theenumiv{\@Alph\c@enumiv} -\newcommand*\labelenumi{\theenumi.} -\newcommand*\labelenumii{\theenumii)} -\newcommand*\labelenumiii{\theenumiii.} -\newcommand*\labelenumiv{\theenumiv.} -\renewcommand*\p@enumii{\theenumi} -\renewcommand*\p@enumiii{\p@enumii(\theenumii)} -\renewcommand*\p@enumiv{\p@enumiii\theenumiii} -\newcommand*\labelitemi{\textbullet} -\newcommand*\labelitemii{\normalfont\bfseries\textendash} -\newcommand*\labelitemiii{\textasteriskcentered} -\newcommand*\labelitemiv{\textperiodcentered} -\newenvironment{description} - {\list{}{\labelwidth\z@ \itemindent-\leftmargin - \let\makelabel\descriptionlabel}} - {\endlist} -\newcommand*{\descriptionlabel}[1]{\hspace\labelsep - \descfont #1} -\newenvironment{labeling}[2][] - {\def\sc@septext{#1} - \list{}{\settowidth{\labelwidth}{#2#1} - \leftmargin\labelwidth \advance\leftmargin by \labelsep - \let\makelabel\labelinglabel}} - {\endlist} -\newcommand\labelinglabel[1]{#1\hfil\sc@septext} -\newenvironment{verse} - {\let\\=\@centercr - \list{}{\itemsep \z@ - \itemindent -1.5em% - \listparindent\itemindent - \rightmargin \leftmargin - \advance\leftmargin 1.5em}% - \item\relax} - {\endlist} -\newenvironment{quotation} - {\list{}{\listparindent 1em% - \itemindent \listparindent - \rightmargin \leftmargin - \parsep \z@ \@plus\p@}% - \item\relax} - {\endlist} -\newenvironment{quote} - {\list{}{\rightmargin\leftmargin}% - \item\relax} - {\endlist} -\newenvironment{addmargin}{% - \@tempswafalse\@addmargin - }{\endlist} -\newenvironment{addmargin*}{% - \@tempswafalse - \if@twoside\ifthispageodd{}{\@tempswatrue}\fi - \@addmargin - }{\endlist} -\newcommand*{\@addmargin}[2][\@tempa]{% - \@tempcnta=\@listdepth - \list{}{% - \if@tempswa - \def\@tempa{\leftmargin}% - \setlength{\leftmargin}{#2}% - \setlength{\rightmargin}{#1}% - \else - \def\@tempa{\rightmargin}% - \setlength{\rightmargin}{#2}% - \setlength{\leftmargin}{#1}% - \fi - \setlength{\listparindent}{\parindent}% - \setlength{\itemsep}{\parskip}% - \setlength{\itemindent}{\z@}% - \setlength{\topsep}{\z@}% - \setlength{\parsep}{\parskip}% - \setlength{\partopsep}{\parskip}% - \let\makelabel\@gobble - \setlength{\labelwidth}{\z@} - \@listdepth=\@tempcnta% - }% - \item[]% - } -\newcommand\marginline[1]{\marginpar[\raggedleft{#1}]{\raggedright #1}} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} @@ -980,195 +595,278 @@ size% \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} -\DeclareOldFontCommand{\sfb}{\normalfont\sffamily\bfseries}{\@nomath\sfb} +\DeclareOldFontCommand{\sfb}{\normalfont\sffamily\bfseries}{% + \@nomath\sfb} \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal} \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal} -\newcommand*\descfont{\sffamily\bfseries} -\newcommand*\sectfont{\normalcolor\sffamily\bfseries} -\newcommand*\pnumfont{\normalfont\normalcolor} -\newcommand*\headfont{\normalfont\normalcolor\slshape} -\newcommand*\titlefont{\sectfont} -\newcommand*{\subject@font}{\normalfont\normalcolor\bfseries} -\newcommand*{\baddr@font}{\sffamily} \newcommand*{\setkomafont}[2]{% \@ifundefined{scr@fnt@#1}{% \@ifundefined{scr@fnt@instead@#1}{% - \ClassError{% - scrlttr2% - }{font of element `#1' can't be set}{% - You've told me to redefine the font selection of the element,% - \MessageBreak% - but either no such element is known by KOMA-Script\MessageBreak - or the element does not use a special font selection} + \ClassError{\KOMAClassName}{% + font of element `#1' can't be set}{% + You've told me to redefine the font selection of the + element,\MessageBreak% + but either no such element is known by + KOMA-Script\MessageBreak% + or the element does not use a special font selection% + }% }{% - \ClassError{% - scrlttr2% - }{font of element `#1' can't be set}{% - You've told me to redefine the font selection of the element,% - \MessageBreak% - but the element does not use a special font - selection. The\MessageBreak - The font of `#1' may be changed with element `\csname - scr@fnt@instead@#1\endcsname'} + \ClassInfo{\KOMAClassName}{% + You've told me to redefine the font selection of the\MessageBreak + element `#1' that is an alias of element\MessageBreak + `\csname scr@fnt@instead@#1\endcsname'% + }% + \expandafter\setkomafont\expandafter{% + \csname scr@fnt@instead@#1\endcsname}{#2}% }% }{% - \expandafter\expandafter\expandafter\renewcommand% - \csname scr@fnt@#1\endcsname{#2}% - \@ifundefined{scr@fnt@wrn@#1}{}{% - \ClassWarning{% - scrlttr2% - }{\csname scr@fnt@wrn@#1\endcsname{#1}} - } - } + \expandafter\expandafter\expandafter\def\csname scr@fnt@#1\endcsname{#2}% + }% + \@ifundefined{scr@fnt@wrn@#1}{}{% + \ClassWarning{\KOMAClassName}{% + \csname scr@fnt@wrn@#1\endcsname{#1}% + }% + }% +} +\ifundefined{unexpanded}{% + \newcommand*{\g@addto@macro@temp}{}% + \newcommand{\l@addto@macro}[2]{% + \begingroup% + \toks@\expandafter{#1#2}% + \xdef\g@addto@macro@temp{\the\toks@}% + \endgroup + \let#1\g@addto@macro@temp + }% +}{% + \newcommand{\l@addto@macro}[2]{% + \edef#1{\unexpanded\expandafter{#1#2}}% + }% } -\newcommand{\l@addto@macro}[2]{% - \begingroup% - \toks@\expandafter{#1#2}% - \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}% - \@tempa} \newcommand*{\addtokomafont}[2]{% \@ifundefined{scr@fnt@#1}{% \@ifundefined{scr@fnt@instead@#1}{% - \ClassError{% - scrlttr2% - }{font of element `#1' can't be extended}{% - You've told me to extend the font selection of the element,% - \MessageBreak% - but either no such element is known by KOMA-Script\MessageBreak - or the element does not use a special font selection} + \ClassError{\KOMAClassName}{% + font of element `#1' can't be extended% + }{% + You've told me to extend the font selection of the + element,\MessageBreak + but either no such element is known by + KOMA-Script\MessageBreak + or the element does not use a special font selection% + }% }{% - \ClassError{% - scrlttr2% - }{font of element `#1' can't be extended}{% - You've told me to extend the font selection of the element,% - \MessageBreak% - but the element does not use a special font - selection. The\MessageBreak - The font of `#1' may be changed with element `\csname - scr@fnt@instead@#1\endcsname'} + \ClassInfo{\KOMAClassName}{% + You've told me to extend the font selection of the\MessageBreak + element `#1' that is an alias of element\MessageBreak + `\csname scr@fnt@instead@#1\endcsname'% + }% + \expandafter\addtokomafont\expandafter{% + \csname scr@fnt@instead@#1\endcsname}{#2}% }% }{% - \expandafter\expandafter\expandafter\l@addto@macro% + \expandafter\expandafter\expandafter\l@addto@macro \csname scr@fnt@#1\endcsname{#2}% - \@ifundefined{scr@fnt@wrn@#1}{}{% - \ClassWarning{% - scrlttr2% - }{\csname scr@fnt@wrn@#1\endcsname{#1}} - } - } + }% + \@ifundefined{scr@fnt@wrn@#1}{}{% + \ClassWarning{\KOMAClassName}{% + \csname scr@fnt@wrn@#1\endcsname{#1}% + }% + }% } \newcommand*{\usekomafont}[1]{% \@ifundefined{scr@fnt@#1}{% \@ifundefined{scr@fnt@instead@#1}{% - \ClassError{% - scrlttr2% - }{font of element `#1' can't be used}{% - You've told me to use the font selection of the element,% - \MessageBreak% - but either no such element is known by KOMA-Script\MessageBreak - or the element does not use a special font selection} - }{% - \ClassWarning{% - scrlttr2% + \ClassError{\KOMAClassName}{% + font of element `#1' can't be used% }{% - You've told me to use the font selection of the element,% - \MessageBreak% - but the element does not use a special font - selection. The\MessageBreak - The font of `#1' may be selected with element `\csname - scr@fnt@instead@#1\endcsname'.\MessageBreak - I fix this using font of `\csname - scr@fnt@instead@#1\endcsname'}% + You've told me to use the font selection of the + element,\MessageBreak + but either no such element is known by + KOMA-Script\MessageBreak + or the element does not use a special font selection% }% - \@nameuse{scr@fnt@instead@#1}% }{% - \@nameuse{scr@fnt@#1}% + \ClassInfo{\KOMAClassName}{% + You've told me to use the font selection of the + element\MessageBreak + `#1' that is an alias of element `\csname + scr@fnt@instead@#1\endcsname'\MessageBreak + }% }% - } -\newcommand*{\scr@fnt@descriptionlabel}{\descfont} -\newcommand*{\scr@fnt@title}{\titlefont} -\newcommand*{\scr@fnt@sectioning}{\sectfont} -\newcommand*{\scr@fnt@pagenumber}{\pnumfont} -\let\scr@fnt@pagination=\scr@fnt@pagenumber -\newcommand*{\scr@fnt@pagehead}{\headfont} -\newcommand*{\scr@fnt@wrn@pagehead}[1]{% - font selection of elements `pagehead' and `pagefoot'\MessageBreak - changed, because you wanted to change font selection\MessageBreak - of element `#1'% -} -\let\scr@fnt@pagefoot=\scr@fnt@pagehead -\let\scr@fnt@wrn@pagefoot=\scr@fnt@wrn@pagehead -\newcommand*{\scr@fnt@subject}{\subject@font} -\newcommand*{\scr@fnt@backaddress}{\baddr@font} -\newcommand*{\scr@fnt@fromaddress}{\faddr@font} -\newcommand*{\scr@fnt@fromname}{\fname@font} -\renewcommand*\footnoterule{% - \kern-3\p@ - \ifx\@textbottom\relax\else\vskip \z@ \@plus.0005fil\fi - \hrule\@width.4\columnwidth - \kern 2.6\p@} -\@addtoreset{footnote}{chapter} -\newcommand\deffootnote[4][]{% - \long\def\@makefntext##1{% - \setlength{\@tempdimc}{#3}% - \def\@tempa{#1}\ifx\@tempa\@empty - \@setpar{\@@par - \@tempdima = \hsize - \addtolength{\@tempdima}{-#2} - \parshape \@ne #2 \@tempdima}% + \@nameuse{scr@fnt@instead@#1}% + }{% + \@nameuse{scr@fnt@#1}% + }% +} +\newcommand*{\newkomafont}[3][\relax]{% + \expandafter\newcommand\expandafter*\csname @#2font\endcsname{#3}% + \expandafter\expandafter\expandafter\newcommand + \expandafter\expandafter\expandafter*% + \expandafter\csname scr@fnt@#2\expandafter\endcsname\expandafter{% + \csname @#2font\endcsname% + }% + \ifx\relax#1\relax\else + \expandafter\newcommand\expandafter*\csname scr@fnt@wrn@#2\endcsname{#1}% + \fi +} +\newcommand*{\aliaskomafont}[2]{% + \expandafter\newcommand\expandafter*\csname scr@fnt@instead@#1\endcsname{% + #2% + }% +} +%%% From File: scrkmisc.dtx +\setlength{\skip\@mpfootins}{\skip\footins} +\setlength\fboxsep{3\p@} +\setlength\fboxrule{.4\p@} +\newcommand*{\new@tpo@label}{\@newl@bel{tpo}} +\newcommand*{\scr@tpo}{0} +\newcommand*{\is@thispageodd}{% + \@bsphack + \begingroup + \@tempcnta=\scr@tpo + \advance\@tempcnta by\@ne + \xdef\scr@tpo{\the\@tempcnta}% + \protected@write\@auxout{\let\arabic\relax}{% + \string\new@tpo@label{\scr@tpo}{\arabic{page}}}% + \expandafter\ifx\csname tpo@\scr@tpo\endcsname\relax + \protect\G@refundefinedtrue + \ClassWarning{\KOMAClassName}{% + odd/even page label number \scr@tpo\space undefined}% + \edef\@tempa{\the\value{page}}% \else - \addtolength{\@tempdimc}{#2}% - \addtolength{\@tempdimc}{-#1}% - \@setpar{\@@par - \@tempdima = \hsize - \addtolength{\@tempdima}{-#1} - \@tempdimb = \hsize - \addtolength{\@tempdimb}{-#2} - \parshape \tw@ #1 \@tempdima #2 \@tempdimb}% + \edef\@tempa{\csname tpo@\scr@tpo\endcsname}% \fi - \par - \parindent\@tempdimc\noindent - \ftn@font\hbox to \z@{\hss\@@makefnmark}##1} - \def\@@makefnmark{\hbox{\ftnm@font{#4}}} + \ifodd\number\@tempa + \aftergroup\thispagewasoddtrue + \else + \aftergroup\thispagewasoddfalse + \fi + \endgroup + \@esphack +} +\newif\ifthispagewasodd +\newcommand{\ifthispageodd}{% + \is@thispageodd + \ifthispagewasodd + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi } -\newcommand*{\ftn@font}{\normalfont} -\newcommand*{\scr@fnt@footnote}{\ftn@font} -\newcommand*{\ftnm@font}{} -\newcommand*{\scr@fnt@footnotenumber}{\ftnm@font} -\newcommand*{\scr@fnt@footnotelabel}{\ftnm@font} -\newcommand*{\scr@fnt@instead@footnotetext}{footnote} -\newcommand*\deffootnotemark[1]{\def\@makefnmark{\hbox{\ftntm@font{#1}}}} -\newcommand*{\ftntm@font}{} -\newcommand*{\scr@fnt@footnotereference}{\ftntm@font} -\newcommand*{\scr@fnt@footnoteref}{\ftntm@font} -\newcommand*{\thefootnotemark}{\@thefnmark} -\deffootnote[1em]{1.5em}{1em} - {\textsuperscript{\thefootnotemark}} -\deffootnotemark{\textsuperscript{\thefootnotemark}} \DeclareRobustCommand*\textsubscript[1]{% - \@textsubscript{\selectfont#1}} + \@textsubscript{\selectfont#1}% +} \newcommand{\@textsubscript}[1]{% - {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} -\newcommand*\today{\ifcase\month\or - January\or February\or March\or April\or May\or June\or - July\or August\or September\or October\or November\or December\fi - \space\number\day, \number\year} + {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}% +} +%%% From File: scrklco.dtx +\newcommand*{\LoadLetterOption}[1]{% + \@ifundefined{@restore@catcode@level}% + {\let\@restore@catcode@level=\z@}{}% + \ifnum\@restore@catcode@level =\z@ + \ifnum\catcode`\@=11 + \let\@restore@catcode\relax + \else + \@tempcnta=\catcode`\@ + \edef\@restore@catcode{% + \noexpand\catcode`\noexpand\@=\the\@tempcnta}% + \makeatletter + \fi + \fi + \@tempcnta=\@restore@catcode@level\relax + \advance\@tempcnta by \@ne\relax + \edef\@restore@catcode@level{\the\@tempcnta}% + \InputIfFileExists{#1.lco}{% + \ClassInfo{% + scrlttr2% + }{Letter-Class-Option `#1' loaded}% + }{% + \ClassError{% + scrlttr2% + }{% + Letter-Class-Option file `#1.lco' not found% + }{% + You've told me to load the Letter-Class-Option `#1'. So I have + to load\MessageBreak + the file `#1.lco'. But the file isn't available.}% + }% + \@tempcnta=\@restore@catcode@level\relax + \advance\@tempcnta by \m@ne\relax + \edef\@restore@catcode@level{\the\@tempcnta}% + \ifnum\@tempcnta =\z@ + \@restore@catcode + \fi + } +\newcommand*{\LOPNP@option}{} +\newcommand*{\LOPNP@size}{} +\newcommand*{\@PapersizeWarning}{% + \begingroup% + \edef\@tempc{\noexpand\@tempswatrue + \noexpand\ifdim\paperwidth=\the\paperwidth\noexpand\else + \noexpand\@tempswafalse\noexpand\fi + \noexpand\ifdim\paperheight=\the\paperheight\noexpand\else + \noexpand\@tempswafalse\noexpand\fi + \noexpand\@@PapersizeWarning + } + \def\@tempb{letter}\ifx\LOPNP@size\@tempb% + \setlength{\paperheight}{11in}\setlength{\paperwidth}{8.5in}% + \else\def\@tempb{legal}\ifx\LOPNP@size\@tempb% + \setlength{\paperheight}{14in}\setlength{\paperwidth}{8.5in}% + \else\def\@tempb{executive}\ifx\LOPNP@size\@tempb% + \setlength{\paperheight}{10.5in}\setlength{\paperwidth}{7.25in}% + \else% + \def\ta@opt@err{% + \ClassError{% + scrlttr2% + }{papersize `\LOPNP@size' undefined}{% + You've told me to check for paper size + `\LOPNP@size'\MessageBreak + at letter option file `\LOPNP@option.lco',\MessageBreak + but this paper size is not supported.\MessageBreak + See the KOMA-Script manual for informations about known + paper sizes.}% + }% + \let\@headlines\ta@opt@err% + \expandafter\x@@paper\LOPNP@size paperpaper\x@@paper% + \fi\fi\fi + \@tempc + \endgroup% +} +\newcommand*{\@@PapersizeWarning}{% + \if@tempswa\else% + \ClassWarningNoLine{% + scrlttr2% + }{% + Letter option file `\LOPNP@option.lco'\MessageBreak + needs paper size `\LOPNP@size'.\MessageBreak + Current paper size is not `\LOPNP@size'!\MessageBreak + You should add `paper=\LOPNP@size' at the\MessageBreak + option list of \string\documentclass!\MessageBreak + Maybe you know what you are doing,\MessageBreak + so I do not change this myself}% + \fi + } +\newcommand*{\LetterOptionNeedsPapersize}[2]{% + \edef\LOPNP@size{#2}\edef\LOPNP@option{#1}% + } +%%% From File: scrklang.dtx \newcommand*{\providecaptionname}[3]{% \@ifundefined{captions#1}{% \@ifundefined{cap@info@#1@done}{% - \ClassInfo{% - scrlttr2% - }{% + \ClassInfo{\KOMAClassName}{% No captions found for `#1'\MessageBreak --> skipped% }% - \expandafter\let\csname cap@info@#1@done\endcsname\@empty}{}% + \expandafter\let\csname cap@info@#1@done\endcsname\@empty + }{}% }{% - \begingroup% - \let\@tempa\endgroup% - \csname captions#1\endcsname% - \ifx #2\undefined% - \def\@tempb{#1}% + \begingroup + \let\@tempa\endgroup + \csname captions#1\endcsname + \ifx #2\undefined + \edef\@tempb{#1}% + \@onelevel@sanitize\@tempb + \@onelevel@sanitize\languagename \ifx\@tempb\languagename \def\@tempa{\endgroup% \expandafter\g@addto@macro\csname captions#1\endcsname{% @@ -1182,9 +880,7 @@ size% }% \fi \else - \ClassInfo{% - scrlttr2% - }{% + \ClassInfo{\KOMAClassName}{% `\string#2' at language `#1' already defined\MessageBreak --> skipped% @@ -1195,32 +891,31 @@ size% } \newcommand*{\newcaptionname}[3]{% \@ifundefined{captions#1}{% - \ClassInfo{% - scrlttr2% - }{% + \ClassInfo{\KOMAClassName}{% No captions found for `#1' --> defining% - }% + }% \@namedef{captions#1}{}% - }{}% - \begingroup% - \csname captions#1\endcsname% - \ifx #2\undefined\else% - \ClassError{% - scrlttr2% - }{% + }{}% + \begingroup + \csname captions#1\endcsname + \ifx #2\undefined\else + \ClassError{\KOMAClassName}{% `\string#2' at language `#1' already defined% - }{% + }{% You've told me to define `\string#2' at language `#1',\MessageBreak but it is already defined.\MessageBreak It will be redefined, if you'll continue.% - } + }% \fi - \endgroup% + \endgroup \expandafter\g@addto@macro\csname captions#1\endcsname{% - \def#2{#3}}% + \def#2{#3}% + }% \begingroup - \def\@tempb{#1}% + \edef\@tempb{#1}% + \@onelevel@sanitize\@tempb + \@onelevel@sanitize\languagename \ifx\@tempb\languagename \def\@tempa{\endgroup\csname captions#1\endcsname}% \else @@ -1230,38 +925,37 @@ size% } \newcommand*{\renewcaptionname}[3]{% \@ifundefined{captions#1}{% - \ClassError{% - scrlttr2% - }{% + \ClassError{\KOMAClassName}{% No captions found for `#1'% - }{% + }{% You've told me to redefine the caption `\string#2' at language `#1',\MessageBreak but `\expandafter\string\csname captions#1\endcsname' is not defined.\MessageBreak If you'll continue it will be defined.% - } + } \@namedef{captions#1}{}% - }{}% - \begingroup% - \csname captions#1\endcsname% - \ifx #2\undefined% - \ClassError{% - scrlttr2% - }{% + }{}% + \begingroup + \csname captions#1\endcsname + \ifx #2\undefined + \ClassError{\KOMAClassName}{% `\string#2' not defined at language `#1'% - }{% + }{% You've told me to redefine `\string#2' at language `#1',\MessageBreak but it is not defined.\MessageBreak If you'll continue it will be defined.% - } + }% \fi \endgroup \expandafter\g@addto@macro\csname captions#1\endcsname{% - \def#2{#3}}% + \def#2{#3}% + }% \begingroup - \def\@tempb{#1}% + \edef\@tempb{#1}% + \@onelevel@sanitize\@tempb + \@onelevel@sanitize\languagename \ifx\@tempb\languagename \def\@tempa{\endgroup\csname captions#1\endcsname}% \else @@ -1273,20 +967,27 @@ size% \@ifundefined{date#1}{% \ClassInfo{% scrlttr2% - }{% + }{% no date found for language `#1'\MessageBreak --> skipped% - } - }{% + }% + }{% \expandafter\g@addto@macro\csname date#1\endcsname{% \let\sym@date=\today% \def\num@date{#2}% \def\today{\if@orgdate\sym@date\else\num@date\fi}% - } - } - } -\AtBeginDocument{ + }% + }% +} +\AtBeginDocument{% \@ifundefined{captionsenglish}{\let\captionsenglish\@empty}{}% + \@ifundefined{dateenglish}{\def\dateenglish{% + \def\today{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year}% + }% + }{}% \providecaptionname{english}\yourrefname{Your ref.}% \providecaptionname{english}\yourmailname{Your letter of}% \providecaptionname{english}\myrefname{Our ref.}% @@ -1304,6 +1005,7 @@ size% \providecaptionname{english}\emailname{Email}% \providecaptionname{english}\wwwname{Url}% \providecaptionname{english}\bankname{Bank account}% + \g@addnumerical@date{english}{\number\day/\number\month/\number\year}% \providecaptionname{USenglish}\yourrefname{Your ref.}% \providecaptionname{USenglish}\yourmailname{Your letter of}% \providecaptionname{USenglish}\myrefname{Our ref.}% @@ -1321,6 +1023,7 @@ size% \providecaptionname{USenglish}\emailname{Email}% \providecaptionname{USenglish}\wwwname{Url}% \providecaptionname{USenglish}\bankname{Bank account}% + \g@addnumerical@date{USenglish}{\number\month/\number\day/\number\year}% \providecaptionname{american}\yourrefname{Your ref.}% \providecaptionname{american}\yourmailname{Your letter of}% \providecaptionname{american}\myrefname{Our ref.}% @@ -1338,6 +1041,7 @@ size% \providecaptionname{american}\emailname{Email}% \providecaptionname{american}\wwwname{Url}% \providecaptionname{american}\bankname{Bank account}% + \g@addnumerical@date{american}{\number\month/\number\day/\number\year}% \providecaptionname{british}\yourrefname{Your ref.}% \providecaptionname{british}\yourmailname{Your letter of}% \providecaptionname{british}\myrefname{Our ref.}% @@ -1355,6 +1059,7 @@ size% \providecaptionname{british}\emailname{Email}% \providecaptionname{british}\wwwname{Url}% \providecaptionname{british}\bankname{Bank account}% + \g@addnumerical@date{british}{\number\day/\number\month/\number\year}% \providecaptionname{UKenglish}\yourrefname{Your ref.}% \providecaptionname{UKenglish}\yourmailname{Your letter of}% \providecaptionname{UKenglish}\myrefname{Our ref.}% @@ -1372,6 +1077,7 @@ size% \providecaptionname{UKenglish}\emailname{Email}% \providecaptionname{UKenglish}\wwwname{Url}% \providecaptionname{UKenglish}\bankname{Bank account}% + \g@addnumerical@date{UKenglish}{\number\day/\number\month/\number\year}% \providecaptionname{german}\yourrefname{Ihr Zeichen}% \providecaptionname{german}\yourmailname{Ihr Schreiben vom}% \providecaptionname{german}\myrefname{Unser Zeichen}% @@ -1389,6 +1095,7 @@ size% \providecaptionname{german}\emailname{E-Mail}% \providecaptionname{german}\wwwname{URL}% \providecaptionname{german}\bankname{Bankverbindung}% + \g@addnumerical@date{german}{\number\day.\,\number\month.\,\number\year}% \providecaptionname{ngerman}\yourrefname{Ihr Zeichen}% \providecaptionname{ngerman}\yourmailname{Ihr Schreiben vom}% \providecaptionname{ngerman}\myrefname{Unser Zeichen}% @@ -1406,6 +1113,7 @@ size% \providecaptionname{ngerman}\emailname{E-Mail}% \providecaptionname{ngerman}\wwwname{URL}% \providecaptionname{ngerman}\bankname{Bankverbindung}% + \g@addnumerical@date{ngerman}{\number\day.\,\number\month.\,\number\year}% \providecaptionname{austrian}\yourrefname{Ihr Zeichen}% \providecaptionname{austrian}\yourmailname{Ihr Schreiben vom}% \providecaptionname{austrian}\myrefname{Unser Zeichen}% @@ -1423,6 +1131,7 @@ size% \providecaptionname{austrian}\emailname{E-Mail}% \providecaptionname{austrian}\wwwname{URL}% \providecaptionname{austrian}\bankname{Bankverbindung}% + \g@addnumerical@date{austrian}{\number\day.\,\number\month.\,\number\year}% \providecaptionname{french}\yourrefname{Vos r\'ef\'erences}% \providecaptionname{french}\yourmailname{Votre lettre du}% \providecaptionname{french}\myrefname{Nos r\'ef\'erences}% @@ -1440,23 +1149,26 @@ size% \providecaptionname{french}\emailname{E-mail}% \providecaptionname{french}\wwwname{URL}% \providecaptionname{french}\bankname{Compte en banque}% - \providecaptionname{italian}\yourrefname{Vs./Rif.}% - \providecaptionname{italian}\yourmailname{Vs.~lettera del}% - \providecaptionname{italian}\myrefname{Ns./Rif.}% - \providecaptionname{italian}\customername{Nr.~cliente}% - \providecaptionname{italian}\invoicename{Nr.~fattura}% + \g@addnumerical@date{french}{\number\day.\,\number\month.\,\number\year}% + \providecaptionname{italian}\yourrefname{Vs./Rif.}% or Vostro Riferimento + \providecaptionname{italian}\yourmailname{Vs.~lettera del}% or Vostra + % lettera del + \providecaptionname{italian}\myrefname{Ns./Rif.}% or Nostro Riferimento + \providecaptionname{italian}\customername{Nr.~cliente}% or Cliente num. + \providecaptionname{italian}\invoicename{Nr.~fattura}% or Fattura num. \providecaptionname{italian}\subjectname{Oggetto}% - \providecaptionname{italian}\ccname{Per conoscenza}% - \providecaptionname{italian}\enclname{Allegato}% + \providecaptionname{italian}\ccname{Per conoscenza}% or Copia a + \providecaptionname{italian}\enclname{Allegato}% or (plural) Allegati \providecaptionname{italian}\headtoname{A}% - \providecaptionname{italian}\headfromname{}% TODO: translate it + \providecaptionname{italian}\headfromname{Da}% \providecaptionname{italian}\datename{Data}% \providecaptionname{italian}\pagename{Pagina}% - \providecaptionname{italian}\phonename{}% TODO: translate it - \providecaptionname{italian}\faxname{}% TODO: translate it - \providecaptionname{italian}\emailname{}% TODO: translate it - \providecaptionname{italian}\wwwname{}% TODO: translate it - \providecaptionname{italian}\bankname{}% TODO: translate it + \providecaptionname{italian}\phonename{Telefono}% + \providecaptionname{italian}\faxname{Fax}% + \providecaptionname{italian}\emailname{Email}% + \providecaptionname{italian}\wwwname{Sito Web}% + \providecaptionname{italian}\bankname{Conto bancario}% + \g@addnumerical@date{italian}{\number\day.\,\number\month.\,\number\year}% \providecaptionname{spanish}\yourrefname{Su ref.}% \providecaptionname{spanish}\yourmailname{Su carta de}% \providecaptionname{spanish}\myrefname{Nuestra ref.}% @@ -1474,6 +1186,7 @@ size% \providecaptionname{spanish}\emailname{Email}% or Correo electr\'onico \providecaptionname{spanish}\wwwname{URL}% or P\`agina web \providecaptionname{spanish}\bankname{Cuenta bancaria}% + \g@addnumerical@date{spanish}{\number\day.\,\number\month.\,\number\year}% \providecaptionname{croatian}\yourrefname{Va\v{s} znak}% \providecaptionname{croatian}\yourmailname{Va\v{s}e pismo od}% \providecaptionname{croatian}\myrefname{Na\v{s} znak}% @@ -1491,6 +1204,7 @@ size% \providecaptionname{croatian}\emailname{E-Mail}% \providecaptionname{croatian}\wwwname{URL}% \providecaptionname{croatian}\bankname{Bankovna veza}% + \g@addnumerical@date{croatian}{\number\day.\,\number\month.\,\number\year.}% \providecaptionname{dutch}\yourrefname{Uw kenmerk}% \providecaptionname{dutch}\yourmailname{Uw brief van}% \providecaptionname{dutch}\myrefname{Ons kenmerk}% @@ -1506,34 +1220,27 @@ size% \providecaptionname{dutch}\phonename{Telefoon}% \providecaptionname{dutch}\faxname{Fax}% \providecaptionname{dutch}\emailname{E--mail}% - \providecaptionname{dutch}\urlname{URL}% + \providecaptionname{dutch}\wwwname{URL}% \providecaptionname{dutch}\bankname{Bankrekening}% - \g@addnumerical@date{english}{% - \number\day/\number\month/\number\year} - \g@addnumerical@date{british}{% - \number\day/\number\month/\number\year} - \g@addnumerical@date{UKenglish}{% - \number\day/\number\month/\number\year} - \g@addnumerical@date{USenglish}{% - \number\month/\number\day/\number\year} - \g@addnumerical@date{american}{% - \number\month/\number\day/\number\year} - \g@addnumerical@date{german}{% - \number\day.\,\number\month.\,\number\year} - \g@addnumerical@date{ngerman}{% - \number\day.\,\number\month.\,\number\year} - \g@addnumerical@date{austrian}{% - \number\day.\,\number\month.\,\number\year} - \g@addnumerical@date{french}{% - \number\day.\,\number\month.\,\number\year} - \g@addnumerical@date{italian}{% - \number\day.\,\number\month.\,\number\year} - \g@addnumerical@date{spanish}{% - \number\day.\,\number\month.\,\number\year} - \g@addnumerical@date{croatian}{% - \number\day.\,\number\month.\,\number\year.} - \g@addnumerical@date{dutch}{% - \number\day.\,\number\month.\,\number\year} + \g@addnumerical@date{dutch}{\number\day.\,\number\month.\,\number\year}% + \providecaptionname{finnish}\yourrefname{Viitteenne}% + \providecaptionname{finnish}\yourmailname{Kirjeenne}% + \providecaptionname{finnish}\myrefname{Viitteemme}% + \providecaptionname{finnish}\customername{Asiakasnumero}% + \providecaptionname{finnish}\invoicename{Laskun numero}% + \providecaptionname{finnish}\subjectname{Asia}% + \providecaptionname{finnish}\ccname{Jakelu}% + \providecaptionname{finnish}\enclname{Liitteet}% + \providecaptionname{finnish}\headtoname{Vastaanottaja}% + \providecaptionname{finnish}\headfromname{L\"ahett\"aj\"a}% + \providecaptionname{finnish}\datename{P\"aiv\"a}% + \providecaptionname{finnish}\pagename{Sivu}% + \providecaptionname{finnish}\phonename{Puhelin}% + \providecaptionname{finnish}\faxname{Faksi}% + \providecaptionname{finnish}\emailname{S\"ahk\"oposti}% + \providecaptionname{finnish}\wwwname{URL}% + \providecaptionname{finnish}\bankname{Pankkitilin numero}% + \g@addnumerical@date{finnish}{\number\day.\number\month.\number\year}% \captionsenglish \dateenglish \begingroup\expandafter\expandafter\expandafter\endgroup @@ -1556,7 +1263,7 @@ size% This may result in use of wrong language!\MessageBreak You should use a compatible language package\MessageBreak - (e.g. `Babel', `german', `ngerman', ...)} + (e.g. `Babel', `german', `ngerman', ...)}% \ifx\l@american\undefined\else\ifnum\language=\l@american \captionsamerican \dateamerican @@ -1606,11 +1313,11 @@ size% \datedutch \fi\fi \else - \edef\@tempa{nohyphenation} + \edef\@tempa{nohyphenation}% \ifx\languagename\@tempa \ClassWarningNoLine{% scrlttr2% - }{% + }{% You've selected language `\languagename'.\MessageBreak Maybe your LaTeX format contains Babel extension\MessageBreak but you have not selected a language using\MessageBreak @@ -1618,47 +1325,23 @@ size% Please select another language!\MessageBreak Only as a workaround english captions and date\MessageBreak will be used% - }% + }% \else - \expandafter\selectlanguage\expandafter{\languagename} + \expandafter\selectlanguage\expandafter{\languagename}% \ClassInfo{% scrlttr2% - }{% + }{% used language is `\languagename'.\MessageBreak Supported languages are `english', `UKenglish',\MessageBreak `british', `american', `USenglish',\MessageBreak `german', `ngerman', `austrian',\MessageBreak - `dutch', `italian', `spanish', `croatian'% - } + `dutch', `italian', `spanish',\MessageBreak + `croatian', 'finnish'% + }% \fi \fi - } -\newenvironment{letter}[2][]{% - \newpage - \if@twoside\ifodd\c@page\else - \thispagestyle{empty}\null\newpage\fi\fi - \setcounter{page}{\@ne}% - \setcounter{footnote}{0}% - \interlinepenalty=200\@processto{#2}% - \KOMAoptions{#1}% - \@beginletterhook - }{% - \stopletter\@@par\pagebreak\@@par% - } -\newcommand*{\stopletter}{} -\newcommand{\@processto}[1]{% - \ifx\relax#1\relax\else - \expandafter\@xproc#1\\\@nil\ifkomavarempty{toaddress}{}{% - \expandafter\@xproc#1\@nil}% - \fi } -\newcommand*{\@xproc}{} -\long\def\@xproc#1\\#2\@nil{% - \setkomavar{toname}{#1}\setkomavar{toaddress}{#2}} -\newcommand*{\fname@font}{} -\newcommand*{\faddr@font}{} -\newcommand{\AtBeginLetter}{\g@addto@macro\@beginletterhook} -\newcommand{\@beginletterhook}{} +%%% From File: scrkvars.dtx \newcommand*{\newkomavar}{% \@ifstar {\@tempswatrue\@newkomavar}{\@tempswafalse\@newkomavar}} \newcommand*{\@newkomavar}[2][\relax]{% @@ -1681,8 +1364,8 @@ size% is undefined, but the name of the variable is defined.\MessageBreak This should never happen. So someone crashs me!% - } - } + }% + }% }{% \ClassError{% scrlttr2% @@ -1690,8 +1373,8 @@ size% Variable `#2' already defined% }{% I'll ignore this command, if you'll continue.% - } - } + }% + }% } \newcommand*{\setkomavar}{% \@ifstar {\@setkomaname}{\@setkomavar}} @@ -1716,7 +1399,7 @@ size% \ifx\@tempa\@tempb\endgroup\else \endgroup\@namedef{scr@#1@name}{#2}% \fi - } + }% } \newcommand*{\@komavar@err}[2]{% \ClassError{% @@ -1773,90 +1456,7 @@ size% \fi }% } -\newkomavar{signature} -\setkomavar{signature}{\usekomavar{fromname}} -\newkomavar{place} -\newkomavar{location} -\newkomavar{backaddress} -\setkomavar{backaddress}{% - \ifkomavarempty{fromname}{}{% - \strut\ignorespaces\usekomavar{fromname}% - \ifkomavarempty{fromaddress}{}{\\}}% - \ifkomavarempty{fromaddress}{}{% - \strut\ignorespaces\usekomavar{fromaddress}}% - } -\newkomavar{specialmail} -\newkomavar{title} -\newkomavar{fromlogo} -\newkomavar[\usekomavar{place}]{placeseparator} -\setkomavar{placeseparator}{,~} -\newkomavar[\subjectname]{subjectseparator} -\setkomavar{subjectseparator}{: } -\newkomavar[\ccname]{ccseparator} -\setkomavar{ccseparator}{: } -\newkomavar[\enclname]{enclseparator} -\setkomavar{enclseparator}{: } -\newkomavar{backaddressseparator} -\setkomavar{backaddressseparator}{,~} -\newkomavar[\phonename]{phoneseparator} -\setkomavar{phoneseparator}{:~} -\newkomavar[\faxname]{faxseparator} -\setkomavar{faxseparator}{:~} -\newkomavar[\emailname]{emailseparator} -\setkomavar{emailseparator}{:~} -\newkomavar[\wwwname]{urlseparator} -\setkomavar{urlseparator}{:~} -\newkomavar[\headfromname]{fromname} -\newkomavar[\usekomavar{fromname}]{fromaddress} -\newkomavar[\headtoname]{toname} -\newkomavar[\usekomavar{toname}]{toaddress} -\newkomavar[\usekomavar*{phoneseparator}% - \usekomavar{phoneseparator}]{fromphone} -\newkomavar[\usekomavar*{faxseparator}% - \usekomavar{faxseparator}]{fromfax} -\newkomavar[\usekomavar*{emailseparator}% - \usekomavar{emailseparator}]{fromemail} -\newkomavar[\usekomavar*{urlseparator}% - \usekomavar{urlseparator}]{fromurl} -\newkomavar[\bankname]{frombank} -\newkomavar[\yourrefname]{yourref} -\newkomavar[\yourmailname]{yourmail} -\newkomavar[\myrefname]{myref} -\newkomavar[\customername]{customer} -\newkomavar[\invoicename]{invoice} -\newkomavar[\usekomavar*{subjectseparator}% - \usekomavar{subjectseparator}]{subject} -\newkomavar[\datename]{date} -\setkomavar{date}{\@date} -\newcommand{\firsthead}[1]{% - \renewcommand*{\@alignfrom}{10000}% - \renewcommand*{\@firsthead}{\noindent#1}% - } -\newcommand{\firstfoot}[1]{% - \renewcommand*{\@firstfoot}{\noindent#1}% - } -\newcommand{\nexthead}[1]{% - \renewcommand*{\@nexthead}{\noindent#1}% - } -\newcommand{\nextfoot}[1]{% - \renewcommand*{\@nextfoot}{\noindent#1}% - } -\newcommand*{\foldmarkson}{% - \@ObsoleteCommand{\foldmarkson}{foldmarks=on}} -\newcommand*{\foldmarksoff}{% - \@ObsoleteCommand{\foldmarksoff}{foldmarks=off}} -\newcommand*{\addrfieldon}{% - \@ObsoleteCommand{\addrfieldon}{addrfield=on}} -\newcommand*{\addrfieldoff}{% - \@ObsoleteCommand{\addrfieldoff}{addrfield=off}} -\newcommand*{\subjecton}{% - \@ObsoleteCommand{\subjecton}{subject=titled}} -\newcommand*{\subjectoff}{% - \@ObsoleteCommand{\subjectoff}{subject=untitled}} -\newcommand*{\subjectafteron}{% - \@ObsoleteCommand{\subjectafteron}{subject=afteropening}} -\newcommand*{\subjectafteroff}{% - \@ObsoleteCommand{\subjectafteroff}{subject=beforeopening}} +%%% From File: scrkplen.dtx \newcommand*{\@newplength}[1]{% \@ifundefined{ltr@len@#1}{% \expandafter\let\csname ltr@len@#1\endcsname=\z@% @@ -1869,8 +1469,8 @@ size% \string\@newplength\MessageBreak which is already defined. Try another name or better\MessageBreak - Don't use this KOMA-Script internal macro} - } + Don't use this KOMA-Script internal macro}% + }% } \newcommand*{\useplength}[1]{% \expandafter\number\expandafter\csname ltr@len@#1\endcsname} @@ -1905,6 +1505,520 @@ size% }% \@tempa% } +%%% From File: scrktare.dtx +\let\@BCOR =\relax +\let\@@BCOR =\relax +\let\@DIV =\relax +\let\@@DIV =\relax +\let\@headlines =\relax +\let\@@headlines =\relax +\let\x@paper =\relax +\let\x@@paper =\relax +\let\scr@pti@nerr@r =\relax +\RequirePackage{typearea}[\KOMAScriptVersion] +%%% From File: scrkpar.dtx +\setlength{\lineskip}{\p@} +\setlength{\normallineskip}{\p@} +\newcommand*{\scr@selectfont}{}\let\scr@selectfont\selectfont +\BeforePackage{everysel}{% + \ifx\selectfont\scr@new@selectfont\else + \ClassWarningNoLine{\KOMAClassName}{discard change of \string\selectfont}% + \fi + \let\selectfont\scr@selectfont +} +\AfterPackage{everysel}{% + \g@addto@macro\selectfont{\par@update}% + \let\scr@new@selectfont\selectfont +} +\g@addto@macro\selectfont{\par@update} +\newcommand*{\scr@new@selectfont}{}\let\scr@new@selectfont\selectfont +\newcommand*{\par@updaterelative}{% + \begingroup + \edef\@tempa{\the\parindent}\ifx\@tempa\f@parindent + \aftergroup\parindent@update + \fi + \edef\@tempa{\the\parskip}\ifx\@tempa\f@parskip + \aftergroup\parskip@update + \fi + \edef\@tempa{\the\parfillskip}\ifx\@tempa\f@parfillskip + \aftergroup\parfillskip@update + \fi + \endgroup +} +\newcommand*{\parindent@update}{% + \scr@defaultunits\parindent\scr@parindent + \begingroup + \let\@tempb\endgroup + \edef\@tempa{\the\parindent}\ifx\@tempa\f@parindent\else + \def\@tempb{\endgroup\edef\f@parindent{\the\parindent}}% + \fi + \@tempb +} +\newcommand*{\parskip@update}{% + \scr@defaultunits\parskip\scr@parskip + \begingroup + \let\@tempb\endgroup + \edef\@tempa{\the\parskip}\ifx\@tempa\f@parskip\else + \def\@tempb{\endgroup\edef\f@parskip{\the\parskip}}% + \fi + \@tempb +} +\newcommand*{\parfillskip@update}{% + \scr@defaultunits\parfillskip\scr@parfillskip + \begingroup + \let\@tempb\endgroup + \edef\@tempa{\the\parfillskip}\ifx\@tempa\f@parfillskip\else + \def\@tempb{\endgroup\edef\f@parfillskip{\the\parfillskip}}% + \fi + \@tempb +} +\newcommand*{\scr@defaultunits}[2]{% + \begingroup + \edef\@tempa{#2}% + \expandafter\scr@@defaultunits\expandafter#1\@tempa plusplus\@nnil + \edef\@tempa{\noexpand\endgroup\noexpand\setlength{\noexpand#1}{\the#1}}% + \@tempa +} +\newcommand*{\scr@@defaultunits}{} +\def\scr@@defaultunits#1#2plus#3plus#4\@nnil{% + \ifx\relax#3\relax + \scr@@@defaultunits#1{}#2minusminus\@nnil + \else + \scr@@@defaultunits#1{#2}#3minusminus\@nnil + \fi +} +\newcommand*{\scr@@@defaultunits}{} +\def\scr@@@defaultunits#1#2#3minus#4minus#5\@nnil{% + \ifx\relax#2\relax + \@defaultunits\@tempskipa#3pt\relax\@nnil + \setlength{#1}{\@tempskipa}% + \else + \@defaultunits\@tempskipa\z@\@plus#3pt\relax\@nnil + \setlength{#1}{\@tempskipa}% + \@defaultunits\@tempskipa#2pt\relax\@nnil + \addtolength{#1}{\@tempskipa}% + \fi + \ifx\relax#4\relax\else + \@defaultunits\@tempskipa\z@\@minus #4pt\relax\@nnil + \addtolength{#1}{\@tempskipa}% + \fi +} +\g@addto@macro{\@listi}{\@list@extra} +\let\@listI=\@listi +\g@addto@macro{\@listii}{\@list@extra} +\g@addto@macro{\@listiii}{\@list@extra} +\newcommand*{\add@extra@listi}[1]{% + \expandafter\let\csname #1@listi\endcsname=\@listi + \def\@listi{\csname #1@listi\endcsname\@list@extra}% +} +\g@addto@macro{\footnotesize}{\protect\add@extra@listi{ftns}} +\g@addto@macro{\small}{\protect\add@extra@listi{sml}} +\newcommand*{\@list@extra}{% + \ifdim\parskip>\z@\topsep\z@\parskip\parskip\itemsep\z@\fi +} +\@lowpenalty = 51 +\@medpenalty =151 +\@highpenalty =301 +%%% From File: scrkpage.dtx +\newcommand*{\set@tempdima@hw}{% + \setlength{\@tempdima}{\textwidth}% + \if@mincl + \addtolength{\@tempdima}{\marginparsep}% + \addtolength{\@tempdima}{\marginparwidth}% + \fi +} +\newcommand*\pnumfont{\normalfont\normalcolor} +\newcommand*\headfont{\normalfont\normalcolor\slshape} +\newcommand*{\scr@fnt@pagenumber}{\pnumfont} +\aliaskomafont{pagination}{pagenumber} +\newcommand*{\scr@fnt@pagehead}{\headfont} +\newcommand*{\scr@fnt@wrn@pagehead}[1]{% + font selection of elements `pagehead' and `pagefoot'\MessageBreak + changed, because they are same% +} +\aliaskomafont{pagefoot}{pagehead} +\newcommand*{\pagemark}{{\usekomafont{pagenumber}% + \pagename\ % + \thepage}} + \renewcommand*{\ps@plain}{% + \renewcommand*{\@oddhead}{% + \vbox{\vbox{\hsize=\textwidth\hbox to\textwidth{% + \parbox[b]{\textwidth}{\strut + \ifnum\@pageat>-1 + \ifnum\@pageat<3 + \ifcase\@pageat\raggedright\or\centering\or\raggedleft\fi + \pagemark + \else + \hfill + \fi + \else + \hfill + \fi + }% + }% + \if@hsl\kern1pt\rule{\textwidth}{.4pt}\fi + }% + }% + }% + \let\@evenhead\@oddhead% + \renewcommand*{\@oddfoot}{% + \parbox[t]{\textwidth}{% + \if@fsl + {% + \raggedright% + \vskip-\baselineskip\vskip.4pt + \hrulefill\\ + }% + \fi + \ifnum\@pageat>2 + \ifcase\@pageat\or\or\or\raggedright\or\centering\or\raggedleft\fi + \strut\pagemark + \else + \hfill + \fi + }% + }% + \let\@evenfoot\@oddfoot + } + \newcommand*{\ps@headings}{\let\@mkboth\markboth + \renewcommand*{\@oddhead}{% + \vbox{% + \vbox{\hsize=\textwidth\hbox to\textwidth{\headfont\@nexthead}}% + \if@hsl\kern1pt\rule{\textwidth}{.4pt}\fi% + }% + }% + \let\@evenhead\@oddhead + \renewcommand*{\@oddfoot}{% + \parbox[t]{\textwidth}{% + \if@fsl + {% + \raggedright% + \vskip-\baselineskip\vskip.4pt + \hrulefill\\ + }% + \fi + \vbox{\hsize=\textwidth\hbox to\textwidth{\headfont\@nextfoot}}% + }% + }% + \let\@evenfoot\@oddfoot + } + \newcommand*{\ps@myheadings}{% + \ps@headings + \let\@mkboth\@gobbletwo + } +\pagestyle{plain} +\pagenumbering{arabic} + \raggedbottom + \onecolumn +%%% From File: scrkfloa.dtx +\newcommand\marginline[1]{% + \marginpar[\raggedleft{#1}]{\raggedright #1}% +} +%%% From File: scrkftn.dtx +\renewcommand*\footnoterule{% + \kern-3\p@ + \ifx\@textbottom\relax\else\vskip \z@ \@plus.05fil\fi + \hrule\@width.4\columnwidth + \kern 2.6\p@} +\newcommand\deffootnote[4][]{% + \long\def\@makefntext##1{% + \setlength{\@tempdimc}{#3}% + \def\@tempa{#1}\ifx\@tempa\@empty + \@setpar{\@@par + \@tempdima = \hsize + \addtolength{\@tempdima}{-#2}% + \parshape \@ne #2 \@tempdima}% + \else + \addtolength{\@tempdimc}{#2}% + \addtolength{\@tempdimc}{-#1}% + \@setpar{\@@par + \@tempdima = \hsize + \addtolength{\@tempdima}{-#1}% + \@tempdimb = \hsize + \addtolength{\@tempdimb}{-#2}% + \parshape \tw@ #1 \@tempdima #2 \@tempdimb + }% + \fi + \par + \parindent\@tempdimc\noindent + \ftn@font\hbox to \z@{\hss\@@makefnmark}##1% + }% + \def\@@makefnmark{\hbox{\ftnm@font{#4}}}% +} +\newcommand*{\ftn@font}{\normalfont} +\newcommand*{\scr@fnt@footnote}{\ftn@font} +\newcommand*{\ftnm@font}{} +\newcommand*{\scr@fnt@footnotenumber}{\ftnm@font} +\newcommand*{\scr@fnt@footnotelabel}{\ftnm@font} +\newcommand*{\scr@fnt@instead@footnotetext}{footnote} +\newcommand*\deffootnotemark[1]{% + \def\@makefnmark{\hbox{\ftntm@font{#1}}}% +} +\newcommand*{\ftntm@font}{} +\newcommand*{\scr@fnt@footnotereference}{\ftntm@font} +\newcommand*{\scr@fnt@footnoteref}{\ftntm@font} +\newcommand*{\thefootnotemark}{\@thefnmark} +\deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}} +\deffootnotemark{\textsuperscript{\thefootnotemark}} +%%% From File: scrklist.dtx + \setlength{\leftmargini}{2.5em} +\setlength{\leftmarginii}{2.2em} +\setlength{\leftmarginiii}{1.87em} +\setlength{\leftmarginiv}{1.7em} + \setlength{\leftmarginv}{1em} + \setlength{\leftmarginvi}{1em} +\setlength{\leftmargin}{\leftmargini} +\setlength{\labelsep}{.5em} +\setlength{\labelwidth}{\leftmargini} +\addtolength{\labelwidth}{-\labelsep} +\@beginparpenalty=-\@lowpenalty +\@endparpenalty =-\@lowpenalty +\@itempenalty =-\@lowpenalty +\setlength\arraycolsep{5\p@} +\setlength\tabcolsep{6\p@} +\setlength\arrayrulewidth{.4\p@} +\setlength\doublerulesep{2\p@} +\setlength\tabbingsep{\labelsep} +\renewcommand*\theenumi{\@arabic\c@enumi} +\renewcommand*\theenumii{\@alph\c@enumii} +\renewcommand*\theenumiii{\@roman\c@enumiii} +\renewcommand*\theenumiv{\@Alph\c@enumiv} +\newcommand*\labelenumi{\theenumi.} +\newcommand*\labelenumii{\theenumii)} +\newcommand*\labelenumiii{\theenumiii.} +\newcommand*\labelenumiv{\theenumiv.} +\renewcommand*\p@enumii{\theenumi} +\renewcommand*\p@enumiii{\p@enumii(\theenumii)} +\renewcommand*\p@enumiv{\p@enumiii\theenumiii} +\newcommand*\labelitemi{\textbullet} +\newcommand*\labelitemii{\normalfont\bfseries\textendash} +\newcommand*\labelitemiii{\textasteriskcentered} +\newcommand*\labelitemiv{\textperiodcentered} +\newenvironment{description}{% + \list{}{\labelwidth\z@ \itemindent-\leftmargin + \let\makelabel\descriptionlabel}% +}{% + \endlist +} +\newcommand*{\descriptionlabel}[1]{% + \hspace{\labelsep}\descfont #1% +} +\newenvironment{labeling}[2][]{% + \def\sc@septext{#1}% + \list{}{\settowidth{\labelwidth}{#2#1}% + \leftmargin\labelwidth \advance\leftmargin by \labelsep + \let\makelabel\labelinglabel}% +}{% + \endlist +} +\newcommand\labelinglabel[1]{#1\hfil\sc@septext} +\newenvironment{verse}{% + \let\\=\@centercr + \list{}{\itemsep=\z@ + \itemindent=-1.5em + \listparindent=\itemindent + \rightmargin=\leftmargin + \advance\leftmargin by1.5em + }% + \item\relax +}{% + \endlist +} +\newenvironment{quotation}{% + \list{}{\listparindent 1em% + \itemindent \listparindent + \rightmargin \leftmargin + \parsep \z@ \@plus\p@ + }% + \item\relax +}{% + \endlist +} +\newenvironment{quote}{% + \list{}{\rightmargin\leftmargin}% + \item\relax +}{% + \endlist +} +\newenvironment{addmargin}{% + \@tempswafalse\@addmargin +}{% + \advance\@listdepth\@ne + \endlist +} +\newenvironment{addmargin*}{% + \@tempswafalse + \if@twoside\ifthispageodd{}{\@tempswatrue}\fi + \@addmargin +}{% + \advance\@listdepth\@ne + \endlist +} +\newcommand*{\@addmargin}[2][\@tempa]{% + \list{}{% + \if@tempswa + \def\@tempa{\leftmargin}% + \setlength{\leftmargin}{#2}% + \setlength{\rightmargin}{#1}% + \else + \def\@tempa{\rightmargin}% + \setlength{\rightmargin}{#2}% + \setlength{\leftmargin}{#1}% + \fi + \setlength{\listparindent}{\parindent}% + \setlength{\itemsep}{\parskip}% + \setlength{\itemindent}{\z@}% + \setlength{\topsep}{\z@}% + \setlength{\parsep}{\parskip}% + \setlength{\partopsep}{\parskip}% + \let\makelabel\@gobble + \setlength{\labelwidth}{\z@}% + \advance\@listdepth\m@ne + }% + \item\relax% +} +\newcommand*\descfont{\sffamily\bfseries} +\newcommand*{\scr@fnt@descriptionlabel}{\descfont} +%%% From File: scrknpap.dtx +\newcommand*{\@firsthead}{\noindent% + \parbox[b]{\useplength{firstheadwidth}}% + {\centering\usekomafont{fromaddress}{% + \ifkomavarempty{fromname}{}{% + {\usekomafont{fromname}% + {\ignorespaces\usekomavar{fromname}}}\\[-8pt] + \rule{\useplength{firstheadwidth}}{.4pt}\\ + }% + \ifkomavarempty{fromaddress}{}{% + \ignorespaces\usekomavar{fromaddress}% + }% + }% + }% +} +\newcommand*{\@gen@firsthead}{% + \ifcase\@alignfrom + \renewcommand*{\@firsthead}{\noindent + \parbox[b]{\textwidth}{\raggedright + {\usekomafont{fromname}\strut\ignorespaces + \usekomavar{fromname}% + {% + \ifnum\@rulefrom=1\\[-.5\baselineskip]% + \setlength{\@tempdima}{\useplength{fromrulewidth}}% + \ifdim\@tempdima=\z@ + \setlength{\@tempdima}{\textwidth}% + \if@logo + \settowidth{\@tempdimb}{\usekomavar{fromlogo}}% + \addtolength{\@tempdima}{-\@tempdimb}% + \fi + \fi + \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% + \fi + }% + \\ + }% + {\usekomafont{fromaddress}\strut\ignorespaces + \usekomavar{fromaddress}% + \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi% + \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi% + \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi% + \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi% + \ifnum\@rulefrom=2\\[-.5\baselineskip]% + \setlength{\@tempdima}{\useplength{fromrulewidth}}% + \ifdim\@tempdima=\z@ + \setlength{\@tempdima}{\textwidth}% + \fi + \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% + \fi + \\ + }% + }% + \if@logo + \llap{\usekomavar{fromlogo}}% + \fi + }% + \or + \renewcommand*{\@firsthead}{\noindent + \parbox[b]{\textwidth}{\centering + {\usekomafont{fromname}\strut\ignorespaces + \usekomavar{fromname}% + {% + \ifnum\@rulefrom=1\\[-.5\baselineskip]% + \setlength{\@tempdima}{\useplength{fromrulewidth}}% + \ifdim\@tempdima=\z@ + \setlength{\@tempdima}{\textwidth}% + \fi + \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% + \fi + }% + \\ + }% + {\usekomafont{fromaddress}\strut\ignorespaces + \usekomavar{fromaddress}% + \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi% + \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi% + \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi% + \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi% + \ifnum\@rulefrom=2\\[-.5\baselineskip]% + \setlength{\@tempdima}{\useplength{fromrulewidth}}% + \ifdim\@tempdima=\z@ + \setlength{\@tempdima}{\textwidth}% + \fi + \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% + \fi + \\ + }% + }% + }% + \or + \renewcommand*{\@firsthead}{\noindent + \if@logo + \rlap{\usekomavar{fromlogo}}% + \fi + \parbox[b]{\textwidth}{\raggedleft + {\usekomafont{fromname}\strut\ignorespaces + \usekomavar{fromname}% + {% + \ifnum\@rulefrom=1\\[-.5\baselineskip]% + \setlength{\@tempdima}{\useplength{fromrulewidth}}% + \ifdim\@tempdima=\z@ + \setlength{\@tempdima}{\textwidth}% + \if@logo + \settowidth{\@tempdimb}{\usekomavar{fromlogo}}% + \addtolength{\@tempdima}{-\@tempdimb}% + \fi + \fi + \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% + \fi + }% + \\ + }% + {\usekomafont{fromaddress}\strut\ignorespaces + \usekomavar{fromaddress}% + \if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi% + \if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi% + \if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi% + \if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi% + \ifnum\@rulefrom=2\\[-.5\baselineskip]% + \setlength{\@tempdima}{\useplength{fromrulewidth}}% + \ifdim\@tempdima=\z@ + \setlength{\@tempdima}{\textwidth}% + \fi + \expandafter\rule\expandafter{\the\@tempdima}{.4pt}% + \fi + \\ + }% + }% + }% + \fi +} +\newcommand{\firsthead}[1]{% + \renewcommand*{\@alignfrom}{10000}% + \renewcommand*{\@firsthead}{\noindent#1}% +} +\newkomafont{fromname}{} +\newkomafont{fromaddress}{} +\newkomafont{backaddress}{\sffamily} +\newkomafont{title}{\normalcolor\sffamily\bfseries} +\newkomafont{subject}{\normalcolor\bfseries} \@newplength{foldmarkhpos} \@newplength{tfoldmarkvpos} \@newplength{bfoldmarkvpos} @@ -1929,160 +2043,54 @@ size% \@newplength{firstheadwidth} \@newplength{fromrulewidth} \@setplength{fromrulewidth}{0pt} -\newcommand*{\LoadLetterOption}[1]{% - \@ifundefined{@restore@catcode@level} - {\let\@restore@catcode@level=\z@}{} - \ifnum\@restore@catcode@level =\z@ - \ifnum\catcode`\@=11 - \let\@restore@catcode\relax - \else - \@tempcnta=\catcode`\@ - \edef\@restore@catcode{% - \noexpand\catcode`\noexpand\@=\the\@tempcnta}% - \makeatletter - \fi - \fi - \@tempcnta=\@restore@catcode@level\relax - \advance\@tempcnta by \@ne\relax - \edef\@restore@catcode@level{\the\@tempcnta} - \InputIfFileExists{#1.lco}{% - \ClassInfo{% - scrlttr2% - }{Letter-Class-Option `#1' loaded} - }{% - \ClassError{% - scrlttr2% - }{% - Letter-Class-Option file `#1.lco' not found% - }{% - You've told me to load the Letter-Class-Option `#1'. So I have - to load\MessageBreak - the file `#1.lco'. But the file isn't available.} - } - \@tempcnta=\@restore@catcode@level\relax - \advance\@tempcnta by \m@ne\relax - \edef\@restore@catcode@level{\the\@tempcnta} - \ifnum\@tempcnta =\z@ - \@restore@catcode - \fi - } -\newcommand*{\LOPNP@option}{} -\newcommand*{\LOPNP@size}{} -\newcommand*{\@PapersizeWarning}{ - \begingroup% - \edef\@tempc{\noexpand\@tempswatrue - \noexpand\ifdim\paperwidth=\the\paperwidth\noexpand\else - \noexpand\@tempswafalse\noexpand\fi - \noexpand\ifdim\paperheight=\the\paperheight\noexpand\else - \noexpand\@tempswafalse\noexpand\fi - \noexpand\@@PapersizeWarning - } - \def\@tempb{letter}\ifx\LOPNP@size\@tempb% - \setlength{\paperheight}{11in}\setlength{\paperwidth}{8.5in}% - \else\def\@tempb{legal}\ifx\LOPNP@size\@tempb% - \setlength{\paperheight}{14in}\setlength{\paperwidth}{8.5in}% - \else\def\@tempb{executive}\ifx\LOPNP@size\@tempb% - \setlength{\paperheight}{10.5in}\setlength{\paperwidth}{7.25in}% - \else% - \def\ta@opt@err{% - \ClassError{% - scrlttr2% - }{papersize `\LOPNP@size' undefined}{% - You've told me to check for paper size - `\LOPNP@size'\MessageBreak - at letter option file `\LOPNP@option.lco',\MessageBreak - but this paper size is not supported.\MessageBreak - See the KOMA-Script manual for informations about known - paper sizes.}% - } - \let\@headlines\ta@opt@err% - \expandafter\x@@paper\LOPNP@size paperpaper\x@@paper% - \fi\fi\fi - \@tempc - \endgroup% +\newcommand*{\@firstfoot}{} +\newcommand{\firstfoot}[1]{% + \renewcommand*{\@firstfoot}{\noindent#1}% } -\newcommand*{\@@PapersizeWarning}{% - \if@tempswa\else% - \ClassWarningNoLine{% - scrlttr2% - }{% - Letter option file `\LOPNP@option.lco'\MessageBreak - needs paper size `\LOPNP@size'.\MessageBreak - Current paper size is not `\LOPNP@size'!\MessageBreak - You should add `paper=\LOPNP@size' at the\MessageBreak - option list of \string\documentclass!\MessageBreak - Maybe you know what you are doing,\MessageBreak - so I do not change this myself} - \fi - } -\newcommand*{\LetterOptionNeedsPapersize}[2]{% - \edef\LOPNP@size{#2}\edef\LOPNP@option{#1}% - } -\LoadLetterOption{DIN} -\newcommand*{\adrentry}[7]{% - \addrentry{#1}{#2}{#3}{#4}{#5}{#6}{#7}{}} -\newcommand*{\adrchar}{\addrchar} -\newcommand*{\addrentry}[9]{\def\@tempa{#1}\ifx \@tempa\@empty \else - \def\@tempa{#2}\ifx \@tempa\@empty - \expandafter\def\csname #9\endcsname{#1\\#3} - \else - \expandafter\def\csname #9\endcsname{#2 #1\\#3} - \fi \fi} -\newcommand*{\addrchar}[1]{} -\newcommand*{\stopbreaks}{\interlinepenalty \@M - \def\par{\@@par\nobreak}\let\\=\@nobreakcr - \let\vspace\@nobreakvspace} -\newcommand*{\@nobreakvspace}{% - \@ifstar{\@nobreakvspacex}{\@nobreakvspacex}} -\newcommand*{\@nobreakvspacex}[1]{\ifvmode\nobreak\vskip #1\relax\else - \@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi} -\newcommand*{\@nobreakcr}{% - \vadjust{\penalty\@M}\@ifstar{\@xnewline}{\@xnewline}} -\newcommand*{\startbreaks}{\let\\=\@normalcr - \interlinepenalty 200\def\par{\@@par\penalty 200}} \newcommand*{\move@topt}{% \null\vskip -1in\vskip -\topmargin% \vskip -\headheight\vskip -\headsep% \vskip -\topskip% \ignorespaces% - } +} \newcommand*{\move@frompt}{% \vskip 1in\vskip \topmargin% \vskip \headheight\vskip \headsep% \vskip \topskip% \vskip -\baselineskip% \ignorespaces% - } +} \newcommand*{\move@topl}{% \null\hskip -1in% \ifodd\value{page}\hskip -\oddsidemargin\else\hskip -\evensidemargin\fi \ignorespaces% - } +} \newcommand*{\move@frompl}{% \hskip 1in% \ifodd\value{page}\hskip \oddsidemargin\else\hskip \evensidemargin\fi% \ignorespaces% - } +} \newcommand*{\vb@t@z}[1]{{% \setbox0\vbox to\z@{#1\vss}% - \setlength{\parskip}{\z@}\setlength{\baselineskip}{\z@}% - \setlength{\parfillskip}{\z@ \@plus 1fil}% + \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative + \setlength{\baselineskip}{\z@}% \setlength{\@tempdima}{\ht0}\addtolength{\@tempdima}{\dp0}% \box0\vskip-\@tempdima% - }} + }% +} \newcommand*{\@foldmark}[2]{% - \vskip #1% - \vb@t@z{\rlap{\move@topl\hskip\useplength{foldmarkhpos}% - \rule{#2}{.2pt}}}% - \vskip -#1\ignorespaces% + \vb@t@z{\vskip #1% + \rlap{\move@topl\hskip\useplength{foldmarkhpos}% + \rule{#2}{.2pt}}}% + \ignorespaces% } \newcommand*{\@foldmarks}{% \if@fold% \typeout{Foldmarks: yes}% \move@topt - \@foldmark{\useplength{tfoldmarkvpos}}{2mm} - \@foldmark{.5\paperheight}{4mm} - \@foldmark{\useplength{bfoldmarkvpos}}{2mm} + \@foldmark{\useplength{tfoldmarkvpos}}{2mm}% + \@foldmark{.5\paperheight}{4mm}% + \@foldmark{\useplength{bfoldmarkvpos}}{2mm}% \move@frompt \else \typeout{Foldmarks: no}% @@ -2210,10 +2218,10 @@ size% \vbox{\hsize\@tempdima% \noindent\usekomavar{toname}\\\usekomavar{toaddress}}% \vfil\null}% - {address field}{toaddrheight} + {address field}{toaddrheight}% {\begin{letter} or you\MessageBreak have to define a smaller special purpose using\MessageBreak - \string\specialmail} + \string\specialmail}% }}}% \vskip-\useplength{toaddrvpos}\move@frompt \else @@ -2266,7 +2274,7 @@ size% \vskip\parskip}\noindent}% \fi \fi - \usekomavar{location}\vskip \z@ \@plus .00001fil} + \usekomavar{location}\vskip \z@ \@plus .00001fil}% {location field}{toaddrheight}{\setkomavar}% }}% }% @@ -2287,10 +2295,10 @@ size% \newcommand*{\@set@reffields}{}% \newcommand*{\addtoreffields}[1]{% \l@addto@macro{\@set@reffields}{\@set@reffield{#1}}% - } +} \newcommand*{\removereffields}{% \renewcommand*{\@set@reffields}{}% - } +} \newcommand*{\defaultreffields}{% \removereffields \addtoreffields{yourref}% @@ -2300,7 +2308,8 @@ size% \addtoreffields{invoice}% } \defaultreffields -\newcommand*{\@datefield}{{\@parskipfalse\@parskip@indent +\newcommand*{\@datefield}{{% + \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative \ifdim\useplength{refwidth}=\z@ \if@refwide \@setplength{refwidth}{\paperwidth}% @@ -2353,7 +2362,7 @@ size% \ifdim \@tempdima<\wd0\setlength{\@tempdima}{\wd0}\fi \enskip\hfill \parbox[t]{\@tempdima}{\noindent\raggedright% - \strut\box0\\\strut\usekomavar{date}} + \strut\box0\\\strut\usekomavar{date}}% \else \typeout{Reference line: only place and date}% \enskip\hfill @@ -2372,17 +2381,18 @@ size% \newcommand*{\@maketitle}{% \ifkomavarempty{title}{% \typeout{Title: no}% - }{% + }{% \typeout{Title: yes}% - {\@parskipfalse\@parskip@indent% - \centering\LARGE\titlefont\usekomavar{title}\par}% + {\setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative + \centering\LARGE\usekomafont{title}\usekomavar{title}\par}% \vskip\baselineskip% - }% - } -\newcommand*{\@subjfield}{{\@parskipfalse\@parskip@indent% + }% +} +\newcommand*{\@subjfield}{{% + \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative \ifkomavarempty{subject}{% \typeout{Subject: no}% - }{% + }{% \if@subjafter% \typeout{Subject: after opening}% \centering% @@ -2392,9 +2402,81 @@ size% \fi% {\usekomafont{subject}\if@subj\@hangfrom{\usekomavar*{subject}}\fi% {\usekomavar{subject}}\par}\vskip2\baselineskip% - }% }% - } + }% +} +\newcommand*{\@nexthead}{% + \rlap{\parbox[c]{\textwidth}{\raggedright\strut + \ifnum\@pageat=0\pagemark\else\leftmark\fi\strut}}% + \parbox[c]{\textwidth}{% + \centering\strut + \ifcase\@pageat + \rightmark + \or + \pagemark + \or + \rightmark + \fi\strut}% + \llap{\parbox[c]{\textwidth}{\raggedleft\strut + \ifcase\@pageat + \leftmark + \or + \rightmark + \or + \pagemark + \else + \rightmark + \fi\strut}}% +}% +\newcommand{\nexthead}[1]{% + \renewcommand*{\@nexthead}{\noindent#1}% +} +\newcommand*{\@nextfoot}{% + \ifnum\@pageat>2 + \parbox[c]{\textwidth}{% + \ifcase\@pageat\or\or\or\raggedright\or\centering\or\raggedleft\fi + \strut\pagemark% + }% + \fi +} +\newcommand{\nextfoot}[1]{% + \renewcommand*{\@nextfoot}{\noindent#1}% +} +\newenvironment{letter}[2][]{% + \newpage + \if@twoside\ifodd\c@page\else\thispagestyle{empty}\null\newpage\fi\fi + \setcounter{page}{\@ne}% + \setcounter{footnote}{0}% + \interlinepenalty=200\@processto{#2}% + \KOMAoptions{#1}% + \@beginletterhook +}{% + \stopletter\@@par\pagebreak\@@par% +} +\newcommand*{\stopletter}{} +\newcommand{\@processto}[1]{% + \ifx\relax#1\relax\else + \expandafter\@xproc#1\\\@nil\ifkomavarempty{toaddress}{}{% + \expandafter\@xproc#1\@nil}% + \fi +} +\newcommand*{\@xproc}{} +\long\def\@xproc#1\\#2\@nil{% + \setkomavar{toname}{#1}\setkomavar{toaddress}{#2}} +\newcommand{\AtBeginLetter}{\g@addto@macro\@beginletterhook} +\newcommand{\@beginletterhook}{} +\newcommand{\AtEndLetter}{\g@addto@macro\stopletter} +\newcommand*{\stopbreaks}{\interlinepenalty \@M + \def\par{\@@par\nobreak}\let\\=\@nobreakcr + \let\vspace\@nobreakvspace} +\newcommand*{\@nobreakvspace}{% + \@ifstar{\@nobreakvspacex}{\@nobreakvspacex}} +\newcommand*{\@nobreakvspacex}[1]{\ifvmode\nobreak\vskip #1\relax\else + \@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi} +\newcommand*{\@nobreakcr}{% + \vadjust{\penalty\@M}\@ifstar{\@xnewline}{\@xnewline}} +\newcommand*{\startbreaks}{\let\\=\@normalcr + \interlinepenalty 200\def\par{\@@par\penalty 200}} \newcommand{\opening}[1]{% \@PapersizeWarning \@gen@firsthead @@ -2403,14 +2485,13 @@ size% \@foldmarks\@firstheadfootfield\@addrfield\@locfield\@datefield \@maketitle \if@subjafter\else\@subjfield\fi - {\@parskipfalse\@parskip@indent\noindent#1\par}% + {\setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative#1\par}% {\setlength{\@tempdima}{\baselineskip}% - \addtolength{\@tempdima}{-\parskip} - \ifdim \@tempdima>\z@\vskip\@tempdima\fi} + \addtolength{\@tempdima}{-\parskip}% + \ifdim \@tempdima>\z@\vskip\@tempdima\fi}% \if@subjafter\@subjfield\fi% \@afterindentfalse\@afterheading - } -\newcommand*{\setpresigskip}{\@setplength{sigbeforevskip}} +} \newcommand*{\@xtrimtempa}{% \@ifnextchar [{\@@xtrimtempa}{\@@xtrimtempa[]}} \newcommand*{\@@xtrimtempa}{} @@ -2426,20 +2507,21 @@ size% \def\@tempb{\expandafter\@tempdimaismaxwidthof\@tempa\@nil}% \fi \@tempb - } -\newcommand*{\closing}[1]{{\@parskipfalse\@parskip@indent\nobreak\par% - \nobreak\vskip\baselineskip% - \stopbreaks\noindent% - \setlength{\@tempdima}{0pt}% - \expandafter\@tempdimaismaxwidthof\scr@signature@var\\\@nil - \expandafter\@tempdimaismaxwidthof\strut\ignorespaces#1\\\@nil - \setlength{\@tempdimb}{\hsize}% - \addtolength{\@tempdimb}{-\useplength{sigindent}}% - \ifdim\@tempdima>\@tempdimb\setlength{\@tempdima}{\@tempdimb}\fi% - \hspace{\useplength{sigindent}}% - \parbox{\@tempdima}{\raggedsignature\strut\ignorespaces% - #1\strut\\[\useplength{sigbeforevskip}] - \strut\usekomavar{signature}\strut}}\par +} +\newcommand*{\closing}[1]{{% + \setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative\nobreak\par% + \nobreak\vskip\baselineskip% + \stopbreaks\noindent% + \setlength{\@tempdima}{0pt}% + \expandafter\@tempdimaismaxwidthof\scr@signature@var\\\@nil + \expandafter\@tempdimaismaxwidthof\strut\ignorespaces#1\\\@nil + \setlength{\@tempdimb}{\hsize}% + \addtolength{\@tempdimb}{-\useplength{sigindent}}% + \ifdim\@tempdima>\@tempdimb\setlength{\@tempdima}{\@tempdimb}\fi% + \hspace{\useplength{sigindent}}% + \parbox{\@tempdima}{\raggedsignature\strut\ignorespaces% + #1\strut\\[\useplength{sigbeforevskip}] + \strut\usekomavar{signature}\strut}}\par \nobreak\vskip\baselineskip% } \newcommand\ps{\par% @@ -2475,9 +2557,73 @@ size% \setlength{\parfillskip}{\z@ \@plus 1fil}\par \endgroup } -\pagestyle{plain} -\pagenumbering{arabic} % Arabic page numbers - \raggedbottom +\newkomavar{signature} +\setkomavar{signature}{\usekomavar{fromname}} +\newkomavar{place} +\newkomavar{location} +\newkomavar{backaddress} +\setkomavar{backaddress}{% + \ifkomavarempty{fromname}{}{% + \strut\ignorespaces\usekomavar{fromname}% + \ifkomavarempty{fromaddress}{}{\\}}% + \ifkomavarempty{fromaddress}{}{% + \strut\ignorespaces\usekomavar{fromaddress}}% + } +\newkomavar{specialmail} +\newkomavar{title} +\newkomavar{fromlogo} +\newkomavar[\usekomavar{place}]{placeseparator} +\setkomavar{placeseparator}{,~} +\newkomavar[\subjectname]{subjectseparator} +\setkomavar{subjectseparator}{: } +\newkomavar[\ccname]{ccseparator} +\setkomavar{ccseparator}{: } +\newkomavar[\enclname]{enclseparator} +\setkomavar{enclseparator}{: } +\newkomavar{backaddressseparator} +\setkomavar{backaddressseparator}{,~} +\newkomavar[\phonename]{phoneseparator} +\setkomavar{phoneseparator}{:~} +\newkomavar[\faxname]{faxseparator} +\setkomavar{faxseparator}{:~} +\newkomavar[\emailname]{emailseparator} +\setkomavar{emailseparator}{:~} +\newkomavar[\wwwname]{urlseparator} +\setkomavar{urlseparator}{:~} +\newkomavar[\headfromname]{fromname} +\newkomavar[\usekomavar{fromname}]{fromaddress} +\newkomavar[\headtoname]{toname} +\newkomavar[\usekomavar{toname}]{toaddress} +\newkomavar[\usekomavar*{phoneseparator}% + \usekomavar{phoneseparator}]{fromphone} +\newkomavar[\usekomavar*{faxseparator}% + \usekomavar{faxseparator}]{fromfax} +\newkomavar[\usekomavar*{emailseparator}% + \usekomavar{emailseparator}]{fromemail} +\newkomavar[\usekomavar*{urlseparator}% + \usekomavar{urlseparator}]{fromurl} +\newkomavar[\bankname]{frombank} +\newkomavar[\yourrefname]{yourref} +\newkomavar[\yourmailname]{yourmail} +\newkomavar[\myrefname]{myref} +\newkomavar[\customername]{customer} +\newkomavar[\invoicename]{invoice} +\newkomavar[\usekomavar*{subjectseparator}% + \usekomavar{subjectseparator}]{subject} +\newkomavar[\datename]{date} +\setkomavar{date}{\@date} +%%% From File: scrkcile.dtx +\newcommand*{\adrentry}[7]{% + \addrentry{#1}{#2}{#3}{#4}{#5}{#6}{#7}{}} +\newcommand*{\adrchar}{\addrchar} +\newcommand*{\addrentry}[9]{\def\@tempa{#1}\ifx \@tempa\@empty \else + \def\@tempa{#2}\ifx \@tempa\@empty + \expandafter\def\csname #9\endcsname{#1\\#3}% + \else + \expandafter\def\csname #9\endcsname{#2 #1\\#3}% + \fi \fi} +\newcommand*{\addrchar}[1]{} +%%% From File: scrlogo.dtx \@ifundefined{KOMAScript}{% \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em% M\kern.05em A\kern.1em-\kern.1em Script}}}{} |