%%
%% This is file `scrbase.sty',
%% generated with the docstrip utility, extended by scrdocstrip.
%%
%% The original source files were:
%%
%% scrkernel-version.dtx  (with options: `package,scrbase')
%% scrkernel-basics.dtx  (with options: `package,option,base')
%% scrkernel-language.dtx  (with options: `package,option,base')
%% scrlfile.dtx  (with options: `load')
%% scrkernel-basics.dtx  (with options: `package,body,base')
%% scrkernel-language.dtx  (with options: `package,body,base')
%% scrlogo.dtx  (with options: `logo')
%% 
%% Copyright (c) 2002-2014 Markus Kohm [komascript at gmx info]
%% 
%% This file was generated from file(s) of the KOMA-Script bundle.
%% ---------------------------------------------------------------
%% 
%% It may be distributed under the conditions of the
%% LaTeX Project Public License in the version distributed together
%% with KOMA-Script, see file `lppl.txt' or `lppl-de.txt'.
%% 
%% This file may only be distributed together with a copy of the
%% KOMA-Script bundle.  You may however distribute the
%% KOMA-Script bundle without all such generated files.  See also
%% `lppl.txt' or `lppl-de.txt' for additional information.
%% 
%% The list of files belonging to KOMA-Script distribution is given in
%% the file `manifest.txt'.  See also `lppl.txt' or `lppl-de.txt' for
%% additional information.
%% 
%% If this file is a beta version, you may not be allowed to distribute
%% it.  Look at the comments below to see if this is the case.
%% 
%% English and German manuals are part of KOMA-Script bundle.
%% ----------------------------------------------------------
%% 
%% See `README'.
%% 
%% The KOMA-Script bundle (but maybe not this file) was based upon the
%% 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/>.
%% 
%%% From File: $Id: scrkernel-version.dtx 2089 2015-05-06 06:10:29Z kohm $
\begingroup
  \catcode`\@11\relax
  \ifx\KOMAScriptVersion\undefined
    \newcommand*{\@CheckKOMAScriptVersion}[1]{%
      \gdef\KOMAScriptVersion{#1}%
    }%
  \else
    \newcommand*{\@CheckKOMAScriptVersion}[1]{%
      \def\@tempa{#1}%
      \ifx\KOMAScriptVersion\@tempa\else
        \@latex@warning@no@line{%
          \noexpand\KOMAScriptVersion\space is
          `\KOMAScriptVersion',\MessageBreak
          but `#1' was expected!\MessageBreak
          You should not use classes, packages or files
          from\MessageBreak
          different KOMA-Script versions%
        }%
      \fi
    }
  \fi
  \@CheckKOMAScriptVersion{2015/05/06 v3.17a KOMA-Script}%
\endgroup
\providecommand*{\scr@pkgextension}{\@pkgextension}
\AtBeginDocument{%
  \let\scr@pkgextension\@pkgextension
}
%%% From File: $Id: scrkernel-basics.dtx 2011 2015-03-17 11:39:55Z kohm $
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{%
  scrbase%
}[%
  2015/05/06 v3.17a KOMA-Script
  package (%
    KOMA-Script-independent
 basics and keyval usage)]
\begingroup
  \def\reserved@b{}%
  \def\reserved@a#1{%
    \PackageError{scrbase}{seems you are not running e-TeX#1}{%
      Since 2004 the LaTeX team recommends to use e-TeX.\MessageBreak
      KOMA-Script since version 2.95 uses several e-TeX features.\MessageBreak
      At actual systems `latex' should already use e-TeX.\MessageBreak
      At deprecated systems it may be called `elatex'.\MessageBreak
      Use either unsupported KOMA-Script up to version 2.9u or\MessageBreak
      ask you administrator for LaTeX using e-TeX#1.\MessageBreak
      Not using e-TeX#1 is a fatal error!\MessageBreak
      Processing cannot be continued!}%
    \endgroup
    \batchmode \errmessage{}\csname @@end\endcsname\end\relax
    \csname endinput\endcsname
  }%
  \expandafter\ifx\csname eTeXversion\endcsname\relax\else
    \ifnum\eTeXversion <2
      \def\reserved@b{ V 2}%
    \else
      \let\reserved@a\endgroup
    \fi
  \fi
\expandafter\reserved@a\expandafter{\reserved@b}
\RequirePackage{keyval}
\newcommand{\scr@ifundefinedorrelax}[1]{%
  \ifcsname #1\endcsname
    \expandafter\ifx\csname #1\endcsname\relax
      \expandafter\expandafter\expandafter\@firstoftwo
    \else
      \expandafter\expandafter\expandafter\@secondoftwo
    \fi
  \else
    \expandafter\@firstoftwo
  \fi
}
\newcommand*\PackageErrorNoLine[2]{%
  \PackageError{#1}{#2\@gobble}%
}
\newcommand*{\DefineFamily}[1]{%
  \scr@ifundefinedorrelax{#1@key@familylist}{%
    \@namedef{#1@key@familylist}{}%
  }{}%
}
\newcommand*{\scr@if@family}[2]{%
  \scr@ifundefinedorrelax{#1@key@familylist}{%
    \PackageError{scrbase}{%
      unknown family `#1'%
    }{%
      You've tried to #2 for family `#1'.\MessageBreak
      This my be done only for previous defined families.\MessageBreak
      You should call `\string\DefineFamily{#1}' first.%
    }%
  }%
}
\newcommand*{\DefineFamilyMember}[2][.\@currname.\@currext]{%
  \scr@if@family{#2}{define a family member}{%
    \edef\reserved@a{%
      \noexpand\in@{#2#1,}{\csname #2@key@familylist\endcsname}}%
    \reserved@a
    \ifin@\else
      \expandafter\edef\csname #2@key@familylist\endcsname{%
        \@nameuse{#2@key@familylist}#2#1,}%
    \fi
  }%
}
\newcommand*{\scr@if@familymember}[3]{%
  \scr@if@family{#2}{#3}{%
    \edef\reserved@a{%
      \noexpand\in@{#2#1,}{\csname #2@key@familylist\endcsname}}%
    \reserved@a
    \ifin@
      \expandafter\@firstofone
    \else
      \PackageError{scrbase}{%
        unknown member `#1' at family `#2'%
      }{%
        You've tried to #3 for member `#1' of family `#2'.\MessageBreak
        This my be done only for previous defined family members.\MessageBreak
        You should call `\string\DefineFamilyMember[{#1}]{#2}' first.%
      }%
      \expandafter\@gobble
    \fi
  }%
}
\newcommand*{\DefineFamilyKey}[3][.\@currname.\@currext]{%
  \@ifnextchar[%]
  {%
    \edef\reserved@a{#1}%
    \expandafter\scr@define@family@key
    \expandafter{\reserved@a}{#2}{#3}%
  }{%
    \edef\reserved@a{#1}%
    \expandafter\scr@define@family@key@nodefault
    \expandafter{\reserved@a}{#2}{#3}%
  }%
}
\newcommand{\scr@define@family@key}{}
\long\def\scr@define@family@key#1#2#3[#4]#5{%
  \scr@if@familymember{#1}{#2}{define a key}{%
    \define@key{#2#1}{#3}[{#4}]{%
      \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
      \FamilyKeyStateUnknown
      #5%
      \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
    }%
  }%
}
\newcommand{\scr@define@family@key@nodefault}[4]{%
  \scr@if@familymember{#1}{#2}{define a key}{%
    \define@key{#2#1}{#3}{%
      \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
      \FamilyKeyStateUnknown
      #4
      \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
    }%
    \@namedef{KV@#2#1@#3@default}{%
      \def\FamilyOfKey{#2}\def\FamilyMemberOfKey{#1}%
      \FamilyKeyStateNeedValue
    }%
  }%
}
\newcommand*{\RelaxFamilyKey}[3][.\@currname.\@currext]{%
  \scr@ifundefinedorrelax{KV@#2#1@#3}{}{%
    \expandafter\let\csname KV@#2#1@#3\endcsname\relax
  }%
  \scr@ifundefinedorrelax{KV@#2#1@#3@default}{}{%
    \expandafter\let\csname KV@#2#1@#3@default\endcsname\relax
  }%
}
\newcommand*{\FamilyKeyState}{}
\newcommand*{\FamilyKeyStateUnknown}{%
  \let\FamilyKeyState\FamilyKeyStateUnknown
}
\newcommand*{\FamilyKeyStateUnknownValue}{%
  \let\FamilyKeyState\FamilyKeyStateUnknownValue
}
\newcommand*{\FamilyKeyStateNeedValue}{%
  \let\FamilyKeyState\FamilyKeyStateNeedValue
}
\newcommand*{\FamilyKeyStateProcessed}{%
  \let\FamilyKeyState\FamilyKeyStateProcessed
}
\let\FamilyKeyState\FamilyKeyStateUnknown
\newcommand*{\FamilyOfKey}{}
\newcommand*{\FamilyMemberOfKey}{}
\newcommand*{\@globaloptionslist}{}
\let\@globaloptionslist\@classoptionslist
\scr@ifundefinedorrelax{XKV@classoptionslist}{}{%
  \ifx\XKV@classoptionslist\@empty\else
    \let\@globaloptionslist\XKV@classoptionslist
  \fi
}
\newcommand*{\FamilyProcessOptions}[2][.\@currname.\@currext]{%
  \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions
    \PackageError{scrbase}{nested \string\FamilyProcessOptions\space
      detected\MessageBreak}{%
      \string\FamilyProcessOptions\space has been used while processing or
      setting options.\MessageBreak
      This is currently not allowed. You should contact the author of the
      causing\MessageBreak
      code.\MessageBreak
      This error is fatal. You should not continue.%
    }%
  \fi
  \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions
  \@namedef{scr@after@options@#1@hook}{\@namedef{scr@after@options@#1@hook}{}}%
  \let\ds@\@empty
  \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
  \ifx\@currext\@clsextension\else
    \@for\CurrentOption:=\@globaloptionslist\do{%
      \ifx\CurrentOption\@empty\else
        \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}%
        \ifin@
          \@use@ption
          \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
        \else
          \scr@ifprocess@curroption{#1}{#2}{%
            \@expandtwoargs\@removeelement\CurrentOption
            \@unusedoptionlist\@unusedoptionlist
          }{}%
        \fi
      \fi
    }%
  \fi
  \@for\CurrentOption:=\@curroptions\do{%
    \scr@ifundefinedorrelax{ds@\CurrentOption}{%
      \@use@ption
      \scr@ifprocess@curroption{#1}{#2}{}\default@ds
    }\@use@ption
  }%
  \@for\CurrentOption:=\@declaredoptions\do{%
    \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
  \let\CurrentOption\@empty
  \let\@fileswith@pti@ns\@@fileswith@pti@ns
  \AtEndOfPackage{\let\@unprocessedoptions\relax}%
  \let\AtEndOfFamilyOptions\@firstofone
  \@nameuse{scr@after@options@#1@hook}%
}
\@onlypreamble\FamilyProcessOptions
\newcommand*{\scr@AtEndOfFamilyOptions}{%
  \expandafter
  \l@addto@macro\csname scr@after@options@\FamilyOfKey @hook\endcsname
}
\newcommand*{\AtEndOfFamilyOptions}{}
\let\AtEndOfFamilyOptions\@firstofone
\newcommand*\scr@ifprocess@curroption[2]{%
  \def\reserved@a##1=##2\@nil{\def\reserved@a{##1}}%
  \expandafter\reserved@a\CurrentOption=\@nil
  \scr@ifundefinedorrelax{KV@#2@\reserved@a}{%
    \scr@ifundefinedorrelax{KV@#2#1@\reserved@a}{%
      \let\FamilyKeyState\OptionNotUsed
    }{%
      \protected@edef\reserved@b{\noexpand\setkeys{#2#1}{{\CurrentOption}}%
        \noexpand\def\noexpand\CurrentOption{\CurrentOption}}%
      \reserved@b
      \ifx\FamilyKeyState\FamilyKeyStateUnknown
        \PackageInfo{scrbase}{Unknown processing state.\MessageBreak
          Processing option `\CurrentOption'\MessageBreak
          of member `#1' of family\MessageBreak
          `#2' doesn't set\MessageBreak
          a valid state. This will be interpreted\MessageBreak
          as \string\FamilyKeyStateProcessed
        }%
        \FamilyKeyStateProcessed
      \fi
    }{%
      \let\FamilyKeyState\OptionNotUsed
    }%
  }{%
    \proteced@edef\reserved@b{\noexpand\setkeys{#2}{{\CurrentOption}}%
      \noexpand\def\noexpand\CurrentOption{\CurrentOption}}%
    \reserved@b
    \ifx\FamilyKeyState\FamilyKeyStateUnknown
      \PackageInfo{scrbase}{Unknown processing state.\MessageBreak
        Processing option `\CurrentOption'\MessageBreak
        of family `#2'\MessageBreak
        doesn't set a valid state.\MessageBreak
        This will be interpreted\MessageBreak
        as \string\FamilyKeyStateProcessed
      }%
      \FamilyKeyStateProcessed
    \fi
    \def\reserved@a##1=##2\@nil{\def\reserved@a{##1}}%
    \expandafter\reserved@a\CurrentOption=\@nil
    \scr@ifundefinedorrelax{KV@#2#1@\reserved@a}{}{%
      \protected@edef\reserved@b{\noexpand\setkeys{#2#1}{{\CurrentOption}}%
        \noexpand\def\noexpand\CurrentOption{\CurrentOption}}%
      \ifx\FamilyKeyState\FamiliyKeyStateProcessed
        \reserved@b
        \FamilyKeyStateProcessed
      \else
        \reserved@b
        \ifx\FamilyKeyState\FamilyKeyStateUnknown
          \PackageInfo{scrbase}{Unknown processing state.\MessageBreak
            Processing option `\CurrentOption'\MessageBreak
            of member `#1' of family\MessageBreak
            `#2' doesn't set\MessageBreak
            a valid state. This will be interpreted\MessageBreak
            as \string\FamilyKeyStateProcessed
          }%
          \FamilyKeyStateProcessed
        \fi
      \fi
    }%
  }%
  \ifx\FamilyKeyState\FamilyKeyStateProcessed
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\newcommand*{\dont@let@as@internal@defined}{/}
\newif\if@let@as@internalonly@defined\@let@as@internalonly@definedfalse
\DefineFamily{KOMA}
\DefineFamilyMember{KOMA}
\DefineFamilyKey{KOMA}{internalonly}[\relax]{%
  \ifx\relax#1\relax
    \@let@as@internalonly@definedtrue
  \else
    \@let@as@internalonly@definedfalse
    \begingroup
      \@expandtwoargs\in@{#1}\dont@let@as@internal@defined
    \expandafter\endgroup
    \ifin@\else\g@addto@macro\dont@let@as@internal@defined{#1/}\fi
  \fi
}
\FamilyProcessOptions{KOMA}\relax
%%% From File: $Id: scrkernel-language.dtx 2011 2015-03-17 11:39:55Z kohm $
%%% From File: $Id: scrlfile.dtx 1525 2013-11-22 12:57:29Z mjk $
\RequirePackage{scrlfile}[%
  2015/05/06 v3.17a KOMA-Script
]
%%% From File: $Id: scrkernel-basics.dtx 2011 2015-03-17 11:39:55Z kohm $
\newcommand*{\XdivY}[2]{%
  \numexpr ( #1 + #2 / 2 ) / #2 - 1\relax
}
\newcommand*{\XmodY}[2]{%
  \numexpr #1 - #2 * \XdivY{#1}{#2}\relax
}
\newif\if@atdocument
\AtBeginDocument{\@atdocumenttrue}
\@onlypreamble\@atdocumentrue
\@onlypreamble\@atdocumentfalse
\newcommand*{\let@as@internal@defined}[1]{%
  \begingroup
    \if@let@as@internalonly@defined
      \in@true
    \else
      \@expandtwoargs\in@{/#1/}\dont@let@as@internal@defined
    \fi
  \expandafter\endgroup
  \ifin@
    \PackageInfo{%
      scrbase%
    }{%
      \expandafter\string\csname #1\endcsname\space excluded from being
      defined%
    }%
  \else
    \@ifundefined{#1}{%
      \begingroup
        \expandafter\def\expandafter\reserved@a
          \expandafter{\csname scr@#1\endcsname}%
        \expandafter\def\expandafter\reserved@b
          \expandafter{\csname #1\endcsname}%
      \expandafter\expandafter\expandafter\endgroup
      \expandafter\expandafter\expandafter\let\expandafter\reserved@b\reserved@a
      \if@atdocument\else
        \g@addto@macro\document{%
          \expandafter\ifx\csname #1\expandafter\endcsname
          \csname scr@#1\endcsname
          \else
            \PackageWarning{scrbase}{%
              \expandafter\string\csname #1\endcsname\space was
              redefined\MessageBreak
              at the document preamble.\MessageBreak
              If you did not redefine it by yourself, have a\MessageBreak
              a look at the description of this command at\MessageBreak
              the manual of every package you are using\@gobble
            }%
          \fi
          \ignorespaces
        }%
      \fi
    }{%
      \PackageInfo{%
        scrbase%
      }{%
        \expandafter\string\csname #1\endcsname\space already
        defined.\MessageBreak
        If \expandafter\string\csname #1\endcsname\space does not behave
        like\MessageBreak
        it was described at the KOMA-Script manual, try to\MessageBreak
        load `scrbase.\scr@pkgextension' earlier or find out at
        which\MessageBreak
        package or class \expandafter\string\csname #1\endcsname\space
        was defined before\@gobble
      }%
    }%
  \fi
}
\let@as@internal@defined{ifundefinedorrelax}
\newcommand{\ifnotundefined}[1]{%
  \ifcsname #1\endcsname
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\newcommand\ifstr[2]{%
  \begingroup\protected@edef\reserved@a{#1}\protected@edef\reserved@b{#2}%
  \ifx\reserved@a\reserved@b
    \endgroup\expandafter\@firstoftwo
  \else
    \endgroup\expandafter\@secondoftwo
  \fi
}
\newcommand*{\ifstrstart}[2]{%
  \begingroup
    \edef\reserved@a{\noexpand\@ifstrstart{#1}{#2}}%
    \reserved@a{\aftergroup\@firstoftwo}{\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\@ifstrstart}[2]{%
  \def\reserved@a ##1#2##2\@nil{%
    \if\relax\detokenize{##1}\relax
      \expandafter\@firstoftwo
    \else
      \expandafter\@secondoftwo
    \fi
  }%
  \reserved@a#1#2\@nil
}
\newcommand*{\ifisdimen}[1]{%
  \begingroup
    \edef\reserved@a{#1}%
    \expandafter\expandafter\expandafter\def
    \expandafter\expandafter\expandafter\reserved@a
    \expandafter\expandafter\expandafter{\expandafter\meaning\reserved@a}%
    \expandafter\def\expandafter\reserved@b\expandafter{\string\dimen}%
    \ifstrstart{\reserved@a}{\reserved@b}{%
      \afterassignment\scr@ifrelax@to@nnil
      \@tempdima=#1\relax\@nnil{%
        \aftergroup\@firstoftwo
      }{%
        \aftergroup\@secondoftwo
      }%
    }{\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\scr@ifrelax@to@nnil}{}
\def\scr@ifrelax@to@nnil#1\@nnil{%
  \begingroup
    \def\reserved@a{#1}\def\reserved@b{\relax}%
    \ifx\reserved@a\reserved@b
      \aftergroup\@firstoftwo
    \else
      \aftergroup\@secondoftwo
    \fi
  \endgroup
}
\newcommand*{\ifisdimexpr}[1]{%
  \begingroup
    \edef\reserved@a{#1}%
    \expandafter\expandafter\expandafter\def
    \expandafter\expandafter\expandafter\reserved@a
    \expandafter\expandafter\expandafter{\expandafter\meaning\reserved@a}%
    \expandafter\def\expandafter\reserved@b\expandafter{\string\dimexpr}%
    \ifstrstart{\reserved@a}{\reserved@b}{%
      \afterassignment\scr@ifemptyorrelax@to@nnil
      \@tempdima=#1\relax\@nnil{%
        \aftergroup\@firstoftwo
      }{%
        \aftergroup\@secondoftwo
      }%
    }{\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\scr@ifemptyorrelax@to@nnil}{}
\def\scr@ifemptyorrelax@to@nnil#1\@nnil{%
  \begingroup
    \def\reserved@a{#1}\def\reserved@b{\relax}%
    \ifx\reserved@a\reserved@b
      \aftergroup\@firstoftwo
    \else
      \ifx\reserved@a\@empty
        \aftergroup\@firstoftwo
      \else
        \aftergroup\@secondoftwo
      \fi
    \fi
  \endgroup
}
\newcommand*{\ifisskip}[1]{%
  \begingroup
    \edef\reserved@a{#1}%
    \expandafter\expandafter\expandafter\def
    \expandafter\expandafter\expandafter\reserved@a
    \expandafter\expandafter\expandafter{\expandafter\meaning\reserved@a}%
    \expandafter\def\expandafter\reserved@b\expandafter{\string\skip}%
    \ifstrstart{\reserved@a}{\reserved@b}{%
      \afterassignment\scr@ifrelax@to@nnil
      \@tempskipa=#1\relax\@nnil{%
        \aftergroup\@firstoftwo
      }{%
        \aftergroup\@secondoftwo
      }%
    }{\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\ifisglueexpr}[1]{%
  \begingroup
    \edef\reserved@a{#1}%
    \expandafter\expandafter\expandafter\def
    \expandafter\expandafter\expandafter\reserved@a
    \expandafter\expandafter\expandafter{\expandafter\meaning\reserved@a}%
    \expandafter\def\expandafter\reserved@b\expandafter{\string\glueexpr}%
    \ifstrstart{\reserved@a}{\reserved@b}{%
      \afterassignment\scr@ifemptyorrelax@to@nnil
      \@tempskipa=#1\relax\@nnil{%
        \aftergroup\@firstoftwo
      }{%
        \aftergroup\@secondoftwo
      }%
    }{\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\ifiscount}[1]{%
  \begingroup
    \edef\reserved@a{#1}%
    \expandafter\expandafter\expandafter\def
    \expandafter\expandafter\expandafter\reserved@a
    \expandafter\expandafter\expandafter{\expandafter\meaning\reserved@a}%
    \expandafter\def\expandafter\reserved@b\expandafter{\string\count}%
    \ifstrstart{\reserved@a}{\reserved@b}{%
      \afterassignment\scr@ifrelax@to@nnil
      \@tempcnta=#1\relax\@nnil{%
        \aftergroup\@firstoftwo
      }{%
        \aftergroup\@secondoftwo
      }%
    }{\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\ifisnumexpr}[1]{%
  \begingroup
    \edef\reserved@a{#1}%
    \expandafter\expandafter\expandafter\def
    \expandafter\expandafter\expandafter\reserved@a
    \expandafter\expandafter\expandafter{\expandafter\meaning\reserved@a}%
    \expandafter\def\expandafter\reserved@b\expandafter{\string\numexpr}%
    \ifstrstart{\reserved@a}{\reserved@b}{%
      \afterassignment\scr@ifemptyorrelax@to@nnil
      \@tempcnta=#1\relax\@nnil{%
        \aftergroup\@firstoftwo
      }{%
        \aftergroup\@secondoftwo
      }%
    }{\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\ifiscounter}[1]{%
  \begingroup
    \@ifundefined{c@#1}%
                 {\aftergroup\@secondoftwo}%
                 {\aftergroup\@firstoftwo}%
  \endgroup
}
\newcommand*{\ifisinteger}[1]{%
  \begingroup
    \edef\reserved@a{#1}\expandafter
    \scr@ifintegerplusminus\reserved@a\@nil{\aftergroup\@firstoftwo}%
                                           {\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\scr@ifintegerplusminus}{}
\def\scr@ifintegerplusminus#1#2\@nil{%
  \def\scr@next{\scr@ifintegerplusminus #2\@nil}%
  \if #1-\relax
  \else \if #1+\relax
    \else
      \def\scr@next{%
        \afterassignment\scr@ifrelax@to@nnil
        \@tempcnta=#1#2\relax\@nnil
      }%
      \if #10\else\if #11\else\if #12\else\if #13\else\if #14\else
      \if #15\else\if #16\else\if #17\else\if #18\else\if #19\else
        \let\scr@next\@secondoftwo
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
    \fi
  \fi
  \scr@next
}
\newcommand*{\ifisdimension}[1]{%
  \begingroup
    \edef\reserved@a{#1\relax}\expandafter
    \scr@ifdimensionplusminus\reserved@a\@nil{\aftergroup\@firstoftwo}%
                                             {\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\scr@ifdimensionplusminus}{}
\def\scr@ifdimensionplusminus#1#2\@nil{%
  \def\scr@next{\scr@ifdimensionplusminus #2\@nil}%
  \if #1-\relax
  \else \if #1+\relax
    \else
      \def\scr@next{%
        \afterassignment\scr@ifrelax@to@nnil
        \@tempdima=#1#2\@nnil
      }%
      \if #1,\else\if #1.\else
        \if #10\else\if #11\else\if #12\else\if #13\else\if #14\else
        \if #15\else\if #16\else\if #17\else\if #18\else\if #19\else
          \let\scr@next\@secondoftwo
        \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
      \fi\fi
    \fi
  \fi
  \scr@next
}
\newcommand*{\ifisglue}[1]{%
  \begingroup
    \edef\reserved@a{#1\relax}\expandafter
    \scr@ifglueplusminus\reserved@a\@nil{\aftergroup\@firstoftwo}%
                                        {\aftergroup\@secondoftwo}%
  \endgroup
}
\newcommand*{\scr@ifglueplusminus}{}
\def\scr@ifglueplusminus#1#2\@nil{%
  \def\scr@next{\scr@ifglueplusminus #2\@nil}%
  \if #1-\relax
  \else \if #1+\relax
    \else
      \def\scr@next{%
        \afterassignment\scr@ifrelax@to@nnil
        \@tempskipa=#1#2\@nnil
      }%
      \if #1,\else\if #1.\else
        \if #10\else\if #11\else\if #12\else\if #13\else\if #14\else
        \if #15\else\if #16\else\if #17\else\if #18\else\if #19\else
          \let\scr@next\@secondoftwo
        \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
      \fi\fi
    \fi
  \fi
  \scr@next
}
\newcommand\ifnumber[1]{%
  \begingroup\@tempswafalse\let\scr@next\test@number
    \expandafter\scr@next#1\scr@next
    \if@tempswa
      \aftergroup\@firstoftwo
    \else
      \aftergroup\@secondoftwo
    \fi
  \endgroup
}
\newcommand*{\test@number}[1]{%
  \ifx \scr@next#1%
    \let\scr@next\relax
  \else
    \@tempcnta=\expandafter\expandafter\expandafter\number
    \expandafter`#1\relax
    \ifnum \@tempcnta>47
      \ifnum \@tempcnta<58
        \@tempswatrue
      \else\@tempswafalse\fi
    \else\@tempswafalse\fi
    \if@tempswa\else\let\scr@next\gobble@till@scr@next\fi
  \fi
  \scr@next
}
\newcommand*{\gobble@till@scr@next}{}
\def\gobble@till@scr@next#1\scr@next{}
\newcommand\ifintnumber[1]{%
  \begingroup\@tempswafalse\let\scr@next\scr@test@sign
    \expandafter\scr@next#1\scr@next
    \if@tempswa
      \aftergroup\@firstoftwo
    \else
      \aftergroup\@secondoftwo
    \fi
  \endgroup
}
\newcommand*{\scr@test@sign}[1]{%
  \ifx \scr@next#1
    \let\scr@next\relax
  \else
    \if #1-%
    \else
      \ifx #1+%
      \else
        \def\scr@next{\let\scr@next\test@number\scr@next #1}%
      \fi
    \fi
  \fi
  \scr@next
}
\newcommand{\ifdimen}[1]{%
  \begingroup\@tempswatrue\let\scr@next\test@posdimen
  \expandafter\test@dimen#1\scr@next
  \if@tempswa
    \endgroup\expandafter\@firstoftwo
  \else
    \endgroup\expandafter\@secondoftwo
  \fi
}
\newcommand*{\test@dimen}[1]{%
  \ifx -#1\else\ifx +#1\else
      \def\scr@next{\let\scr@next\test@posdimen\scr@next#1}\fi\fi
  \scr@next
}
\newcommand*{\test@posdimen}[1]{%
  \ifx \scr@next#1%
    \@tempswafalse\let\scr@next\relax
  \else
    \if .#1\else\if ,#1\else
        \@tempcnta=%
        \expandafter\expandafter\expandafter\number\expandafter`#1\relax
        \ifnum \@tempcnta>47
          \ifnum \@tempcnta<58
          \else\def\scr@next{\test@dimunt#1}\fi
        \else\def\scr@next{\test@dimunt#1}\fi
    \fi\fi
  \fi
  \scr@next
}
\newcommand*{\test@dimunt}{}
\def\test@dimunt#1\scr@next{%
  \expandafter\test@trueunt#1truetrue\test@trueunt
}
\newcommand*{\test@trueunt}{}
\def\test@trueunt#1true#2true#3\test@trueunt{%
  \edef\reserved@a{#1}%
  \ifx\reserved@a\@empty\test@@ifdimunt{#2}\else\test@@ifdimunt{#1}\fi
}
\newcommand*\test@@ifdimunt[1]{%
  \@tempswafalse
  \ifstr{#1}{pt}{\@tempswatrue}{%
    \ifstr{#1}{pc}{\@tempswatrue}{%
      \ifstr{#1}{in}{\@tempswatrue}{%
        \ifstr{#1}{bp}{\@tempswatrue}{%
          \ifstr{#1}{cm}{\@tempswatrue}{%
            \ifstr{#1}{mm}{\@tempswatrue}{%
              \ifstr{#1}{dd}{\@tempswatrue}{%
                \ifstr{#1}{cc}{\@tempswatrue}{%
                  \ifstr{#1}{sp}{\@tempswatrue}{}%
                }%
              }%
            }%
          }%
        }%
      }%
    }%
  }%
}
\newcommand{\scr@ifpdftex}{\ifnotundefined{pdftexversion}}
\let@as@internal@defined{ifpdftex}
\BeforePackage{pdfcprot}{\let\ifpdftex\relax}
\AfterPackage{pdfcprot}{\let@as@internal@defined{ifpdftex}}
\newcommand{\scr@ifVTeX}{\ifnotundefined{VTeXversion}}
\let@as@internal@defined{ifVTeX}
\newcommand{\scr@ifpdfoutput}{%
  \scr@ifundefinedorrelax{pdfoutput}{%
    \scr@ifundefinedorrelax{OpMode}{%
      \expandafter\@secondoftwo%
    }{%
      \ifnum\OpMode=1
        \expandafter\@firstoftwo
      \else
        \expandafter\@secondoftwo
      \fi
    }%
  }{%
    \ifnum\pdfoutput>0
      \expandafter\@firstoftwo
    \else
      \expandafter\@secondoftwo
    \fi
  }%
}%
\let@as@internal@defined{ifpdfoutput}
\newcommand*{\scr@ifpsoutput}{%
  \ifnotundefined{if@dvips}{%
    \if@dvips
      \expandafter\@firstoftwo
    \else
      \expandafter\@secondoftwo
    \fi
  }{%
    \ifnotundefined{OpMode}{%
      \ifnum\OpMode=2
        \expandafter\@firstoftwo
      \else
        \expandafter\@secondoftwo
      \fi
    }{%
      \expandafter\@secondoftwo
    }%
  }%
}
\let@as@internal@defined{ifpsoutput}
\newcommand*{\scr@ifdvioutput}{%
  \scr@ifundefinedorrelax{pdfoutput}{%
    \scr@ifundefinedorrelax{OpMode}{%
      \expandafter\@firstoftwo
    }{%
      \ifnum\OpMode=0
        \expandafter\@firstoftwo
      \else
        \expandafter\@secondoftwo
      \fi
    }%
  }{%
    \ifnum\pdfoutput=0
      \expandafter\@firstoftwo
    \else
      \expandafter\@secondoftwo
    \fi
  }%
}
\let@as@internal@defined{ifdvioutput}
\newcommand*{\scr@smashdp}[1]{%
  \begingroup
    \def\finsm@sh{\dp\z@\z@\box\z@}%
    \ifmmode
      \expandafter\mathpalette\expandafter\mathsm@sh
    \else
      \expandafter\makesm@sh
    \fi
    {#1}%
  \endgroup
}
\providecommand*{\PackageInfoNoLine}[2]{%
  \PackageInfo{#1}{#2\@gobble}%
}
\providecommand*{\ClassInfoNoLine}[2]{%
  \ClassInfo{#1}{#2\@gobble}%
}
\providecommand*\@removefromreset[2]{%
  {%
    \expandafter\let\csname c@#1\endcsname\@removefromreset
    \def\@elt##1{%
      \expandafter\ifx\csname c@##1\endcsname\@removefromreset
      \else\noexpand\@elt{##1}\fi
    }%
    \expandafter\xdef\csname cl@#2\endcsname{\csname cl@#2\endcsname}%
  }%
}
\newcommand*{\FamilyExecuteOptions}[2][.\@currname.\@currext]{%
  \@FamilyExecuteOptions[{#1}]{#2}%
}
\newcommand{\@FamilyExecuteOptions}[3][.\@currname.\@currext]{%
  \@namedef{scr@after@options@#1@hook}{\@namedef{scr@after@options@#1@hook}{}}%
  \@for\scr@key@atlist:=#3\do{%
    \expandafter\scr@key@split@name@value\scr@key@atlist==\@nil
    \ifx\scr@key@name\@empty\else
      \ifx\scr@key@name\space\else
        \scr@ifundefinedorrelax{KV@#2@\scr@key@name}{%
          \scr@ifundefinedorrelax{KV@#2#1@\scr@key@name}{%
            \PackageError{scrbase}{%
              unknown option
              `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
            }{%
              Member `#1' of family `#2'\MessageBreak
              cannot handle option `\scr@key@name'.\MessageBreak
              So it cannot be set%
              \ifx\scr@key@value\@empty\else
                \space to value
                `\expandafter\detokenize\expandafter{\scr@key@value}'%
              \fi.%
            }%
          }{%
            \scr@execute@option{#2#1}%
          }%
        }{%
          \scr@execute@option{#2}%
          \ifstr{#1}{}{}{%
            \scr@ifundefinedorrelax{KV@#2#1\scr@key@name}{}{%
              \ifx\FamilyKeyState\FamilyKeyStateProcessed
                \scr@execute@option{#2#1}%
                \FamilyKeyStateProcessed
              \else
                \scr@execute@option{#2#1}%
              \fi
            }%
          }%
        }%
        \scr@show@key@state@error
      \fi
    \fi
  }%
  \@nameuse{scr@after@options@#1@hook}%
}
\newcommand*{\scr@show@key@state@error}{%
  \ifx\FamilyKeyState\FamilyKeyStateProcessed\else
    \PackageError{scrbase}{%
      unknown option
      `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
    }{%
      Option
      `\expandafter\detokenize\expandafter{\scr@key@name}'\MessageBreak
      \ifx\FamilyMemberOfKey\@empty\else
        of member `\FamilyMemberOfKey'\MessageBreak
      \fi
      \ifx\FamilyOfKey\@empty\else
        of family `\FamilyOfKey'\MessageBreak
      \fi
      \ifx\FamilyKeyState\FamilyKeyStateNeedValue
        expects a value, but has been used without any value.%
      \else
        cannot handle value\MessageBreak
        `\expandafter\detokenize\expandafter{\scr@key@value}',%
        \MessageBreak
        \ifx\FamilyKeyState\FamilyKeyStateUnknownValue
          because this is an unsupported value.%
        \else
          because \FamilyKeyState.
        \fi
      \fi
    }%
  \fi
}
\newcommand{\FamilyOptions}[1]{\@FamilyOptions{#1}}
\newcommand{\@FamilyOptions}[2]{%
  \@namedef{scr@after@options@#1@hook}{\@namedef{scr@after@options@#1@hook}{}}%
  \@for\scr@key@atlist:=#2\do{%
    \ifx\scr@key@atlist\@empty\else
      \ifx\scr@key@atlist\space\else
        \expandafter\scr@key@split@name@value\scr@key@atlist==\@nil
        \let\scr@key@run@errors\@empty
        \scr@key@found@false
        \edef\reserved@a{\csname #1@key@familylist\endcsname}%
        \@for\reserved@a:=\reserved@a\do{%
          \scr@ifundefinedorrelax{KV@\reserved@a @\scr@key@name}{}{%
            \expandafter\scr@execute@option\expandafter{\reserved@a}%
            \scr@key@found@true
            \ifx\scr@key@run@errors\relax\else
              \ifx\FamilyKeyState\FamilyKeyStateProcessed
                \let\scr@key@run@errors\relax
              \else
                \ifx\FamilyKeyState\FamilyKeyStateUnknownValue
                  \edef\scr@key@run@errors{%
                    \unexpanded\expandafter{\scr@key@run@errors}%
                    \noexpand\MessageBreak
                    \FamilyMemberOfKey: unkown value
                    `\expandafter\detokenize\expandafter{\scr@key@value}'.%
                  }%
                \else
                  \ifx\FamilyKeyState\FamilyKeyStateNeedValue
                    \edef\scr@key@run@errors{%
                      \unexpanded\expandafter{\scr@key@run@errors}%
                      \noexpand\MessageBreak
                      \FamilyMemberOfKey: value expected.
                    }%
                  \else
                    \edef\scr@key@run@errors{%
                      \unexpanded\expandafter{\scr@key@run@errors}%
                      \noexpand\MessageBreak
                      \FamilyMemberOfKey: \FamilyKeyState.
                    }%
                  \fi
                \fi
              \fi
            \fi
          }%
        }%
        \ifscr@key@found@
          \ifx\scr@key@run@errors\relax\else
            \ifx\scr@key@run@errors\@empty\else
              \PackageError{scrbase}{%
                unknown option
                `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
              }{%
                The members of family `#1' cannot set option
                `\scr@key@name'
                \ifx\scr@key@value\@empty\else
                  \MessageBreak
                  to value
                  `\expandafter\detokenize\expandafter{\scr@key@value}'%
                \fi.\MessageBreak
                Here's what each member says:
                \scr@key@run@errors
              }%
            \fi
          \fi
        \else
          \PackageError{scrbase}{%
            unknown option
            `\expandafter\detokenize\expandafter{\scr@key@atlist}'%
          }{%
            No one of the members of family `#1'\MessageBreak
            can handle option `\scr@key@name'.\MessageBreak
            So it cannot be set%
            \ifx\scr@key@value\@empty\else
              \space to value
              `\expandafter\detokenize\expandafter{\scr@key@value}'%
            \fi.%
          }%
        \fi
      \fi
    \fi
  }%
  \@nameuse{scr@after@options@#1@hook}%
}
\newcommand*{\scr@execute@option}[1]{%
  \protected@edef\reserved@a{%
    \noexpand\let\noexpand\KV@err\noexpand\scr@KV@err
    \noexpand\setkeys{#1}{%
      \unexpanded\expandafter{\scr@key@atlist}}%
     \noexpand\def\noexpand\scr@key@atlist{%
      \unexpanded\expandafter{\scr@key@atlist}}%
    \noexpand\def\noexpand\scr@key@name{%
      \unexpanded\expandafter{\scr@key@name}}%
    \noexpand\def\noexpand\scr@key@value{%
      \unexpanded\expandafter{\scr@key@value}}%
    \ifx\scr@key@run@errors\relax
      \noexpand\let\noexpand\scr@key@run@errors\relax
    \else
      \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
        }}%
    \fi
  }%
  \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions
  \reserved@a
  \let\AtEndOfFamilyOptions\@firstofone
  \ifx\FamilyKeyState\FamilyKeyStateUnknown
    \PackageInfo{scrbase}{Unknown processing state.\MessageBreak
      Processing option
      `\expandafter\detokenize\expandafter{\scr@key@atlist}'\MessageBreak
      \ifx\FamilyMemberOfKey\@empty\else
        of member `\FamilyMemberOfKey'\MessageBreak
      \fi
      of family `\FamilyOfKey'\MessageBreak
      doesn't set a valid state.\MessageBreak
      This will be interpreted\MessageBreak
      as \string\FamilyKeyStateProcessed
    }%
    \FamilyKeyStateProcessed
  \fi
}
\newcommand*{\scr@KV@err}[1]{%
  \FamilyKeyStateNeedValue
}
\newcommand*{\scr@key@run@errors}{}
\newif\ifscr@key@found@
\newcommand*{\scr@key@atlist}{}
\newcommand*{\scr@key@name}{}
\newcommand*{\scr@key@value}{}
\newcommand*{\scr@key@split@name@value}{}
\long\def\scr@key@split@name@value#1=#2=#3\@nil{%
  \KV@@sp@def\scr@key@name{#1}%
  \KV@@sp@def\scr@key@value{#2}%
}
\newcommand*{\FamilyOption}[2]{\@FamilyOption{#1}{#2}}
\newcommand{\@FamilyOption}[3]{%
  \expandafter\KV@@sp@def\expandafter\scr@key@name\expandafter{#2}%
  \let\reserved@a\@empty
  \@for\reserved@b:=#3\do{%
    \ifx\reserved@b\@empty\else
      \ifx\reserved@b\space\else
        \edef\reserved@a{\unexpanded\expandafter{\reserved@a},%
          \scr@key@name=\unexpanded\expandafter{\reserved@b}}%
      \fi
    \fi
  }%
  \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}}%
}%
\newcommand{\FamilyUnknownKeyValue}[4]{%
  \FamilyKeyStateUnknownValue
  \ifx\FamilyElseValues\@empty\else
    \PackageWarning{scrbase}{non empty \string\FamilyElseValue
      ignored.\MessageBreak
      Setting this command to a non empty\MessageBreak
      value for option `#2' of\MessageBreak
      family `#1' is deprecated,\MessageBreak
      but has been found
    }%
  \fi
}
\newcommand*{\FamilyElseValues}{}
\newcommand*{\FamilyBoolKey}[4][.\@currname.\@currext]{%
  \@ifundefined{if#4}{%
    \expandafter\newif\csname if#4\endcsname
  }{}%
  \DefineFamilyKey[{#1}]{#2}{#3}[true]{\FamilySetBool{#2}{#3}{#4}{##1}}%
}
\newcommand*{\FamilySetBool}[4]{%
  \ifstr{#4}{true}{\@nameuse{#3true}\FamilyKeyStateProcessed}{%
    \ifstr{#4}{on}{\@nameuse{#3true}\FamilyKeyStateProcessed}{%
      \ifstr{#4}{yes}{\@nameuse{#3true}\FamilyKeyStateProcessed}{%
        \ifstr{#4}{false}{\@nameuse{#3false}\FamilyKeyStateProcessed}{%
          \ifstr{#4}{off}{\@nameuse{#3false}\FamilyKeyStateProcessed}{%
            \ifstr{#4}{no}{\@nameuse{#3false}\FamilyKeyStateProcessed}{%
              \FamilyUnknownKeyValue{#1}{#2}{#4}{%
                `true', `on', `yes', `false', `off', `no'%
              }%
            }%
          }%
        }%
      }%
    }%
  }%
  \let\FamilyElseValues\@empty
}
\newcommand*{\FamilyCounterKey}[3][.\@currname.\@currext]{%
  \@ifnextchar [%]
    {\Family@@Counter@@Key{#1}{#2}{#3}}%
    {\Family@Counter@Key{#1}{#2}{#3}}%
}
\newcommand*{\Family@@Counter@@Key}{}
\def\Family@@Counter@@Key#1#2#3[#4]#5{%
  \@ifundefined{c@#5}{\newcounter{#5}}{}%
  \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetCounter{#2}{#3}{#5}{##1}}%
}
\newcommand*{\Family@Counter@Key}[4]{%
  \@ifundefined{c@#4}{\newcounter{#4}}{}%
  \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetCounter{#2}{#3}{#4}{##1}}%
}
\newcommand*{\FamilySetCounter}[4]{%
  \ifiscount{#4}{\value{#3}=#4\FamilyKeyStateProcessed}{%
    \ifisdimen{#4}{\value{#3}=#4\FamilyKeyStateProcessed}{%
      \ifisskip{#4}{\value{#3}=#4\FamilyKeyState\Processed}{%
        \ifisnumexpr{#4}{\value{#3}=#4\FamilyKeyStateProcessed}{%
          \ifisdimexpr{#4}{\value{#3}=#4\FamilyKeyStateProcessed}{%
            \ifisinteger{#4}{\value{#3}=#4\FamilyKeyStateProcessed}{%
              \ifiscounter{#4}{\value{#3}=\value{#4}\FamilyKeyStateProcessed}{%
                \FamilyUnknownKeyValue{#1}{#2}{#4}{%
                  integer numbers, counters, lengths, skips, dimens
                }%
              }%
            }%
          }%
        }%
      }%
    }%
  }%
}
\newcommand*{\FamilyCounterMacroKey}[3][.\@currname.\@currext]{%
  \@ifnextchar [%]
    {\Family@@Counter@@Macro@@Key{#1}{#2}{#3}}%
    {\Family@Counter@Macro@Key{#1}{#2}{#3}}%
}
\newcommand*{\Family@@Counter@@Macro@@Key}{}
\def\Family@@Counter@@Macro@@Key#1#2#3[#4]#5{%
  \ifdefined#4\else\let#4\z@\fi
  \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetCounterMacro{#2}{#3}{#5}{##1}}%
}
\newcommand*{\Family@Counter@Macro@Key}[4]{%
  \ifdefined#4\else\let#4\z@\fi
  \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetCounterMacro{#2}{#3}{#4}{##1}}%
}
\newcommand*{\FamilySetCounterMacro}[4]{%
  \begingroup
    \ifiscount{#4}{\@tempcnta=#4\aftergroup\FamilyKeyStateProcessed}{%
      \ifisdimen{#4}{\@tempcnta=#4\aftergroup\FamilyKeyStateProcessed}{%
        \ifisskip{#4}{\@tempcnta=#4\aftergroup\FamilyKeyState\Processed}{%
          \ifisnumexpr{#4}{\@tempcnta=#4\aftergroup\FamilyKeyStateProcessed}{%
            \ifisdimexpr{#4}{\@tempcnta=#4\aftergroup\FamilyKeyStateProcessed}{%
              \ifisinteger{#4}{%
                \@tempcnta=#4\aftergroup\FamilyKeyStateProcessed
              }{%
                \ifiscounter{#4}{%
                  \@tempcnta=\value{#4}\FamilyKeyStateProcessed}{%
                  \FamilyUnknownKeyValue{#1}{#2}{#4}{%
                    integer numbers, counters, lengths, skips, dimens
                  }%
                }%
              }%
            }%
          }%
        }%
      }%
    }%
  \expandafter\expandafter\expandafter\endgroup
  \expandafter\def\expandafter#3\expandafter{\the\@tempcnta}%
}
\newcommand*{\FamilyLengthKey}[3][.\@currname.\@currext]{%
  \@ifnextchar [%]
    {\Family@@Length@@Key{#1}{#2}{#3}}%
    {\Family@Length@Key{#1}{#2}{#3}}%
}
\newcommand*{\Family@@Length@@Key}{}
\def\Family@@Length@@Key#1#2#3[#4]#5{%
  \ifdefined#5\else\newlength{#5}\fi
  \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetLength{#2}{#3}{#5}{##1}}%
}
\newcommand*{\Family@Length@Key}[4]{%
  \ifdefined#4\else\newlength{#4}\fi
  \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetLength{#2}{#3}{#4}{##1}}%
}
\newcommand*{\FamilySetLength}[4]{%
  \ifiscount{#4}{#3=#4\FamilyKeyStateProcessed}{%
    \ifisdimen{#4}{#3=#4\FamilyKeyStateProcessed}{%
      \ifisskip{#4}{#3=#4\FamilyKeyState\Processed}{%
        \ifisnumexpr{#4}{#3=#4\FamilyKeyStateProcessed}{%
          \ifisdimexpr{#4}{#3=#4\FamilyKeyStateProcessed}{%
            \ifisglueexpr{#4}{#3=#4\FamilyKeyStateProcessed}{%
              \ifisglue{#4}{#3=#4\FamilyKeyStateProcessed}{%
                \FamilyUnknownKeyValue{#1}{#2}{#4}{%
                  length values, counters, lengths, skips, dimens
                }%
              }%
            }%
          }%
        }%
      }%
    }%
  }%
}
\newcommand*{\FamilyLengthMacroKey}[3][.\@currname.\@currext]{%
  \@ifnextchar [%]
    {\Family@@Length@@Macro@@Key{#1}{#2}{#3}}%
    {\Family@Length@Macro@Key{#1}{#2}{#3}}%
}
\newcommand*{\Family@@Length@@Macro@@Key}{}
\def\Family@@Length@@Macro@@Key#1#2#3[#4]#5{%
  \ifdefined#5\else\let#5\z@\fi
  \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetLengthMacro{#2}{#3}{#5}{##1}}%
}
\newcommand*{\Family@Length@Macro@Key}[4]{%
  \ifdefined#4\else\let#4\z@\fi
  \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetLengthMacro{#2}{#3}{#4}{##1}}%
}
\newcommand*{\FamilySetLengthMacro}[4]{%
  \begingroup
    \ifiscount{#4}{\@tempskipa=#4\aftergroup\FamilyKeyStateProcessed}{%
      \ifisdimen{#4}{\@tempskipa=#4\aftergroup\FamilyKeyStateProcessed}{%
        \ifisskip{#4}{\@tempkipa=#4\aftergroup\FamilyKeyState\Processed}{%
          \ifisnumexpr{#4}{\@tempskipa=#4\aftergroup\FamilyKeyStateProcessed}{%
            \ifisdimexpr{#4}{%
              \@tempskipa=#4\aftergroup\FamilyKeyStateProcessed
            }{%
              \ifisglueexpr{#4}{%
                \@tempskipa=#4\aftergroup\FamilyKeyStateProcessed
              }{%
                \ifisglue{#4}{%
                  \@tempskipa=#4\aftergroup\FamilyKeyStateProcessed
                }{%
                  \FamilyUnknownKeyValue{#1}{#2}{#4}{%
                    length values, counters, lengths, skips, dimens
                  }%
                }%
              }%
            }%
          }%
        }%
      }%
    }%
  \expandafter\expandafter\expandafter\endgroup
  \expandafter\def\expandafter#3\expandafter{\the\@tempskipa}%
}
\newcommand*{\FamilyNumericalKey}[3][.\@currname.\@currext]{%
  \@ifnextchar [%]
    {\Family@Numerical@Key{#1}{#2}{#3}}{\Family@Numerical@Key{#1}{#2}{#3}[]}%
}
\newcommand*{\Family@Numerical@Key}{}
\def\Family@Numerical@Key#1#2#3[#4]#5#6{%
  \@ifundefined{#5}{\@namedef{#5}{0}}{}%
  \ifx\relax#4\relax
    \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetNumerical{#2}{#3}{#5}{#6}{##1}}%
  \else
    \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{%
      \FamilySetNumerical{#2}{#3}{#5}{#6}{##1}}%
  \fi
}
\newcommand*{\FamilySetNumerical}[5]{%
  \begingroup
    \edef\@searched{#5}%
    \let\reserved@a=\@empty
    \let\reserved@b=\@empty
    \@tempswafalse
    \@for\@valuelist:=#4\do{%
      \if@tempswa\else
        \edef\reserved@c{\expandafter\@firstoftwo\@valuelist}%
        \edef\reserved@a{\reserved@a\reserved@b`\reserved@c'}%
        \edef\reserved@b{, }%
        \ifx\reserved@c\@searched
          \@tempswatrue
          \edef\reserved@a{\expandafter\@secondoftwo\@valuelist}%
        \fi
      \fi
    }%
    \if@tempswa
      \edef\reserved@a{\endgroup
        \noexpand\@namedef{#3}{\reserved@a}%
        \noexpand\FamilyKeyStateProcessed
      }%
    \else
      \edef\reserved@a{\endgroup
        \noexpand\FamilyUnknownKeyValue{#1}{#2}{#5}{\reserved@a}%
      }%
    \fi
  \reserved@a
  \let\FamilyElseValues\@empty
}
\newcommand*{\FamilyStringKey}[3][.\@currname.\@currext]{%
  \@ifnextchar [%]
    {\Family@@String@@Key{#1}{#2}{#3}}{\Family@String@Key{#1}{#2}{#3}}%
}
\newcommand*{\Family@@String@@Key}{}
\long\def\Family@@String@@Key#1#2#3[#4]#5{%
  \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\def#5{##1}}%
}
\newcommand{\Family@String@Key}[4]{%
  \DefineFamilyKey[{#1}]{#2}{#3}{\def#4{##1}\FamilyKeyStateProcessed}%
}
%%% From File: $Id: scrkernel-language.dtx 2011 2015-03-17 11:39:55Z kohm $
\newcommand*{\defcaptionname}{%
  \@ifstar\scr@def@scaptionname\scr@def@captionname
}
\newcommand*{\scr@def@scaptionname}[3]{%
  \if@atdocument \expandafter\@firstofone
  \else \expandafter\AtBeginDocument
  \fi
  {%
    \begingroup
      \let\reserved@b\endgroup
      \edef\scr@reserved@a{#1}%
      \@onelevel@sanitize\scr@reserved@a
      \expandafter\@for \expandafter\scr@reserved@a \expandafter:\expandafter=%
      \scr@reserved@a \do{%
        \scr@trim@spaces\scr@reserved@a
        \ifx\scr@reserved@a\@empty
          \PackageWarning{scrbase}{empty language at \string\defcaptionname}%
        \else
          \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
            \expandafter\expandafter\expandafter\gdef
          \else
            \expandafter\expandafter\expandafter\g@addto@macro
          \fi
          \csname extras\scr@reserved@a\endcsname{%
            \def#2{#3}%
          }%
          \scr@def@activateactivelanguageaftergroup{#2}{#3}%
        \fi
      }%
    \reserved@b
  }%
}
\newcommand*{\scr@def@activateactivelanguageaftergroup}[2]{%
  \@onelevel@sanitize\languagename
  \@tempswafalse
  \ifx\languagename\scr@reserved@a
    \@tempswatrue
  \else
    \ifcsname l@\scr@reserved@a\endcsname
      \expandafter\ifnum\csname l@\scr@reserved@a\endcsname=\language
        \@tempswatrue
      \fi
    \fi
  \fi
  \if@tempswa
    \def\reserved@b{\endgroup
      \PackageInfo{scrbase}{activating \languagename\space \string#1}%
      \def#1{#2}%
    }%
  \fi
}
\newcommand\scr@trim@spaces[1]{%
  \expandafter\KV@@sp@def\expandafter#1\expandafter{#1}%
}
\newcommand*{\scr@def@captionname}[3]{%
  \if@atdocument \expandafter\@firstofone
  \else \expandafter\AtBeginDocument
  \fi
  {%
    \begingroup
      \let\reserved@b\endgroup
      \edef\scr@reserved@a{#1}%
      \@onelevel@sanitize\scr@reserved@a
      \expandafter\@for \expandafter\scr@reserved@a \expandafter:\expandafter=%
      \scr@reserved@a \do{%
        \scr@trim@spaces\scr@reserved@a
        \ifx\scr@reserved@a\@empty
          \PackageWarning{scrbase}{empty language at \string\defcaptionname}%
        \else
          \@tempswafalse
          \begingroup
            \@tempswafalse
            \ifcsname extras\scr@reserved@a\endcsname
              \let#2\relax
              \csname extras\scr@reserved@a\endcsname
              \ifx #2\relax \else \aftergroup\@tempswatrue \fi
            \fi
          \endgroup
          \if@tempswa
            \expandafter\g@addto@macro\csname extras\scr@reserved@a\endcsname{%
              \def#2{#3}%
            }%
          \else
           \expandafter\ifx\csname captions\scr@reserved@a\endcsname\relax
              \expandafter\expandafter\expandafter\gdef
            \else
              \expandafter\expandafter\expandafter\g@addto@macro
            \fi
            \csname captions\scr@reserved@a\endcsname{%
              \def#2{#3}%
            }%
          \fi
          \scr@def@activateactivelanguageaftergroup{#2}{#3}%
        \fi
      }%
    \reserved@b
  }%
}
\newcommand*{\providecaptionname}{%
  \@ifstar\scr@provide@scaptionname\scr@provide@captionname
}
\newcommand*{\scr@provide@scaptionname}[3]{%
  \if@atdocument \expandafter\@firstofone
  \else \expandafter\AtBeginDocument
  \fi
  {%
    \begingroup
      \let\reserved@b\endgroup
      \edef\scr@reserved@a{#1}%
      \@onelevel@sanitize\scr@reserved@a
      \expandafter\@for \expandafter\scr@reserved@a \expandafter:\expandafter=%
      \scr@reserved@a \do{%
        \scr@trim@spaces\scr@reserved@a
        \ifx\scr@reserved@a\@empty
          \PackageWarning{scrbase}{empty language at
            \string\providecaptionname}%
        \else
          \begingroup
            \let#2\relax
            \csname extras\scr@reserved@a\endcsname
            \csname captions\scr@reserved@a\endcsname
            \ifx #2\relax \aftergroup\@firstofone
            \else
              \aftergroup\@gobble
            \fi
          \endgroup
          {%
            \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
              \expandafter\expandafter\expandafter\@gobbletwo
            \else
              \expandafter\expandafter\expandafter\g@addto@macro
            \fi
            \csname extras\scr@reserved@a\endcsname{%
              \def#2{#3}%
            }%
            \scr@def@activateactivelanguageaftergroup{#2}{#3}%
          }%
        \fi
      }%
    \reserved@b
  }%
}
\newcommand*{\scr@provide@captionname}[3]{%
  \if@atdocument \expandafter\@firstofone
  \else \expandafter\AtBeginDocument
  \fi
  {%
    \begingroup
      \let\reserved@b\endgroup
      \edef\scr@reserved@a{#1}%
      \@onelevel@sanitize\scr@reserved@a
      \expandafter\@for \expandafter\scr@reserved@a \expandafter:\expandafter=%
      \scr@reserved@a \do{%
        \scr@trim@spaces\scr@reserved@a
        \ifx\scr@reserved@a\@empty
          \PackageWarning{scrbase}{empty language at
            \string\providecaptionname}%
        \else
          \begingroup
            \let#2\relax
            \csname captions\scr@reserved@a\endcsname
            \csname extras\scr@reserved@a\endcsname
            \ifx #2\relax \aftergroup\@firstofone
            \else
              \aftergroup\@gobble
            \fi
          \endgroup
          {%
            \expandafter\ifx\csname captions\scr@reserved@a\endcsname\relax
              \expandafter\expandafter\expandafter\@gobbletwo
            \else
              \expandafter\expandafter\expandafter\g@addto@macro
            \fi
            \csname captions\scr@reserved@a\endcsname{%
              \def#2{#3}%
            }%
            \scr@def@activateactivelanguageaftergroup{#2}{#3}%
          }%
        \fi
      }%
    \reserved@b
  }%
}
\newcommand*{\newcaptionname}{%
  \@ifstar\scr@new@scaptionname\scr@new@captionname
}
\newcommand*{\scr@new@scaptionname}[3]{%
  \if@atdocument \expandafter\@firstofone
  \else \expandafter\AtBeginDocument
  \fi
  {%
    \begingroup
      \let\reserved@b\endgroup
      \edef\scr@reserved@a{#1}%
      \@onelevel@sanitize\scr@reserved@a
      \expandafter\@for \expandafter\scr@reserved@a \expandafter:\expandafter=%
      \scr@reserved@a \do{%
        \scr@trim@spaces\scr@reserved@a
        \ifx\scr@reserved@a\@empty
          \PackageWarning{scrbase}{empty language at \string\newcaptionname}%
        \else
          \begingroup
            \let#2\relax
            \csname captions\scr@reserved@a\endcsname
            \csname extras\scr@reserved@a\endcsname
            \ifx #2\relax
            \else
              \PackageError{scrbase}{%
                `\string#2' already defined\MessageBreak
                for language `\scr@reserved@a'%
              }{%
                You've told me to define `\string#2' for language
                `\scr@reserved@a',\MessageBreak
                but is has already been defined.\MessageBreak
                Nevertheless, if you'll continue it will be redefined.%
              }%
            \fi
          \endgroup
          \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
            \expandafter\expandafter\expandafter\gdef
          \else
            \expandafter\expandafter\expandafter\g@addto@macro
          \fi
          \csname extras\scr@reserved@a\endcsname{%
            \def#2{#3}%
          }%
          \scr@def@activateactivelanguageaftergroup{#2}{#3}%
        \fi
      }%
    \reserved@b
  }%
}
\newcommand*{\scr@new@captionname}[3]{%
  \if@atdocument \expandafter\@firstofone
  \else \expandafter\AtBeginDocument
  \fi
  {%
    \begingroup
      \let\reserved@b\endgroup
      \edef\scr@reserved@a{#1}%
      \@onelevel@sanitize\scr@reserved@a
      \expandafter\@for \expandafter\scr@reserved@a \expandafter:\expandafter=%
      \scr@reserved@a \do{%
        \scr@trim@spaces\scr@reserved@a
        \ifx\scr@reserved@a\@empty
          \PackageWarning{scrbase}{empty language at \string\newcaptionname}%
        \else
          \begingroup
            \let#2\relax
            \csname captions\scr@reserved@a\endcsname
            \csname extras\scr@reserved@a\endcsname
            \ifx #2\relax
            \else
              \PackageError{scrbase}{%
                `\string#2' already defined\MessageBreak
                for language `\scr@reserved@a'%
              }{%
                You've told me to define `\string#2' for language
                `\scr@reserved@a',\MessageBreak
                but is has already been defined.\MessageBreak
                Nevertheless, if you'll continue it will be redefined.%
              }%
            \fi
          \endgroup
          \expandafter\ifx\csname captions\scr@reserved@a\endcsname\relax
            \expandafter\expandafter\expandafter\gdef
          \else
            \expandafter\expandafter\expandafter\g@addto@macro
          \fi
          \csname captions\scr@reserved@a\endcsname{%
            \def#2{#3}%
          }%
          \scr@def@activateactivelanguageaftergroup{#2}{#3}%
        \fi
      }%
    \reserved@b
  }%
}
\newcommand*{\renewcaptionname}{%
  \@ifstar\scr@renew@scaptionname\scr@renew@captionname
}
\newcommand*{\scr@renew@scaptionname}[3]{%
  \if@atdocument \expandafter\@firstofone
  \else \expandafter\AtBeginDocument
  \fi
  {%
    \begingroup
      \let\reserved@b\endgroup
      \edef\scr@reserved@a{#1}%
      \@onelevel@sanitize\scr@reserved@a
      \expandafter\@for \expandafter\scr@reserved@a \expandafter:\expandafter=%
      \scr@reserved@a \do{%
        \scr@trim@spaces\scr@reserved@a
        \ifx\scr@reserved@a\@empty
          \PackageWarning{scrbase}{empty language at \string\renewcaptionname}%
        \else
          \begingroup
            \let#2\relax
            \csname captions\scr@reserved@a\endcsname
            \csname extras\scr@reserved@a\endcsname
            \ifx #2\relax
              \PackageError{scrbase}{%
                `\string#2' not defined at language `\scr@reserved@a'%
              }{%
                You've told me to redefine `\string#2' at language
                `\scr@reserved@a',\MessageBreak
                but is hasn't been defined before.\MessageBreak
                Nevertheless, if you'll continue I'll define it at
                `\expandafter\string\csname extras\scr@reserved@a\endcsname'%
              }%
            \fi
          \endgroup
          \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
            \expandafter\expandafter\expandafter\gdef
          \else
            \expandafter\expandafter\expandafter\g@addto@macro
          \fi
          \csname extras\scr@reserved@a\endcsname{%
            \def#2{#3}%
          }%
          \scr@def@activateactivelanguageaftergroup{#2}{#3}%
        \fi
      }%
    \reserved@b
  }%
}
\newcommand*{\scr@renew@captionname}[3]{%
  \if@atdocument \expandafter\@firstofone
  \else \expandafter\AtBeginDocument
  \fi
  {%
    \begingroup
      \let\reserved@b\endgroup
      \edef\scr@reserved@a{#1}%
      \@onelevel@sanitize\scr@reserved@a
      \expandafter\@for \expandafter\scr@reserved@a \expandafter:\expandafter=%
      \scr@reserved@a \do{%
        \scr@trim@spaces\scr@reserved@a
        \ifx\scr@reserved@a\@empty
          \PackageWarning{scrbase}{empty language at \string\renewcaptionname}%
        \else
          \begingroup
            \let#2\relax
            \csname extras\scr@reserved@a\endcsname
            \ifx #2\relax
              \csname captions\scr@reserved@a\endcsname
              \ifx #2\relax
                \PackageError{scrbase}{%
                  `\string#2' not defined at language `\scr@reserved@a'%
                }{%
                  You've told me to redefine `\string#2' at language
                  `\scr@reserved@a',\MessageBreak
                  but it hasn't been defined before.\MessageBreak
                  Nevertheless, if you'll continue I'll define it at
                  `\expandafter\string
                  \csname captions\scr@reserved@a\endcsname'%
                }%
              \fi
              \expandafter\ifx\csname captions\scr@reserved@a\endcsname\relax
                \expandafter\expandafter\expandafter\gdef
              \else
                \expandafter\expandafter\expandafter\g@addto@macro
              \fi
              \csname captions\scr@reserved@a\endcsname{\def#2{#3}}%
            \else
              \expandafter\ifx\csname extras\scr@reserved@a\endcsname\relax
                \expandafter\expandafter\expandafter\gdef
              \else
                \expandafter\expandafter\expandafter\g@addto@macro
              \fi
              \csname extras\scr@reserved@a\endcsname{\def#2{#3}}%
            \fi
          \endgroup
          \scr@def@activateactivelanguageaftergroup{#2}{#3}%
        \fi
      }%
    \reserved@b
  }%
}
%%% From File: $Id: scrlogo.dtx 1380 2013-10-01 15:31:55Z mjk $
\@ifundefined{KOMAScript}{%
  \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
      M\kern.05em A\kern.1em-\kern.1em Script}}}{}
\endinput
%%
%% End of file `scrbase.sty'.
