diff options
author | Karl Berry <karl@freefriends.org> | 2007-03-07 18:05:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-03-07 18:05:27 +0000 |
commit | 1c15eb0bc227a081215bf372a3756aadc4d19d09 (patch) | |
tree | 512213f86181e4a6b05eab611fd4a84f334fc27a /Master/texmf-dist/tex/latex/koma-script/scrartcl.cls | |
parent | f20e65ef1cfe5fc288f66e7af8abc8477511b36a (diff) |
koma-script update (5mar07)
git-svn-id: svn://tug.org/texlive/trunk@4009 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrartcl.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrartcl.cls | 514 |
1 files changed, 429 insertions, 85 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls b/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls index 45f625b161c..01d30698a87 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls +++ b/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls @@ -6,6 +6,7 @@ %% %% scrkvers.dtx (with options: `class,article') %% scrkbase.dtx (with options: `load') +%% scrkcomp.dtx (with options: `class,article,option') %% scrkmisc.dtx (with options: `class,article,option') %% scrklang.dtx (with options: `class,article,option') %% scrkfont.dtx (with options: `class,article,option') @@ -21,6 +22,7 @@ %% scrkidx.dtx (with options: `class,article,option') %% scrklist.dtx (with options: `class,article,option') %% scrkmisc.dtx (with options: `class,article,execoption') +%% scrkcomp.dtx (with options: `class,article,body') %% scrkfont.dtx (with options: `class,article,body') %% scrklang.dtx (with options: `class,article,body') %% scrktare.dtx (with options: `class,article,body') @@ -37,7 +39,7 @@ %% scrklist.dtx (with options: `class,article,body') %% scrlogo.dtx (with options: `logo') %% -%% Copyright (c) 1994-2006 +%% Copyright (c) 1994-2007 %% Markus Kohm and any individual authors listed elsewhere in this file. %% %% This file was generated from file(s) of the KOMA-Script bundle. @@ -89,7 +91,7 @@ \fi } \fi - \@CheckKOMAScriptVersion{2006/07/30 v2.95b KOMA-Script}% + \@CheckKOMAScriptVersion{2007/03/02 v2.97 KOMA-Script}% \endgroup \newcommand*{\KOMAClassName}{% scrartcl% @@ -102,6 +104,41 @@ ] %%% From File: scrkbase.dtx \RequirePackage{scrkbase}[\KOMAScriptVersion] +%%% From File: scrkcomp.dtx +\newcommand*{\scr@compatibility}{0} +\KOMA@key{version}[last]{% + \scr@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'% + }% + }{% + \edef\scr@compatibility{\@nameuse{scr@v@#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.% + }% + }% +} +\@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@2.95a}{2} +\@namedef{scr@v@2.95b}{2} +\@namedef{scr@v@2.96}{2} +\@namedef{scr@v@2.96a}{3} +\@namedef{scr@v@2.97}{3} +\@namedef{scr@v@last}{3} %%% From File: scrkmisc.dtx \KOMA@key{draft}[true]{% \KOMA@set@ifkey{draft}{@tempswa}{#1}% @@ -117,7 +154,7 @@ %%% From File: scrklang.dtx %%% From File: scrkfont.dtx \newcommand*\@ptsize{% - 1% + 11% } \newcommand*{\@pt@scan}{% \expandafter\@pt@@scan\CurrentOption pt\@pt@@scan% @@ -131,14 +168,13 @@ }{\@headlines}% } \KOMA@key{fontsize}{% - \begingroup - \setlength{\@tempdima}{#1}% - \addtolength{\@tempdima}{-10\p@}% - \edef\@tempa{\endgroup\noexpand\renewcommand*\noexpand\@ptsize{% - \strip@pt\@tempdima}}% - \@tempa + \scr@ifundefined{changefontsizes}{% + \@defaultunits\@tempdima#1pt\relax\@nnil + \edef\@ptsize{#1}% + }{% + \changefontsizes{#1}% + }% } -\@onlypreamble\KV@KOMA@fontsize %%% From File: scrktare.dtx \newcommand*{\@BCOR}{\expandafter\@@BCOR\CurrentOption BCORBCOR\@@BCOR} \newcommand*{\@@BCOR}{} @@ -197,12 +233,31 @@ \newcommand*{\scr@pti@nerr@r}{ \OptionNotUsed } +\KOMA@key{headlines}{% + \PassOptionsToPackage{headlines=#1}{typearea}% +} +\KOMA@key{headinclude}[true]{\PassOptionsToPackage{headinclude=#1}{typearea}} +\KOMA@key{footinclude}[true]{\PassOptionsToPackage{footinclude=#1}{typearea}} +\KOMA@key{mpinclude}[true]{\PassOptionsToPackage{mpinclude=#1}{typearea}} +\KOMA@key{BCOR}{% + \PassOptionsToPackage{BCOR=#1}{typearea}% +} +\KOMA@key{DIV}[calc]{% + \PassOptionsToPackage{DIV=#1}{typearea}% +} \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} +\KOMA@key{twocolumn}[true]{% + \KOMA@set@ifkey{twocolumn}{@twocolumn}{#1}% +} +\KOMA@key{pagesize}[auto]{% + \PassOptionsToPackage{pagesize=#1}{typearea}% +} +\KOMA@key{paper}{% + \PassOptionsToPackage{paper=#1}{typearea}% +} %%% From File: scrkpar.dtx \newcommand*{\setparsizes}[3]{% \edef\f@parindent{\the\parindent}% @@ -319,11 +374,12 @@ %%% From File: scrktitl.dtx \newif\if@titlepage \@titlepagefalse -\DeclareOption{titlepage}{\@titlepagetrue} -\DeclareOption{notitlepage}{\@titlepagefalse} -\newif\if@abstrt -\DeclareOption{abstracton}{\@abstrttrue} -\DeclareOption{abstractoff}{\@abstrtfalse} +\KOMA@ifkey{titlepage}{@titlepage} +\KOMA@DeclareObsoleteOption[\ClassInfo]{notitlepage}{titlepage=false} +\newif\if@abstrt\@abstrtfalse +\KOMA@ifkey{abstract}{@abstrt} +\KOMA@DeclareObsoleteOption[\ClassInfo]{abstracton}{abstract=true} +\KOMA@DeclareObsoleteOption[\ClassInfo]{abstractoff}{abstract=false} %%% From File: scrksect.dtx \DeclareOption{pointednumbers}{% \AtEndOfClass{\@altsecnumformattrue @@ -436,6 +492,7 @@ If you'll continue, option `smallheadings' will be used% }% } +\@bigheadings %%% From File: scrkpage.dtx \newif\if@hsl \KOMA@key{headsepline}[true]{% @@ -443,7 +500,7 @@ \@ifpackageloaded{typearea}{% \KOMAoptions{headinclude=#1}% }{% - \PassOptionsToPackage{typearea}{headinclude=#1}% + \PassOptionsToPackage{headinclude=#1}{typearea}% }% } \KOMA@DeclareObsoleteOption[\PackageInfo]{headnosepline}{headsepline=false} @@ -453,7 +510,7 @@ \@ifpackageloaded{typearea}{% \KOMAoptions{footinclude=#1}% }{% - \PassOptionsToPackage{typearea}{footinclude=#1}% + \PassOptionsToPackage{footinclude=#1}{typearea}% }% } \KOMA@DeclareObsoleteOption[\PackageInfo]{footnosepline}{footsepline=false} @@ -461,11 +518,13 @@ \begingroup% \def\@tempc{% \endgroup% - \KOMA@unkown@keyval{cleardoublepage}{#1}{% + \KOMA@unknown@keyval{cleardoublepage}{#1}{% 'current' or any defined pagestyle e.g. 'empty','plain'}% }% \ifstr{#1}{current}{% - \let\cleardoublepage\cleardoublestandardpage + \def\@tempc{\endgroup% + \let\cleardoublepage\cleardoublestandardpage + }% }{% \ifnotundefined{ps@#1}{% \def\@tempc{\endgroup% @@ -488,7 +547,7 @@ cleardoublepage=plain% } \KOMA@DeclareObsoleteOption[\PackageInfo]{cleardoublestandard}{% - cleardoublepage=standard% + cleardoublepage=current% } %%% From File: scrkfloa.dtx \newif\if@tablecaptionabove\@tablecaptionabovefalse @@ -539,6 +598,15 @@ \newif\if@dynlist \DeclareOption{listsleft}{\@dynlisttrue} \DeclareOption{listsindent}{\@dynlistfalse} +\newcommand*{\@chapterlistsgap}{10\p@} +\newif\if@chaptertolists\@chaptertolistsfalse +\KOMA@key{chapteratlists}[entry]{% + \ifstr{#1}{entry}{% + \@chaptertoliststrue\renewcommand*{\@chapterlistsgap}{\z@}% + }{% + \@chaptertolistsfalse\renewcommand*{\@chapterlistsgap}{#1}% + }% +} %%% From File: scrkbib.dtx \DeclareOption{openbib}{% \AtEndOfPackage{% @@ -587,32 +655,259 @@ draft=false,headsepline=false,footsepline=false,parskip=false% ,twoside=false% } -\ExecuteOptions{% - bigheadings% - ,abstractoff% -} \ProcessOptions\relax +%%% From File: scrkcomp.dtx %%% From File: scrkfont.dtx -\@tempcnta=10 -\advance\@tempcnta by\@ptsize -\xdef\@tempa{% - size% - \the\@tempcnta.clo} -\InputIfFileExists{\@tempa}{}{% - \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!% - }% - \batchmode \csname @@end\endcsname \end +\newcommand*{\changefontsizes}[2][1.2\@tempdima]{% + \ClassWarning{\KOMAClassName}{% + Using fallback calculation to setup font sizes\MessageBreak + for basic size `#2'}% + \@defaultunits\@tempdima#2pt\relax\@nnil + \setlength{\@tempdimc}{\@tempdima}% + \addtolength{\@tempdimc}{-10\p@}% + \edef\@ptsize{\strip@pt\@tempdimc}% + \@defaultunits\@tempdimb#1pt\relax\@nnil + \setlength{\@tempdimc}{\dimexpr (100\@tempdimb / \@tempdima * \p@)}% + \edef\@tempb{\the\@tempdimc}% + \setlength{\@tempdimc}{\@tempdima}% + \def\@tempa##1##2##3##4##5\@nnil{\def##1{##2.##3##4}}% + \expandafter\@tempa\expandafter\@tempb\@tempb\@nnil% + \setlength{\abovedisplayskip}{% + \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}% + \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}% + \setlength{\belowdisplayskip}{\abovedisplayskip}% + \setlength{\belowdisplayshortskip}{% + .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}% + \edef\normalsize{% + \noexpand\@setfontsize\noexpand\normalsize + {\the\@tempdima}{\the\@tempdimb}% + \abovedisplayskip \the\abovedisplayskip + \abovedisplayshortskip \the\abovedisplayshortskip + \belowdisplayskip \the\belowdisplayskip + \belowdisplayshortskip \the\belowdisplayshortskip + \let\noexpand\@listi\noexpand\@listI + }% + \setlength{\@tempdima}{0.9125\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \setlength{\abovedisplayskip}{% + \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}% + \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}% + \setlength{\belowdisplayskip}{\abovedisplayskip}% + \setlength{\belowdisplayshortskip}{% + .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}% + \edef\small{% + \noexpand\@setfontsize\noexpand\small + {\the\@tempdima}{\the\@tempdimb}% + \abovedisplayskip \the\abovedisplayskip + \abovedisplayshortskip \the\abovedisplayshortskip + \belowdisplayskip \the\belowdisplayskip + \belowdisplayshortskip \the\belowdisplayshortskip + \let\noexpand\@listi\noexpand\@listi@small + }% + \setlength{\@tempdima}{.83334\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \setlength{\abovedisplayskip}{% + \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}% + \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}% + \setlength{\belowdisplayskip}{\abovedisplayskip}% + \setlength{\belowdisplayshortskip}{% + .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}% + \edef\footnotesize{% + \noexpand\@setfontsize\noexpand\footnotesize + {\the\@tempdima}{\the\@tempdimb}% + \abovedisplayskip \the\abovedisplayskip + \abovedisplayshortskip \the\abovedisplayshortskip + \belowdisplayskip \the\belowdisplayskip + \belowdisplayshortskip \the\belowdisplayshortskip + \let\noexpand\@listi\noexpand\@listi@footnotesize + }% + \setlength{\@tempdima}{.66667\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\scriptsize{% + \noexpand\@setfontsize\noexpand\scriptsize + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{.5\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\tiny{% + \noexpand\@setfontsize\noexpand\tiny + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.2\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\large{% + \noexpand\@setfontsize\noexpand\large + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.44\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Large{% + \noexpand\@setfontsize\noexpand\Large + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.728\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\LARGE{% + \noexpand\@setfontsize\noexpand\LARGE + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.074\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\huge{% + \noexpand\@setfontsize\noexpand\huge + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.488\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Huge{% + \noexpand\@setfontsize\noexpand\Huge + {\the\@tempdima}{\the\@tempdimb}% + }% + \normalsize + \setlength{\footnotesep}{.7\@tempdimc}% + \setlength{\skip\footins}{.9\@tempdimc \@plus .3333\@tempdimc \@minus + .6\@tempdimc}% + \setlength{\floatsep}{\@tempdimc \@plus .1667\@tempdimc \@minus + .3333\@tempdimc}% + \setlength{\textfloatsep}{1.6667\@tempdimc \@plus .1667\@tempdimc \@minus + .3333\@tempdimc}% + \setlength{\intextsep}{\@tempb\@tempdimc \@plus .3333\@tempdimc \@minus + .3333\@tempdimc}% + \setlength{\dblfloatsep}{\@tempb\@tempdimc \@plus .1667\@tempdimc \@minus + .3333\@tempdimc}% + \setlength{\dbltextfloatsep}{\textfloatsep}% + \setlength{\@fptop}{0\p@ \@plus 1fil}% + \setlength{\@fpsep}{.8333\@tempdimc \@plus 2fil}% + \setlength{\@fpbot}{\@fptop}% + \setlength{\@dblfptop}{0\p@ \@plus 1fil}% + \setlength{\@dblfpsep}{.8333\@tempdimc \@plus 2fil}% + \setlength{\@dblfpbot}{\@fptop}% + \setlength{\partopsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus + .16667\@tempdimc}% + \setlength{\topsep}{.8333\@tempdimc \@plus .3333\@tempdimc \@minus + .5\@tempdimc}% + \setlength{\parsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}% + \@tempswafalse + \begingroup + \def\@list@extra{\aftergroup\@tempswatrue}% + \csname @listi\endcsname + \endgroup + \edef\@listi{\leftmargin\leftmargini + \topsep \the\topsep + \parsep \the\parsep + \itemsep \parsep + \if@tempswa\noexpand\@list@extra\fi + }% + \let\@listI\@listi + \setlength{\topsep}{.75\@tempdimc \@plus .25\@tempdimc \@minus + .41667\@tempdimc}% + \setlength{\parsep}{.375\@tempdimc \@plus .16667\@tempdimc \@minus \p@}% + \@tempswafalse + \begingroup + \def\@list@extra{\aftergroup\@tempswatrue}% + \csname @listi\endcsname + \endgroup + \edef\@listi@small{\leftmargin\leftmargini + \topsep \the\topsep + \parsep \the\parsep + \itemsep \parsep + \if@tempswa\noexpand\@list@extra\fi + }% + \setlength{\topsep}{.5\@tempdimc \@plus .16667\@tempdimc \@minus + .16667\@tempdimc}% + \setlength{\parsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus \p@}% + \@tempswafalse + \begingroup + \def\@list@extra{\aftergroup\@tempswatrue}% + \csname @listi\endcsname + \endgroup + \edef\@listi@footnotesize{\leftmargin\leftmargini + \topsep \the\topsep + \parsep \the\parsep + \itemsep \parsep + \if@tempswa\noexpand\@list@extra\fi + }% + \setlength{\topsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}% + \setlength{\parsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}% + \@tempswafalse + \begingroup + \def\@list@extra{\aftergroup\@tempswatrue}% + \csname @listii\endcsname + \endgroup + \edef\@listii{\leftmargin\leftmarginii + \labelwidth=\dimexpr \leftmargin-\labelsep + \topsep \the\topsep + \parsep \the\parsep + \itemsep \parsep + \if@tempswa\noexpand\@list@extra\fi + }% + \setlength{\topsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}% + \setlength{\parsep}{\p@ \@plus\z@ \@minus\p@}% + \@tempswafalse + \begingroup + \def\@list@extra{\aftergroup\@tempswatrue}% + \csname @listiii\endcsname + \endgroup + \edef\@listiii{\leftmargin\leftmarginiii + \labelwidth=\dimexpr \leftmargin-\labelsep + \topsep \the\topsep + \parsep \z@ + \partopsep \the\parsep + \itemsep \topsep + \if@tempswa\noexpand\@list@extra\fi + }% + \@tempswafalse + \begingroup + \def\@list@extra{\aftergroup\@tempswatrue}% + \csname @listiv\endcsname + \endgroup + \def\@listiv{\leftmargin\leftmarginiv + \labelwidth=\dimexpr \leftmargin-\labelsep + \if@tempswa\noexpand\@list@extra\fi + }% + \@tempswafalse + \begingroup + \def\@list@extra{\aftergroup\@tempswatrue}% + \csname @listv\endcsname + \endgroup + \def\@listv{\leftmargin\leftmarginv + \labelwidth=\dimexpr \leftmargin-\labelsep + \if@tempswa\noexpand\@list@extra\fi + }% + \@tempswafalse + \begingroup + \def\@list@extra{\aftergroup\@tempswatrue}% + \csname @listvi\endcsname + \endgroup + \def\@listvi{\leftmargin\leftmarginvi + \labelwidth=\dimexpr \leftmargin-\labelsep + \if@tempswa\noexpand\@list@extra\fi + }% + \@listi +} +\providecommand*{\@fontsizefilebase}{scrsize} +\expandafter\@defaultunits\expandafter\@tempdima\@ptsize pt\relax\@nnil +\edef\@tempa{\@ptsize}% +\setlength{\@tempdimb}{\@tempdima}% +\edef\@tempb{\strip@pt\@tempdimb}% +\addtolength{\@tempdimb}{-10\p@}% +\edef\@ptsize{\strip@pt\@tempdimb}% +\InputIfFileExists{\@fontsizefilebase\@tempa.clo}{ + \ClassInfo{\KOMAClassName}{% + File `\@fontsizefilebase\@tempa.clo' used to setup font sizes}% +}{% + \InputIfFileExists{\@fontsizefilebase\@tempb pt.clo}{% + \ClassInfo{\KOMAClassName}{% + File `\@fontsizefilebase\@tempb pt.clo' used instead of\MessageBreak + file `\@fontsizefilebase\@tempa.clo' to setup font sizes}% + }{% + \InputIfFileExists{size\@tempb.clo}{% + \ClassInfo{\KOMAClassName}{% + File `size\@tempb.clo' used to setup font sizes}% + }{% + \changefontsizes{\@tempa}% + }% + }% } \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} @@ -654,7 +949,7 @@ }% }% } -\ifundefined{unexpanded}{% +\scr@ifundefined{unexpanded}{% \newcommand*{\g@addto@macro@temp}{}% \newcommand{\l@addto@macro}[2]{% \begingroup% @@ -718,8 +1013,10 @@ `#1' that is an alias of element `\csname scr@fnt@instead@#1\endcsname'\MessageBreak }% + \expandafter\expandafter\expandafter\usekomafont + \expandafter\expandafter\expandafter{% + \csname scr@fnt@instead@#1\endcsname}% }% - \@nameuse{scr@fnt@instead@#1}% }{% \@nameuse{scr@fnt@#1}% }% @@ -969,7 +1266,7 @@ \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 + \ifdim\parskip>\z@\topsep\z@\parsep\parskip\itemsep\z@\fi } \@lowpenalty = 51 \@medpenalty =151 @@ -1004,8 +1301,9 @@ \noindent\@extratitle\next@tpage\cleardoublepage \thispagestyle{empty}% \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative \ifx\@titlehead\@empty \else - \noindent\begin{minipage}[t]{\textwidth}% + \begin{minipage}[t]{\textwidth}% \@titlehead \end{minipage}\par \fi @@ -1031,11 +1329,11 @@ \@thanks \vfill\null \if@twoside\next@tpage - \noindent\begin{minipage}[t]{\textwidth} + \begin{minipage}[t]{\textwidth} \@uppertitleback \end{minipage}\par \vfill - \noindent\begin{minipage}[b]{\textwidth} + \begin{minipage}[b]{\textwidth} \@lowertitleback \end{minipage} \fi @@ -1132,8 +1430,9 @@ \ifx\@extratitle\@empty \else \noindent\@extratitle \next@tpage \if@twoside \null\next@tpage \fi \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative \ifx\@titlehead\@empty \else - \noindent\begin{minipage}[t]{\textwidth} + \begin{minipage}[t]{\textwidth} \@titlehead \end{minipage}\par \fi @@ -1247,7 +1546,7 @@ \addtocounter{#1}{-1}\scr@sect{#1}% } \BeforeClosingMainAux{% - \if@autodot\if@filesw\write\@mainaux{% + \if@autodot\if@filesw\immediate\write\@mainaux{% \string\global\string\@altsecnumformattrue}% \fi\fi} \newcommand*\autodot{\if@altsecnumformat.\fi} @@ -1271,9 +1570,11 @@ \renewcommand*{\thesubparagraph}{% \theparagraph.\@arabic\c@subparagraph } -\newcommand*{\othersectionlevelsformat}[1]{% - \csname the#1\endcsname\autodot\enskip} -\renewcommand*{\@seccntformat}{\protect\othersectionlevelsformat} +\newcommand*{\othersectionlevelsformat}[3]{#3\autodot\enskip} +\renewcommand*{\@seccntformat}[1]{% + \protect\othersectionlevelsformat{#1}{% + \expandafter\aftergroup\noexpand\@gobble}{\csname the#1\endcsname}% +} \newcommand*\partname{Part} \newcommand*\abstractname{Abstract} \newcommand*\appendixname{Appendix} @@ -1306,10 +1607,10 @@ \interlinepenalty \@M \normalfont\sectfont\nobreak \ifnum \c@secnumdepth >\m@ne - \size@partnumber\partformat + \size@partnumber{\partformat}% \partheadmidvskip \fi - \size@part #2\strut% + \size@part{#2}\strut% \partmark{#1}\par \endgroup \nobreak @@ -1322,7 +1623,7 @@ \raggedpart \interlinepenalty \@M \normalfont - \sectfont\nobreak\size@part #1\strut\@mkboth{}{}\par + \sectfont\nobreak\size@part{#1}\strut\@mkboth{}{}\par \endgroup \nobreak \partheadendvskip @@ -1350,36 +1651,43 @@ \newcommand\section{\@startsection{section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% - {\raggedsection\normalfont\sectfont\nobreak\size@section\nobreak}% + {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\setlength{\parfillskip}{\z@ + plus 1fil}\fi + \raggedsection\normalfont\sectfont\size@section}% } \newcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% - {\raggedsection\normalfont\sectfont\nobreak\size@subsection\nobreak + {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\setlength{\parfillskip}{\z@ + plus 1fil}\fi + \raggedsection\normalfont\sectfont\size@subsection }% } \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% - {\raggedsection\normalfont\sectfont\nobreak\size@subsubsection - \nobreak + {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\setlength{\parfillskip}{\z@ + plus 1fil}\fi + \raggedsection\normalfont\sectfont\size@subsubsection }% } \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% - {\raggedsection\normalfont\sectfont\nobreak\size@paragraph\nobreak}% + {\raggedsection\normalfont\sectfont\size@paragraph}% } \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% - {\raggedsection\normalfont\sectfont\nobreak\size@subparagraph - \nobreak - }% + {\raggedsection\normalfont\sectfont\size@subparagraph}% } +\newkomafont{minisec}{} \newcommand\minisec[1]{\@afterindentfalse \vskip 1.5ex {\parindent \z@ - \raggedsection\normalfont\sectfont\nobreak#1\par\nobreak}\nobreak% + \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax + \setlength{\parfillskip}{\z@ plus 1fil}\fi + \raggedsection\normalfont\sectfont + \usekomafont{minisec}#1\par\nobreak}\nobreak% \@afterheading } \newcommand*{\raggedsection}{} @@ -1402,7 +1710,6 @@ \newcommand*{\scr@fnt@subsubsection}{\size@subsubsection} \newcommand*{\scr@fnt@paragraph}{\size@paragraph} \newcommand*{\scr@fnt@subparagraph}{\size@subparagraph} -\aliaskomafont{minisec}{disposition} \aliaskomafont{sectioning}{disposition} \newcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax @@ -1421,18 +1728,25 @@ \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par - \if@compatibility - \global\@nobreaktrue - \everypar{\global\@nobreakfalse\everypar{}}% + \ifnum \scr@compatibility>\@nameuse{scr@v@2.96} + \endgroup + \penalty20010 \else - \penalty\@highpenalty - \fi - \endgroup + \if@compatibility + \global\@nobreaktrue + \everypar{\global\@nobreakfalse\everypar{}}% + \else + \penalty\@highpenalty + \fi + \endgroup + \fi \fi } \newcommand*\l@section[2]{% \ifnum \c@tocdepth >\z@ - \addpenalty{\@secpenalty}% + \ifnum \lastpenalty<20009 + \addpenalty{\@secpenalty}% + \fi \addvspace{1.0em \@plus\p@}% \setlength\@tempdima{1.5em}% \if@tocleft @@ -1446,14 +1760,38 @@ \leavevmode \sectfont \advance\leftskip\@tempdima \hskip -\leftskip - #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par\nobreak \endgroup + \ifnum \scr@compatibility>\@nameuse{scr@v@2.96} + \penalty20008 + \fi + \fi +} +\newcommand*\l@subsection{\bprot@dottedtocline{2}{1.5em}{2.3em}} +\newcommand*\l@subsubsection{\bprot@dottedtocline{3}{3.8em}{3.2em}} +\newcommand*\l@paragraph{\bprot@dottedtocline{4}{7.0em}{4.1em}} +\newcommand*\l@subparagraph{\bprot@dottedtocline{5}{10em}{5em}} +\newcommand*{\bprot@dottedtocline}[5]{% + \ifnum \scr@compatibility>\@nameuse{scr@v@2.96} + \ifnum #1>\c@tocdepth \else + \begingroup + \@tempcnta 20010 + \advance \@tempcnta by -#1 + \ifnum \@tempcnta>\lastpenalty + \endgroup + \addpenalty{\@lowpenalty}% + \else + \endgroup + \fi + \@dottedtocline{#1}{#2}{#3}{#4}{#5}% + \@tempcnta 20009 + \advance \@tempcnta by -#1 + \penalty\@tempcnta + \fi + \else + \@dottedtocline{#1}{#2}{#3}{#4}{#5}% \fi } -\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} -\newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} -\newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} -\newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} %%% From File: scrkmisc.dtx \newif\if@restonecol \newcommand{\dictum}[2][]{\par% @@ -1732,9 +2070,8 @@ \ifdim \@tempdimb<2em \ClassWarning{\KOMAClassName}{% caption beside will be very, very small.\MessageBreak - In most cases this will result in overfull and - underfull\MessageBreak - \string\hbox\space messages% + In most cases this will result in overfull and\MessageBreak + underfull \string\hbox\space messages% }% \fi \onelinecaptionsfalse @@ -1842,6 +2179,13 @@ \newcommand*{\setcapwidth}[2][]{% \begingroup% \setlength{\@tempdima}{#2}% + \ifdim\@tempdima <\z@ + \@tempdima\z@ + \ClassWarning{\KOMAClassName}{% + caption width less than 0pt not allowed.\MessageBreak + Setting caption width to 0pt% + }% + \fi \edef\@tempa{\endgroup\def\noexpand\cap@width{\the\@tempdima}}% \@tempa \begingroup |