diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrreprt.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrreprt.cls | 628 |
1 files changed, 515 insertions, 113 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls b/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls index b98fa5ee2f8..ad85f3dd205 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls +++ b/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls @@ -6,6 +6,7 @@ %% %% scrkvers.dtx (with options: `class,report') %% scrkbase.dtx (with options: `load') +%% scrkcomp.dtx (with options: `class,report,option') %% scrkmisc.dtx (with options: `class,report,option') %% scrklang.dtx (with options: `class,report,option') %% scrkfont.dtx (with options: `class,report,option') @@ -21,6 +22,7 @@ %% scrkidx.dtx (with options: `class,report,option') %% scrklist.dtx (with options: `class,report,option') %% scrkmisc.dtx (with options: `class,report,execoption') +%% scrkcomp.dtx (with options: `class,report,body') %% scrkfont.dtx (with options: `class,report,body') %% scrklang.dtx (with options: `class,report,body') %% scrktare.dtx (with options: `class,report,body') @@ -37,7 +39,7 @@ %% scrklist.dtx (with options: `class,report,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}{% scrreprt% @@ -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,13 +374,15 @@ %%% From File: scrktitl.dtx \newif\if@titlepage \@titlepagetrue -\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 \newif\if@openright +\@openrightfalse \DeclareOption{openright}{\@openrighttrue} \DeclareOption{openany}{\@openrightfalse} \DeclareOption{pointednumbers}{% @@ -463,15 +520,20 @@ If you'll continue, option `smallheadings' will be used% }% } -\newif\if@chapterprefix -\DeclareOption{chapterprefix}{\@chapterprefixtrue} -\DeclareOption{nochapterprefix}{\@chapterprefixfalse} -\DeclareOption{appendixprefix}{% - \def\appendixmore{\@chapterprefixtrue}% -} -\DeclareOption{noappendixprefix}{% - \def\appendixmore{\@chapterprefixfalse}% +\@bigheadings +\newif\if@chapterprefix\@chapterprefixfalse +\KOMA@ifkey{chapterprefix}{@chapterprefix} +\KOMA@DeclareObsoleteOption{nochapterprefix}{chapterprefix=false} +\KOMA@key{appendixprefix}[true]{% + \KOMA@set@ifkey{appendixprefix}{@tempswa}{#1}% + \if@tempswa + \def\appendixmore{\@chapterprefixtrue}% + \else + \def\appendixmore{\@chapterprefixfalse}% + \fi } +\KOMA@DeclareObsoleteOption[\ClassInfo]{noappendixprefix}{% + appendixprefix=false} %%% From File: scrkpage.dtx \newif\if@hsl \KOMA@key{headsepline}[true]{% @@ -479,7 +541,7 @@ \@ifpackageloaded{typearea}{% \KOMAoptions{headinclude=#1}% }{% - \PassOptionsToPackage{typearea}{headinclude=#1}% + \PassOptionsToPackage{headinclude=#1}{typearea}% }% } \KOMA@DeclareObsoleteOption[\PackageInfo]{headnosepline}{headsepline=false} @@ -489,7 +551,7 @@ \@ifpackageloaded{typearea}{% \KOMAoptions{footinclude=#1}% }{% - \PassOptionsToPackage{typearea}{footinclude=#1}% + \PassOptionsToPackage{footinclude=#1}{typearea}% }% } \KOMA@DeclareObsoleteOption[\PackageInfo]{footnosepline}{footsepline=false} @@ -497,11 +559,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% @@ -524,7 +588,7 @@ cleardoublepage=plain% } \KOMA@DeclareObsoleteOption[\PackageInfo]{cleardoublestandard}{% - cleardoublepage=standard% + cleardoublepage=current% } %%% From File: scrkfloa.dtx \newif\if@tablecaptionabove\@tablecaptionabovefalse @@ -575,6 +639,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{% @@ -624,32 +697,259 @@ draft=false,headsepline=false,footsepline=false,parskip=false% ,twoside=false% } -\ExecuteOptions{% - bigheadings% - ,nochapterprefix,openany,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} @@ -691,7 +991,7 @@ }% }% } -\ifundefined{unexpanded}{% +\scr@ifundefined{unexpanded}{% \newcommand*{\g@addto@macro@temp}{}% \newcommand{\l@addto@macro}[2]{% \begingroup% @@ -755,8 +1055,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}% }% @@ -1006,7 +1308,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 @@ -1041,8 +1343,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 @@ -1068,11 +1371,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 @@ -1169,8 +1472,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 @@ -1287,7 +1591,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} @@ -1298,7 +1602,7 @@ \newcounter{chapter} \renewcommand*{\thechapter}{\@arabic\c@chapter} \newcommand*{\chapterformat}{% - \chapappifchapterprefix{\ }\thechapter\autodot\enskip + \mbox{\chapappifchapterprefix{~}\thechapter\autodot\enskip}% } \newcommand*\chaptermarkformat{\chapappifchapterprefix{\ }% \thechapter\autodot\enskip} @@ -1317,9 +1621,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*\chaptername{Chapter} \newcommand*\abstractname{Abstract} @@ -1378,10 +1684,10 @@ \interlinepenalty \@M \normalfont\sectfont\nobreak \ifnum \c@secnumdepth >-2\relax - \size@partnumber\partformat + \size@partnumber{\partformat}% \partheadmidvskip \fi - \size@part #2\strut% + \size@part{#2}\strut% \partmark{#1}\par \endgroup \@endpart @@ -1392,7 +1698,7 @@ \raggedpart \interlinepenalty \@M \normalfont - \sectfont\nobreak\size@part #1\strut\@mkboth{}{}\par + \sectfont\nobreak\size@part{#1}\strut\@mkboth{}{}\par \endgroup \@endpart } @@ -1476,25 +1782,47 @@ \refstepcounter{chapter}% \@maybeautodot\thechapter \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}#1}% - \else - \addcontentsline{toc}{chapter}{#1}% + \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}% + \if@chaptertolists + \addcontentsline{lof}{chapteratlist}{% + \protect\numberline{\thechapter}#1}% + \addcontentsline{lot}{chapteratlist}{% + \protect\numberline{\thechapter}#1}% + \@ifundefined{float@addtolists}{}{% + \float@addtolists{% + \protect\contentsline{chapteratlist}{% + \protect\numberline{\thechapter}#1}{\thepage}% + }% + }% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \if@chaptertolists + \addcontentsline{lof}{chapteratlist}{#1}% + \addcontentsline{lot}{chapteratlist}{#1}% + \@ifundefined{float@addtolists}{}{% + \float@addtolists{% + \protect\contentsline{chapteratlist}{#1}{\thepage}% + }% + }% \fi - \chaptermark{#1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% + \fi + \chaptermark{#1}% + \ifdim \@chapterlistsgap>\z@ + \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% + \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% \@ifundefined{float@addtolists}{}{% - \float@addtolists{\protect\addvspace{10\p@}}% + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% }% - \if@twocolumn - \if@at@twocolumn - \@makechapterhead{#2}% - \else - \@topnewpage[\@makechapterhead{#2}]% - \fi - \else + \fi + \if@twocolumn + \if@at@twocolumn \@makechapterhead{#2}% + \else + \@topnewpage[\@makechapterhead{#2}]% + \fi + \else + \@makechapterhead{#2}% \@afterheading \fi } @@ -1504,19 +1832,27 @@ \use@preamble{chapter@u}\nobreak } \newcommand*{\@@makechapterhead}[1]{\chapterheadstartvskip - {\normalfont\sectfont\size@chapter + {% \setlength{\parindent}{\z@}\setlength{\parfillskip}{\fill}% + \normalfont\sectfont\size@chapter{}% \if@chapterprefix \let\@tempa\raggedsection \else \let\@tempa\@hangfrom \fi \@tempa{\ifnum \c@secnumdepth >\m@ne% - \chapterformat + \if@chapterprefix + \expandafter\size@chapterprefix + \else + \expandafter\size@chapter + \fi + {\chapterformat}% + \if@chapterprefix + \size@chapterprefix{}\endgraph\nobreak\vskip.5\baselineskip + \fi \fi }% - \if@chapterprefix\par\nobreak\vskip.5\baselineskip\fi - {\raggedsection \interlinepenalty \@M #1\par}}% + {\raggedsection \interlinepenalty \@M \size@chapter{#1}\par}}% \nobreak\chapterheadendvskip } \newcommand*{\@schapter}[1]{% @@ -1533,9 +1869,9 @@ } \newcommand*{\@@makeschapterhead}[1]{% \chapterheadstartvskip% - {\normalfont\sectfont\size@chapter + {\normalfont\sectfont\size@chapter{}% \setlength{\parindent}{\z@}\setlength{\parfillskip}{\fill}% - \raggedsection \interlinepenalty \@M #1\par}% + \raggedsection \interlinepenalty \@M \size@chapter{#1}\par}% \nobreak\chapterheadendvskip% } \newcommand*{\@makeschapterhead}[1]{% @@ -1552,6 +1888,24 @@ \newcommand*{\@addchap}{} \def\@addchap[#1]#2{\@schapter{#2}% \addcontentsline{toc}{chapter}{#1}% + \if@chaptertolists + \addcontentsline{lof}{chapteratlist}{#1}% + \addcontentsline{lot}{chapteratlist}{#1}% + \@ifundefined{float@addtolists}{}{% + \float@addtolists{% + \protect\contentsline{chapteratlist}{#1}{\thepage}% + }% + }% + \fi + \ifnum \@nameuse{scr@v@2.96}<\scr@compatibility + \ifdim \@chapterlistsgap>\z@ + \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% + \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% + \@ifundefined{float@addtolists}{}{% + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% + }% + \fi + \fi \if@twoside\@mkboth{#1}{}\else\@mkboth{}{#1}\fi } \newcommand*{\@saddchap}[1]{\@schapter{#1}\@mkboth{}{}} @@ -1564,36 +1918,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}{} @@ -1604,6 +1965,7 @@ \newcommand*{\size@part}{} \newcommand*{\size@partnumber}{} \newcommand*{\size@chapter}{} +\newcommand*{\size@chapterprefix}{\size@chapter} \newcommand*{\size@section}{} \newcommand*{\size@subsection}{} \newcommand*{\size@subsubsection}{} @@ -1613,12 +1975,12 @@ \newcommand*{\scr@fnt@part}{\size@part} \newcommand*{\scr@fnt@partnumber}{\size@partnumber} \newcommand*{\scr@fnt@chapter}{\size@chapter} +\newcommand*{\scr@fnt@chapterprefix}{\size@chapterprefix} \newcommand*{\scr@fnt@section}{\size@section} \newcommand*{\scr@fnt@subsection}{\size@subsection} \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*{\use@preamble}[1]{% \@ifundefined{#1@preamble}{}{% @@ -1749,13 +2111,20 @@ \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par - \penalty\@highpenalty - \endgroup + \ifnum \scr@compatibility>\@nameuse{scr@v@2.96} + \endgroup + \penalty20010 + \else + \penalty\@highpenalty + \endgroup + \fi \fi } \newcommand*\l@chapter[2]{% \ifnum \c@tocdepth >\m@ne - \addpenalty{-\@highpenalty}% + \ifnum \lastpenalty<20010 + \addpenalty{-\@highpenalty}% + \fi \vskip 1.0em \@plus\p@ \setlength\@tempdima{1.5em}% \if@tocleft @@ -1770,15 +2139,42 @@ \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par - \penalty\@highpenalty - \endgroup + \ifnum \scr@compatibility>\@nameuse{scr@v@2.96} + \endgroup + \penalty20009 + \else + \penalty\@highpenalty + \endgroup + \fi + \fi +} +\newcommand*{\l@chapteratlist}{\l@chapter} +\newcommand*\l@section{\bprot@dottedtocline{1}{1.5em}{2.3em}} +\newcommand*\l@subsection{\bprot@dottedtocline{2}{3.8em}{3.2em}} +\newcommand*\l@subsubsection{\bprot@dottedtocline{3}{7.0em}{4.1em}} +\newcommand*\l@paragraph{\bprot@dottedtocline{4}{10em}{5em}} +\newcommand*\l@subparagraph{\bprot@dottedtocline{5}{12em}{6em}} +\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@section{\@dottedtocline{1}{1.5em}{2.3em}} -\newcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} -\newcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} -\newcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}} -\newcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}} %%% From File: scrkmisc.dtx \newif\if@restonecol \newcommand{\dictum}[2][]{\par% @@ -2066,9 +2462,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 @@ -2176,6 +2571,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 |