summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-03-07 00:36:15 +0000
committerKarl Berry <karl@freefriends.org>2012-03-07 00:36:15 +0000
commit3c83ff430f9038fe824468a3a6df3cd66cff0016 (patch)
treeecb739f4be1b4e22130fd6c816d320643c3b9110 /Master/texmf-dist/tex/latex/koma-script/scrartcl.cls
parent742ee4652adc1208821c470a0fb7cb97fbe82905 (diff)
koma-script (6mar12)
git-svn-id: svn://tug.org/texlive/trunk@25573 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.cls331
1 files changed, 291 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls b/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls
index 3378a6edbd1..39f9eece68a 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls
+++ b/Master/texmf-dist/tex/latex/koma-script/scrartcl.cls
@@ -40,7 +40,7 @@
%% scrklist.dtx (with options: `class,article,body')
%% scrlogo.dtx (with options: `logo')
%%
-%% Copyright (c) 1994-2011
+%% Copyright (c) 1994-2012
%% Markus Kohm and any individual authors listed elsewhere in this file.
%%
%% This file was generated from file(s) of the KOMA-Script bundle.
@@ -95,7 +95,7 @@
\fi
}
\fi
- \@CheckKOMAScriptVersion{2011/06/16 v3.09a KOMA-Script}%
+ \@CheckKOMAScriptVersion{2012/01/01 v3.10 KOMA-Script}%
\endgroup
\newcommand*{\KOMAClassName}{%
scrartcl%
@@ -185,6 +185,7 @@
\@namedef{scr@v@3.08b}{10}
\@namedef{scr@v@3.09}{10}
\@namedef{scr@v@3.09a}{10}
+\@namedef{scr@v@3.10}{10}
\@namedef{scr@v@last}{10}
%%% From File: scrkmisc.dtx
\KOMA@key{draft}[true]{%
@@ -511,7 +512,10 @@
\KOMA@set@ncmdkey{headings}{@tempa}{%
{big}{0},%
{normal}{1},%
- {small}{2}%
+ {small}{2},%
+ {optiontotocandhead}{10},{optiontoheadandtoc}{10},%
+ {optiontotoc}{11},%
+ {optiontohead}{12}%
}{#1}%
\ifcase \@tempa\relax
\renewcommand*{\size@part}{\Huge}%
@@ -544,11 +548,21 @@
\or
\or
\or
+ \or
+ \scr@activate@xsection{3}%
+ \or
+ \scr@activate@xsection{2}%
+ \or
+ \scr@activate@xsection{1}%
\fi
}
\KOMA@DeclareDeprecatedOption{bigheadings}{headings=big}
\KOMA@DeclareDeprecatedOption{normalheadings}{headings=normal}
\KOMA@DeclareDeprecatedOption{smallheadings}{headings=small}
+\newcommand*{\scr@osectarg}{0}
+\newcommand*{\scr@activate@xsection}[1]{%
+ \renewcommand*{\scr@osectarg}{#1}%
+}
%%% From File: scrkpage.dtx
\newif\if@hsl
\KOMA@key{headsepline}[true]{%
@@ -706,7 +720,7 @@
\fi
\ifstr{#1}{multiple}{%
\let\@footnotemark\scr@footnotemark
- \let\FN@mf@prepare\scr@mf@prepare
+ \def\FN@mf@prepare{\scr@mf@prepare}%
\def\scr@footmisc@options{multiple}%
}{%
\ifstr{#1}{nomultiple}{%
@@ -917,7 +931,7 @@
\scr@bibstyle@oldstyle
\newcommand*\bib@heading{%
\section*{\refname}%
- \@mkboth{\refname}{\refname}%
+ \@mkboth{\MakeMarkcase{\refname}}{\MakeMarkcase{\refname}}%
}
\KOMA@key{bibliography}{%
\scr@ifundefinedorrelax{scr@bibstyle@#1}{%
@@ -931,17 +945,18 @@
\ifcase \@tempa\relax
\renewcommand*\bib@heading{%
\section*{\refname}%
- \@mkboth{\refname}{\refname}%
+ \@mkboth{\MakeMarkcase{\refname}}{\MakeMarkcase{\refname}}%
}%
\or% totoc
\renewcommand*\bib@heading{%
\addsec{\refname}%
- \@mkboth{\refname}{\refname}%
+ \@mkboth{\MakeMarkcase{\refname}}{\MakeMarkcase{\refname}}%
}%
\or% numbered
\renewcommand*\bib@heading{%
\section{\refname}%
- \@mkboth{\sectionmarkformat \refname}{\sectionmarkformat \refname}%
+ \@mkboth{\MakeMarkcase{\sectionmarkformat \refname}}%
+ {\MakeMarkcase{\sectionmarkformat \refname}}%
}
\fi
}{%
@@ -1277,19 +1292,30 @@
\setlength{\normallineskip}{\p@}
\setlength{\columnsep}{10\p@}
\setlength{\columnseprule}{\z@}
-\newcommand*{\scr@selectfont}{}\let\scr@selectfont\selectfont
+\newcommand*{\scr@selectfont}{}
+\expandafter\let\expandafter\scr@selectfont\csname selectfont \endcsname
\BeforePackage{everysel}{%
- \ifx\selectfont\scr@new@selectfont\else
- \ClassWarningNoLine{\KOMAClassName}{discard change of \string\selectfont}%
- \fi
- \let\selectfont\scr@selectfont
+ \AtBeginDocument{%
+ \expandafter\ifx\csname selectfont \endcsname\scr@new@selectfont\else
+ \ClassWarningNoLine{\KOMAClassName}{discard change of \string\selectfont}%
+ \fi
+ \expandafter\let\csname selectfont \endcsname\scr@selectfont
+ }%
}
\AfterPackage{everysel}{%
- \g@addto@macro\selectfont{\par@update}%
- \let\scr@new@selectfont\selectfont
+ \g@addto@macro\@EverySelectfont@Init{%
+ \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}%
+ \expandafter\let\expandafter\scr@new@selectfont\csname selectfont \endcsname
+ }%
}
-\g@addto@macro\selectfont{\par@update}
-\newcommand*{\scr@new@selectfont}{}\let\scr@new@selectfont\selectfont
+\AfterPackage{tracefnt}{%
+ \expandafter\let\expandafter\scr@selectfont\csname selectfont \endcsname
+ \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}%
+ \expandafter\let\expandafter\scr@new@selectfont\csname selectfont \endcsname
+}
+\expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}
+\newcommand*{\scr@new@selectfont}{}
+\expandafter\let\expandafter\scr@new@selectfont\csname selectfont \endcsname
\newcommand*{\par@updaterelative}{%
\begingroup
\edef\@tempa{\the\parindent}\ifx\@tempa\f@parindent
@@ -1651,11 +1677,129 @@
\fi
\@@maybeautodot
}
-\let\scr@sect\@sect
-\renewcommand*{\@sect}[1]{\stepcounter{#1}%
- \expandafter\@maybeautodot\csname the#1\endcsname
- \addtocounter{#1}{-1}\scr@sect{#1}%
-}
+\def\@tempa#1#2#3#4#5#6[#7]#8{%
+ \ifnum #2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{#1}%
+ \protected@edef\@svsec{\@seccntformat{#1}\relax}%
+ \fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ #6{%
+ \@hangfrom{\hskip #3\relax\@svsec}%
+ \interlinepenalty \@M #8\@@par}%
+ \endgroup
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}%
+ \fi
+ #7}%
+ \else
+ \def\@svsechd{%
+ #6{\hskip #3\relax
+ \@svsec #8}%
+ \csname #1mark\endcsname{#7}%
+ \addcontentsline{toc}{#1}{%
+ \ifnum #2>\c@secnumdepth \else
+ \protect\numberline{\csname the#1\endcsname}%
+ \fi
+ #7}}%
+ \fi
+ \@xsect{#5}}
+\ifx\@sect\@tempa\else
+ \ClassWarning{\KOMAClassName}{%
+ Unexpected definition of \string\@sect!\MessageBreak
+ Please send an information about this to\MessageBreak
+ the KOMA-Script maintainer!\MessageBreak
+ Maybe LaTeX will be broken by the redefinition\MessageBreak
+ of \string\@sect\space}%
+\fi
+\def\@sect#1#2#3#4#5#6[#7]#8{%
+ \ifnum \scr@osectarg=\z@
+ \@scr@tempswafalse
+ \else
+ \scr@istest#7=\@nil
+ \fi
+ \if@scr@tempswa
+ \setkeys{KOMAarg.section}{tocentry={#8},head={#8},#7}%
+ \else
+ \ifcase \scr@osectarg\relax
+ \setkeys{KOMAarg.section}{tocentry={#7},head={#7}}%
+ \or
+ \setkeys{KOMAarg.section}{tocentry={#8},head={#7}}%
+ \or
+ \setkeys{KOMAarg.section}{tocentry={#7},head={#8}}%
+ \or
+ \setkeys{KOMAarg.section}{tocentry={#7},head={#7}}%
+ \fi
+ \fi
+ \ifnum #2>\c@secnumdepth
+ \let\@svsec\@empty
+ \else
+ \refstepcounter{#1}%
+ \expandafter\@maybeautodot\csname the#1\endcsname
+ \protected@edef\@svsec{\@seccntformat{#1}\relax}%
+ \fi
+ \@tempskipa #5\relax
+ \ifdim \@tempskipa>\z@
+ \begingroup
+ #6{%
+ \@hangfrom{\hskip #3\relax\@svsec}%
+ \interlinepenalty \@M #8\@@par}%
+ \endgroup
+ \expandafter\csname #1mark\expandafter\endcsname\expandafter{\scr@ds@head}%
+ \ifx\scr@ds@tocentry\@empty\else
+ \scr@ifundefinedorrelax{add#1tocentry}{%
+ \expandafter\global\expandafter\def
+ \csname add#1tocentry\endcsname##1##2{%
+ \addtocentrydefault{#1}{##1}{##2}%
+ }%
+ }{}%
+ \ifnum #2>\c@secnumdepth
+ \csname add#1tocentry\endcsname{}{\scr@ds@tocentry}%
+ \else
+ \csname add#1tocentry\endcsname{\csname the#1\endcsname}{%
+ \scr@ds@tocentry}%
+ \fi
+ \fi
+ \else
+ \def\@svsechd{%
+ #6{\hskip #3\relax
+ \@svsec #8}%
+ \expandafter\csname #1mark\expandafter\endcsname\expandafter{%
+ \scr@ds@head}%
+ \ifx\scr@ds@tocentry\@empty\else
+ \scr@ifundefinedorrelax{add#1tocentry}{%
+ \expandafter\global\expandafter\def
+ \csname add#1tocentry\endcsname####1####2{%
+ \addtocentrydefault{#1}{####1}{####2}%
+ }%
+ }{}%
+ \ifnum #2>\c@secnumdepth
+ \csname add#1tocentry\endcsname{}{\scr@ds@tocentry}%
+ \else
+ \csname add#1tocentry\endcsname{\csname the#1\endcsname}{%
+ \scr@ds@tocentry}%
+ \fi
+ \fi
+ }%
+ \fi
+ \@xsect{#5}%
+}
+\DefineFamily{KOMAarg}
+\DefineFamilyMember[.section]{KOMAarg}
+\DefineFamilyKey[.section]{KOMAarg}{tocentry}{\def\scr@ds@tocentry{#1}}
+\DefineFamilyKey[.section]{KOMAarg}{head}{\def\scr@ds@head{#1}}
+\newcommand*\scr@ds@tocentry{}
+\newcommand*\scr@ds@head{}
+\newcommand*{\scr@istest}{}
+\def\scr@istest#1=#2\@nil{%
+ \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}%
@@ -1705,12 +1849,34 @@
}
\newcommand*{\@part}{}
\def\@part[#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
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{part}%
\@maybeautodot\thepart%
- \addparttocentry{\thepart}{#1}%
+ \ifx\scr@ds@tocentry\@empty\else
+ \addparttocentry{\thepart}{\scr@ds@tocentry}%
+ \fi
\else
- \addparttocentry{}{#1}%
+ \ifx\scr@ds@tocentry\@empty\else
+ \addparttocentry{}{\scr@ds@tocentry}%
+ \fi
\fi
\begingroup
\setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
@@ -1721,8 +1887,12 @@
\size@partnumber{\partformat}%
\partheadmidvskip
\fi
- \size@part{#2}\strut%
- \partmark{#1}\par
+ \size@part{#2}\strut
+ \ifx\partmark\@gobble
+ \@mkboth{}{}\par
+ \else
+ \expandafter\partmark\expandafter{\scr@ds@head}\par
+ \fi
\endgroup
\nobreak
\partheadendvskip
@@ -1745,26 +1915,90 @@
}
\newcommand\addpart{%
\par
- \partheadstartvskip%
+ \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
- \addparttocentry{}{#1}%
+ \ifx\scr@ds@tocentry\@empty\else
+ \expandafter\addparttocentry\expandafter{\expandafter}\expandafter{%
+ \scr@ds@tocentry}%
\@spart{#2}%
- \ifx\partmark\@gobble\else\@mkboth{#1}{}\fi
+ \ifx\partmark\@gobble
+ \@mkboth{}{}%
+ \else
+ \expandafter\@mkboth\expandafter{%
+ \expandafter\MakeMarkcase\expandafter{\scr@ds@head}}{}%
+ \fi
}
\newcommand*{\@saddpart}{\@spart}
\newcommand*{\partmark}{}
\let\partmark\@gobble
\newcommand*\addsec{\secdef\@addsec\@saddsec}
\newcommand*{\@addsec}{}
-\def\@addsec[#1]#2{\section*{#2}\addcontentsline{toc}{section}{#1}
- \if@twoside \@mkboth{#1}{}\else \@mkboth{#1}{#1}\fi
+\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
+ \if@twoside
+ \expandafter\@mkboth\expandafter{%
+ \expandafter\MakeMarkcase\expandafter{\scr@ds@head}}{}%
+ \else
+ \expandafter\@mkboth\expandafter{\expandafter}\expandafter{%
+ \expandafter\MakeMarkcase\expandafter{\scr@ds@head}}%
+ \fi
}
\newcommand*{\@saddsec}[1]{\section*{#1}\@mkboth{}{}}
+\newcommand*{\addsectiontocentry}[2]{%
+ \addtocentrydefault{section}{#1}{#2}%
+}
+\newcommand*{\addsubsectiontocentry}[2]{%
+ \addtocentrydefault{subsection}{#1}{#2}%
+}
+\newcommand*{\addparagraphtocentry}[2]{%
+ \addtocentrydefault{paragraph}{#1}{#2}%
+}
+\newcommand*{\addsubparagraphtocentry}[2]{%
+ \addtocentrydefault{subparagraph}{#1}{#2}%
+}
\newcommand\section{\@startsection{section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
@@ -1920,7 +2154,7 @@
\raggeddictum\parbox{\dictumwidth}{%
{\@dictumfont{\raggeddictumtext #2\strut\par}%
\def\@tempa{#1}\ifx\@tempa\@empty\else%
- {\raggeddictumtext\vskip-1ex\hrulefill\par}%
+ {\raggeddictumtext\dictumrule}%
\raggeddictumauthor\@dictumauthorfont\dictumauthorformat{#1}%
\strut\par%
\fi%
@@ -1928,6 +2162,7 @@
}\par%
\endgroup
}
+\newcommand*{\dictumrule}{\vskip-1ex\hrulefill\par}%
\newcommand*{\dictumwidth}{.3333\textwidth}
\newcommand*{\raggeddictum}{\raggedleft}
\newcommand*{\dictumauthorformat}[1]{(#1)}
@@ -1980,7 +2215,7 @@
\DeclareRobustCommand*\textsubscript[1]{%
\@textsubscript{\selectfont#1}%
}
-\newcommand{\@textsubscript}[1]{%
+\providecommand*{\@textsubscript}[1]{%
{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}%
}
%%% From File: scrkpage.dtx
@@ -2040,12 +2275,12 @@
\if@twoside\else\hfil\fi}}}}\hss}%
\renewcommand*{\sectionmark}[1]{%
\if@twoside\expandafter\markboth\else\expandafter\markright\fi
- {\ifnum \c@secnumdepth >\z@%
- \sectionmarkformat\fi ##1}{}}%
+ {\MakeMarkcase{\ifnum \c@secnumdepth >\z@%
+ \sectionmarkformat\fi ##1}}{}}%
\renewcommand*{\subsectionmark}[1]{%
\if@twoside
- \markright{\ifnum \c@secnumdepth >\@ne%
- \subsectionmarkformat\fi ##1}%
+ \markright{\MakeMarkcase{\ifnum \c@secnumdepth >\@ne%
+ \subsectionmarkformat\fi ##1}}%
\fi
}%
}%
@@ -2570,6 +2805,12 @@
\newcommand*{\captionaboveof}{\@captionabovetrue\captionof}
\newcommand*{\captionbelowof}{\@captionabovefalse\captionof}
\BeforePackage{capt-of}{\let\captionof\relax}
+\newenvironment{captionofbeside}[1]{%
+ \def\@captype{#1}%
+ \captionbeside
+}{%
+ \endcaptionbeside
+}
\newcommand*\figurename{Figure}
\newcommand*\tablename{Table}
\newcounter{figure}
@@ -2735,6 +2976,16 @@
\fi
\let\@footnotetext\scr@saved@footnotetext
}
+\BeforePackage{setspace}{%
+ \let\@footnotetext\scr@saved@footnotetext
+}
+\AfterPackage{setspace}{%
+ \let\scr@saved@footnotetext\@footnotetext
+ \renewcommand{\@footnotetext}[1]{%
+ \scr@saved@footnotetext{#1}%
+ \csname FN@mf@prepare\endcsname
+ }%
+}
\newcommand*{\multiplefootnoteseparator}{%
\begingroup\let\thefootnotemark\multfootsep\@makefnmark\endgroup
}
@@ -2815,7 +3066,7 @@
KOMA-Script soon, so it should not be used
}%
\section*{\contentsname}%
- \@mkboth{\contentsname}{\contentsname}%
+ \@mkboth{\MakeMarkcase{\contentsname}}{\MakeMarkcase{\contentsname}}%
}
\newcommand*{\toc@l@number}{}
\newcommand*{\tableofcontents}{%
@@ -2831,7 +3082,7 @@
\newcommand*{\float@listhead}[1]{%
\scr@float@listhead@warning
\float@@listhead{#1}%
- \@mkboth{#1}{#1}%
+ \@mkboth{\MakeMarkcase{#1}}{\MakeMarkcase{#1}}%
\if@dynlist%
\newcommand*{\scr@starttoc}{}%
\let\scr@starttoc=\@starttoc
@@ -2961,7 +3212,7 @@
\newcommand{\setindexpreamble}[1]{\def\index@preamble{#1}}
\newcommand*{\idx@heading}{%
\twocolumn[\idx@@heading{\indexname}]%
- \@mkboth{\indexname}{\indexname}%
+ \@mkboth{\MakeMarkcase{\indexname}}\MakeMarkcase{{\indexname}}%
}
\newenvironment{theindex}{%
\if@twocolumn