diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrbase.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrbase.sty | 188 |
1 files changed, 125 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrbase.sty b/Master/texmf-dist/tex/latex/koma-script/scrbase.sty index fa551e44c7b..652c166e450 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrbase.sty +++ b/Master/texmf-dist/tex/latex/koma-script/scrbase.sty @@ -5,6 +5,7 @@ %% The original source files were: %% %% scrkernel-version.dtx (with options: `package,scrbase') +%% scrkernel-basics.dtx (with options: `package,prepare,base') %% scrkernel-basics.dtx (with options: `package,option,base') %% scrkernel-language.dtx (with options: `package,option,base') %% scrlfile.dtx (with options: `load') @@ -44,7 +45,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 @@ -66,18 +67,18 @@ \fi } \fi - \@CheckKOMAScriptVersion{2017/01/03 v3.22 KOMA-Script}% + \@CheckKOMAScriptVersion{2017/04/13 v3.23 KOMA-Script}% \endgroup \providecommand*{\scr@pkgextension}{\@pkgextension} \AtBeginDocument{% \let\scr@pkgextension\@pkgextension } -%%% From File: $Id: scrkernel-basics.dtx 2490 2016-07-29 06:29:45Z kohm $ +%%% From File: $Id: scrkernel-basics.dtx 2601 2017-02-23 16:26:09Z kohm $ (prepare) \NeedsTeXFormat{LaTeX2e}[1995/06/01] \ProvidesPackage{% scrbase% }[% - 2017/01/03 v3.22 KOMA-Script + 2017/04/13 v3.23 KOMA-Script package (% KOMA-Script-independent basics and keyval usage)] @@ -249,8 +250,28 @@ \expandafter\let\csname scr@before@process@options@#2#1@hook\endcsname \relax }% - \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions - \@namedef{scr@after@options@#1@hook}{\@namedef{scr@after@options@#1@hook}{}}% + \scr@ifundefinedorrelax{scr@after@options@#2@hook}{% + \@namedef{scr@after@options@#2@hook}{% + \@namedef{scr@after@options@#2@hook}{}% + }% + }{% + \expandafter\edef\csname scr@after@options@#2@hook\endcsname{% + \noexpand\@namedef{scr@after@options@#2@hook}{% + \unexpanded\expandafter\expandafter\expandafter + {\csname scr@after@options@#2@hook\endcsname}% + }% + }% + }% + \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate + \@namedef{scr@after@options@#2@hook@topmost}{% + \@namedef{scr@after@options@#2@hook@topmost}{}% + }% + \expandafter\l@addto@macro\csname scr@after@options@#2@hook\endcsname{% + \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate + \@nameuse{scr@after@options@#2@hook@topmost}% + }% + \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions + \fi \let\ds@\@empty \edef\@curroptions{\@ptionlist{\@currname.\@currext}}% \ifx\@currext\@clsextension\else @@ -290,8 +311,7 @@ \let\CurrentOption\@empty \let\@fileswith@pti@ns\@@fileswith@pti@ns \AtEndOfPackage{\let\@unprocessedoptions\relax}% - \let\AtEndOfFamilyOptions\@firstofone - \@nameuse{scr@after@options@#1@hook}% + \@nameuse{scr@after@options@#2@hook}% } \@onlypreamble\FamilyProcessOptions \newcommand*{\BeforeFamilyProcessOptions}[3][.\@currname.\@currext]{% @@ -303,11 +323,18 @@ }% } \newcommand*{\scr@AtEndOfFamilyOptions}{% + \kernel@ifstar {\scr@@AtEndOfFamilyOptions{@topmost}}% + {\scr@@AtEndOfFamilyOptions\@empty}% +} +\newcommand*{\scr@@AtEndOfFamilyOptions}[1]{% \expandafter - \l@addto@macro\csname scr@after@options@\FamilyOfKey @hook\endcsname + \l@addto@macro\csname scr@after@options@\FamilyOfKey @hook#1\endcsname +} +\newcommand*{\scr@AtEndOfFamilyOptions@immediate}{% + \kernel@ifstar {\@firstofone}{\@firstofone}% } \newcommand*{\AtEndOfFamilyOptions}{} -\let\AtEndOfFamilyOptions\@firstofone +\let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate \newcommand*\scr@ifprocess@curroption[2]{% \def\reserved@a##1=##2\@nil{\def\reserved@a{##1}}% \expandafter\reserved@a\CurrentOption=\@nil @@ -374,6 +401,35 @@ \expandafter\@secondoftwo \fi } +\@ifundefined{l@addto@macro}{}{% + \begingroup + \long\def\reserved@a#1#2{% + \edef#1{\unexpanded\expandafter{#1#2}}% + }% + \ifx\reserved@a\l@addto@macro\else + \PackageWarning{scrbase}{% + Someone also uses macro name \string\l@addto@macro.\MessageBreak + When KOMA-Script author decided to use macro name\MessageBreak + \string\l@addto@macro\space first, there was no other + free\MessageBreak + LaTeX package using this macro name.\MessageBreak + In the meantime other package authers decided to use\MessageBreak + same macro name, but unfortunatly not all of those\MessageBreak + are compatible with KOMA-Script's definition, e.g.,\MessageBreak + while adding definitions with arguments to macros.\MessageBreak + Because of such potentially incompatible definitions,\MessageBreak + KOMA-Script will redefine the command now.\MessageBreak + Please ask the author of the other package to\MessageBreak + rename his macro, if a problem results in the\MessageBreak + redefinition% + }% + \fi + \endgroup +} +\long\def\l@addto@macro#1#2{% + \edef#1{\unexpanded\expandafter{#1#2}}% +}% +%%% From File: $Id: scrkernel-basics.dtx 2601 2017-02-23 16:26:09Z kohm $ (option) \newcommand*{\dont@let@as@internal@defined}{/} \newif\if@let@as@internalonly@defined\@let@as@internalonly@definedfalse \DefineFamily{KOMA} @@ -390,12 +446,12 @@ \fi } \FamilyProcessOptions{KOMA}\relax -%%% From File: $Id: scrkernel-language.dtx 2429 2016-04-12 12:10:19Z kohm $ -%%% From File: $Id: scrlfile.dtx 2429 2016-04-12 12:10:19Z kohm $ +%%% From File: $Id: scrkernel-language.dtx 2592 2017-02-16 16:56:10Z kohm $ +%%% From File: $Id: scrlfile.dtx 2592 2017-02-16 16:56:10Z kohm $ \RequirePackage{scrlfile}[% - 2017/01/03 v3.22 KOMA-Script + 2017/04/13 v3.23 KOMA-Script ] -%%% From File: $Id: scrkernel-basics.dtx 2490 2016-07-29 06:29:45Z kohm $ +%%% From File: $Id: scrkernel-basics.dtx 2601 2017-02-23 16:26:09Z kohm $ (body) \newcommand*{\XdivY}[2]{% \numexpr ( #1 + #2 / 2 ) / #2 - 1\relax } @@ -1139,13 +1195,21 @@ \let@as@internal@defined{ifpsoutput} \newcommand*{\scr@ifdvioutput}{% \scr@ifundefinedorrelax{pdfoutput}{% - \scr@ifundefinedorrelax{OpMode}{% - \expandafter\@firstoftwo - }{% - \ifnum\OpMode=0 + \scr@ifundefinedorrelax{outputmode}{% + \scr@ifundefinedorrelax{OpMode}{% \expandafter\@firstoftwo - \else + }{% + \ifnum\OpMode=0 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% + }{% + \ifnum\outputmode>0 \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo \fi }% }{% @@ -1188,7 +1252,18 @@ \@FamilyExecuteOptions[{#1}]{#2}% } \newcommand{\@FamilyExecuteOptions}[3][.\@currname.\@currext]{% - \@namedef{scr@after@options@#1@hook}{\@namedef{scr@after@options@#1@hook}{}}% + \scr@ifundefinedorrelax{scr@after@options@#2@hook}{% + \@namedef{scr@after@options@#2@hook}{% + \@namedef{scr@after@options@#2@hook}{}% + }% + }{% + \expandafter\edef\csname scr@after@options@#2@hook\endcsname{% + \noexpand\@namedef{scr@after@options@#2@hook}{% + \unexpanded\expandafter\expandafter\expandafter + {\csname scr@after@options@#2@hook\endcsname}% + }% + }% + }% \@for\scr@key@atlist:=#3\do{% \expandafter\scr@key@split@name@value\scr@key@atlist==\@nil \ifx\scr@key@name\@empty\else @@ -1249,7 +1324,7 @@ \fi \fi }% - \@nameuse{scr@after@options@#1@hook}% + \@nameuse{scr@after@options@#2@hook}% } \newcommand*{\scr@show@key@state@error}{% \ifx\FamilyKeyState\FamilyKeyStateProcessed\else @@ -1282,7 +1357,29 @@ } \newcommand{\FamilyOptions}[1]{\@FamilyOptions{#1}} \newcommand{\@FamilyOptions}[2]{% - \@namedef{scr@after@options@#1@hook}{\@namedef{scr@after@options@#1@hook}{}}% + \scr@ifundefinedorrelax{scr@after@options@#1@hook}{% + \@namedef{scr@after@options@#1@hook}{% + \@namedef{scr@after@options@#1@hook}{}% + }% + }{% + \expandafter\edef\csname scr@after@options@#1@hook\endcsname{% + \noexpand\@namedef{scr@after@options@#1@hook}{% + \unexpanded\expandafter\expandafter\expandafter + {\csname scr@after@options@#1@hook\endcsname}% + }% + }% + }% + \scr@ifundefinedorrelax{scr@after@options@#1@hook@topmost}{% + \@namedef{scr@after@options@#1@hook@topmost}{}% + }{}% + \expandafter\ifx\csname scr@after@options@#1@hook@topmost\endcsname\@empty + \expandafter\l@addto@macro\csname scr@after@options@#1@hook\endcsname{% + \@nameuse{scr@after@options@#1@hook@topmost}% + }% + \@namedef{scr@after@options@#1@hook@topmost}{% + \@namedef{scr@after@options@#1@hook@topmost}{}% + }% + \fi \@for\scr@key@atlist:=#2\do{% \ifx\scr@key@atlist\@empty\else \ifx\scr@key@atlist\space\else @@ -1379,20 +1476,13 @@ \noexpand\def\noexpand\scr@key@run@errors{% \unexpanded\expandafter{\scr@key@run@errors}}% \fi - \expandafter\ifx\csname scr@after@options@#1@hook\endcsname\relax - \noexpand\expandafter\noexpand\let\noexpand\csname - scr@after@options@#1@hook\endcsname\relax - \else - \noexpand\def\expandafter\noexpand - \csname scr@after@options@#1@hook\endcsname{% - \expandafter\unexpanded\expandafter\expandafter\expandafter{% - \csname scr@after@options@#1@hook\endcsname - }}% + \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate + \noexpand\let\noexpand\AtEndOfFamilyOptions + \noexpand\scr@AtEndOfFamilyOptions@immediate \fi }% \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions \reserved@a - \let\AtEndOfFamilyOptions\@firstofone \ifx\FamilyKeyState\FamilyKeyStateUnknown \PackageInfo{scrbase}{Unknown processing state.\MessageBreak Processing option @@ -1452,34 +1542,6 @@ \def\reserved@b{\FamilyOptions{#1}}% \expandafter\reserved@b\expandafter{\reserved@a}% } -\@ifundefined{l@addto@macro}{}{% - \begingroup - \long\def\reserved@a#1#2{% - \edef#1{\unexpanded\expandafter{#1#2}}% - }% - \ifx\reserved@a\l@addto@macro\else - \PackageWarning{scrbase}{% - Someone also uses macro name \string\l@addto@macro.\MessageBreak - When KOMA-Script author decided to use macro name\MessageBreak - \string\l@addto@macro\space first, there was no other - free\MessageBreak - LaTeX package using this macro name.\MessageBreak - In the meantime other package authers decided to use\MessageBreak - same macro name, but unfortunatly not all of those\MessageBreak - are compatible with KOMA-Script's definition, e.g.,\MessageBreak - while adding definitions with arguments to macros.\MessageBreak - Because of such potentially incompatible definitions,\MessageBreak - KOMA-Script will redefine the command now.\MessageBreak - Please ask the author of the other package to\MessageBreak - rename his macro, if a problem results in the\MessageBreak - redefinition% - }% - \fi - \endgroup -} -\long\def\l@addto@macro#1#2{% - \edef#1{\unexpanded\expandafter{#1#2}}% -}% \begingroup \catcode`\^^A=\catcode`\# \@makeother\# @@ -1597,7 +1659,7 @@ \newcommand*{\FamilySetCounter}[4]{% \begingroup \protected@edef\reserved@a{#4}% - \def\reserved@b{\endgroup\value{#3}=#4 \FamilyKeyStateProcessed}% + \def\reserved@b{\endgroup\value{#3}=#4\relax\FamilyKeyStateProcessed}% \expandafter\ifiscount\expandafter{\reserved@a}{}{% \expandafter\ifisdimen\expandafter{\reserved@a}{}{% \expandafter\ifisskip\expandafter{\reserved@a}{}{% @@ -1833,7 +1895,7 @@ \newcommand{\Family@String@Key}[4]{% \DefineFamilyKey[{#1}]{#2}{#3}{\def#4{##1}\FamilyKeyStateProcessed}% } -%%% 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*{\defcaptionname}{% \kernel@ifstar\scr@def@scaptionname\scr@def@captionname } @@ -2253,7 +2315,7 @@ \reserved@b }% } -%%% 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}}}{} |