diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty | 206 |
1 files changed, 134 insertions, 72 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty b/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty index 6519c581d17..06ed5304056 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty +++ b/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty @@ -13,7 +13,7 @@ %% scrlayer-scrpage.dtx (with options: `interface,trace,scrpage,body') %% scrlogo.dtx (with options: `logo') %% -%% Copyright (c) 2012-2013 Markus Kohm [komascript at gmx info] +%% Copyright (c) 2012-2014 Markus Kohm [komascript at gmx info] %% %% This file was generated from file(s) of the KOMA-Script bundle. %% --------------------------------------------------------------- @@ -45,13 +45,13 @@ %% find a complete unmodified copy of LaTeX2e at %% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>. %% -%%% From File: $Id: scrlayer-scrpage.dtx 1548 2013-12-14 17:36:23Z mjk $ (identify) +%%% From File: $Id: scrlayer-scrpage.dtx 1806 2014-10-16 06:41:25Z kohm $ (identify) \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{scrlayer-scrpage}[% - 14/12/2013 v0.9.1548 + 2014/10/28 v3.14 KOMA-Script package (end user interface for scrlayer)] -%%% From File: $Id: scrlayer.dtx 1480 2013-10-31 10:00:02Z mjk $ (init) +%%% From File: $Id: scrlayer.dtx 1810 2014-10-20 07:35:25Z kohm $ (init) \RequirePackage{scrlayer} \scr@ifundefinedorrelax{scrlayer@AtEndOfPackage}{% \AtEndOfPackage{\let\scrlayer@AtEndOfPackage\@firstofone}% @@ -62,8 +62,11 @@ } \let\scrlayer@AtEndOfPackage\AtEndOfPackage \scrlayerInitInterface -%%% From File: $Id: scrlayer-scrpage.dtx 1548 2013-12-14 17:36:23Z mjk $ (init) +%%% From File: $Id: scrlayer-scrpage.dtx 1806 2014-10-16 06:41:25Z kohm $ (init) \AtEndOfPackage{% + \sls@auto@pagestyleset% +} +\newcommand*{\sls@auto@pagestyleset}{% \scr@ifundefinedorrelax{KOMAClassName}{% \PackageInfoNoLine{scrlayer-scrpage}{% auto-selection of `pagestyleset=standard'}% @@ -75,7 +78,7 @@ {pagestyleset=KOMA-Script}% }% } -%%% From File: $Id: scrlayer.dtx 1480 2013-10-31 10:00:02Z mjk $ (options) +%%% From File: $Id: scrlayer.dtx 1810 2014-10-20 07:35:25Z kohm $ (options) \KOMA@key{markcase}{% \scrlayer@AtEndOfPackage{% \begingroup @@ -209,14 +212,14 @@ \scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @autoremoveinterfaces} \scrlayer@AddCsToInterface{% KV@KOMA.\@currname.\@currext @autoremoveinterfaces@default} -%%% From File: $Id: scrlayer-scrpage.dtx 1548 2013-12-14 17:36:23Z mjk $ (options) +%%% From File: $Id: scrlayer-scrpage.dtx 1806 2014-10-16 06:41:25Z kohm $ (options) \KOMA@key{headwidth}{% \begingroup - \sls@split@at@colon#1::\@nil + \sls@split@at@iicolons#1:::\@nil \ifx\reserved@a\@empty \let\reserved@a\sls@headwidth\fi \edef\reserved@a{% \noexpand\endgroup - \noexpand\sls@set@hf@width{head}{\reserved@b}{\reserved@a}% + \noexpand\sls@set@hf@width{head}{\reserved@b}{\reserved@c}{\reserved@a}% }% \reserved@a \FamilyKeyStateProcessed @@ -225,35 +228,38 @@ \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@headwidth@default} \KOMA@key{footwidth}{% \begingroup - \sls@split@at@colon#1::\@nil + \sls@split@at@iicolons#1::\@nil \ifx\reserved@a\@empty \let\reserved@a\sls@footwidth\fi \edef\reserved@a{% \noexpand\endgroup - \noexpand\sls@set@hf@width{foot}{\reserved@b}{\reserved@a}% + \noexpand\sls@set@hf@width{foot}{\reserved@b}{\reserved@c}{\reserved@a}% }% \reserved@a \FamilyKeyStateProcessed } \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@footwidth} \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@footwidth@default} -\scrlayerAddToInterface\sls@split@at@colon{% - \def\sls@split@at@colon#1:#2:#3\@nil{% - \ifstr{#3}{}{}{% - \ifstr{#3}{:}{}{% - \PackageWarning{scrlayer}{extra `:' found!\MessageBreak - You've used more than one colon at the argument\MessageBreak - of a two value option.\MessageBreak - The extra value(s) will be ignored% +\scrlayerAddToInterface\sls@split@at@iicolons{% + \def\sls@split@at@iicolons#1:#2:#3:#4\@nil{% + \ifstr{#4}{}{}{% + \ifstr{#4}{:}{}{% + \ifstr{#4}{::}{}{% + \PackageWarning{scrlayer}{extra `:' found!\MessageBreak + You've used more than two colons at the argument\MessageBreak + of a two value option.\MessageBreak + The extra value(s) will be ignored% + }% }% }% }% \def\reserved@a{#1}% \def\reserved@b{#2}% + \def\reserved@c{#3}% }% } \scrlayerAddToInterface\sls@set@hf@width{% - \newcommand*{\sls@set@hf@width}[3]{% - \sls@settowidthof{\@tempdima}{#3}% + \newcommand*{\sls@set@hf@width}[4]{% + \sls@settowidthof{\@tempdima}{#4}% \ifdim\@tempdima>\paperwidth \PackageWarning {scrlayer-scrpage}% @@ -286,8 +292,13 @@ \fi }{% \sls@settowidthof{\@tempdimb}{#2}% - } - \addtolength{\@tempdima}{-\@tempdimb}% + }% + \ifstr{#3}{}{% + \addtolength{\@tempdima}{-\@tempdimb}% + }{% + \sls@settowidthof{\@tempdima}{#3}% + \setlength{\@tempdima}{-\@tempdima}% + }% \ifdim\@tempdimb<\z@ \setlength{\@tempdimb}{-\@tempdimb}% \expandafter\edef\csname sls@odd#1shift\endcsname{-\the\@tempdimb}% @@ -453,6 +464,21 @@ \reserved@b }% } +\scrlayerAddToInterface\sls@split@at@colon{% + \def\sls@split@at@colon#1:#2:#3\@nil{% + \ifstr{#3}{}{}{% + \ifstr{#3}{:}{}{% + \PackageWarning{scrlayer}{extra `:' found!\MessageBreak + You've used more than one colon at the argument\MessageBreak + of a two value option.\MessageBreak + The extra value(s) will be ignored% + }% + }% + }% + \def\reserved@a{#1}% + \def\reserved@b{#2}% + }% +} \scrlayerAddToInterface\sls@headabove@linelength{% \newcommand*{\sls@headabove@linelength}{\sls@headwidth}% } @@ -546,6 +572,7 @@ \scr@ifundefinedorrelax{sls@ps@style@#1}{% \FamilyKeyStateUnknownValue }{% + \let\sls@auto@pagestyleset\relax \@nameuse{sls@ps@style@#1}% \FamilyKeyStateProcessed }% @@ -576,24 +603,24 @@ \scr@ifundefinedorrelax{KOMAClassName}{}{% \ifstr{\KOMAClassName}{scrlttr2}{% \clearpairofpagestyles - \lehead[\ifnum\@pageat\z@\pagemark\fi] - {\ifnum\@pageat\z@\pagemark\else\leftmark\fi}% - \lohead[\ifnum\@pageat\z@\pagemark\fi] - {\ifnum\@pageat\z@\pagemark\else\leftmark\fi}% - \chead[\ifnum\@pageat\@ne\pagemark\fi] + \lehead[\ifnum\@pageat=\z@\pagemark\fi] + {\ifnum\@pageat=\z@\pagemark\else\leftmark\fi}% + \lohead[\ifnum\@pageat=\z@\pagemark\fi] + {\ifnum\@pageat=\z@\pagemark\else\leftmark\fi}% + \chead[\ifnum\@pageat=\@ne\pagemark\fi] {\ifcase\@pageat \rightmark\or \pagemark\or \rightmark\fi}% - \rehead[\ifnum\@pageat\tw@\pagemark\fi] + \rehead[\ifnum\@pageat=\tw@\pagemark\fi] {\ifcase\@pageat \leftmark\or \rightmark\or \pagemark \else \rightmark\fi}% - \rohead[\ifnum\@pageat\tw@\pagemark\fi] + \rohead[\ifnum\@pageat=\tw@\pagemark\fi] {\ifcase\@pageat \leftmark\or \rightmark\or \pagemark \else \rightmark\fi}% - \lefoot[\ifnum\@pageat\thr@@\pagemark\fi] - {\ifnum\@pageat\thr@@\pagemark\fi}% - \cfoot[\ifnum\@pageat 4 \pagemark\fi] - {\ifnum\@pageat 4 \pagemark\fi}% - \refoot[\ifnum\@pageat 5 \pagemark\fi] - {\ifnum\@pageat 5 \pagemark\fi}% + \lefoot[\ifnum\@pageat=\thr@@\pagemark\fi] + {\ifnum\@pageat=\thr@@\pagemark\fi}% + \cfoot[\ifnum\@pageat=4 \pagemark\fi] + {\ifnum\@pageat=4 \pagemark\fi}% + \refoot[\ifnum\@pageat=5 \pagemark\fi] + {\ifnum\@pageat=5 \pagemark\fi}% }{}% }% }% @@ -613,9 +640,9 @@ \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@hmode@default}% \scrlayer@AddCsToInterface{sls@leavevmode@linetrue} \scrlayer@AddCsToInterface{sls@leavevmode@linefalse} -%%% From File: $Id: scrlayer.dtx 1480 2013-10-31 10:00:02Z mjk $ (body) +%%% From File: $Id: scrlayer.dtx 1810 2014-10-20 07:35:25Z kohm $ (body) \KOMAProcessOptions\relax -%%% From File: $Id: scrlayer-scrpage.dtx 1548 2013-12-14 17:36:23Z mjk $ (body) +%%% From File: $Id: scrlayer-scrpage.dtx 1806 2014-10-16 06:41:25Z kohm $ (body) \scrlayerAddToInterface\setheadwidth{% \newcommand*{\setheadwidth}[2][]{% \KOMAoptions{headwidth=#2:#1}% @@ -832,8 +859,8 @@ width=\sls@headwidth,% contents={% \sls@secure@box\headheight{% - \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#4}}}}% - ]{#1.head.odd}% + \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#4}}}}}% + ]{#1.head.even}% \DeclareLayer[% background,oddpage,twoside,% head,% @@ -841,8 +868,8 @@ width=\sls@headwidth,% contents={% \sls@secure@box\headheight{% - \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#5}}}}% - ]{#1.head.even}% + \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#5}}}}}% + ]{#1.head.odd}% \DeclareLayer[% background,oddpage,oneside,% head,% @@ -850,7 +877,7 @@ width=\sls@headwidth,% contents={% \sls@secure@box\headheight{% - \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#6}}}}% + \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#6}}}}}% ]{#1.head.oneside}% }% } @@ -914,7 +941,7 @@ contents={% \sls@secure@box\footheight{% \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{#4}}}}% - ]{#1.foot.odd}% + ]{#1.foot.even}% \DeclareLayer[% foreground,oddpage,twoside,% foot,% @@ -923,7 +950,7 @@ contents={% \sls@secure@box\footheight{% \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{#5}}}}% - ]{#1.foot.even}% + ]{#1.foot.odd}% \DeclareLayer[% foreground,oddpage,oneside,% foot,% @@ -990,13 +1017,13 @@ }% } \@ifundefined{scr@fnt@pagehead}{% + \scrlayer@AddCsToInterface{scr@fnt@pagehead}% \@ifundefined{@pageheadfont}{% \newkomafont{pagehead}{}% \scrlayer@AddCsToInterface{@pageheadfont}% }{% \newcommand*{\scr@fnt@pagehead}{\@pageheadfont}% }% - \scrlayer@AddCsToInterface{scr@fnt@pagehead}% }{} \@ifundefined{scr@fnt@pageheadfoot}{% \newcommand*{\scr@fnt@pageheadfoot}{\headfont}% @@ -1005,15 +1032,26 @@ \newcommand*{\headfont}{\normalcolor\slshape}% }{} }{} +\scr@ifundefinedorrelax{scr@wrn@pagehead}{}{% + \PackageInfo{scrlayer-scrpage}{% + deactivating warning for font element\MessageBreak + `pagehead'}% + \let\scr@fnt@wrn@pagehead\relax +} \@ifundefined{scr@fnt@pagefoot}{% - \newcommand*{\scr@fnt@pagefoot}{\footfont}% \scrlayer@AddCsToInterface{scr@fnt@pagefoot}% + \def\scr@fnt@pagefoot{\footfont}% \@ifundefined{footfont}{% \newcommand*{\footfont}{}% \scrlayer@AddCsToInterface{footfont}% }{}% - \let\scr@fnt@wrn@pagefoot\relax }{} +\scr@ifundefinedorrelax{scr@fnt@pagefoot}{}{% + \PackageInfo{scrlayer-scrpage}{% + deactivating warning for font element\MessageBreak + `pagefoot'}% + \let\scr@fnt@wrn@pagefoot\relax +} \scrlayerAddToInterface\sls@hf@rule{% \newcommand*\sls@hf@rule[3]{% \begingroup @@ -1483,31 +1521,40 @@ \DeclarePageStyleAlias{scrplain}{plain.scrheadings} \scrlayerOnAutoRemoveInterface{\DestroyPageStyleAlias{scrplain}} \scrlayerAddToInterface\ihead{% - \newcommand*{\ihead}{\@ifnextchar[{\@@ihead}{\@ihead}}% + \newcommand*{\ihead}{\@ifstar {\@dblarg\@@@ihead}{\@ihead}}% } \scrlayerAddToInterface\@ihead{% - \newcommand*{\@ihead}[1]{\rehead{#1}\lohead{#1}}% + \newcommand*{\@ihead}{\@ifnextchar[{\@@@ihead}{\@@ihead}}% } \scrlayerAddToInterface\@@ihead{% - \newcommand*{\@@ihead}[2][]{\rehead[{#1}]{#2}\lohead[{#1}]{#2}}% + \newcommand*{\@@ihead}[1]{\rehead{#1}\lohead{#1}}% +} +\scrlayerAddToInterface\@@@ihead{% + \newcommand*{\@@@ihead}[2][]{\rehead[{#1}]{#2}\lohead[{#1}]{#2}}% } \scrlayerAddToInterface\ohead{% - \newcommand*{\ohead}{\@ifnextchar[{\@@ohead}{\@ohead}}% + \newcommand*{\ohead}{\@ifstar {\@dblarg\@@@ohead}{\@ohead}}% } \scrlayerAddToInterface\@ohead{% - \newcommand*{\@ohead}[1]{\lehead{#1}\rohead{#1}}% + \newcommand*{\@ohead}{\@ifnextchar[{\@@@ohead}{\@@ohead}}% } \scrlayerAddToInterface\@@ohead{% - \newcommand*{\@@ohead}[2][]{\lehead[{#1}]{#2}\rohead[{#1}]{#2}}% + \newcommand*{\@@ohead}[1]{\lehead{#1}\rohead{#1}}% +} +\scrlayerAddToInterface\@@@ohead{% + \newcommand*{\@@@ohead}[2][]{\lehead[{#1}]{#2}\rohead[{#1}]{#2}}% } \scrlayerAddToInterface\chead{% - \newcommand*{\chead}{\@ifnextchar[{\@@chead}{\@chead}}% + \newcommand*{\chead}{\@ifstar {\@dblarg\@@@chead}{\@chead}}% } \scrlayerAddToInterface\@chead{% - \newcommand*{\@chead}[1]{\cehead{#1}\cohead{#1}}% + \newcommand*{\@chead}{\@ifnextchar[{\@@@chead}{\@@chead}}% } \scrlayerAddToInterface\@@chead{% - \newcommand*{\@@chead}[2][]{\cehead[{#1}]{#2}\cohead[{#1}]{#2}}% + \newcommand*{\@@chead}[1]{\cehead{#1}\cohead{#1}}% +} +\scrlayerAddToInterface\@@@chead{% + \newcommand*{\@@@chead}[2][]{\cehead[{#1}]{#2}\cohead[{#1}]{#2}}% } \scrlayerAddToInterface\lehead{% \newcommand*{\lehead}{\sls@renewelement{even}{left}{head}}% @@ -1528,31 +1575,40 @@ \newcommand*{\cohead}{\sls@renewelement{odd}{middle}{head}}% } \scrlayerAddToInterface\ifoot{% - \newcommand*{\ifoot}{\@ifnextchar[{\@@ifoot}{\@ifoot}}% + \newcommand*{\ifoot}{\@ifstar {\@dblarg\@@@ifoot}{\@ifoot}}% } \scrlayerAddToInterface\@ifoot{% - \newcommand*{\@ifoot}[1]{\refoot{#1}\lofoot{#1}}% + \newcommand*{\@ifoot}{\@ifnextchar[{\@@@ifoot}{\@@ifoot}}% } \scrlayerAddToInterface\@@ifoot{% - \newcommand*{\@@ifoot}[2][]{\refoot[{#1}]{#2}\lofoot[{#1}]{#2}}% + \newcommand*{\@@ifoot}[1]{\refoot{#1}\lofoot{#1}}% +} +\scrlayerAddToInterface\@@@ifoot{% + \newcommand*{\@@@ifoot}[2][]{\refoot[{#1}]{#2}\lofoot[{#1}]{#2}}% } \scrlayerAddToInterface\ofoot{% - \newcommand*{\ofoot}{\@ifnextchar[{\@@ofoot}{\@ofoot}}% + \newcommand*{\ofoot}{\@ifstar {\@dblarg\@@@ofoot}{\@ofoot}}% } \scrlayerAddToInterface\@ofoot{% - \newcommand*{\@ofoot}[1]{\lefoot{#1}\rofoot{#1}}% + \newcommand*{\@ofoot}{\@ifnextchar[{\@@@ofoot}{\@@ofoot}}% } \scrlayerAddToInterface\@@ofoot{% - \newcommand*{\@@ofoot}[2][]{\lefoot[{#1}]{#2}\rofoot[{#1}]{#2}}% + \newcommand*{\@@ofoot}[1]{\lefoot{#1}\rofoot{#1}}% +} +\scrlayerAddToInterface\@@@ofoot{% + \newcommand*{\@@@ofoot}[2][]{\lefoot[{#1}]{#2}\rofoot[{#1}]{#2}}% } \scrlayerAddToInterface\cfoot{% - \newcommand*{\cfoot}{\@ifnextchar[{\@@cfoot}{\@cfoot}}% + \newcommand*{\cfoot}{\@ifstar {\@dblarg\@@@cfoot}{\@cfoot}}% } \scrlayerAddToInterface\@cfoot{% - \newcommand*{\@cfoot}[1]{\cefoot{#1}\cofoot{#1}}% + \newcommand*{\@cfoot}{\@ifnextchar[{\@@@cfoot}{\@@cfoot}}% } \scrlayerAddToInterface\@@cfoot{% - \newcommand*{\@@cfoot}[2][]{\cefoot[{#1}]{#2}\cofoot[{#1}]{#2}}% + \newcommand*{\@@cfoot}[1]{\cefoot{#1}\cofoot{#1}}% +} +\scrlayerAddToInterface\@@@cfoot{% + \newcommand*{\@@@cfoot}[2][]{\cefoot[{#1}]{#2}\cofoot[{#1}]{#2}}% } \scrlayerAddToInterface\lefoot{% \newcommand*{\lefoot}{\sls@renewelement{even}{left}{foot}}% @@ -1574,13 +1630,19 @@ } \scrlayerAddToInterface\sls@renewelement{% \newcommand*{\sls@renewelement}[3]{% + \@ifstar{\@dblarg{\sls@@@@renewelement{#1}{#2}{#3}}}% + {\sls@@renewelement{#1}{#2}{#3}}% + }% +} +\scrlayerAddToInterface\sls@@renewelement{% + \newcommand*{\sls@@renewelement}[3]{% \@ifnextchar[%] + {\sls@@@@renewelement{#1}{#2}{#3}}% {\sls@@@renewelement{#1}{#2}{#3}}% - {\sls@@renewelement{#1}{#2}{#3}}% }% } -\scrlayerAddToInterface\sls@@renewelement{% - \newcommand*{\sls@@renewelement}[4]{% +\scrlayerAddToInterface\sls@@@renewelement{% + \newcommand*{\sls@@@renewelement}[4]{% \scr@ifundefinedorrelax{sls@ps@\sls@currentheadings @#1@#2@#3}{% \@namedef{sls@ps@scrheadings@#1@#2@#3}{#4}% }{% @@ -1588,10 +1650,10 @@ }% }% } -\scrlayerAddToInterface\sls@@@renewelement{% - \def\sls@@@renewelement#1#2#3[#4]#5{% +\scrlayerAddToInterface\sls@@@@renewelement{% + \def\sls@@@@renewelement#1#2#3[#4]#5{% \sls@@renewplainelement{#1}{#2}{#3}{#4}% - \sls@@renewelement{#1}{#2}{#3}{#5}% + \sls@@@renewelement{#1}{#2}{#3}{#5}% }% } \scrlayerAddToInterface\sls@@renewplainelement{% |