% ======================================================================
% common-options.tex
% Copyright (c) Markus Kohm, 2001-2017
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX 
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% common-options.tex
% Copyright (c) Markus Kohm, 2001-2017
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
% Die neuste Version dieser Lizenz ist
%   http://www.latex-project.org/lppl.txt
% und Version 1.3c ist Teil aller Verteilungen von LaTeX
% Version 2005/12/01 oder spaeter und dieses Werks.
%
% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
% (allein durch den Autor verwaltet).
%
% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
% 
% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
% ======================================================================
%
% Paragraphs that are common for several chapters of the KOMA-Script guide
% Maintained by Markus Kohm
%
% ----------------------------------------------------------------------
%
% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind
% Verwaltet von Markus Kohm
%
% ======================================================================

\KOMAProvidesFile{common-options.tex}
                 [$Date: 2016-11-14 21:06:12 +0100 (Mo, 14. Nov 2016) $
                  KOMA-Script guide (common paragraphs)]
\translator{Gernot Hassenpflug\and Krickette Murabayashi}

% Date of the translated German file: 2017-01-02

\section{Early or late Selection of Options}
\seclabel{options}
\BeginIndexGroup
\BeginIndex{}{options}%

\IfThisCommonFirstRun{}{%
  All of what is described in
  \autoref{sec:\ThisCommonFirstLabelBase.options} is generally
  applicable. So if you have alread read and understood
  \autoref{sec:\ThisCommonFirstLabelBase.options} you can switch to
  \autoref{sec:\ThisCommonLabelBase.options.next},
  \autopageref{sec:\ThisCommonLabelBase.options.next}.%
}

In this section a peculiarity of {\KOMAScript} is presented, which, apart
from %
\IfThisCommonLabelBase{typearea}{the \Package{typearea} package, is also
  relevant to other {\KOMAScript} packages and classes}{%
  \IfThisCommonLabelBase{maincls}{the classes \Class{scrbook},
    \Class{scrreprt}, and \Class{scrartcl} is also relevant to other
    {\KOMAScript} classes and packages}{%
    \IfThisCommonLabelBase{scrlttr2}{the class \Class{scrlttr2} is also
      relevant to other {\KOMAScript} classes and packages}{%
      \IfThisCommonLabelBase{scrextend}{the classes and the
        \Package{scrextend} package is also relevant to several other
        {\KOMAScript} packages}{%
        \IfThisCommonLabelBase{scrhack}{the \Package{scrhack} package, is also
          relevant to other \KOMAScript{} packages and classes}{%
          \IfThisCommonLabelBase{scrjura}{the \Package{scrjura} package, is
            also relevant to other \KOMAScript{} packages and classes}{%
            \IfThisCommonLabelBase{scrlayer}{the \Package{scrlayer} package,
              is also relevant to other \KOMAScript{} packages and classes}{%
              \IfThisCommonLabelBase{scrlayer-scrpage}{the
                \Package{scrlayer-scrpage} package, is also relevant to other
                \KOMAScript{} packages and classes}{%
                \IfThisCommonLabelBase{scrlayer-notecolumn}{the
                  \Package{scrlayer-notecolumn} package, is also relevant to
                  other \KOMAScript{} packages and classes}{%
                  \InternalCommonFileUsageError}}}}}}}}}%
. Such that the user can find all information corresponding to a single
package or a single class in the relevant chapter, this section is found
almost identically in several chapters. Users who are not only interested in a
particular package or class, but wish to gain an overview of {\KOMAScript} as
a whole, may read the section in one chapter and may thereafter skip it
wherever coming across it in the document.

\begin{Declaration}
  \Macro{documentclass}\OParameter{option list}%
                       \Parameter{{\KOMAScript} class}
  \Macro{usepackage}\OParameter{option list}%
                    \Parameter{package list}
\end{Declaration}
In \LaTeX{}, provision is made for the user to pass class options as a
comma-separated list of keywords as optional arguments to
\Macro{documentclass}.
Apart from being passed to the class,
these options are also passed on to all packages which can understand
the options. Provision is also made for the user to pass optional
arguments as a comma-separated list of keywords as optional arguments
to \Macro{usepackage}.  {\KOMAScript}
expands\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and
  \Class{scrartcl}\and \Package{scrextend}\and \Package{typearea}} the
