From 0a00b3b492fd27dc12cddae602b2c43206a17d74 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 24 Apr 2015 23:19:31 +0000
Subject: koma-script (24apr15)

git-svn-id: svn://tug.org/texlive/trunk@37036 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/koma-script/scrlayer-scrpage.sty     | 328 ++++++++++++++-------
 1 file changed, 229 insertions(+), 99 deletions(-)

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

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 c977855c1f5..a2e4bd938b2 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty
@@ -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 1899 2015-01-08 08:57:02Z kohm $ (identify)
+%%% From File: $Id: scrlayer-scrpage.dtx 2070 2015-04-08 09:02:19Z kohm $ (identify)
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 \ProvidesPackage{scrlayer-scrpage}[%
-  2015/02/07 v3.16 KOMA-Script
+  2015/04/23 v3.17 KOMA-Script
   package
   (end user interface for scrlayer)]
-%%% From File: $Id: scrlayer.dtx 1912 2015-01-26 20:11:06Z kohm $ (init)
+%%% From File: $Id: scrlayer.dtx 1962 2015-02-26 08:34:33Z kohm $ (init)
 \RequirePackage{scrlayer}
 \scr@ifundefinedorrelax{scrlayer@AtEndOfPackage}{%
   \AtEndOfPackage{\let\scrlayer@AtEndOfPackage\@firstofone}%
@@ -62,7 +62,7 @@
 }
 \let\scrlayer@AtEndOfPackage\AtEndOfPackage
 \scrlayerInitInterface
-%%% From File: $Id: scrlayer-scrpage.dtx 1899 2015-01-08 08:57:02Z kohm $ (init)
+%%% From File: $Id: scrlayer-scrpage.dtx 2070 2015-04-08 09:02:19Z kohm $ (init)
 \AtEndOfPackage{%
   \sls@auto@pagestyleset%
 }
@@ -78,7 +78,7 @@
     {pagestyleset=KOMA-Script}%
   }%
 }
-%%% From File: $Id: scrlayer.dtx 1912 2015-01-26 20:11:06Z kohm $ (options)
+%%% From File: $Id: scrlayer.dtx 1962 2015-02-26 08:34:33Z kohm $ (options)
 \KOMA@key{markcase}{%
 \scrlayer@AtEndOfPackage{%
   \begingroup
@@ -109,11 +109,16 @@
       \aftergroup\FamilyKeyStateUnknownValue
     \fi
   \endgroup
+  \ifx\FamilyKeyState\FamilyKeyStateProcessed
+    \KOMA@kav@removekey{.scrlayer.sty}{markcase}%
+    \KOMA@kav@xadd{.scrlayer.sty}{markcase}{#1}%
+  \fi
 }%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @markcase}
-\KOMA@ifkey{autooneside}{scrlayer@autooneside}\scrlayer@autoonesidetrue
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @autooneside}
+\KOMA@key{autooneside}[true]{%
+  \KOMA@set@ifkey{autooneside}{scrlayer@autooneside}{#1}%
+  \KOMA@kav@replacebool{.scrlayer.sty}{autooneside}{scrlayer@autooneside}%
+}
 \KOMA@key{automark}[]{%
   \scrlayer@testunexpectedarg{automark}{#1}%
   \scrlayer@AtEndOfPackage{%
@@ -124,95 +129,87 @@
     \fi
   }%
   \FamilyKeyStateProcessed
+  \KOMA@kav@removekey{.scrlayer.sty}{automark}%
+  \KOMA@kav@removekey{.scrlayer.sty}{manualmark}%
+  \KOMA@kav@add{.scrlayer.sty}{automark}{}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @automark}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @automark@default}
 \KOMA@key{manualmark}[]{%
   \scrlayer@testunexpectedarg{manualmark}{#1}%
   \scrlayer@AtEndOfPackage{\manualmark}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@removekey{.scrlayer.sty}{automark}%
+  \KOMA@kav@removekey{.scrlayer.sty}{manualmark}%
+  \KOMA@kav@add{.scrlayer.sty}{manualmark}{}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @manualmark}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @manualmark@default}
 \KOMA@key{onpsselect}{%
   \l@addto@macro{\@ps@initialhook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsselect}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsselect}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsselect@default}
 \KOMA@key{onpsinit}{%
   \l@addto@macro{\@ps@hook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsinit}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsinit}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsinit@default}
 \KOMA@key{onpsoneside}{%
   \l@addto@macro{\@ps@onesidehook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsoneside}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsoneside}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsoneside@default}
 \KOMA@key{onpstwoside}{%
   \l@addto@macro{\@ps@twosidehook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpstwoside}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpstwoside}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpstwoside@default}
 \KOMA@key{onpsoddpage}{%
   \l@addto@macro{\@ps@oddpagehook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsoddpage}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsoddpage}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsoddpage@default}
 \KOMA@key{onpsevenpage}{%
   \l@addto@macro{\@ps@evenpagehook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsevenpage}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsevenpage}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsevenpage@default}
 \KOMA@key{onpsfloatpage}{%
   \l@addto@macro{\@ps@floatpagehook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsfloatpage}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsfloatpage}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsfloatpage@default}
 \KOMA@key{onpsnonfloatpage}{%
   \l@addto@macro{\@ps@nonfloatpagehook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsnonfloatpage}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsnonfloatpage}
