From d4d66453da7ea3fd6fc443a113b45031e79b0e30 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 13 Sep 2017 22:06:52 +0000
Subject: koma-script (14sep17)

git-svn-id: svn://tug.org/texlive/trunk@45292 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/koma-script/scrlayer.sty  | 47 +++++++++++++---------
 1 file changed, 29 insertions(+), 18 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/koma-script/scrlayer.sty')

diff --git a/Master/texmf-dist/tex/latex/koma-script/scrlayer.sty b/Master/texmf-dist/tex/latex/koma-script/scrlayer.sty
index 9ad1eee2b26..a0edae04e4c 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrlayer.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/scrlayer.sty
@@ -11,7 +11,7 @@
 %% scrlayer.dtx  (with options: `package,trace,scrlayer,final')
 %% scrlogo.dtx  (with options: `logo')
 %% 
-%% Copyright (c) 2012-2016 Markus Kohm [komascript at gmx info]
+%% Copyright (c) 2012-2017 Markus Kohm [komascript at gmx info]
 %% 
 %% This file was generated from file(s) of the KOMA-Script bundle.
 %% ---------------------------------------------------------------
@@ -41,15 +41,17 @@
 %% LaTeX 2.09 Script family created by Frank Neukam 1993 and the LaTeX2e
 %% standard classes created by The LaTeX3 Project 1994-1996.  You may
 %% find a complete unmodified copy of LaTeX2e at
-%% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>.
+%% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (identify)
+%%% From File: $Id: scrlayer.dtx 2645 2017-05-22 19:04:42Z kohm $
+%%%            (run: identify)
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 \ProvidesPackage{scrlayer}[%
-  2017/04/13 v3.23 KOMA-Script
+  2017/09/07 v3.24 KOMA-Script
   package
   (defining layers and page styles)]
-%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (init)
+%%% From File: $Id: scrlayer.dtx 2645 2017-05-22 19:04:42Z kohm $
+%%%            (run: init)
 \RequirePackage{scrkbase}[2013/03/05]
 \scr@ifundefinedorrelax{scrlayer@AtEndOfPackage}{%
   \AtEndOfPackage{\let\scrlayer@AtEndOfPackage\@firstofone}%
@@ -113,7 +115,8 @@
     \setlength{\footheight}{\baselineskip}
   \fi
 }
-%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (options)
+%%% From File: $Id: scrlayer.dtx 2645 2017-05-22 19:04:42Z kohm $
+%%%            (run: options)
 \KOMA@key{markcase}{%
   \begingroup
     \KOMA@set@ncmdkey{markcase}{reserved@a}{%
@@ -273,11 +276,13 @@
 }
 \newcommand*{\@ps@foregroundhook}{}
 \KOMA@kav@add{.scrlayer.sty}{onpsforeground}{}
+\KOMA@ifkey{singlespacing}{@ps@singlespacing}
 \KOMA@ifkey{deactivatepagestylelayers}{scrlayer@deactivate@layers}
 \KOMA@ifkey{draft}{scrlayer@draft}
 \KOMA@ifkey{forceoverwrite}{scrlayer@forceoverwrite}
 \KOMA@ifkey{autoremoveinterfaces}{scrlayer@autoremoveinterfaces}
-%%% From File: $Id: scrlayer.dtx 2562 2016-12-07 09:15:31Z kohm $ (body)
+%%% From File: $Id: scrlayer.dtx 2645 2017-05-22 19:04:42Z kohm $
+%%%            (run: body)
 \KOMAProcessOptions\relax
 \newcommand*{\rightfirstmark}{\expandafter\@rightmark\firstmark\@empty\@empty}
 \newcommand*{\rightbotmark}{\expandafter\@rightmark\botmark\@empty\@empty}
@@ -1116,7 +1121,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})
     \setlength{\unitlength}{1mm}%
@@ -1271,6 +1276,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}%
@@ -1301,6 +1307,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}%
@@ -1331,6 +1338,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}%
@@ -1365,6 +1373,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}%
@@ -1466,10 +1475,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}%
@@ -1502,9 +1511,10 @@
     \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
+      \makebox[\z@][\IfRTL{r}{l}]{%
         \hskip\layerxoffset
+        \IfRTL{\hskip\layerwidth}{}%
         \makebox[\z@][\layerhalign]{%
           \parbox[\layervalign][\layerheight][\layervalign]{\layerwidth}{%
             \vskip\z@\strut{%
@@ -1537,8 +1547,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}%
 }
@@ -2162,10 +2172,11 @@
   \@ifundefined{scrlayer@#1@onremove}{\@namedef{scrlayer@#1@onremove}{}}{}%
   \expandafter\l@addto@macro\csname scrlayer@#1@onremove\endcsname{#2}%
 }
-%%% 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 $
+%%%            (run: final)
 \DeclareNewPageStyleByLayers{@everystyle@}{}
 \RedeclarePageStyleByLayers{empty}{}
-%%% From File: $Id: scrlogo.dtx 2592 2017-02-16 16:56:10Z kohm $
+%%% From File: $Id: scrlogo.dtx 2640 2017-05-08 09:36:55Z kohm $
 \@ifundefined{KOMAScript}{%
   \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
       M\kern.05em A\kern.1em-\kern.1em Script}}}{}
-- 
cgit v1.2.3

