summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx')
-rw-r--r--Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx135
1 files changed, 88 insertions, 47 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx b/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx
index d49b9ba6406..3c6f846094f 100644
--- a/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx
+++ b/Master/texmf-dist/source/latex/koma-script/scrkernel-typearea.dtx
@@ -1,8 +1,8 @@
-%\CheckSum{2882}
+% \CheckSum{2945}
% \iffalse meta-comment
% ======================================================================
% scrkernel-typearea.dtx
-% Copyright (c) Markus Kohm, 2002-2019
+% Copyright (c) Markus Kohm, 2002-2020
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
@@ -20,7 +20,7 @@
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% scrkernel-typearea.dtx
-% Copyright (c) Markus Kohm, 2002-2019
+% Copyright (c) Markus Kohm, 2002-2020
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
@@ -55,7 +55,7 @@
% Right brace \} Tilde \~}
%
% \iffalse meta-comment
-%%% From File: $Id: scrkernel-typearea.dtx 3390 2019-11-18 17:09:35Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 3470 2020-03-24 12:12:02Z kohm $
%<identify>%%% (run: identify)
%<init>%%% (run: init)
%<options>%%% (run: options)
@@ -66,9 +66,9 @@
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
\def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2019-11-18 18:09:35 +0100 (Mon, 18 Nov 2019) $
+ \filedate$Date: 2020-03-24 13:12:02 +0100 (Tue, 24 Mar 2020) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
- \filerevision$Revision: 3390 $
+ \filerevision$Revision: 3470 $
\edef\reserved@a{%
\noexpand\endgroup
\noexpand\ProvidesFile{scrkernel-typearea.dtx}[%
@@ -1413,37 +1413,39 @@
% \begin{macrocode}
%<*class&body&!letter>
\if@scr@emulatestandardclasses
- \ifnum\@lastdiv=\z@
- \setlength{\textwidth}{\dimexpr \paperwidth-2in\relax}
- \ifdim \f@size\p@<10.5\p@
- \setlength{\@tempdimb}{345\p@}
- \else\ifdim \f@size\p@<11.5\p@
- \setlength{\@tempdimb}{360\p@}
- \else
- \setlength{\@tempdimb}{390\p@}
- \fi
- \fi
- \if@twocolumn
- \ifdim\@textwidth>2\@tempdimb\relax
- \setlength{\textwidth}{2\@tempdimb}
+ \Ifstr{\@lastdiv}{areaset}{}{%
+ \ifnum\@lastdiv=\z@
+ \setlength{\textwidth}{\dimexpr \paperwidth-2in\relax}
+ \ifdim \f@size\p@<10.5\p@
+ \setlength{\@tempdimb}{345\p@}
+ \else\ifdim \f@size\p@<11.5\p@
+ \setlength{\@tempdimb}{360\p@}
+ \else
+ \setlength{\@tempdimb}{390\p@}
+ \fi
\fi
- \else
- \ifdim\textwidth>\@tempdimb
- \setlength{\textwidth}{\@tempdimb}
+ \if@twocolumn
+ \ifdim\@textwidth>2\@tempdimb\relax
+ \setlength{\textwidth}{2\@tempdimb}
+ \fi
+ \else
+ \ifdim\textwidth>\@tempdimb
+ \setlength{\textwidth}{\@tempdimb}
+ \fi
\fi
+ \@settopoint\textwidth
+ \setlength{\@tempdima}{\dimexpr \paperheight-3.5in\relax}
+ \divide\@tempdima\baselineskip
+ \@tempcnta=\@tempdima
+ \setlength{\textheight}{\@tempcnta\baselineskip}
+ \addtolength{\textheight}{\topskip}
+ \edef\reserved@a{%
+ \noexpand\@areasetadvancedtrue
+ \noexpand\areaset[current]{\noexpand\textwidth}{\noexpand\textheight}%
+ \if@areasetadvanced\else\noexpand\@areasetadvancedfalse\fi
+ }\reserved@a
\fi
- \@settopoint\textwidth
- \setlength{\@tempdima}{\dimexpr \paperheight-3.5in\relax}
- \divide\@tempdima\baselineskip
- \@tempcnta=\@tempdima
- \setlength{\textheight}{\@tempcnta\baselineskip}
- \addtolength{\textheight}{\topskip}
- \edef\reserved@a{%
- \noexpand\@areasetadvancedtrue
- \noexpand\areaset[current]{\noexpand\textwidth}{\noexpand\textheight}%
- \if@areasetadvanced\else\noexpand\@areasetadvancedfalse\fi
- }\reserved@a
- \fi
+ }%
\fi
%</class&body&!letter>
% \end{macrocode}
@@ -1701,28 +1703,51 @@
% \end{option}
%
% \begin{option}{DIV}
-% \changes{v2.2a}{1995/01/25}{neue Option}%^^A
+% \changes{v2.2a}{1995/01/25}{new option}%^^A
% \changes{v2.95}{2002/12/04}{new implementation using \textsf{keyval}}%^^A
% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}}%^^A
% The value is written into the counter \cs{ta@div}. Several symbolic values
% are supported and have to be converted into a counter. Note, while loading
% the package symbolic values are nonsense.
+% \begin{macro}{\@lastdiv}
+% \changes{v3.30}{2020/03/24}{init the internal macro}%^^A
+% This internal macro stores the last value to option \texttt{DIV}. It is
+% initialized with \cs{relax}.
+% \begin{macrocode}
+%<package&typearea&init>\newcommand*{\@lastdiv}{\z@}\let\@lastdiv\relax
+% \end{macrocode}
+% \end{macro}%^^A \@lastdiv
% \begin{macrocode}
%<*package&typearea&options>
+\def\movet@reserved@a@to@nnil#1\@nnil{\def\reserved@a{#1}}%
\KOMA@key{DIV}[calc]{%
\edef\@tempa{#1}%
- \def\@tempb{last}\ifx\@tempa\@tempb\let\@tempa=\@lastdiv\fi
+ \def\@tempb{last}\ifx\@tempa\@tempb\let\@tempa=\@lastdiv
+ \ifx\@tempa\relax\def\@tempa{current}\fi
+ \fi
\def\@tempb{current}\ifx\@tempa\@tempb\else
\def\@tempb{default}\ifx\@tempa\@tempb\ta@div=\z@ \else
\def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=\tw@ \else
\def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=\thr@@ \else
- \ta@div=\@tempa
+ \expandafter\def\expandafter\@tempa\expandafter{\expandafter0\@tempa}%
+ \afterassignment\movet@reserved@a@to@nnil
+ \@tempcnta=\@tempa\relax\@nnil
+ \def\@tempb{\relax}\ifx\reserved@a\@tempb
+ \ta@div=\@tempcnta
+ \edef\@tempa{\the\ta@div}%
+ \else
+ \let\@tempa\relax
+ \fi
\fi
\fi
\fi
\fi
- \FamilyKeyStateProcessed
- \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{DIV}{#1}%
+ \ifx\@tempa\relax
+ \FamilyKeyStateUnknownValue
+ \else
+ \FamilyKeyStateProcessed
+ \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{DIV}{\@tempa}%
+ \fi
}
% \end{macrocode}
% After loading the package we have to do a little bit more, because we need
@@ -1836,6 +1861,8 @@
% the margin notes at the outer margin. But if the typing area is to narrow
% for the margin note column, the width of margin note column will be
% reduced. This can be done easily be swapping the two lengths.
+% \changes{v3.30}{2020/02/25}{orphan line break at end of warning message
+% removed}%^^A
% \begin{macrocode}
\if@mincl
\advance\textwidth by-\marginparwidth
@@ -1846,7 +1873,7 @@
marginpar (\the\marginparwidth) while using option\MessageBreak
`mpinclude'.\MessageBreak
Because of this, I'm exchanging the values.\MessageBreak
- You should increase DIV to avoid such problems.\MessageBreak
+ You should increase DIV to avoid such problems%
}%
\@tempskipa=\marginparwidth
\marginparwidth=\textwidth
@@ -2120,8 +2147,10 @@
% \changes{v2.8q}{2001/11/06}{new symbolic value \texttt{last}}%^^A
% \changes{v2.96}{2006/08/21}{warn if \cs{typearea} is used inside a
% group}%^^A
-% \changes{v3.10}{2011/09/13}{using \cs{scr@grouplevel@test}}
+% \changes{v3.10}{2011/09/13}{using \cs{scr@grouplevel@test}}%^^A
% \changes{v3.12}{2013/03/26}{page footer height configurable}%^^A
+% \changes{v3.30}{2020/03/24}{\texttt{current} after \cs{areaset} is
+% \texttt{areaset}}%^^A
%
% The symbolic values of the obligatory argument of \cs{typearea}:
% \begin{center}\begin{tabular}{lll}
@@ -2145,14 +2174,16 @@
\fi
\edef\@tempa{#2}%
\def\@tempb{last}\ifx\@tempa\@tempb\let\@tempa=\@lastdiv
- \ifx\csname @tempa\endcsname\relax
- \def\@tempa{current}%
- \fi
+ \ifx\@tempa\relax \def\@tempa{current}\fi
\fi
+ \Ifstr{\@tempa}{current}{%
+ \Ifstr{\@lastdiv}{areaset}{\let\@tempa\@lastdiv}{}%
+ }{}%
\def\@tempb{areaset}\ifx\@tempa\@tempb
\areaset[current]{\textwidth}{\textheight}%
\else
- \def\@tempb{current}\ifx\@tempa\@tempb\else
+ \def\@tempb{current}\ifx\@tempa\@tempb
+ \else
\def\@tempb{default}\ifx\@tempa\@tempb\ta@div=\z@ \else
\def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=\tw@ \else
\def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=\thr@@ \else
@@ -3096,6 +3127,8 @@
% \changes{v2.5}{1997/06/17}{Einzelzeichenscanner durch
% Mustererkennung ersetzt}%^^A
% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A
+% \changes{v3.30}{2020/03/24}{avoid error message for unknown \texttt{BCOR}
+% value to \cs{documentclass}}%^^A
% Das Makro \cs{@BCOR} wird später benötigt, um die Option
% \texttt{BCOR\emph{BCOR}} zu erkennen. Die Option wird über ihr
% Muster erkannt.
@@ -3120,7 +3153,10 @@
% \changes{v3.22}{2016/07/29}{missing deprecated option warning added}%^^A
% \changes{v3.28}{2019/11/18}{\cs{ifdimen} renamed to \cs{Ifdimen}}%^^A
% \begin{macrocode}
-%<class> \PassOptionsToPackage{BCOR#2}{typearea}%
+%<*class>
+ \Ifstrstart{#2}{=}{\OptionNotUsed}{%
+ \PassOptionsToPackage{BCOR#2}{typearea}}%
+%</class>
%<*package>
\Ifdimen{#2}{%
\KOMA@UseDeprecatedOption{%
@@ -3145,6 +3181,8 @@
% Mustererkennung ersetzt}%^^A
% \changes{v3.22}{2016/07/29}{missing deprecated option warning added}%^^A
% \changes{v3.28}{2019/11/18}{\cs{ifnumber} umbenannt in \cs{Ifnumber}}%^^A
+% \changes{v3.30}{2020/03/24}{avoid error message for unknown \texttt{DIV}
+% value to \cs{documentclass}}%^^A
% Die grundsätzliche Funktion ist die gleiche wie bei \cs{@BCOR},
% \cs{@@BCOR}.
% \begin{macrocode}
@@ -3153,7 +3191,10 @@
\def\@@DIV #1DIV#2DIV#3\@@DIV{%
\edef\@tempa{#1}\ifx\@tempa\@empty
\edef\@tempa{#3}\def\@tempb{DIV}\ifx\@tempa\@tempb
-%<class> \PassOptionsToPackage{DIV#2}{typearea}%
+%<*class>
+ \Ifstrstart{#2}{=}{\OptionNotUsed}{%
+ \PassOptionsToPackage{DIV#2}{typearea}}%
+%</class>
%<*package>
\Ifnumber{#2}{%
\KOMA@UseDeprecatedOption{%