-\scrlayer@AddCsToInterface{%
-  KV@KOMA.\@currname.\@currext @onpsnonfloatpage@default}
 \KOMA@key{onpsbackground}{%
   \l@addto@macro{\@ps@backgroundhook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsbackground}{#1}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsbackground}
-\scrlayer@AddCsToInterface{%
-  KV@KOMA.\@currname.\@currext @onpsbackground@default}
 \KOMA@key{onpsforeground}{%
   \l@addto@macro{\@ps@foregroundhook}{#1}%
   \FamilyKeyStateProcessed
+  \KOMA@kav@add{.scrlayer.sty}{onpsforeground}{#1}%
+}
+\KOMA@key{deactivatepagestylelayers}[true]{%
+  \KOMA@set@ifkey{deactivatepagestylelayers}{scrlayer@deactivate@layers}{#1}%
+  \KOMA@kav@replacebool{.scrlayer.sty}{deactivatepagestylelayers}
+                       {scrlayer@deactivate@layers}%
+}
+\KOMA@key{draft}[true]{%
+  \KOMA@set@ifkey{draft}{scrlayer@draft}{#1}%
+  \KOMA@kav@replacebool{.scrlayer.sty}{draft}{scrlayer@draft}%
+}
+\KOMA@key{forceoverwrite}[true]{%
+  \KOMA@set@ifkey{forceoverwrite}{scrlayer@forceoverwrite}{#1}%
+  \KOMA@kav@replacebool{.scrlayer.sty}{forceoverwrite}{scrlayer@forceoverwrite}%
 }
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @onpsforeground}
-\scrlayer@AddCsToInterface{%
-  KV@KOMA.\@currname.\@currext @onpsforeground@default}
-\KOMA@ifkey{deactivatepagestylelayers}{scrlayer@deactivate@layers}
-\scrlayer@AddCsToInterface{%
-  KV@KOMA.\@currname.\@currext @deactivatepagestylelayers}
-\scrlayer@AddCsToInterface{%
-  KV@KOMA.\@currname.\@currext @deactivatepagestylelayers@default}
-\KOMA@ifkey{draft}{scrlayer@draft}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @draft}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @draft@default}
-\KOMA@ifkey{forceoverwrite}{scrlayer@forceoverwrite}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @forceoverwrite}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @forceoverwrite@default}
-\KOMA@ifkey{autoremoveinterfaces}{scrlayer@autoremoveinterfaces}
-\scrlayer@AddCsToInterface{KV@KOMA.\@currname.\@currext @autoremoveinterfaces}
-\scrlayer@AddCsToInterface{%
-  KV@KOMA.\@currname.\@currext @autoremoveinterfaces@default}
-%%% From File: $Id: scrlayer-scrpage.dtx 1899 2015-01-08 08:57:02Z kohm $ (options)
+\KOMA@key{autoremoveinterfaces}[true]{%
+  \KOMA@set@ifkey{autoremoveinterfaces}{scrlayer@autoremoveinterfaces}{#1}%
+  \KOMA@kav@replacebool{.scrlayer.sty}{autoremoveinterfaces}
+                       {scrlayer@autoremoveinterfaces}%
+}
+%%% From File: $Id: scrlayer-scrpage.dtx 2070 2015-04-08 09:02:19Z kohm $ (options)
 \KOMA@key{headwidth}{%
   \begingroup
     \sls@split@at@iicolons#1:::\@nil
@@ -220,9 +217,12 @@
     \edef\reserved@a{%
       \noexpand\endgroup
       \noexpand\sls@set@hf@width{head}{\reserved@b}{\reserved@c}{\reserved@a}%
+      \noexpand\FamilyKeyStateProcessed
+      \noexpand\KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{headwidth}{%
+        \reserved@a:\reserved@b:\reserved@c
+      }%
     }%
   \reserved@a
-  \FamilyKeyStateProcessed
 }
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@headwidth}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@headwidth@default}
@@ -233,9 +233,12 @@
     \edef\reserved@a{%
       \noexpand\endgroup
       \noexpand\sls@set@hf@width{foot}{\reserved@b}{\reserved@c}{\reserved@a}%
+      \noexpand\FamilyKeyStateProcessed
+      \noexpand\KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{footwidth}{%
+        \reserved@a:\reserved@b:\reserved@c
+      }%
     }%
   \reserved@a
-  \FamilyKeyStateProcessed
 }
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@footwidth}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@footwidth@default}
@@ -316,21 +319,25 @@
 \scrlayerAddToInterface\sls@headwidth{%
   \scr@ifundefinedorrelax{@headwidth}{%
     \newcommand*{\sls@headwidth}{\textwidth}%
+    \KOMA@kav@add{.scrlayer-scrpage.sty}{headwidth}{\textwidth:0pt:0pt}%
   }{%
     \newcommand*{\sls@headwidth}{\@headwidth}%
+    \KOMA@kav@xadd{.scrlayer-scrpage.sty}{headwidth}{\@headwidth:0pt:0pt}%
   }%
 }
