| 1 |
% ====================================================================== |
| 2 |
% common-options-en.tex |
| 3 |
% Copyright (c) Markus Kohm, 2001-2022 |
| 4 |
% |
| 5 |
% This file is part of the LaTeX2e KOMA-Script bundle. |
| 6 |
% |
| 7 |
% This work may be distributed and/or modified under the conditions of |
| 8 |
% the LaTeX Project Public License, version 1.3c of the license. |
| 9 |
% The latest version of this license is in |
| 10 |
% http://www.latex-project.org/lppl.txt |
| 11 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 12 |
% version 2005/12/01 or later and of this work. |
| 13 |
% |
| 14 |
% This work has the LPPL maintenance status "author-maintained". |
| 15 |
% |
| 16 |
% The Current Maintainer and author of this work is Markus Kohm. |
| 17 |
% |
| 18 |
% This work consists of all files listed in MANIFEST.md. |
| 19 |
% ====================================================================== |
| 20 |
% |
| 21 |
% Paragraphs that are common for several chapters of the KOMA-Script guide |
| 22 |
% Maintained by Markus Kohm |
| 23 |
% |
| 24 |
% ====================================================================== |
| 25 |
|
| 26 |
\KOMAProvidesFile{common-options-en.tex} |
| 27 |
[$Date: 2023-07-31 15:38:10 +0200 (Mo, 31. Jul 2023) $ |
| 28 |
KOMA-Script guide (common paragraphs)] |
| 29 |
\translator{Gernot Hassenpflug\and Krickette Murabayashi\and Karl Hagen} |
| 30 |
|
| 31 |
\section{Early or Late Selection of Options} |
| 32 |
\seclabel{options} |
| 33 |
\BeginIndexGroup |
| 34 |
\BeginIndex{}{options}% |
| 35 |
|
| 36 |
\IfThisCommonFirstRun{% |
| 37 |
This section introduces a special feature of \KOMAScript{} which, in |
| 38 |
addition to \IfThisCommonLabelBase{typearea}{\Package{typearea}}{% |
| 39 |
\IfThisCommonLabelBase{maincls}{\Class{scrbook}, \Class{scrreprt}, and |
| 40 |
\Class{scrartcl}}{% |
| 41 |
\IfThisCommonLabelBase{scrlttr2}{the \Class{scrlttr2} class}{% |
| 42 |
\IfThisCommonLabelBase{scrextend}{the classes and |
| 43 |
\Package{scrextend}}{% |
| 44 |
\IfThisCommonLabelBase{scrjura}{\Package{scrjura}}{% |
| 45 |
\IfThisCommonLabelBase{scrlayer}{\Package{scrlayer}}{% |
| 46 |
\IfThisCommonLabelBase{scrlayer-scrpage}{% |
| 47 |
\Package{scrlayer-scrpage}}{% |
| 48 |
\IfThisCommonLabelBase{scrlayer-notecolumn}{% |
| 49 |
\Package{scrlayer-notecolumn}}{% |
| 50 |
\InternalCommonFileUsageError}}}}}}}}% |
| 51 |
, is also relevant to other \KOMAScript{} packages and classes. % |
| 52 |
\IfThisCommonLabelBase{scrlttr2}{So that each chapter may stand on its own, |
| 53 |
this section appears in nearly identical form in several chapters, but if |
| 54 |
you are studying all of \KOMAScript{}, you of course only need to read it |
| 55 |
one time.% |
| 56 |
}{This section appears in nearly identical form in several chapters, so you |
| 57 |
can find all the information about a single package or class in the |
| 58 |
relevant chapter. Users who are interested not just in a particular |
| 59 |
package or class but in getting an overview of \KOMAScript{} as a whole |
| 60 |
only need to read this section in one of the chapters and can |
| 61 |
\IfThisCommonLabelBase{maincls}{skip the rest of the chapter.}{% |
| 62 |
then skip it as they study the guide.}% |
| 63 |
}% |
| 64 |
}{% |
| 65 |
The information in \autoref{sec:\ThisCommonFirstLabelBase.options} applies |
| 66 |
equally to this chapter. So if you have already read and understood |
| 67 |
\autoref{sec:\ThisCommonFirstLabelBase.options}, you can skip ahead to |
| 68 |
\autoref{sec:\ThisCommonLabelBase.options.next}, |
| 69 |
\autopageref{sec:\ThisCommonLabelBase.options.next}.% |
| 70 |
} |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
\begin{Declaration} |
| 75 |
\Macro{documentclass}\OParameter{option list}% |
| 76 |
\Parameter{{\KOMAScript} class} |
| 77 |
\Macro{usepackage}\OParameter{option list}% |
| 78 |
\Parameter{package list} |
| 79 |
\end{Declaration} |
| 80 |
\LaTeX{} allows users to pass class options\textnote{class options} as a |
| 81 |
comma-separated list of keywords in the optional argument to |
| 82 |
\Macro{documentclass}. In addition to being passed to the class, these options |
| 83 |
are also passed on to all packages\textnote{global options} that can |
| 84 |
understand them. Users can also pass a similar comma-separated list of |
| 85 |
keywords in the optional argument of \Macro{usepackage}\textnote{packet |
| 86 |
options}. \KOMAScript{} extends\ChangedAt{v3.00}{\Class{scrbook}\and |
| 87 |
\Class{scrreprt}\and \Class{scrartcl}\and \Package{scrextend}\and |
| 88 |
\Package{typearea}} the option mechanism for |
| 89 |
\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{the \KOMAScript{} classes and |
| 90 |
} some packages with further options. Thus most \KOMAScript{} options can also |
| 91 |
take a value, so an option does not necessarily take the form \PName{option}, |
| 92 |
but can also take the form \PName{option}\texttt{=}\PName{value}% |
| 93 |
\important{\PName{option}\texttt{=}\PName{value}}. Except for this difference, |
| 94 |
\Macro{documentclass} and \Macro{usepackage} in \KOMAScript{} function as |
| 95 |
described in \cite{latex:usrguide} or any introduction to \LaTeX, for example |
| 96 |
\cite{lshort}. |
| 97 |
|
| 98 |
\IfThisCommonLabelBaseNotOneOf{% |
| 99 |
scrjura,scrlayer,scrlayer-scrpage,scrlayer-notecolumn,scrextend% |
| 100 |
}{% |
| 101 |
When using a \KOMAScript{} class\textnote{Attention!}, you should not |
| 102 |
specify options when loading the \Package{typearea} or \Package{scrbase} |
| 103 |
packages. The reason for this restriction is that the class already loads |
| 104 |
these packages without options, and \LaTeX{} refuses to load a package |
| 105 |
multiple times with different option settings.% |
| 106 |
\IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{ In general, it is not |
| 107 |
necessary to load either one of these packages explicitly when using any |
| 108 |
\KOMAScript{} class.}{}% |
| 109 |
\par |
| 110 |
}{} |
| 111 |
|
| 112 |
% The alternative text for wrapping optimization was redundant and, as |
| 113 |
% it's not required for the English version, has been deleted. |
| 114 |
Setting the options with \Macro{documentclass} has one\textnote{Attention!} |
| 115 |
major disadvantage: unlike the interface described below, the options in |
| 116 |
\Macro{documentclass} are not robust. So commands, lengths, counters, and |
| 117 |
similar constructs may break inside the optional argument of this command. |
| 118 |
For example, with many non-\KOMAScript{} classes, using a \LaTeX{} length |
| 119 |
in the value of an option results in an error% |
| 120 |
\IfThisCommonLabelBaseNotOneOf{maincls,scrlttr2}{ before the value is passed |
| 121 |
to a \KOMAScript{} package and it can take control of the option |
| 122 |
execution}{}% |
| 123 |
. So if you want to use a \LaTeX{} length, counter, or command as part of the |
| 124 |
value of an option, you should use \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 125 |
\DescRef{\LabelBase.cmd.KOMAoption}. These commands will be described next.% |
| 126 |
% |
| 127 |
\EndIndexGroup |
| 128 |
|
| 129 |
|
| 130 |
\begin{Declaration} |
| 131 |
\Macro{KOMAoptions}\Parameter{option list} |
| 132 |
\Macro{KOMAoption}\Parameter{option}\Parameter{value list} |
| 133 |
\end{Declaration} |
| 134 |
\KOMAScript{}\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and |
| 135 |
\Class{scrartcl}\and \Package{scrextend}\and \Package{typearea}} also |
| 136 |
provides the ability to change the values of most |
| 137 |
\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{class and }package options |
| 138 |
even after loading the \IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{% |
| 139 |
class or} package. You can use the \Macro{KOMAoptions} command to change the |
| 140 |
values of a list of options, as in |
| 141 |
\DescRef{\ThisCommonLabelBase.cmd.documentclass} or |
| 142 |
\DescRef{\ThisCommonLabelBase.cmd.usepackage}. Each option in the |
| 143 |
\PName{option list} has the form \PName{option}\texttt{=}\PName{value}% |
| 144 |
\important{\PName{option}\texttt{=}\PName{value},\dots}. |
| 145 |
|
| 146 |
Some options also have a default value. If you do not specify a value, that is |
| 147 |
if you give the option simply as \PName{option}, then this default value will |
| 148 |
be used. |
| 149 |
|
| 150 |
Some options can have several values simultaneously. For such options, it is |
| 151 |
possible, with the help of \Macro{KOMAoption}, to pass a list of values to a |
| 152 |
single \PName{option}. The individual values are given as a comma-separated |
| 153 |
\PName{value list}\important{\PName{value},\dots}. |
| 154 |
|
| 155 |
\begin{Explain} |
| 156 |
\KOMAScript{} uses the commands \DescRef{scrbase.cmd.FamilyOptions} and |
| 157 |
\DescRef{scrbase.cmd.FamilyOption} with the family ``\PValue{KOMA}'' to |
| 158 |
implement this ability. |
| 159 |
\IfThisCommonLabelBaseOneOf{typearea}{% Umbruchkorrektur |
| 160 |
Advanced users will find more on these instructions in |
| 161 |
\autoref{sec:scrbase.keyvalue}, \DescPageRef{scrbase.cmd.FamilyOptions}. |
| 162 |
}{% |
| 163 |
See \autoref{part:forExperts}, \autoref{sec:scrbase.keyvalue}, |
| 164 |
\DescPageRef{scrbase.cmd.FamilyOptions}. }% |
| 165 |
\end{Explain} |
| 166 |
|
| 167 |
Options set with \Macro{KOMAoptions} or \Macro{KOMAoption} will reach |
| 168 |
\IfThisCommonLabelBase{scrextend}{}{both the \KOMAScript{} class and }any |
| 169 |
previously loaded \KOMAScript{} packages that recognise these options. If an |
| 170 |
option or a value is unknown, \hyperref[cha:scrbase]{\Package{scrbase}}% |
| 171 |
\IndexPackage{scrbase}\important{\hyperref[cha:scrbase]{\Package{scrbase}}} |
| 172 |
will report it as an error.% |
| 173 |
% |
| 174 |
\iffalse% Umbruchkorrekturtext |
| 175 |
\iffree{}{\IfThisCommonLabelBase{scrlayer-scrpage}{\par |
| 176 |
Incidentally, the \Package{scrpage2}\IndexPackage{scrpage2}% |
| 177 |
\important{\Package{scrpage2}}, which is considered obsolete, does not have |
| 178 |
this extension. Options can therefore only be set when the package is loaded |
| 179 |
with the option explained previously.}{}}% |
| 180 |
\fi% |
| 181 |
% |
| 182 |
\EndIndexGroup |
| 183 |
% |
| 184 |
\EndIndexGroup |
| 185 |
|
| 186 |
\phantomsection |
| 187 |
\label{sec:\ThisCommonLabelBase.options.end} |
| 188 |
\endinput |
| 189 |
|
| 190 |
%%% Local Variables: |
| 191 |
%%% mode: latex |
| 192 |
%%% TeX-master: "scrguide-en.tex" |
| 193 |
%%% coding: utf-8 |
| 194 |
%%% ispell-local-dictionary: "en_GB" |
| 195 |
%%% eval: (flyspell-mode 1) |
| 196 |
%%% End: |