diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrlayer.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/scrlayer.dtx | 168 |
1 files changed, 153 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx b/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx index a2884484eb4..4d051a66ba7 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx @@ -1,4 +1,4 @@ -% \CheckSum{3683} +% \CheckSum{3819} % \iffalse^^A meta-comment % ====================================================================== % scrlayer.dtx @@ -57,18 +57,18 @@ % Right brace \} Tilde \~} % % \iffalse^^A meta-comment -%<identify>%%% From File: $Id: scrlayer.dtx 1962 2015-02-26 08:34:33Z kohm $ (identify) -%<init>%%% From File: $Id: scrlayer.dtx 1962 2015-02-26 08:34:33Z kohm $ (init) -%<options>%%% From File: $Id: scrlayer.dtx 1962 2015-02-26 08:34:33Z kohm $ (options) -%<body>%%% From File: $Id: scrlayer.dtx 1962 2015-02-26 08:34:33Z kohm $ (body) -%<final>%%% From File: $Id: scrlayer.dtx 1962 2015-02-26 08:34:33Z kohm $ (final) +%<identify>%%% From File: $Id: scrlayer.dtx 2125 2015-06-09 07:58:46Z kohm $ (identify) +%<init>%%% From File: $Id: scrlayer.dtx 2125 2015-06-09 07:58:46Z kohm $ (init) +%<options>%%% From File: $Id: scrlayer.dtx 2125 2015-06-09 07:58:46Z kohm $ (options) +%<body>%%% From File: $Id: scrlayer.dtx 2125 2015-06-09 07:58:46Z kohm $ (body) +%<final>%%% From File: $Id: scrlayer.dtx 2125 2015-06-09 07:58:46Z kohm $ (final) %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2015-02-26 09:34:33 +0100 (Thu, 26 Feb 2015) $ + \filedate$Date: 2015-06-09 09:58:46 +0200 (Tue, 09 Jun 2015) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 1962 $ + \filerevision$Revision: 2125 $ \endgroup \ProvidesFile{scrlayer.dtx}[\filedate\space\filerevision\space %</dtx> @@ -1183,6 +1183,17 @@ \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname } % \end{macrocode} +% \item[\texttt{backandforeground}:] not really useful, but the counterpart of +% the restrictions above. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{backandforeground}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{backandforeground}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{backandforeground}{#1}% + \csname @scr@l@\scr@current@layer @backgroundtrue\endcsname + \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname +} +% \end{macrocode} % \item[\texttt{oddpage}:] restrict the layer to odd pages only. At % two-sided layout only pages with odd page numbers are odd pages. At % single-sided layout all pages are odd pages. Note, that this attribute has @@ -1207,6 +1218,41 @@ \csname @scr@l@\scr@current@layer @eventrue\endcsname } % \end{macrocode} +% \item[\texttt{oddorevenpage}:] do not restrict the layer to odd or even +% pages. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{oddorevenpage}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{oddorevenpage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{oddorevenpage}{#1}% + \csname @scr@l@\scr@current@layer @oddtrue\endcsname + \csname @scr@l@\scr@current@layer @eventrue\endcsname +} +% \end{macrocode} +% \item[\texttt{evenoroddpage}:] same as \texttt{oddorevenpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{evenoroddpage}[\relax]{% + \PackageWarning{scrlayer}{Option `evenoroddpage' unknown.\MessageBreak + Using `oddorevenpage' instead}% + \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1} +} +% \end{macrocode} +% \item[\texttt{oddandevenpages}:] same as \texttt{oddorevenpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{oddandevenpages}[\relax]{% + \PackageWarning{scrlayer}{Option `oddandevenpages' unknown.\MessageBreak + Using `oddorevenpage' instead}% + \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1} +} +% \end{macrocode} +% \item[\texttt{evenandoddpages}:] same as \texttt{oddorevenpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{evenandoddpages}[\relax]{% + \PackageWarning{scrlayer}{Option `evenandoddpages' unknown.\MessageBreak + Using `oddorevenpage' instead}% + \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1} +} +% \end{macrocode} % \item[\Option{floatpage}:] restrict the layer to float pages. % \begin{macrocode} \DefineFamilyKey[.definelayer]{KOMAarg}{floatpage}[\relax]{% @@ -1221,11 +1267,61 @@ % \begin{macrocode} \DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatpage}[\relax]{% \FamilyKeyStateProcessed - \scrlayer@testunexpectedarg{twoside}{#1}% + \scrlayer@testunexpectedarg{nonfloatpage}{#1}% \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname \csname @scr@l@\scr@current@layer @floatpagefalse\endcsname } % \end{macrocode} +% \item[\Option{floatornonfloatpage}:] don't restrict the layer to float or +% non-float pages. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{floatornonfloatpage}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{floatornonfloatpage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{floatornonfloatpage}{#1}% + \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname + \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname +} +% \end{macrocode} +% \item[\Option{nonfloatorfloatpage}:] same as \Option{floatornonfloatpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatorfloatpage}[\relax]{% + \PackageWarning{scrlayer}{Option `nonfloatorfloatpage' unknown.\MessageBreak + Using `floatornonfloatpage' instead}% + \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}% +} +% \end{macrocode} +% \item[\Option{floatandnonfloatpages}:] same as \Option{floatornonfloatpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{floatandnonfloatpages}[\relax]{% + \PackageWarning{scrlayer}{Option `floatandnonfloatpages' unknown.\MessageBreak + Using `floatornonfloatpage' instead}% + \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}% +} +% \end{macrocode} +% \item[\Option{nonfloatandfloatpages}:] same as \Option{floatornonfloatpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatandfloatpages}[\relax]{% + \PackageWarning{scrlayer}{Option `nonfloatandfloatpages' unknown.\MessageBreak + Using `floatornonfloatpage' instead}% + \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}% +} +% \end{macrocode} +% \item[\Option{everypage}:] remove all odd-, even-, float-, and +% nonfloat-restrictions. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{everypage}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{everypage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{everypage}{#1}% + \csname @scr@l@\scr@current@layer @backgroundtrue\endcsname + \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname + \csname @scr@l@\scr@current@layer @oddtrue\endcsname + \csname @scr@l@\scr@current@layer @eventrue\endcsname + \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname + \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname +} +% \end{macrocode} % \item[\Option{oneside}:] restrict the layer to pages on single-sided % layouts. % \begin{macrocode} @@ -1246,6 +1342,30 @@ \csname @scr@l@\scr@current@layer @onesidefalse\endcsname } % \end{macrocode} +% \item[\Option{everyside}:] remove all one- or two-side restrictions. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{everyside}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{everyside}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{everyside}{#1}% + \csname @scr@l@\scr@current@layer @twosidetrue\endcsname + \csname @scr@l@\scr@current@layer @onesidetrue\endcsname +} +% \end{macrocode} +% \item[\Option{unrestricted}:] remove all restrictions +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{unrestricted}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{unrestricted}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{unrestricted}{#1}% + \csname @scr@l@\scr@current@layer @oddtrue\endcsname + \csname @scr@l@\scr@current@layer @eventrue\endcsname + \csname @scr@l@\scr@current@layer @nonfloatpagefalse\endcsname + \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname + \csname @scr@l@\scr@current@layer @twosidetrue\endcsname + \csname @scr@l@\scr@current@layer @onesidetrue\endcsname +} +% \end{macrocode} % \end{description} % % Attribute modifications are attributes, that modify existing basic @@ -2395,6 +2515,9 @@ % \begin{macro}{\scrlayer@declare@ps@by@layers} % \changes{v3.15}{2014/12/28}{fix: \cs{linewidth} replaced by % \cs{textwidth}}^^A +% \changes{v3.18}{2015/06/09}{usage of \cs{parbox[b]} instead of +% \cs{parbox[t]} because of strange effect with package +% \textsf{multicol}}^^A % Needed, because of page style aliases. Same arguments like % \cs{DeclarePageStyleByLayers} but, \#1 is the name of the page style, \#2 is % the list of options and \#3 is still the list of layers. @@ -2429,9 +2552,8 @@ \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}% \@nameuse{@ps@@everystyle@@backgroundhook}% \@nameuse{@ps@#1@backgroundhook}% - \parbox[t][\headheight][t]{\textwidth}{% + \parbox[b][\headheight][t]{\textwidth}{% \vskip \dimexpr -\topmargin-1in - -\headheight -\ht\strutbox\relax \hskip \dimexpr -\oddsidemargin-1in\relax \strut\makebox[\z@][l]{% @@ -2460,9 +2582,8 @@ \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}% \@nameuse{@ps@@everystyle@@backgroundhook}% \@nameuse{@ps@#1@backgroundhook}% - \parbox[t][\headheight][t]{\textwidth}{% + \parbox[b][\headheight][t]{\textwidth}{% \vskip \dimexpr -\topmargin-1in - -\headheight -\ht\strutbox\relax \hskip \dimexpr-\evensidemargin-1in\relax \strut\makebox[\z@][l]{% @@ -2559,6 +2680,7 @@ % \end{macro}^^A \scrlayer@declare@ps@by@layers % % \begin{macro}{\ForEachLayerOfPageStyle} +% \changes{v3.18}{2015/05/14}{star version of the command}^^A % \begin{description} % \item[\Parameter{string}:] a valid page style (must be fully expandable % and expand to the name of a existing page style); note, that currently @@ -2568,16 +2690,32 @@ % \end{description} % Do the given \meta{code} for each layer of the page style % \meta{string}. Note, that the expansion of \meta{code} will be done inside -% a group. +% a group. There's also a star version of the command, that delays execution +% of \meta{code} after the end of the group. % \begin{macrocode} %<*package&body> -\newcommand*{\ForEachLayerOfPageStyle}[2]{% +\newcommand*{\ForEachLayerOfPageStyle}{% + \@ifstar {\@s@ForEachLayerOfPageStyle}{\@ForEachLayerOfPageStyle}% +} +\newcommand*{\@ForEachLayerOfPageStyle}[2]{% \begingroup \edef\reserved@a{\GetRealPageStyle{#1}}% \def\@elt##1{\ifscrlayer@deactivate@layers\else #2\fi}% \@nameuse{@ps@\reserved@a @layers}% \endgroup } +\newcommand*{\@s@ForEachLayerOfPageStyle}[2]{% + \begingroup + \edef\reserved@a{\GetRealPageStyle{#1}}% + \def\reserved@b{\endgroup}% + \def\@elt##1{% + \l@addto@macro\reserved@b{% + \ifscrlayer@deactivate@layers\else #2\fi + }% + }% + \@nameuse{@ps@\reserved@a @layers}% + \reserved@b +} %</package&body> % \end{macrocode} % \begin{option}{deactivatepagestylelayers} |