-\scrlayerAddToInterface\sls@oddheadshift{\newcommand*{\sls@oddheadshift}{\z@}}
-\scrlayerAddToInterface\sls@evenheadshift{\newcommand*{\sls@evenheadshift}{\z@}}
+\scrlayerAddToInterface\sls@oddheadshift{\newcommand*{\sls@oddheadshift}{0pt}}
+\scrlayerAddToInterface\sls@evenheadshift{\newcommand*{\sls@evenheadshift}{0pt}}
 \scrlayerAddToInterface\sls@footwidth{%
   \scr@ifundefinedorrelax{@footwidth}{%
     \newcommand*{\sls@footwidth}{\textwidth}%
+    \KOMA@kav@add{.scrlayer-scrpage.sty}{footwidth}{\textwidth:0pt:0pt}
   }{%
     \newcommand*{\sls@footwidth}{\@footwidth}%
+    \KOMA@kav@xadd{.scrlayer-scrpage.sty}{footwidth}{\@footwidth:0pt:0pt}
   }%
 }
-\scrlayerAddToInterface\sls@oddfootshift{\newcommand*{\sls@oddfootshift}{\z@}}
-\scrlayerAddToInterface\sls@evenfootshift{\newcommand*{\sls@evenfootshift}{\z@}}
+\scrlayerAddToInterface\sls@oddfootshift{\newcommand*{\sls@oddfootshift}{0pt}}
+\scrlayerAddToInterface\sls@evenfootshift{\newcommand*{\sls@evenfootshift}{0pt}}
 \scrlayerAddToInterface\sls@settotwidthof{%
   \newcommand*{\sls@settowidthof}[2]{%
     \ifstr{#2}{paper}{%
@@ -401,67 +408,83 @@
     }%
   }%
 }
