From 734c91dfac1697d69bdd509c8bc7a97750c78f96 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 6 May 2017 21:41:21 +0000
Subject: koma-script (6may17)

git-svn-id: svn://tug.org/texlive/trunk@44226 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/koma-script/scrlttr2.cls  | 192 ++++++++++++---------
 1 file changed, 106 insertions(+), 86 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls')

diff --git a/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls b/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls
index fc190203355..791aeab5d25 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls
+++ b/Master/texmf-dist/tex/latex/koma-script/scrlttr2.cls
@@ -6,6 +6,8 @@
 %%
 %% scrkernel-version.dtx  (with options: `class,letter')
 %% scrkernel-basics.dtx  (with options: `load')
+%% scrkernel-compatibility.dtx  (with options: `class,letter,init')
+%% scrkernel-typearea.dtx  (with options: `class,scrlttr2,init')
 %% scrkernel-compatibility.dtx  (with options: `class,letter,option')
 %% scrkernel-miscellaneous.dtx  (with options: `class,letter,option')
 %% scrkernel-letterclassoptions.dtx  (with options: `class,letter,option')
@@ -71,7 +73,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 2491 2016-07-29 08:03:57Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 2592 2017-02-16 16:56:10Z kohm $
 \begingroup
   \catcode`\@11\relax
   \ifx\KOMAScriptVersion\undefined
@@ -93,7 +95,7 @@
       \fi
     }
   \fi
-  \@CheckKOMAScriptVersion{2017/01/03 v3.22 KOMA-Script}%
+  \@CheckKOMAScriptVersion{2017/04/13 v3.23 KOMA-Script}%
 \endgroup
 \providecommand*{\scr@clsextension}{\@clsextension}
 \AtBeginDocument{%
@@ -108,50 +110,13 @@
 \newcommand*{\KOMAClassFileName}{\KOMAClassName.\@clsextension}
 \edef\KOMAClassFileName{\KOMAClassFileName}
 \ProvidesClass{\KOMAClassName}[%
-  2017/01/03 v3.22 KOMA-Script
+  2017/04/13 v3.23 KOMA-Script
   document class (\ClassName)%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 2490 2016-07-29 06:29:45Z kohm $
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: $Id: scrkernel-compatibility.dtx 2491 2016-07-29 08:03:57Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 2596 2017-02-22 07:45:45Z kohm $ (init)
 \newcommand*
   {\scr@compatibility}{\scr@v@last}
-\KOMA@key{version}[last]{%
-  \scr@ifundefinedorrelax{scr@v@#1}{%
-    \def\scr@compatibility{0}%
-    \ClassWarningNoLine{\KOMAClassName}{%
-      You have set option `version' to value `#1', but\MessageBreak
-      this value of version is not supported.\MessageBreak
-      Because of this, version was set to `first'%
-    }%
-    \FamilyKeyStateProcessed
-    \KOMA@kav@replacevalue{.%
-      \KOMAClassFileName
-    }{version}{first}%
-  }{%
-    \ClassInfoNoLine{\KOMAClassName}{%
-      Switching compatibility level to `#1'%
-    }%
-    \edef\scr@compatibility{\@nameuse{scr@v@#1}}%
-    \FamilyKeyStateProcessed
-    \KOMA@kav@xreplacevalue{.%
-      \KOMAClassFileName
-    }{version}{#1}%
-  }%
-}
-\KOMA@kav@add{.\KOMAClassFileName}{version}{last}
-\AtEndOfClass{%
-  \KOMA@key{version}[]{%
-    \ClassError{\KOMAClassName}{%
-      Option `version' too late%
-    }{%
-      Option `version' may be set only while loading the
-      class.\MessageBreak
-      But you've tried to set it up later.%
-    }%
-    \FamilyKeyStateProcessed
-  }%
-}
 \@namedef{scr@v@first}{0}
 \@namedef{scr@v@2.9}{0}
 \@namedef{scr@v@2.9t}{0}
@@ -215,7 +180,46 @@
 \@namedef{scr@v@3.20}{15}
 \@namedef{scr@v@3.21}{15}
 \@namedef{scr@v@3.22}{16}
+\@namedef{scr@v@3.23}{16}
 \@namedef{scr@v@last}{16}
+%%% From File: $Id: scrkernel-typearea.dtx 2617 2017-04-03 13:56:55Z kohm $ (init)
+%%% From File: $Id: scrkernel-compatibility.dtx 2596 2017-02-22 07:45:45Z kohm $ (option)
+\KOMA@key{version}[last]{%
+  \scr@ifundefinedorrelax{scr@v@#1}{%
+    \def\scr@compatibility{0}%
+    \ClassWarningNoLine{\KOMAClassName}{%
+      You have set option `version' to value `#1', but\MessageBreak
+      this value of version is not supported.\MessageBreak
+      Because of this, version was set to `first'%
+    }%
+    \FamilyKeyStateProcessed
+    \KOMA@kav@replacevalue{.%
+      \KOMAClassFileName
+    }{version}{first}%
+  }{%
+    \ClassInfoNoLine{\KOMAClassName}{%
+      Switching compatibility level to `#1'%
+    }%
+    \edef\scr@compatibility{\@nameuse{scr@v@#1}}%
+    \FamilyKeyStateProcessed
+    \KOMA@kav@xreplacevalue{.%
+      \KOMAClassFileName
+    }{version}{#1}%
+  }%
+}
+\KOMA@kav@add{.\KOMAClassFileName}{version}{last}
+\AtEndOfClass{%
+  \KOMA@key{version}[]{%
+    \ClassError{\KOMAClassName}{%
+      Option `version' too late%
+    }{%
+      Option `version' may be set only while loading the
+      class.\MessageBreak
+      But you've tried to set it up later.%
+    }%
+    \FamilyKeyStateProcessed
+  }%
+}
 \newcommand*{\scr@v@is@lt}[1]{%
   \scr@compatibility<\@nameuse{scr@v@#1}
 }
@@ -228,7 +232,7 @@
 \newcommand*{\scr@v@is@ge}[1]{%
   \numexpr\scr@compatibility+\@ne\relax>\@nameuse{scr@v@#1}
 }
-%%% From File: $Id: scrkernel-miscellaneous.dtx 2463 2016-05-19 07:27:47Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 2605 2017-02-23 19:27:27Z kohm $
 \KOMA@key{draft}[true]{%
   \KOMA@set@ifkey{draft}{@tempswa}{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed
@@ -252,7 +256,7 @@
 \newcommand*{\@gr@gsffamily}{%
   \if@egregdoesnotlikesansseriftitles\else\sffamily\fi
 }
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 2428 2016-04-12 10:31:07Z kohm $
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 2604 2017-02-23 19:25:14Z kohm $
 \newcommand*{\lco@test}{%
   \IfFileExists{\CurrentOption.lco}{%
     \expandafter
@@ -269,7 +273,7 @@
 }
 \AtEndOfClass
   {\LoadLetterOption{DIN}}
-%%% From File: $Id: scrkernel-language.dtx 2429 2016-04-12 12:10:19Z kohm $
+%%% From File: $Id: scrkernel-language.dtx 2592 2017-02-16 16:56:10Z kohm $
 \newif\if@orgdate\@orgdatetrue
 \KOMA@key{numericaldate}[true]{%
   \if@orgdate\@orgdatefalse\else\@orgdatetrue\fi
@@ -284,7 +288,7 @@
 }{orgdate}{true}
 \KOMA@DeclareDeprecatedOption{scrdate}{numericaldate=true}
 \KOMA@DeclareDeprecatedOption{orgdate}{numericaldate=false}
-%%% From File: $Id: scrkernel-fonts.dtx 2501 2016-09-28 05:55:32Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 2592 2017-02-16 16:56:10Z kohm $
 \newcommand*\@ptsize{%
   12%
 }
@@ -371,7 +375,7 @@
 }
 %%% From File: $Id: scrkernel-variables.dtx 2429 2016-04-12 12:10:19Z kohm $
 %%% From File: $Id: scrkernel-pseudolengths.dtx 2001 2015-03-12 11:29:57Z kohm $
-%%% From File: $Id: scrkernel-typearea.dtx 2494 2016-08-04 07:23:47Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 2617 2017-04-03 13:56:55Z kohm $ (option)
 \newcommand*{\@BCOR}{\expandafter\@@BCOR\CurrentOption BCORBCOR\@@BCOR}
 \newcommand*{\@@BCOR}{}
 \def\@@BCOR #1BCOR#2BCOR#3\@@BCOR{%
@@ -479,7 +483,7 @@
 \DeclareOption*{%
   \lco@test
   \x@paper}
-%%% From File: $Id: scrkernel-paragraphs.dtx 2351 2016-02-22 08:20:29Z kohm $
+%%% From File: $Id: scrkernel-paragraphs.dtx 2592 2017-02-16 16:56:10Z kohm $
 %%%            run: option
 \newcommand*{\setparsizes}[3]{%
   \edef\f@parindent{\the\parindent}%
@@ -645,7 +649,7 @@
 \KOMA@DeclareDeprecatedOption{parindent}{parskip=false}
 \KOMA@kav@add{.\KOMAClassFileName}{parskip}{false}
 \KOMA@kav@add{.\KOMAClassFileName}{parskip}{absolute}
-%%% From File: $Id: scrkernel-pagestyles.dtx 2304 2015-12-12 08:55:47Z kohm $
+%%% From File: $Id: scrkernel-pagestyles.dtx 2592 2017-02-16 16:56:10Z kohm $
 \KOMA@ifkey{headsepline}{@hsl}%
 \KOMA@kav@add{.\KOMAClassFileName}{headsepline}{false}
 \KOMA@DeclareDeprecatedOption{headnosepline}{headsepline=false}
@@ -749,8 +753,8 @@
 \KOMA@DeclareDeprecatedOption{cleardoubleempty}{cleardoublepage=empty}
 \KOMA@DeclareDeprecatedOption{cleardoubleplain}{cleardoublepage=plain}
 \KOMA@DeclareDeprecatedOption{cleardoublestandard}{cleardoublepage=current}
-%%% From File: $Id: scrkernel-floats.dtx 2498 2016-09-01 19:44:10Z kohm $
-%%% From File: $Id: scrkernel-footnotes.dtx 2571 2017-01-03 13:04:47Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 2592 2017-02-16 16:56:10Z kohm $
+%%% From File: $Id: scrkernel-footnotes.dtx 2613 2017-03-27 08:12:13Z kohm $
 \KOMA@key{footnotes}{%
   \ifx\@footnotemark\scr@saved@footnotemark
   \else
@@ -820,8 +824,8 @@
   \csname FN@mf@prepare\endcsname
   \ifhmode\spacefactor\@x@sf\fi
   \relax}
-%%% From File: $Id: scrkernel-listsandtabulars.dtx 2503 2016-10-21 08:54:46Z kohm $
-%%% From File: $Id: scrkernel-notepaper.dtx 2564 2016-12-21 10:43:41Z kohm $
+%%% From File: $Id: scrkernel-listsandtabulars.dtx 2592 2017-02-16 16:56:10Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 2599 2017-02-22 11:09:23Z kohm $
 \KOMA@ifkey{firsthead}{@firsthead}
 \KOMAExecuteOptions{firsthead=true}
 \newcommand*{\@alignfrom}{0}
@@ -1371,12 +1375,12 @@
   \KOMAClassFileName
 }{symbolicnames}{false}%
 %%% From File: $Id: scrkernel-circularletters.dtx 2001 2015-03-12 11:29:57Z kohm $
-%%% From File: $Id: scrkernel-miscellaneous.dtx 2463 2016-05-19 07:27:47Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 2605 2017-02-23 19:27:27Z kohm $
 \KOMAExecuteOptions{%
   parskip=false,%
 }
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 2491 2016-07-29 08:03:57Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 2596 2017-02-22 07:45:45Z kohm $ (body)
 \expandafter\ifnum \@nameuse{scr@v@2.95}>\scr@compatibility\relax
   \newcommand*{\@setif}[2][]{%
     \begingroup
@@ -1388,7 +1392,7 @@
     \expandafter\endgroup\@tempa
   }%
 \fi
-%%% From File: $Id: scrkernel-fonts.dtx 2501 2016-09-28 05:55:32Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 2592 2017-02-16 16:56:10Z kohm $
 \newcommand*\scr@setlength[4]{%
   \expandafter\ifnum\scr@v@is@lt{3.12}\relax
     \setlength{#1}{#2 \@plus#3 \@minus#4}%
@@ -1862,7 +1866,7 @@
   \@nomath\sfb}
 \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
 \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
-%%% From File: $Id: scrkernel-miscellaneous.dtx 2463 2016-05-19 07:27:47Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 2605 2017-02-23 19:27:27Z kohm $
 \setlength{\skip\@mpfootins}{\skip\footins}
 \setlength\fboxsep{3\p@}
 \setlength\fboxrule{.4\p@}
@@ -1901,6 +1905,8 @@
         \noexpand\string
         \noexpand\new@tpo@label{\scr@tpo}{\noexpand\arabic{page}}}%
     \fi
+    \noexpand\def\noexpand\is@thispageodd@setlabel
+    {\unexpanded\expandafter{\is@thispageodd@setlabel}}%
   }%
   #1%
   \@esphack
@@ -1951,8 +1957,9 @@
   the extended optional argument of the section\MessageBreak
   commands}
 \scr@package@not@recommended{titleps}{%
-  package `scrlayer-scrpage`}
-%%% From File: $Id: scrkernel-letterclassoptions.dtx 2428 2016-04-12 10:31:07Z kohm $
+  package `scrlayer-scrpage'}
+\scr@package@not@recommended{minitoc}{}
+%%% From File: $Id: scrkernel-letterclassoptions.dtx 2604 2017-02-23 19:25:14Z kohm $
 \newcommand*{\LoadLetterOption}[1]{%
   \@ifundefined{@restore@catcode@level}%
     {\let\@restore@catcode@level=\z@}{}%
@@ -2079,26 +2086,29 @@
     \def\@tempb{letter}\ifx\LOPNP@size\@tempb%
       \setlength{\paperheight}{11in}\setlength{\paperwidth}{8.5in}%
     \else\def\@tempb{legal}\ifx\LOPNP@size\@tempb%
-      \setlength{\paperheight}{14in}\setlength{\paperwidth}{8.5in}%
-    \else\def\@tempb{executive}\ifx\LOPNP@size\@tempb%
-      \setlength{\paperheight}{10.5in}\setlength{\paperwidth}{7.25in}%
-    \else%
-      \def\ta@opt@err{%
-        \ClassError{scrlttr2%
-          }{papersize `\LOPNP@size' undefined}{%
-          You've told me to check for paper size
-          `\LOPNP@size'\MessageBreak
-          at letter option file `\LOPNP@option.lco',\MessageBreak
-          but this paper size is not supported.\MessageBreak
-          See the KOMA-Script manual for informations about known
-          paper sizes.}%
-        }%
-      \let\@headlines\ta@opt@err%
-      \expandafter\x@@paper\LOPNP@size paperpaper\x@@paper%
-    \fi\fi\fi
+        \setlength{\paperheight}{14in}\setlength{\paperwidth}{8.5in}%
+      \else\def\@tempb{executive}\ifx\LOPNP@size\@tempb%
+          \setlength{\paperheight}{10.5in}\setlength{\paperwidth}{7.25in}%
+        \else%
+          \PaperNameToSize[letter]{\LOPNP@size}%
+        \fi
+      \fi
+    \fi
     \@tempc
   \endgroup%
 }
+\AfterPackage*{typearea}{%
+\ProvideUnknownPaperSizeError{letter}{%
+  \ClassError{scrlttr2}{%
+    papersize `\LOPNP@size' undefined}{%
+    You've told me to check for paper size
+    `\LOPNP@size'\MessageBreak
+    at letter option file `\LOPNP@option.lco',\MessageBreak
+    but this paper size is not supported.\MessageBreak
+    See the KOMA-Script manual for informations about known
+    paper sizes.}%
+}
+}
 \newcommand*{\@@PapersizeWarning}{%
   \if@tempswa\else%
   \ClassWarningNoLine{scrlttr2%
@@ -2106,8 +2116,16 @@
     Letter option file `\LOPNP@option.lco'\MessageBreak
     needs paper size `\LOPNP@size'.\MessageBreak
     Current paper size is not `\LOPNP@size'!\MessageBreak
-    You should add `paper=\LOPNP@size' at the\MessageBreak
-    option list of \string\documentclass!\MessageBreak
+    \scr@ifundefinedorrelax{KOMAClassName}{%
+      You should load package `typearea' either\MessageBreak
+      with option `paper=\LOPNP@size,paper=portrait' or
+      additionally\MessageBreak
+    }{%
+      You should add `paper=\LOPNP@size,paper=portrait' at the\MessageBreak
+      option list of `\string\documentclass' or\MessageBreak
+    }%
+    add `\string\KOMAoptions{paper=\LOPNP@size,paper=portrait}'\MessageBreak
+    before starting this letter!\MessageBreak
     Maybe you know what you are doing,\MessageBreak
     so I do not change this myself}%
   \fi
@@ -2115,7 +2133,7 @@
 \newcommand*{\LetterOptionNeedsPapersize}[2]{%
   \edef\LOPNP@size{#2}\edef\LOPNP@option{#1}%
 }
-%%% From File: $Id: scrkernel-language.dtx 2429 2016-04-12 12:10:19Z kohm $
+%%% From File: $Id: scrkernel-language.dtx 2592 2017-02-16 16:56:10Z kohm $
 \newcommand*{\g@addnumerical@date}[2]{%
   \@ifundefined{date#1}{%
     \ClassInfo{scrlttr2%
@@ -2836,7 +2854,7 @@
       }%
     \@tempa%
   }
-%%% From File: $Id: scrkernel-typearea.dtx 2494 2016-08-04 07:23:47Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 2617 2017-04-03 13:56:55Z kohm $ (body)
 \let\@BCOR                =\relax
 \let\@@BCOR               =\relax
 \let\@DIV                 =\relax
@@ -2847,7 +2865,7 @@
 \let\x@@paper             =\relax
 \let\scr@pti@nerr@r       =\relax
 \RequirePackage{typearea}[\KOMAScriptVersion]
-%%% From File: $Id: scrkernel-paragraphs.dtx 2351 2016-02-22 08:20:29Z kohm $
+%%% From File: $Id: scrkernel-paragraphs.dtx 2592 2017-02-16 16:56:10Z kohm $
 %%%            run: body
 \setlength{\lineskip}{\p@}
 \setlength{\normallineskip}{\p@}
@@ -2974,7 +2992,7 @@
 \@lowpenalty  = 51
 \@medpenalty  =151
 \@highpenalty =301
-%%% From File: $Id: scrkernel-pagestyles.dtx 2304 2015-12-12 08:55:47Z kohm $
+%%% From File: $Id: scrkernel-pagestyles.dtx 2592 2017-02-16 16:56:10Z kohm $
 \newcommand*{\set@tempdima@hw}{%
   \setlength{\@tempdima}{\textwidth}%
   \if@mincl
@@ -3070,11 +3088,11 @@
 }
 \pagestyle{plain}
 \pagenumbering{arabic}
-%%% From File: $Id: scrkernel-floats.dtx 2498 2016-09-01 19:44:10Z kohm $
+%%% From File: $Id: scrkernel-floats.dtx 2592 2017-02-16 16:56:10Z kohm $
 \newcommand\marginline[1]{%
   \marginpar[\raggedleft{#1}]{\raggedright #1}%
 }
-%%% From File: $Id: scrkernel-footnotes.dtx 2571 2017-01-03 13:04:47Z kohm $
+%%% From File: $Id: scrkernel-footnotes.dtx 2613 2017-03-27 08:12:13Z kohm $
 \renewcommand*\footnoterule{%
   \normalsize\ftn@rule@test@values
   \kern-\dimexpr 2.6\p@+\ftn@rule@height\relax
@@ -3129,6 +3147,7 @@
 \newcommand\deffootnote[4][]{%
   \expandafter\ifnum\scr@v@is@ge{3.22}\relax
     \long\def\@makefntext##1{%
+      \raggedfootnote
       \leftskip #2
       \l@addto@macro\@trivlist{%
         \ifnum\@listdepth=\@ne\advance\leftmargin #2\relax\fi
@@ -3169,6 +3188,7 @@
   \fi
   \def\@@makefnmark{\hbox{\ftnm@font{#4}}}%
 }
+\newcommand*{\raggedfootnote}{}
 \newcommand*{\ftn@font}{\normalfont}
 \newcommand*{\scr@fnt@footnote}{\ftn@font}
 \newcommand*{\ftnm@font}{}
@@ -3229,7 +3249,7 @@
   \endgroup
   \@footnotemark
 }
-%%% From File: $Id: scrkernel-listsandtabulars.dtx 2503 2016-10-21 08:54:46Z kohm $
+%%% From File: $Id: scrkernel-listsandtabulars.dtx 2592 2017-02-16 16:56:10Z kohm $
   \setlength{\leftmargini}{2.5em}
 \setlength{\leftmarginii}{2.2em}
 \setlength{\leftmarginiii}{1.87em}
@@ -3379,7 +3399,7 @@
 \newcommand*{\scr@fnt@descriptionlabel}{\descfont}
 \newkomafont{labelinglabel}{}
 \newkomafont{labelingseparator}{}
-%%% From File: $Id: scrkernel-notepaper.dtx 2564 2016-12-21 10:43:41Z kohm $
+%%% From File: $Id: scrkernel-notepaper.dtx 2599 2017-02-22 11:09:23Z kohm $
 \newcommand*{\@firsthead}{%
   \ClassWarning{scrlttr2}{%
     Deprecated usage of \string\@firsthead.\MessageBreak
@@ -4716,7 +4736,7 @@
   \expandafter\def\csname #9\endcsname{#2 #1\\#3}%
  \fi \fi}
 \newcommand*{\addrchar}[1]{}
-%%% From File: $Id: scrlogo.dtx 1380 2013-10-01 15:31:55Z mjk $
+%%% From File: $Id: scrlogo.dtx 2592 2017-02-16 16:56:10Z 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

