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 | 85 |
1 files changed, 61 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx b/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx index a86027ff43d..28e35ff21ce 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx @@ -1,8 +1,8 @@ -% \CheckSum{3902} +% \CheckSum{3929} % \iffalse^^A meta-comment % ====================================================================== % scrlayer.dtx -% Copyright (c) Markus Kohm, 2012-2016 +% Copyright (c) Markus Kohm, 2012-2017 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -20,7 +20,7 @@ % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- % scrlayer.dtx -% Copyright (c) Markus Kohm, 2012-2016 +% Copyright (c) Markus Kohm, 2012-2017 % % Diese Datei ist Teil der LaTeX2e KOMA-Script-Sammlung. % @@ -57,20 +57,26 @@ % Right brace \} Tilde \~} % % \iffalse^^A meta-comment -%<identify>%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (identify) -%<init>%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (init) -%<options>%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (options) -%<body>%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (body) -%<final>%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (final) +%%% From File: $Id: scrlayer.dtx 2645 2017-05-22 19:04:42Z kohm $ +%<identify>%%% (run: identify) +%<init>%%% (run: init) +%<options>%%% (run: options) +%<body>%%% (run: body) +%<final>%%% (run: 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: 2016-12-07 10:15:31 +0100 (Wed, 07 Dec 2016) $ + \filedate$Date: 2017-05-22 21:04:42 +0200 (Mon, 22 May 2017) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 2562 $ -\endgroup -\ProvidesFile{scrlayer.dtx}[\filedate\space\filerevision\space + \filerevision$Revision: 2645 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrlayer.dtx}% + [\filedate\space\filerevision\space + KOMA-Script package source + }% +\reserved@a %</dtx> %<*identify|doc> %<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01] @@ -106,8 +112,6 @@ \let\endbatchfile\relax \fi \endbatchfile -%</dtx> -%<*driver> \documentclass{scrdoc} \addtolength{\textwidth}{-1em} \addtolength{\marginparwidth}{2em} @@ -181,7 +185,7 @@ \PrintChanges \PrintIndex \end{document} -%</driver> +%</dtx> % \fi^^A meta-comment % % \selectlanguage{english} @@ -2007,7 +2011,7 @@ \if t\layervalign -\ht\strutbox \else \if b\layervalign -\dimexpr\layerheight-\dp\strutbox\relax - \else -.5\dimexpr \layerheight+\ht\strutbox-\dp\strutbox\relax + \else -.5\dimexpr\layerheight+\ht\strutbox-\dp\strutbox\relax \fi \fi}) % \end{macrocode} @@ -2561,6 +2565,20 @@ % \end{macrocode} % \end{macro}^^A \@psforegroundhook % \end{option}^^A onpsforeground +% \begin{option}{singlespacing} +% \changes{v3.24}{2017/05/22}{new option added}^^A +% \begin{description} +% \item[\texttt{=\meta{simple switch}}:] if activated, all page styles will be +% set with line spread 1. This switch is global. If you want it for some +% styles only, add \Macro{linespread}\PParameter{1}\Macro{selectfont} to +% option \Option{oninit} of only those styles. +%\end{description} +% \begin{macrocode} +%<*options> +\KOMA@ifkey{singlespacing}{@ps@singlespacing} +%</options> +% \end{macrocode} +% \end{option} % \begin{macrocode} %<*package&body> \newcommand*{\DeclarePageStyleByLayers}[3][]{% @@ -2576,6 +2594,7 @@ % \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 +% \changes{v3.24}{2017/05/22}{test for \cs{if@ps@singlespacing} added}^^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. @@ -2600,6 +2619,7 @@ \renewcommand*{\@oddhead}{% \begingroup \let\headmark\rightmark + \if@ps@singlespacing\linespread{1}\selectfont\fi \@nameuse{@ps@@everystyle@@hook}% \@nameuse{@ps@#1@hook}% \@nameuse{@ps@@everystyle@@\if@twoside two\else one\fi sidehook}% @@ -2630,6 +2650,7 @@ \renewcommand*{\@evenhead}{% \begingroup \let\headmark\leftmark + \if@ps@singlespacing\linespread{1}\selectfont\fi \@nameuse{@ps@@everystyle@@hook}% \@nameuse{@ps@#1@hook}% \@nameuse{@ps@@everystyle@@twosidehook}% @@ -2660,6 +2681,7 @@ \renewcommand*{\@oddfoot}{% \begingroup \let\headmark\rightmark + \if@ps@singlespacing\linespread{1}\selectfont\fi \@nameuse{@ps@@everystyle@@hook}% \@nameuse{@ps@#1@hook}% \@nameuse{@ps@@everystyle@@\if@twoside two\else one\fi sidehook}% @@ -2694,6 +2716,7 @@ \renewcommand*{\@evenfoot}{% \begingroup \let\headmark\leftmark + \if@ps@singlespacing\linespread{1}\selectfont\fi \@nameuse{@ps@@everystyle@@hook}% \@nameuse{@ps@#1@hook}% \@nameuse{@ps@@everystyle@@twosidehook}% @@ -2862,6 +2885,10 @@ % \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by % \cs{kernel@ifnextchar}}^^A % \begin{macro}{\scr@@layerbox} +% \changes{v3.24}{2017/05/08}{\cs{edef} replaced by \cs{protected@edef}}^^A +% \changes{v3.24}{2017/05/08}{\cs{dimexpr} added to \cs{layer\dots}}^^A +% \changes{v3.24}{2017/05/08}{\cs{dimexpr} removed from usage of +% \cs{layer\dots}}^^A % The layer box is used to output a layer in \cs{@oddhead}, \cs{@evenhead}, % \cs{@oddfoot}, or \cs{@evenfoot}. Is has two pairs of arguments: ($x,y$) % and ($w,h$), where $x$ is the distance from left paper edge, $y$ is the @@ -2878,10 +2905,10 @@ } \def\scr@@layerbox(#1,#2)(#3,#4)[#5]#6{% \begingroup - \edef\layerxoffset{#1}% - \edef\layeryoffset{#2}% - \edef\layerwidth{#3}% - \edef\layerheight{#4}% + \protected@edef\layerxoffset{\noexpand\dimexpr #1\relax}% + \protected@edef\layeryoffset{\noexpand\dimexpr #2\relax}% + \protected@edef\layerwidth{\noexpand\dimexpr #3\relax}% + \protected@edef\layerheight{\noexpand\dimexpr #4\relax}% \def\layervalign{t}% \def\layerhalign{l}% \edef\reserved@b{#5}% @@ -2914,9 +2941,18 @@ \parbox[t][\z@][t]{\z@}{% \vskip\layeryoffset \if b\layervalign\vskip-\layerheight\fi - \if c\layervalign\vskip-.5\dimexpr\layerheight\relax\fi - \makebox[\z@][l]{% + \if c\layervalign\vskip-.5\layerheight\fi +% \end{macrocode} +% \changes{3.23a}{2017/04/22}{\textsf{bidi} code added}^^A +% \changes{v3.24}{2017/05/04}{usage of \textsf{scrbase}'s \cs{IfRTL}}^^A +% If we are in right-to-left mode of package \textsf{bidi} or +% \textsf{xepersian} the horizontal output is in the opposite direction. So we +% need the \cs{makebox} to the right instead of the left and to move the +% contents additionally by its width. +% \begin{macrocode} + \makebox[\z@][\IfRTL{r}{l}]{% \hskip\layerxoffset + \IfRTL{\hskip\layerwidth}{}% \makebox[\z@][\layerhalign]{% \parbox[\layervalign][\layerheight][\layervalign]{\layerwidth}{% \vskip\z@\strut{% @@ -2954,6 +2990,7 @@ % % \begin{macro}{\layerpicturemode} % \changes{v3.19}{2015/07/30}{new command}^^A +% \changes{v3.24}{2017/05/08}{redundant \cs{dimexpr} removed}^^A % This is a bit more complicated. It is the layer output for \texttt{picture} % layers. In this case we use a picture environment and internally define some % additional commands. @@ -2973,8 +3010,8 @@ \long\def\putLR##1{\put(\LenToUnit{\layerwidth},0){##1}}% \long\def\putUR##1{\put(\LenToUnit{\layerwidth},% \LenToUnit{\layerheight}){##1}}% - \long\def\putC##1{\put(\LenToUnit{.5\dimexpr\layerwidth\relax},% - \LenToUnit{.5\dimexpr\layerheight\relax}){##1}}% + \long\def\putC##1{\put(\LenToUnit{.5\layerwidth},% + \LenToUnit{.5\layerheight}){##1}}% #1% \end{picture}% } |