-\KOMA@key{headtopline}[:]{\sls@set@values{head}{above}{#1}}
+\KOMA@key{headtopline}[:]{%
+  \sls@set@values[headtopline]{head}{above}{#1}%
+}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@headtopline}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@headtopline@default}
-\KOMA@key{headsepline}[:]{\sls@set@values{head}{below}{#1}}
+\KOMA@key{headsepline}[:]{%
+  \sls@set@values[headsepline]{head}{below}{#1}%
+}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@headsepline}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@headsepline@default}
-\KOMA@key{footsepline}[:]{\sls@set@values{foot}{above}{#1}}
+\KOMA@key{footsepline}[:]{%
+  \sls@set@values[footsepline]{foot}{above}{#1}%
+}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@footsepline}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@footsepline@default}
-\KOMA@key{footbotline}[:]{\sls@set@values{foot}{below}{#1}}
+\KOMA@key{footbotline}[:]{%
+  \sls@set@values[footbotline]{foot}{below}{#1}%
+}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@footbotline}
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@footbotline@default}
 \scrlayerAddToInterface\sls@set@values{%
-  \newcommand*{\sls@set@values}[3]{%
+  \newcommand*{\sls@set@values}[4][]{%
     \begingroup
-      \let\reserved@a\@empty
-      \let\reserved@b\@empty
-      \ifstr{#3}{true}{\def\reserved@a{.4pt}\def\reserved@b{sls@#1width}}{%
-        \ifstr{#3}{yes}{\def\reserved@a{.4pt}\def\reserved@b{sls@#1width}}{%
-          \ifstr{#3}{on}{\def\reserved@a{.4pt}\def\reserved@b{sls@#1width}}{%
-            \ifstr{#3}{false}{\def\reserved@a{\z@}\def\reserved@b{z@}}{%
-              \ifstr{#3}{no}{\def\reserved@a{\z@}\def\reserved@b{z@}}{%
-                \ifstr{#3}{off}{\def\reserved@a{\z@}\def\reserved@b{z@}}{%
-                }%
-              }%
+      \ifstr{#1}{}{%
+        \FamilyKeyStateUnknown
+      }{%
+        \KOMA@set@ifkey{#1}{@tempswa}{#4}%
+      }%
+      \ifx\FamilyKeyState\FamilyKeyStateProcessed
+        \if@tempswa
+          \edef\reserved@b{%
+            \noexpand\endgroup
+            \noexpand\@namedef{sls@#2#3@linethickness}{.4pt}%
+            \noexpand\@namedef{sls@#2#3@linelength}{%
+              \expandafter\noexpand\csname sls@#2width\endcsname
             }%
           }%
-        }%
-      }%
-      \ifx\reserved@a\@empty
-        \sls@split@at@colon#3::\@nil
+        \else
+          \def\reserved@b{%
+            \endgroup
+            \@namedef{sls@#2#3@linethickness}{0pt}%
+            \@namedef{sls@#2#3@linelength}{0pt}%
+          }%
+        \fi
+      \else
+        \let\reserved@a\@empty
+        \let\reserved@b\@empty
+        \sls@split@at@colon#4::\@nil
         \ifx\reserved@a\@empty
-          \def\reserved@a{\endgroup\@namedef{sls@#1#2@linethickness}{.4pt}}%
+          \def\reserved@a{\endgroup\@namedef{sls@#2#3@linethickness}{.4pt}}%
         \else
           \setlength{\@tempdima}{\dimexpr\reserved@a\relax}%
           \edef\reserved@a{%
             \noexpand\endgroup
-            \noexpand\@namedef{sls@#1#2@linethickness}{\the\@tempdima}%
+            \noexpand\@namedef{sls@#2#3@linethickness}{\the\@tempdima}%
           }%
         \fi
         \ifx\reserved@b\@empty
           \def\reserved@b{%
             \reserved@a
-            \@namedef{sls@#1#2@linelength}{\@nameuse{sls@#1width}}%
+            \@namedef{sls@#2#3@linelength}{\@nameuse{sls@#2width}}%
           }%
         \else
           \edef\reserved@b{%
             \noexpand\reserved@a
-            \noexpand\sls@deftowidthof{sls@#1#2@linelength}{\reserved@b}%
+            \noexpand\sls@deftowidthof{sls@#2#3@linelength}{\reserved@b}%
           }%
         \fi
-      \else
-        \edef\reserved@b{%
-          \noexpand\endgroup
-          \noexpand\@namedef{sls@#1#2@linethickness}{\reserved@a}%
-          \noexpand\@namedef{sls@#1#2@linelength}{%
-            \expandafter\noexpand\csname \reserved@b\endcsname
-          }%
-        }%
       \fi
     \reserved@b
+    \FamilyKeyStateProcessed
+    \ifstr{#1}{}{}{%
+      \KOMA@kav@xreplacevalue{.scrlayer-scrpage.sty}{#1}{%
+        \csname sls@#2#3@linethickness\endcsname
+        :\csname sls@#2#3@linelength\endcsname
+      }%
+    }%
   }%
 }
 \scrlayerAddToInterface\sls@split@at@colon{%
@@ -483,26 +506,38 @@
   \newcommand*{\sls@headabove@linelength}{\sls@headwidth}%
 }
 \scrlayerAddToInterface\sls@headabove{%
-  \newcommand*{\sls@headabove@linethickness}{\z@}%
+  \newcommand*{\sls@headabove@linethickness}{0pt}%
 }
+\KOMA@kav@xadd{.scrlayer-scrpage.sty}{headtopline}{%
+  \expandafter\noexpand\sls@headabove@linethickness:%
+  \expandafter\noexpand\sls@headabove@linelength}
 \scrlayerAddToInterface\sls@headbelow@linelength{%
   \newcommand*{\sls@headbelow@linelength}{\sls@headwidth}%
 }
 \scrlayerAddToInterface\sls@headbelow@linethickness{%
-  \newcommand*{\sls@headbelow@linethickness}{\z@}%
+  \newcommand*{\sls@headbelow@linethickness}{0pt}%
 }
+\KOMA@kav@xadd{.scrlayer-scrpage.sty}{headsepline}{%
+  \expandafter\noexpand\sls@headbelow@linethickness:%
+  \expandafter\noexpand\sls@headbelow@linelength}
 \scrlayerAddToInterface\sls@footabove@linelength{%
   \newcommand*{\sls@footabove@linelength}{\sls@footwidth}%
 }
 \scrlayerAddToInterface\sls@footabove@linethickness{%
-  \newcommand*{\sls@footabove@linethickness}{\z@}%
+  \newcommand*{\sls@footabove@linethickness}{0pt}%
 }
+\KOMA@kav@xadd{.scrlayer-scrpage.sty}{footsepline}{%
+  \expandafter\noexpand\sls@footabove@linethickness:%
+  \expandafter\noexpand\sls@footabove@linelength}
 \scrlayerAddToInterface\sls@footbelow@linelength{%
   \newcommand*{\sls@footbelow@linelength}{\sls@footwidth}%
 }
 \scrlayerAddToInterface\sls@footbelow@linethickness{%
-  \newcommand*{\sls@footbelow@linethickness}{\z@}%
+  \newcommand*{\sls@footbelow@linethickness}{0pt}%
 }
+\KOMA@kav@xadd{.scrlayer-scrpage.sty}{footbotline}{%
+  \expandafter\noexpand\sls@footbelow@linethickness:%
+  \expandafter\noexpand\sls@footbelow@linelength}
 \scrlayerAddCsToInterface{ifsls@plain@head@above@line}{%
   \KOMA@ifkey{plainheadtopline}{sls@plain@head@above@line}%
   \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@plainheadtopline}%
@@ -538,10 +573,15 @@
 \scrlayerAddToInterface\sls@hfline@adjust{%
   \newcommand*{\sls@hfline@adjust}{0}%
 }
+\KOMA@kav@add{.scrlayer-scrpage.sty}{ilines}{}
 \KOMA@key{ilines}[]{%
   \ifx\relax#1\relax
     \renewcommand*{\sls@hfline@adjust}{0}%
     \FamilyKeyStateProcessed
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}%
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}%
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}%
+    \KOMA@kav@add{.scrlayer-scrpage.sty}{ilines}{}%
   \else
     \def\FamilyKeyStateProcessed{unexpected value}%
   \fi
@@ -552,6 +592,10 @@
   \ifx\relax#1\relax
     \renewcommand*{\sls@hfline@adjust}{1}%
     \FamilyKeyStateProcessed
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}%
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}%
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}%
+    \KOMA@kav@add{.scrlayer-scrpage.sty}{clines}{}%
   \else
     \def\FamilyKeyStateProcessed{unexpected value}%
   \fi
@@ -562,6 +606,10 @@
   \ifx\relax#1\relax
     \renewcommand*{\sls@hfline@adjust}{2}%
     \FamilyKeyStateProcessed
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}%
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}%
+    \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}%
+    \KOMA@kav@add{.scrlayer-scrpage.sty}{olines}{}%
   \else
     \def\FamilyKeyStateProcessed{unexpected value}%
   \fi
@@ -575,6 +623,7 @@
     \let\sls@auto@pagestyleset\relax
     \@nameuse{sls@ps@style@#1}%
     \FamilyKeyStateProcessed
+    \KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{pagestyleset}{#1}%
   }%
 }
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@pagestyleset}
@@ -640,9 +689,78 @@
 \scrlayer@AddCsToInterface{KV@KOMA.scrlayer-scrpage.sty@hmode@default}%
 \scrlayer@AddCsToInterface{sls@leavevmode@linetrue}
 \scrlayer@AddCsToInterface{sls@leavevmode@linefalse}
-%%% From File: $Id: scrlayer.dtx 1912 2015-01-26 20:11:06Z kohm $ (body)
+%%% From File: $Id: scrlayer.dtx 1962 2015-02-26 08:34:33Z kohm $ (body)
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrlayer-scrpage.dtx 1899 2015-01-08 08:57:02Z kohm $ (body)
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @markcase\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @autooneside\endcsname\relax
+\expandafter\let\csname KV@KOMA.\@currname.\@currext @automark\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @automark@default\endcsname\relax
+\expandafter\let\csname KV@KOMA.\@currname.\@currext @manualmark\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @manualmark@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsselect\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsselect@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsinit\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsinit@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsoneside\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsoneside@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpstwoside\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpstwoside@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsoddpage\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsoddpage@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsevenpage\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsevenpage@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsfloatpage\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsfloatpage@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsnonfloatpage\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsnonfloatpage@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsbackground\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsbackground@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsforeground\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @onpsforeground@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @deactivatepagestylelayers\endcsname
+  \relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @deactivatepagestylelayers@default\endcsname
+  \relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @draft\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @draft@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @forceoverwrite\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @forceoverwrite@default\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @autoremoveinterfaces\endcsname\relax
+\expandafter\let
+  \csname KV@KOMA.\@currname.\@currext @autoremoveinterfaces@default\endcsname
+  \relax
+%%% From File: $Id: scrlayer-scrpage.dtx 2070 2015-04-08 09:02:19Z kohm $ (body)
 \scrlayerAddToInterface\setheadwidth{%
   \newcommand*{\setheadwidth}[2][]{%
     \KOMAoptions{headwidth=#2:#1}%
@@ -683,12 +801,24 @@
 }
 \scrlayerAddToInterface\sls@@@setline{%
   \def\sls@@@setline#1#2{%
-    \edef\@tempa{#2}\edef\@tempb{current}
+    \edef\@tempa{#2}\edef\@tempb{current}%
     \ifstr{#2}{}{}{%
       \ifstr{#2}{current}{}{%
         \setlength{\@tempdima}{#2}%
-        \expandafter\edef\csname sls@#1@linethickness\endcsname%
-        {\the\@tempdima}%
+        \ifstr{#1}{headabove}{%
+          \KOMAExecuteOptions[.scrlayer-scrpage.sty]{headtopline=\@tempdima}%
+        }{\ifstr{#1}{headbelow}{%
+            \KOMAExecuteOptions[.scrlayer-scrpage.sty]{headsepline=\@tempdima}%
+          }{%
+            \ifstr{#1}{footabove}{%
+              \KOMAExecuteOptions[.scrlayer-scrpage.sty]%
+                                 {footsepline=\@tempdima}%
+            }{%
+              \KOMAExecuteOptions[.scrlayer-scrpage.sty]%
+                                 {footbotline=\@tempdima}%
+            }%
+          }%
+        }%
       }%
     }%
     \PackageWarning{scrlayer-scrpage}{%
@@ -1032,7 +1162,7 @@
     \newcommand*{\headfont}{\normalcolor\slshape}%
   }{}
 }{}
-\scr@ifundefinedorrelax{scr@wrn@pagehead}{}{%
+\scr@ifundefinedorrelax{scr@fnt@wrn@pagehead}{}{%
   \PackageInfo{scrlayer-scrpage}{%
     deactivating warning for font element\MessageBreak
     `pagehead'}%
@@ -1046,7 +1176,7 @@
     \scrlayer@AddCsToInterface{footfont}%
   }{}%
 }{}
-\scr@ifundefinedorrelax{scr@fnt@pagefoot}{}{%
+\scr@ifundefinedorrelax{scr@fnt@wrn@pagefoot}{}{%
   \PackageInfo{scrlayer-scrpage}{%
     deactivating warning for font element\MessageBreak
     `pagefoot'}%
-- 
cgit v1.2.3