option mechanism for the {\KOMAScript} classes and various packages to
use further possibilities. Thus, most {\KOMAScript} options can also
take a value. An option may have not only the form \PName{Option}, but
may also have the form \PName{option}\texttt{=}\PName{value}. Apart
from this difference \Macro{documentclass} and \Macro{usepackage}
function the same in {\KOMAScript} as described in
\cite{latex:usrguide} or any introduction to \LaTeX, for example
\cite{lshort}.%

\IfThisCommonLabelBaseNotOneOf{%
  scrjura,scrhack,scrlayer,scrlayer-scrpage,scrlayer-notecolumn,scrextend%
}{%

  When using a {\KOMAScript} class, no options should be passed on
% Die Alternativen an dieser Stelle dienen der Verbesserung des Umbruchs
  \IfThisCommonLabelBase{typearea}{unnecessary, explicit }{}%
  loading of the \Package{typearea} or \Package{scrbase} packages. The reason
  for this is that the class already loads these packages without options and
  \LaTeX{} refuses multiple loadings of a package with different option
  settings.%
  \IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{\ Actually, it is no longer
    necessary when using any {\KOMAScript} class to explicity load either one
    of these packages.}{}%
}{}

You should note\textnote{Attention!}, that in opposite to the interface
described below the options interface of \Macro{documentclass} and
\Macro{usepackage} is not robust. So commands, lengths, counters and such
constructs may break inside the optional argument of these commands. Because
of this, the usage of a \LaTeX{} length inside the value of an option would
cause an error before \KOMAScript{} can get the control over the option
execution. So, if you want to use a \LaTeX{} length, counter or command a part
of the value of an option, you have to use
\DescRef{\LabelBase.cmd.KOMAoptions} or
\DescRef{\LabelBase.cmd.KOMAoption}. These commands will be described next.%
%
\EndIndexGroup


\begin{Declaration}
  \Macro{KOMAoptions}\Parameter{option list}
  \Macro{KOMAoption}\Parameter{option}\Parameter{value list}
\end{Declaration}
\KOMAScript{}\ChangedAt{v3.00}{\Class{scrbook}\and
  \Class{scrreprt}\and \Class{scrartcl}\and \Package{scrextend}\and
  \Package{typearea}} offers most class and package options the
opportunity to change the value of options even after loading of the
class or package. One may then change the values of a list of options
at will with the \Macro{KOMAoptions} command. Each option in the
\PName{option list} has the form
\PName{option}\texttt{=}\PName{value}.

Some options also have a default value. If one does not give a value,
i.\,e., gives the option simply in the form \PName{option}, then the
default value will be used.

Some options can assume several values simultaneously. For such options there
exists the possibility, with the help of \Macro{KOMAoption}, to pass a single
\PName{option} a list of values. The individual values are given as a
comma-separated \PName{value list}.

\begin{Explain}
  % If in the \PName{option list} one sets an option to a disallowed
  % value, or the \PName{value list} contains an invalid value, then an
  % error is produced. If \LaTeX{} is run in an interactive mode, then
  % it stops at this point. Entering ``\texttt{h}'' displays a help
  % screen, in which also the valid values for the corresponding option
  % are given.

  % If a \PName{value} includes an equal sign or a comma, then the
  % \PName{value} must be enclosed in curly brackets.

  To implement this possibility {\KOMAScript} uses the commands
  \DescRef{scrbase.cmd.FamilyOptions} and \DescRef{scrbase.cmd.FamilyOption}
  with the family ``\PValue{KOMA}''.
\iffalse % Umbruchkorrektur
  More information on these commands %
  \IfThisCommonLabelBase{maincls}{for experts }{%
    \IfThisCommonLabelBase{scrlttr2}{for experts }{}}%
  is found in \autoref{sec:scrbase.keyvalue},
  \DescPageRef{scrbase.cmd.FamilyOptions}.
\else
  For more information in these commands see \autoref{part:forExperts},
  \autoref{sec:scrbase.keyvalue},
  \DescPageRef{scrbase.cmd.FamilyOptions}.
\fi
\end{Explain}
%
\EndIndexGroup
%
\EndIndexGroup


%%% Local Variables:
%%% mode: latex
%%% coding: iso-latin-1
%%% TeX-master: "../guide"
%%% End:
