diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrartcl.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrartcl.cls | 556 |
1 files changed, 343 insertions, 213 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls b/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls index df79c3f9c47..befb01b633b 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls +++ b/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls @@ -23,6 +23,7 @@ %% scrkernel-bibliography.dtx (with options: `class,article,option') %% scrkernel-index.dtx (with options: `class,article,option') %% scrkernel-listsandtabulars.dtx (with options: `class,article,option') +%% scrkernel-sections.dtx (with options: `class,article,execoption') %% scrkernel-miscellaneous.dtx (with options: `class,article,execoption') %% scrkernel-compatibility.dtx (with options: `class,article,body') %% scrkernel-fonts.dtx (with options: `class,article,body') @@ -73,7 +74,7 @@ %% find a complete unmodified copy of LaTeX2e at %% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>. %% -%%% From File: $Id: scrkernel-version.dtx 2089 2015-05-06 06:10:29Z kohm $ +%%% From File: $Id: scrkernel-version.dtx 2149 2015-07-02 08:07:30Z kohm $ \begingroup \catcode`\@11\relax \ifx\KOMAScriptVersion\undefined @@ -95,9 +96,9 @@ \fi } \fi - \@CheckKOMAScriptVersion{2015/05/06 v3.17a KOMA-Script}% + \@CheckKOMAScriptVersion{2015/07/02 v3.18 KOMA-Script}% \endgroup -\providecommand*{\scr@clsextenstion}{\@clsextenstion} +\providecommand*{\scr@clsextension}{\@clsextension} \AtBeginDocument{% \let\scr@clsextension\@clsextension } @@ -110,19 +111,20 @@ \newcommand*{\KOMAClassFileName}{\KOMAClassName.\@clsextension} \edef\KOMAClassFileName{\KOMAClassFileName} \ProvidesClass{\KOMAClassName}[% - 2015/05/06 v3.17a KOMA-Script + 2015/07/02 v3.18 KOMA-Script document class (\ClassName)% ] -%%% From File: $Id: scrkernel-basics.dtx 2011 2015-03-17 11:39:55Z kohm $ +%%% From File: $Id: scrkernel-basics.dtx 2140 2015-06-17 10:15:52Z kohm $ \RequirePackage{scrkbase}[\KOMAScriptVersion] -%%% From File: $Id: tocbasic.dtx 2041 2015-03-25 08:42:54Z kohm $ +%%% From File: $Id: tocbasic.dtx 2146 2015-06-20 06:38:46Z kohm $ \RequirePackage{tocbasic}[% - 2015/05/06 v3.17a KOMA-Script + 2015/07/02 v3.18 KOMA-Script ] \addtotoclist{toc} \addtotoclist[float]{lof} \addtotoclist[float]{lot} -%%% From File: $Id: scrkernel-sections.dtx 2079 2015-04-20 07:12:08Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 2131 2015-06-10 18:17:51Z kohm $ +%%% (run: prepare) \newcommand*{\scr@dotchangeatdocument}[1]{% \ClassError{\KOMAClassName}{% change of end dot feature after \string\begin{document}% @@ -151,13 +153,29 @@ } \newcommand*{\size@part}{} \newcommand*{\size@partnumber}{} +\newcommand*{\scr@part@beforeskip}{% + 4ex +} +\newcommand*{\scr@part@afterskip}{% + 3ex +} +\newcommand*{\scr@part@style}{part} +\newcommand*{\partheadstartvskip}{% + \addvspace{\@tempskipa}% +} +\newcommand*{\partheadmidvskip}{% + \par\nobreak +} +\newcommand*{\partheadendvskip}{% + \vskip\@tempskipa +} \newcommand*{\size@section}{} \newcommand*{\size@subsection}{} \newcommand*{\size@subsubsection}{} \newcommand*{\size@paragraph}{} \newcommand*{\size@subparagraph}{} \newcommand*{\sectfont}{\normalcolor\sffamily\bfseries} -%%% From File: $Id: scrkernel-compatibility.dtx 2089 2015-05-06 06:10:29Z kohm $ +%%% From File: $Id: scrkernel-compatibility.dtx 2101 2015-05-14 10:20:33Z kohm $ \newif\if@scr@emulatestandardclasses \let\scr@emulatestandardclassestrue\relax \let\scr@emulatestandardclassesfalse\relax @@ -275,6 +293,8 @@ \@namedef{scr@v@3.16}{14} \@namedef{scr@v@3.17}{15} \@namedef{scr@v@3.17a}{15} +\@namedef{scr@v@3.17c}{15} +\@namedef{scr@v@3.18}{15} \@namedef{scr@v@last}{15} \newcommand*{\scr@v@is@lt}[1]{% \scr@compatibility<\@nameuse{scr@v@#1} @@ -378,7 +398,7 @@ \KOMAClassFileName }{fontsize}{#1}% } -%%% From File: $Id: scrkernel-typearea.dtx 2088 2015-05-03 09:09:14Z kohm $ +%%% From File: $Id: scrkernel-typearea.dtx 2108 2015-05-20 18:11:25Z kohm $ \newcommand*{\@BCOR}{\expandafter\@@BCOR\CurrentOption BCORBCOR\@@BCOR} \newcommand*{\@@BCOR}{} \def\@@BCOR #1BCOR#2BCOR#3\@@BCOR{% @@ -679,7 +699,8 @@ \KOMA@ifkey{abstract}{@abstrt} \KOMA@DeclareStandardOption{abstracton}{abstract=true} \KOMA@DeclareStandardOption{abstractoff}{abstract=false} -%%% From File: $Id: scrkernel-sections.dtx 2079 2015-04-20 07:12:08Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 2131 2015-06-10 18:17:51Z kohm $ +%%% (run: option) \KOMA@key{numbers}{% \KOMA@set@ncmdkey{numbers}{@tempa}{% {autoendperiod}{0},{autoenddot}{0},{auto}{0},% @@ -705,7 +726,6 @@ \fi \fi } -\KOMA@kav@add{.\KOMAClassFileName}{numbers}{autoendperiod} \KOMA@DeclareDeprecatedOption{pointednumbers}{numbers=enddot} \KOMA@DeclareDeprecatedOption{pointlessnumbers}{numbers=noenddot} \KOMA@ifkey{sectionentrydots}{@sectionentrywithdots} @@ -805,7 +825,7 @@ \KOMA@DeclareDeprecatedOption{bigheadings}{headings=big} \KOMA@DeclareDeprecatedOption{normalheadings}{headings=normal} \KOMA@DeclareDeprecatedOption{smallheadings}{headings=small} -%%% From File: $Id: scrkernel-pagestyles.dtx 2019 2015-03-20 08:35:36Z kohm $ +%%% From File: $Id: scrkernel-pagestyles.dtx 2130 2015-06-10 09:36:46Z kohm $ \newif\if@hsl \KOMA@key{headsepline}[true]{% \KOMA@set@ifkey{headsepline}{@hsl}{#1}% @@ -1135,31 +1155,34 @@ \csname FN@mf@prepare\endcsname \ifhmode\spacefactor\@x@sf\fi \relax} -%%% From File: $Id: scrkernel-listsof.dtx 2001 2015-03-12 11:29:57Z kohm $ +%%% From File: $Id: scrkernel-listsof.dtx 2134 2015-06-15 11:34:28Z kohm $ \newif\if@tocleft \KOMA@key{toc}{% \KOMA@set@ncmdkey{toc}{@tempa}{% {noindex}{0},{noidx}{0},% {index}{1},{idx}{1},% - {nolistof}{2},% - {listof}{3},% - {listofnumbered}{4},{numberedlistof}{4},% - {nobibliography}{5},{nobib}{5},% - {bibliography}{6},{bib}{6},% - {bibliographynumbered}{7},{bibnumbered}{7},{numberedbibliography}{7},% - {numberedbib}{7},% - {flat}{8},{left}{8},% - {graduated}{9},{indent}{9},{indented}{9},% - {indenttextentries}{10},{indentunnumbered}{10},{numberline}{10},% - {leftaligntextentries}{11},{leftalignunnumbered}{11},{nonumberline}{11},% - {sectionentrywithdots}{12},{sectionentrydotfill}{12}, - {sectionentrywithoutdots}{13},{sectionentryfill}{13}% + {indexnumbered}{2},% + {nolistof}{3},% + {listof}{4},% + {listofnumbered}{5},{numberedlistof}{5},% + {nobibliography}{6},{nobib}{6},% + {bibliography}{7},{bib}{7},% + {bibliographynumbered}{8},{bibnumbered}{8},{numberedbibliography}{8},% + {numberedbib}{8},% + {flat}{9},{left}{9},% + {graduated}{10},{indent}{10},{indented}{10},% + {indenttextentries}{11},{indentunnumbered}{11},{numberline}{11},% + {leftaligntextentries}{12},{leftalignunnumbered}{12},{nonumberline}{12},% + {sectionentrywithdots}{13},{sectionentrydotfill}{13}, + {sectionentrywithoutdots}{14},{sectionentryfill}{14}% }{#1}% \ifx\FamilyKeyState\FamilyKeyStateProcessed - \ifcase \@tempa\relax % index + \ifcase \@tempa\relax % noindex \KOMAoptions{index=notoc}% - \or % noindex + \or % index \KOMAoptions{index=totoc}% + \or % indexnumbered + \KOMAoptions{index=numbered}% \or % listof \KOMAoptions{listof=notoc}% \or % nolistof @@ -1349,7 +1372,7 @@ \KOMA@DeclareDeprecatedOption{liststotocnumbered}{listof=numbered} \KOMA@DeclareDeprecatedOption{listsleft}{listof=flat} \KOMA@DeclareDeprecatedOption{listsindent}{listof=graduated} -%%% From File: $Id: scrkernel-bibliography.dtx 2001 2015-03-12 11:29:57Z kohm $ +%%% From File: $Id: scrkernel-bibliography.dtx 2144 2015-06-17 15:38:01Z kohm $ \newcommand{\newbibstyle}[3][]{% \scr@ifundefinedorrelax{scr@bibstyle@#2}{% \scr@ifundefinedorrelax{scr@bibstyle@#1}{% @@ -1414,10 +1437,18 @@ \newcommand*\bib@heading{% \ifbib@leveldown \subsection*{\refname}% - \ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{\refname}}\fi + \scr@ifundefinedorrelax{@mkright}{% + \ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{\refname}}\fi + }{% + \@mkright{\MakeMarkcase{\refname}}% + }% \else \section*{\refname}% - \@mkboth{\MakeMarkcase{\refname}}{\MakeMarkcase{\refname}}% + \scr@ifundefinedorrelax{@mkdouble}{% + \@mkboth{\MakeMarkcase{\refname}}{\MakeMarkcase{\refname}}% + }{% + \@mkdouble{\MakeMarkcase{\refname}}% + }% \fi }% \newif\ifbib@leveldown @@ -1511,46 +1542,100 @@ \KOMA@DeclareStandardOption{openbib}{bibliography=openstyle} \KOMA@DeclareDeprecatedOption{bibtotoc}{bibliography=totoc} \KOMA@DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered} -%%% From File: $Id: scrkernel-index.dtx 2001 2015-03-12 11:29:57Z kohm $ +%%% From File: $Id: scrkernel-index.dtx 2134 2015-06-15 11:34:28Z kohm $ \newcommand*{\idx@@heading}{% - \section* + \ifidx@leveldown + \expandafter\subsection + \else + \expandafter\section + \fi*% } +\newif\ifidx@leveldown \KOMA@key{index}{% \KOMA@set@ncmdkey{index}{@tempa}{% {notoc}{0},{nottotoc}{0},{default}{0},{plainheading}{0},% - {totoc}{1},{toc}{1},{notnumbered}{1}% + {totoc}{1},{toc}{1},{notnumbered}{1},% + {numbered}{2},{totocnumbered}{2},% + {leveldown}{3},% + {standardlevel}{4}% }{#1}% \ifx\FamilyKeyState\FamilyKeyStateProcessed - \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}% - \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}% - \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}% - \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}% \ifcase \@tempa\relax + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}% \KOMA@kav@add{.\KOMAClassFileName}{toc}{noindex}% \KOMA@kav@add{.\KOMAClassFileName}{index}{notoc}% \renewcommand*{\idx@@heading}{% - \section* + \ifidx@leveldown + \expandafter\subsection + \else + \expandafter\section + \fi*% }% \or + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}% \KOMA@kav@add{.\KOMAClassFileName}{toc}{index}% \KOMA@kav@add{.\KOMAClassFileName}{index}{toc}% \renewcommand*{\idx@@heading}{% - \addsec + \ifidx@leveldown + \expandafter\subsection\expandafter* + \else + \expandafter\addsec + \fi + }% + \or + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{indexnumbered}% + \KOMA@kav@add{.\KOMAClassFileName}{index}{numbered}% + \renewcommand*{\idx@@heading}{% + \ifidx@leveldown + \expandafter\subsection + \else + \expandafter\section + \fi }% + \or + \KOMA@kav@remove{.\KOMAClassFileName}{index}{leveldown}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{standardlevel}% + \KOMA@kav@add{.\KOMAClassFileName}{index}{leveldown}% + \idx@leveldowntrue + \or + \KOMA@kav@remove{.\KOMAClassFileName}{index}{leveldown}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{standardlevel}% + \KOMA@kav@add{.\KOMAClassFileName}{index}{standardlevel}% + \idx@leveldownfalse \fi \fi } \KOMA@kav@add{.\KOMAClassFileName}{toc}{noindex} \KOMA@kav@add{.\KOMAClassFileName}{index}{notoc} +\KOMA@kav@add{.\KOMAClassFileName}{index}{standardlevel} \KOMA@DeclareDeprecatedOption{idxtotoc}{index=totoc} %%% From File: $Id: scrkernel-listsandtabulars.dtx 2028 2015-03-23 12:19:51Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 2131 2015-06-10 18:17:51Z kohm $ +%%% (run: execoption) +\KOMAExecuteOptions{numbers=autoendperiod} %%% From File: $Id: scrkernel-miscellaneous.dtx 2028 2015-03-23 12:19:51Z kohm $ \KOMAExecuteOptions{% parskip=false,% headings=big% } \KOMAProcessOptions\relax -%%% From File: $Id: scrkernel-compatibility.dtx 2089 2015-05-06 06:10:29Z kohm $ +%%% From File: $Id: scrkernel-compatibility.dtx 2101 2015-05-14 10:20:33Z kohm $ %%% From File: $Id: scrkernel-fonts.dtx 2063 2015-04-03 11:55:42Z kohm $ \newcommand*\scr@setlength[4]{% \expandafter\ifnum\scr@v@is@lt{3.12}\relax @@ -1994,7 +2079,7 @@ 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}% -%%% From File: $Id: scrkernel-typearea.dtx 2088 2015-05-03 09:09:14Z kohm $ +%%% From File: $Id: scrkernel-typearea.dtx 2108 2015-05-20 18:11:25Z kohm $ \let\@BCOR =\relax \let\@@BCOR =\relax \let\@DIV =\relax @@ -2504,7 +2589,8 @@ \fi } \newcommand*\abstractname{Abstract} -%%% From File: $Id: scrkernel-sections.dtx 2079 2015-04-20 07:12:08Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 2131 2015-06-10 18:17:51Z kohm $ +%%% (run: body) \setcounter{secnumdepth}{3} \newcommand*{\ifnumbered}[1]{% \scr@ifundefinedorrelax{#1numdepth}{% @@ -2528,6 +2614,10 @@ \fi }% } +\BeforeClosingMainAux{% + \if@autodot\if@filesw\immediate\write\@mainaux{% + \string\global\string\@altsecnumformattrue}% + \fi\fi} \newcommand{\@maybeautodot}[1]{\if@autodot\else\begingroup% \expandafter\@@maybeautodot #1\@stop\endgroup\fi } @@ -2568,7 +2658,7 @@ \newcommand*{\scr@startsection}[6]{% \if@noskipsec \leavevmode \fi \par - \@tempskipa #4\relax + \@tempskipa \glueexpr #4\relax \@afterindenttrue \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse @@ -2579,10 +2669,16 @@ \else \addpenalty\@secpenalty\addvspace\@tempskipa \fi - \@ifstar - {\csname scr@preto@ssect@hook\endcsname\@ssect{#3}{#4}{#5}{#6}}% - {\csname scr@preto@sect@hook\endcsname - \scr@section@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}% + \@ifstar {% + \csname scr@preto@ssect@hook\endcsname + \@ssect{\glueexpr #3\relax}{\glueexpr #4\relax}{\glueexpr #5\relax}{#6}% + }{% + \csname scr@preto@sect@hook\endcsname + \scr@section@dblarg{% + \@sect{#1}{\numexpr #2\relax}{\glueexpr #3\relax}{\glueexpr #4\relax}% + {\glueexpr #5\relax}{#6}% + }% + }% } \else \ClassWarningNoLine{\KOMAClassName}{`\string\@startsection' has been @@ -2603,9 +2699,14 @@ }% \let\scr@saved@startsection\@startsection \newcommand*{\scr@startsection}[6]{% - \@ifstar - {\scr@saved@startsection{#1}{#2}{#3}{#4}{#5}{#6}*}% - {\scr@section@dblarg{\scr@saved@startsection{#1}{#2}{#3}{#4}{#5}{#6}}}% + \@ifstar {% + \scr@saved@startsection{#1}{\numexpr #2\relax}{\glueexpr #3\relax}% + {\glueexpr #4\relax}{\glueexpr #5\relax}{#6}*% + }{% + \scr@section@dblarg{% + \scr@saved@startsection{#1}{\numexpr #2\relax}{\glueexpr #3\relax}% + {\glueexpr #4\relax}{\glueexpr #5\relax}{#6}}% + }% } \fi \newcommand*{\At@startsection}[1]{% @@ -2701,18 +2802,19 @@ \setkeys{KOMAarg.section}{tocentry={#7},head={#7}}% \fi \fi - \ifnum #2>\c@secnumdepth + \let\IfUsePrefixLine\@secondoftwo + \ifnum \numexpr #2\relax>\c@secnumdepth \let\@svsec\@empty \else \refstepcounter{#1}% \expandafter\@maybeautodot\csname the#1\endcsname \protected@edef\@svsec{\@seccntformat{#1}\relax}% \fi - \@tempskipa #5\relax + \@tempskipa \glueexpr #5\relax\relax \ifdim \@tempskipa>\z@ \begingroup #6{% - \@hangfrom{\hskip #3\relax\@svsec}% + \@hangfrom{\hskip \glueexpr #3\relax\@svsec}% \interlinepenalty \@M #8\@@par}% \endgroup \expandafter\csname #1mark\expandafter\endcsname\expandafter{\scr@ds@head}% @@ -2723,7 +2825,7 @@ \addtocentrydefault{#1}{##1}{##2}% }% }{}% - \ifnum #2>\c@secnumdepth + \ifnum \numexpr #2\relax>\c@secnumdepth \csname add#1tocentry\endcsname{}{\scr@ds@tocentry}% \else \csname add#1tocentry\endcsname{\csname the#1\endcsname}{% @@ -2732,10 +2834,10 @@ \fi \else \def\@svsechd{% - #6{\hskip #3\relax + #6{\hskip \glueexpr #3\relax \@svsec #8}% - \expandafter\csname #1mark\expandafter\endcsname\expandafter{% - \scr@ds@head}% + \expandafter\csname #1mark\expandafter\endcsname + \expandafter{\scr@ds@head}% \ifx\scr@ds@tocentry\@empty\else \scr@ifundefinedorrelax{add#1tocentry}{% \expandafter\global\expandafter\def @@ -2743,7 +2845,7 @@ \addtocentrydefault{#1}{####1}{####2}% }% }{}% - \ifnum #2>\c@secnumdepth + \ifnum \numexpr #2\relax>\c@secnumdepth \csname add#1tocentry\endcsname{}{\scr@ds@tocentry}% \else \csname add#1tocentry\endcsname{\csname the#1\endcsname}{% @@ -2752,7 +2854,8 @@ \fi }% \fi - \@xsect{#5}% + \let\IfUsePrefixLine\scr@IfUsePrefixLineWarning + \@xsect{\glueexpr #5\relax}% } \DefineFamily{KOMAarg} \DefineFamilyMember[.section]{KOMAarg} @@ -2765,10 +2868,23 @@ \ifx\relax#2\relax\@scr@tempswafalse\else\@scr@tempswatrue\fi } \newif\if@scr@tempswa -\BeforeClosingMainAux{% - \if@autodot\if@filesw\immediate\write\@mainaux{% - \string\global\string\@altsecnumformattrue}% - \fi\fi} +\newcommand*{\scr@IfUsePrefixLineWarning}[2]{% + \ClassWarning{\KOMAClassName}{% + usage of \string\IfUsePrefixLine\space outside + section command\MessageBreak + style makes no sense, because the behaviour not only\MessageBreak + depends on class options but also on the run-time\MessageBreak + section command style.\MessageBreak + Neither the then-code nor the else-code will be\MessageBreak + executed.\MessageBreak + You may change this and avoid the warning by LOCALLY\MessageBreak + setting \string\IsUsePrefixLine\space to either + \string\@firstoftwo\space or\MessageBreak + \string\@secondoftwo\space before using it% + }% +} +\newcommand*{\IfUsePrefixLine}[2]{} +\let\IfUsePrefixLine\scr@IfUsePrefixLineWarning \newcommand*{\raggedsection}{} \let\raggedsection\raggedright \DefineFamily{KOMAarg} @@ -2837,13 +2953,36 @@ \DeclareSectionCommandStyleLengthOption{section} {afterskip}{scr@}{@afterskip} \DeclareSectionCommandStyleFontOption{section}{font}{}{} +\newcommand*{\scr@dsc@def@style@section@command}[1]{% + \@namedef{#1}{% + \scr@startsection{#1}% + {\csname #1numdepth\endcsname}% + {\csname scr@#1@sectionindent\endcsname}% + {\csname scr@#1@beforeskip\endcsname}% + {\csname scr@#1@afterskip\endcsname}% + {% + \ifdim\glueexpr\csname scr@#1@beforeskip\endcsname <\z@ + \expandafter\ifnum\scr@v@is@gt{2.96}\relax + \setlength{\parfillskip}{\z@ plus 1fil}% + \fi + \fi + \raggedsection\normalfont\sectfont\nobreak + \usekomafont{#1}% + }% + }% +} \newcommand*{\scr@dsc@style@part@options}{} \DeclareSectionCommandStyleLengthOption{part} {beforeskip}{scr@}{@beforeskip} \DeclareSectionCommandStyleLengthOption{part} {afterskip}{scr@}{@afterskip} \DeclareSectionCommandStyleFontOption{part}{font}{}{} -\DeclareSectionCommandStyleFontOption{part}{prefixfont}{}{number} +\DeclareSectionCommandStyleFontOption{part}{prefixfont}{}{prefix} +\newcommand*{\scr@dsc@def@style@part@command}[1]{% + \@namedef{#1}{\scr@startpart{#1}}% + \@namedef{@#1}{\scr@@startpart{#1}}% + \@namedef{@s#1}{\scr@@startspart{#1}}% +} \newcommand*{\scr@dsc@style@section@neededoptionstest}{% \scr@ifundefinedorrelax{scr@\scr@dsc@current @sectionindent}{% \scr@declaresectioncommanderror{\scr@dsc@current}{section indent}{indent}% @@ -2872,7 +3011,7 @@ \IfExistskomafont{\scr@dsc@current}{}{% \scr@declaresectioncommanderror{\scr@dsc@current}{font}{font}% }{}% - \IfExistskomafont{\scr@dsc@current number}{}{% + \IfExistskomafont{\scr@dsc@current prefix}{}{% \scr@declaresectioncommanderror{\scr@dsc@current}{number font} {prefixfont}% }{}% @@ -2887,7 +3026,7 @@ \ifscr@dsc@parametersonlytrue \FamilyKeyStateProcessed }{% - \scr@ifundefinedorrelax{scr@start##1}{% + \scr@ifundefinedorrelax{scr@dsc@def@style@##1@command}{% \FamilyKeyStateUnknownValue }{% \@namedef{scr@\scr@dsc@current @style}{##1}% @@ -2963,7 +3102,7 @@ \expandafter\edef\csname scr@\scr@dsc@current @tocindent\endcsname{% \the\@tempskipa}% \else - \expandafter\edef\csname scr@\scr@dsc@current @tocindent\endcsname{ + \expandafter\edef\csname scr@\scr@dsc@current @tocindent\endcsname{% ##1}% \fi \fi @@ -3019,7 +3158,9 @@ empty section style option% }% \else - \scr@ifundefinedorrelax{scr@start\@nameuse{scr@#2@style}}{% + \scr@ifundefinedorrelax{% + scr@dsc@def@style@\@nameuse{scr@#2@style}@command% + }{% \ClassWarning{\KOMAClassName}{% not defining `\expandafter\string\csname #2\endcsname' due\MessageBreak @@ -3027,28 +3168,7 @@ `\@nameuse{scr@#2@style}'% }% }{% - \expandafter\edef\csname #2\endcsname{% - \expandafter\noexpand - \csname scr@start\csname scr@#2@style\endcsname\endcsname - {#2}% - \expandafter\noexpand\csname #2numdepth\endcsname - \expandafter\noexpand\csname scr@#2@sectionindent\endcsname - \expandafter\noexpand\csname scr@#2@beforeskip\endcsname - \expandafter\noexpand\csname scr@#2@afterskip\endcsname{% - \noexpand\ifdim\noexpand\glueexpr - \expandafter\noexpand\csname scr@#2@beforeskip\endcsname - <\noexpand\z@ - \unexpanded{% - \expandafter\ifnum\scr@v@is@gt{2.96}\relax - \setlength{\parfillskip}{\z@ plus 1fil}% - \fi - }% - \noexpand\fi - \unexpanded{% - \raggedsection\normalfont\sectfont\nobreak\usekomafont{#2}% - }% - }% - }% + \@nameuse{scr@dsc@def@style@\@nameuse{scr@#2@style}@command}{#2}% }% \fi \@ifundefined{DeclareSectionNumberDepth}{% @@ -3079,6 +3199,7 @@ }{}% }% }% + \let\scr@dsc@current\relax } \newcommand*{\scr@declaresectioncommanderror}[3]{% \ClassError{\KOMAClassName}{% @@ -3264,61 +3385,61 @@ \gdef\thesection{\@Alph\c@section}% \csname appendixmore\endcsname } -\newcommand*{\partnumdepth}{% - \z@ -} -\newcommand*{\scr@part@beforeskip}{% - 4ex -} -\newcommand*{\partheadstartvskip}{% - \addvspace{\@tempskipa}% -} -\newcommand*{\partheadmidvskip}{% - \par\nobreak -} -\newcommand*{\scr@part@afterskip}{% - 3ex -} -\newcommand*{\partheadendvskip}{% - \vskip\@tempskipa -} -\newcommand*{\scr@part@style}{part} -\newcommand\part{\par - \@tempskipa=\glueexpr\scr@part@beforeskip\relax +\newcommand*{\scr@startpart}[1]{% + \par + \@tempskipa=\glueexpr\@nameuse{scr@#1@beforeskip}\relax\relax \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi - \partheadstartvskip% + \partheadstartvskip \@afterindentfalse - \SecDef\@part\@spart + \expandafter\SecDef\csname @#1\expandafter\endcsname\csname @s#1\endcsname } -\newcommand*{\@part}{} -\def\@part[#1]#2{% +\newcommand{\scr@@startpart}{} +\long\def\scr@@startpart#1[#2]#3{% \ifnum \scr@osectarg=\z@ \@scr@tempswafalse \else - \scr@istest#1=\@nil + \scr@istest#2=\@nil \fi \if@scr@tempswa - \setkeys{KOMAarg.section}{tocentry={#2},head={#2},#1}% + \setkeys{KOMAarg.section}{tocentry={#3},head={#3},#2}% \else \ifcase \scr@osectarg\relax - \setkeys{KOMAarg.section}{tocentry={#1},head={#1}}% + \setkeys{KOMAarg.section}{tocentry={#2},head={#2}}% \or - \setkeys{KOMAarg.section}{tocentry={#2},head={#1}}% + \setkeys{KOMAarg.section}{tocentry={#3},head={#2}}% \or - \setkeys{KOMAarg.section}{tocentry={#1},head={#2}}% + \setkeys{KOMAarg.section}{tocentry={#2},head={#3}}% \or - \setkeys{KOMAarg.section}{tocentry={#1},head={#1}}% + \setkeys{KOMAarg.section}{tocentry={#2},head={#2}}% \fi \fi - \ifnumbered{part}{% - \refstepcounter{part}% + \ifnumbered{#1}{% + \refstepcounter{#1}% \@maybeautodot\thepart% + \expandafter\@maybeautodot\csname the#1\endcsname + \typeout{#1 \csname the#1\endcsname.}% \ifx\scr@ds@tocentry\@empty\else - \addparttocentry{\thepart}{\scr@ds@tocentry}% + \scr@ifundefinedorrelax{add#1tocentry}{% + \addtocentrydefault{#1}% + }{% + \@nameuse{add#1tocentry}% + }{\csname the#1\endcsname}{\scr@ds@tocentry}% \fi }{% + \expandafter\ifnum\scr@v@is@lt{3.18}\relax\else + \begingroup + \let\@elt\@stpelt + \csname cl@#1\endcsname + \endgroup + \fi + \typeout{#1 without number}% \ifx\scr@ds@tocentry\@empty\else - \addparttocentry{}{\scr@ds@tocentry}% + \hy@insteadofrefstepcounter{#1}% + \scr@ifundefinedorrelax{add#1tocentry}{% + \addtocentrydefault{#1}% + }{% + \@nameuse{add#1tocentry}% + }{}{\scr@ds@tocentry}% \fi }% \begingroup @@ -3326,91 +3447,83 @@ \raggedpart \interlinepenalty \@M \normalfont\sectfont\nobreak - \ifnumbered{part}{% - \size@partnumber{\partformat}% + \ifnumbered{#1}{% + \usekomafont{#1prefix}{\@nameuse{#1format}}% \partheadmidvskip }{}% - \size@part{#2}\strut - \ifx\partmark\@gobble - \@mkboth{}{}\par + \usekomafont{part}{#3}\strut + \expandafter\ifx\csname #1mark\endcsname\@gobble + \@mkboth{}{}% \else - \expandafter\partmark\expandafter{\scr@ds@head}\par + \csname #1mark\expandafter\endcsname\expandafter{\scr@ds@head}% \fi + \par \endgroup \nobreak - \@tempskipa=\glueexpr\scr@part@afterskip\relax + \@tempskipa=\glueexpr\@nameuse{scr@#1@afterskip}\relax\relax \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi \partheadendvskip \@afterheading } -\newcommand*{\@spart}[1]{% +\newcommand{\scr@@startspart}[2]{% + \begingroup + \let\@mkboth\@gobbletwo + \hy@insteadofrefstepcounter{#1}% + \endgroup \begingroup \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative \raggedpart \interlinepenalty \@M \normalfont - \sectfont\nobreak\size@part{#1}\strut\@mkboth{}{}\par + \sectfont\nobreak\usekomafont{#1}{#2}\strut\@mkboth{}{}\par \endgroup \nobreak - \@tempskipa=\glueexpr\scr@part@afterskip\relax + \@tempskipa=\glueexpr\csname scr@#1@afterskip\endcsname\relax\relax \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi \partheadendvskip \@afterheading } +\newcommand*{\hy@insteadofrefstepcounter}[1]{} +\let\hy@insteadofrefstepcounter\@gobble +\BeforePackage{hyperref}{% + \let\scr@orig@chapter\@chapter + \let\scr@orig@schapter\@schapter + \let\scr@orig@addchap\@addchap +} +\AfterPackage!{hyperref}{% + \let\@chapter\scr@orig@chapter + \let\@schapter\scr@orig@schapter + \let\@addchap\scr@orig@addchap + \ifx\hy@insteadofrefstepcounter\@gobble + \renewcommand*{\hy@insteadofrefstepcounter}[1]{% + \Hy@MakeCurrentHrefAuto{#1*}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + }% + \fi +} \newcommand*{\addparttocentry}[2]{% \addtocentrydefault{part}{#1}{#2}% } \newcommand\addpart{% - \par - \partheadstartvskip - \@afterindentfalse \SecDef\@addpart\@saddpart } \newcommand*{\@addpart}{} -\def\@addpart[#1]#2{% - \ifnum \scr@osectarg=\z@ - \@scr@tempswafalse - \else - \scr@istest#1=\@nil - \fi - \if@scr@tempswa - \setkeys{KOMAarg.section}{tocentry={#2},head={#2},#1}% - \else - \ifcase \scr@osectarg\relax - \setkeys{KOMAarg.section}{tocentry={#1},head={#1}}% - \or - \setkeys{KOMAarg.section}{tocentry={#2},head={#1}}% - \or - \setkeys{KOMAarg.section}{tocentry={#1},head={#2}}% - \or - \setkeys{KOMAarg.section}{tocentry={#1},head={#1}}% - \fi - \fi - \csname phantomsection\endcsname - \ifx\scr@ds@tocentry\@empty\else - \expandafter\addparttocentry\expandafter{\expandafter}\expandafter{% - \scr@ds@tocentry}% - \fi - \@spart{#2}% - \expandafter\addpartmark\expandafter{\scr@ds@head}% +\long\def\@addpart[#1]#2{% + \edef\reserved@a{% + \unexpanded{% + \part[{#1}]{#2}% + \c@secnumdepth= + }\the\c@secnumdepth\relax + }% + \c@secnumdepth=\numexpr \partnumdepth-1\relax + \reserved@a } -\newcommand*{\@saddpart}{\@spart} -\newcommand*{\partmark}{} -\let\partmark\@gobble - -\newcommand*\addpartmark[1]{% - \begingroup - \expandafter\let\csname if@mainmatter\expandafter\endcsname - \csname iffalse\endcsname - \c@secnumdepth=-2 - \partmark{#1}% - \endgroup +\newcommand{\@saddpart}[1]{% + \part*{#1}% + \addpartmark{}% } -\newcommand*{\parttocdepth}{\m@ne} -\let\parttocdepth\m@ne -\newcommand*{\scr@part@tocindent}{\z@} -\let\scr@part@tocindent\z@ -\newcommand*{\scr@part@tocnumwidth}{2em} \newcommand*\l@part[2]{% \ifnum \c@tocdepth <\parttocdepth \else \addpenalty{\@secpenalty}% @@ -3448,10 +3561,20 @@ \renewcommand*{\thepart}{\@Roman\c@part} \newcommand*{\partformat}{\partname~\thepart\autodot} \newcommand*\partname{Part} +\newcommand*{\partmark}[1]{\@mkboth{}{}} +\newcommand*\addpartmark[1]{% + \begingroup + \expandafter\let\csname if@mainmatter\expandafter\endcsname + \csname iffalse\endcsname + \c@secnumdepth=\numexpr \partnumdepth-1\relax + \partmark{#1}% + \endgroup +} \newcommand*{\raggedpart}{} \let\raggedpart\raggedsection \newcommand*{\scr@fnt@part}{\size@part} \newcommand*{\scr@fnt@partnumber}{\size@partnumber} +\aliaskomafont{partprefix}{partnumber} \newkomafont{partentry}{\usekomafont{disposition}\large} \newkomafont{partentrypagenumber}{} \newcommand*\l@section[2]{% @@ -3491,33 +3614,21 @@ \fi } \newcommand*{\raggedsectionentry}{} -\newcommand*\addsec{\SecDef\@addsec\@saddsec} +\newcommand\addsec{\SecDef\@addsec\@saddsec} \newcommand*{\@addsec}{} -\def\@addsec[#1]#2{\section*{#2}% - \ifnum \scr@osectarg=\z@ - \@scr@tempswafalse - \else - \scr@istest#1=\@nil - \fi - \if@scr@tempswa - \setkeys{KOMAarg.section}{tocentry={#2},head={#2},#1}% - \else - \ifcase \scr@osectarg\relax - \setkeys{KOMAarg.section}{tocentry={#1},head={#1}}% - \or - \setkeys{KOMAarg.section}{tocentry={#2},head={#1}}% - \or - \setkeys{KOMAarg.section}{tocentry={#1},head={#2}}% - \or - \setkeys{KOMAarg.section}{tocentry={#1},head={#1}}% - \fi - \fi - \ifx\scr@ds@tocentry\@empty\else - \addsectiontocentry{}{\scr@ds@tocentry}% - \fi - \expandafter\addsecmark\expandafter{\scr@ds@head}% +\def\@addsec[#1]#2{% + \edef\reserved@a{% + \unexpanded{% + \section[{#1}]{#2}% + \c@secnumdepth= + }\the\c@secnumdepth\relax + }% + \c@secnumdepth=\numexpr \sectionnumdepth-1\relax + \reserved@a +} +\newcommand*{\@saddsec}[1]{% + \section*{#1}\addsecmark{}% } -\newcommand*{\@saddsec}[1]{\section*{#1}\addsecmark{}} \newkomafont{minisec}{} \newcommand\minisec[1]{% \expandafter\ifnum\scr@v@is@lt{3.13a}\relax @@ -3581,7 +3692,7 @@ } \newcommand*\addsecmark[1]{% \begingroup - \c@secnumdepth=\m@ne + \c@secnumdepth=\numexpr \sectionnumdepth-1\relax \sectionmark{#1}% \endgroup } @@ -3594,6 +3705,13 @@ \newkomafont{sectionentrypagenumber}{} \newkomafont{sectionentrydots}{\normalfont} \DeclareSectionCommand[% + style=part,% + level=\z@,% + toclevel=\m@ne,% + tocindent=\z@,% + tocnumwidth=2em +]{part} +\DeclareSectionCommand[% style=section,% level=1,% indent=\z@,% @@ -3820,7 +3938,7 @@ \let\scr@ttl@@extract\relax }% } -%%% From File: $Id: scrkernel-pagestyles.dtx 2019 2015-03-20 08:35:36Z kohm $ +%%% From File: $Id: scrkernel-pagestyles.dtx 2130 2015-06-10 09:36:46Z kohm $ \newcommand*{\set@tempdima@hw}{% \setlength{\@tempdima}{\textwidth}% \if@mincl @@ -4596,7 +4714,7 @@ \endgroup \@footnotemark } -%%% From File: $Id: scrkernel-listsof.dtx 2001 2015-03-12 11:29:57Z kohm $ +%%% From File: $Id: scrkernel-listsof.dtx 2134 2015-06-15 11:34:28Z kohm $ \renewcommand*{\numberline}[1]{% \numberline@box{% \numberline@prefix @@ -4728,7 +4846,7 @@ \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} \newcommand*\listoftables{\listoftoc{lot}} \let\l@table\l@figure -%%% From File: $Id: scrkernel-bibliography.dtx 2001 2015-03-12 11:29:57Z kohm $ +%%% From File: $Id: scrkernel-bibliography.dtx 2144 2015-06-17 15:38:01Z kohm $ \newcommand*\refname{References} \newcommand*{\bibpreamble}{\relax} \let\bibpreamble\relax @@ -4813,14 +4931,26 @@ } \newcommand{\AfterBibliographyPreamble}{\g@addto@macro\bib@before@hook} \newcommand{\AtEndBibliography}{\g@addto@macro\bib@after@hook} -%%% From File: $Id: scrkernel-index.dtx 2001 2015-03-12 11:29:57Z kohm $ +%%% From File: $Id: scrkernel-index.dtx 2134 2015-06-15 11:34:28Z kohm $ \newcommand*{\index@preamble}{} \let\index@preamble=\relax \newcommand{\setindexpreamble}[1]{\def\index@preamble{#1}} \newcommand*{\idx@heading}{% \twocolumn[% \idx@@heading{\indexname}]% - \@mkboth{\MakeMarkcase{\indexname}}{\MakeMarkcase{\indexname}}% + \ifidx@leveldown + \scr@ifundefinedorrelax{@mkright}{% + \ifx\@mkboth\@gobble\else\markright{\MakeMarkcase{\indexname}}\fi + }{% + \@mkright{\MakeMarkcase{\indexname}}% + }% + \else + \scr@ifundefinedorrelax{@mkdouble}{% + \@mkboth{\MakeMarkcase{\indexname}}{\MakeMarkcase{\indexname}}% + }{% + \@mkdouble{\MakeMarkcase{\indexname}}% + }% + \fi } \newenvironment{theindex}{% \if@twocolumn |