summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex')
-rw-r--r--Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex205
1 files changed, 150 insertions, 55 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex b/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex
index 376319b4d06..78454dbe73b 100644
--- a/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex
+++ b/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex
@@ -1,6 +1,6 @@
% ======================================================================
% scrbase.tex
-% Copyright (c) Markus Kohm, 2002-2013
+% Copyright (c) Markus Kohm, 2002-2014
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
@@ -18,7 +18,7 @@
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% scrbase.tex
-% Copyright (c) Markus Kohm, 2002-2013
+% Copyright (c) Markus Kohm, 2002-2014
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
@@ -46,11 +46,11 @@
% ======================================================================
\KOMAProvidesFile{scrbase.tex}
- [$Date: 2013-12-13 16:32:18 +0100 (Fr, 13 Dez 2013) $
+ [$Date: 2014-09-19 10:04:02 +0200 (Fri, 19 Sep 2014) $
KOMA-Script package scrbase]
\translator{Markus Kohm\and Melvin Hendrix}
-% Date of the translated German file: 2013/11/06
+% Date of the translated German file: 2014/09/19
\chapter{Basic Functions of Package \Package{scrbase}}
\labelbase{scrbase}
@@ -270,8 +270,8 @@ Generally, the four predefined states should be sufficient.
\begin{lstcode}
\newif\if@Salami@Aufschnitt
\DefineFamilyKey{butcher}%
- {coldcut}[true]{%
- \expandafter\let\expandafter\if@salami@coldcut
+ {coldcuts}[true]{%
+ \expandafter\let\expandafter\if@salami@coldcuts
\csname if#1\endcsname
\FamilyKeyStateProcessed
}
@@ -315,7 +315,7 @@ the keys of the family members.
\begin{lstcode}
\FamilyProcessOptions{butcher}
\end{lstcode}
- then the user may select the option \Option{coldcut} when loading the
+ then the user may select the option \Option{coldcuts} when loading the
package. If the option is used globally, this means at the optional
argument of \Macro{documentclass}, then the option would be passed
automatically to all three packages, if all three packages are loaded
@@ -350,10 +350,10 @@ Somehow special are keys of empty family members, which are not attached to a
family member, but to a family. Such keys are set before the keys of family
members.
\begin{Example}
- Assume option \Option{coldcut} should be set by default in the
+ Assume option \Option{coldcuts} should be set by default in the
previous example. In this case only line
\begin{lstcode}
- \FamilyExecuteOptions{butcher}{coldcut}
+ \FamilyExecuteOptions{butcher}{coldcuts}
\end{lstcode}
has to be added.
\end{Example}
@@ -385,34 +385,45 @@ family, then \Macro{FamilyOptions} will result in an error. Package
\PName{key}, but all those members signal failure via \Macro{FamilyKeyState}.
\begin{Example}
You extend your butcher project by a package \Package{sausagesalad}. If this
- package has been loaded, all sausage package should generate cold cut:
+ package has been loaded, all sausage package should generate cold cuts:
\begin{lstcode}
\ProvidesPackage{sausagesalad}%
[2008/05/06 nonsense package]
\DefineFamily{butcher}
\DefineFamilyMember{butcher}
\FamilyProcessOptions{butcher}\relax
- \FamilyOptions{butcher}{coldcut}
+ \FamilyOptions{butcher}{coldcuts}
\end{lstcode}
- If currently none of the sausage packages are loaded, then an error
- message results because of undefined option ``\Option{coldcut}''. This is
- avoided by changing the last line of the code to:
-\begin{lstcode}[moretexcs={Family@Options}]
- \Family@Options{butcher}{coldcut}{}
+ If currently none of the sausage packages are loaded, the undefined option
+ \Option{coldcuts} leads to an error message. This is avoided by adding
+ before the last line of the code above:
+\begin{lstcode}
+ \DefineFamilyKey{butcher}%
+ {coldcuts}[true]{}%
\end{lstcode}
- Despite this, sausage packages loaded after
- \Package{sausagesalad} still do not produce cold cut. This may be corrected
+ However, sausage packages loaded after
+ \Package{sausagesalad} still do not produce cold cuts. This may be corrected
by editing the last line of the code again to:
-\begin{lstcode}[moretexcs={Family@Options}]
+\begin{lstcode}
\AtBeginDocument{%
- \Family@Options{butcher}{coldcut}{%
- \PackageWarning{sausagesalad}{%
- sausage salad needs at least
- one sausage package}%
- }%
+ \DefineFamiyKey[.sausagesalad.sty]%
+ {butcher}%
+ {coldcuts}[true]{}%
+ }
+ \DefineFamilyKey{butcher}%
+ {coldcuts}[true]{%
+ \AtBeginDocument{\FamilyOptions{butcher}%
+ {coldcuts=#1}}%
}%
\end{lstcode}
- This may throw a warning message if none of the sausage packages are loaded.
+ This code does following: First the option will be defined while
+ \Macro{begin}\PParameter{document} to do nothing for package
+ \Package{sausagesalad}. Because \Macro{@currname} and \Macro{@currext} are
+ not longer valid at this time, the optional argument on
+ \Macro{DefineFamilyKey} has to be used. But until this re-definition of the
+ option, a second definition is made, that calls the option again while
+ \Macro{begin}\PParameter{document} for the whole family and so also for
+ other sausage salad packages.
\end{Example}
%
\EndIndex{Cmd}{FamilyOptions}%
@@ -439,7 +450,7 @@ is the same as that of the previous command \Macro{FamilyOptions}.
\begin{Example}
Package \Package{sausagesalad} should have one mire option, to add
additional ingredients. Each of the ingredients sets a switch as was done
- previously for the cold cut.
+ previously for the cold cuts.
\begin{lstcode}
\newif\if@saladwith@onions
\newif\if@saladwith@gherkins
@@ -492,7 +503,7 @@ option definition.
\BeginIndex{Cmd}{FamilyBoolKey}%
\BeginIndex{Cmd}{FamilySetBool}%
In the previous examples, boolean switches often have been used. In the example
-with option \Option{coldcut}, it is necessary that the user assigns either
+with option \Option{coldcuts}, it is necessary that the user assigns either
value \PValue{true} or value \PValue{false}. There is no error message for
wrong value assignment. Because of this, boolean switches are a necessary
feature. Package \Package{scrbase} provides \Macro{FamilyBoolKey} for definition of
@@ -515,37 +526,37 @@ members, this may result in an error message about unknown value assignment
(see also \autopageref{desc:scrbase.cmd.FamilyUnkownKeyValue} and
\autopageref{desc:scrbase.cmd.FamilyKeyState}).
\begin{Example}
- The key \Option{coldcut} should be declared somehow more
+ The key \Option{coldcuts} should be declared somehow more
robust. Additionally, all sausage packages should use the same key. So
- either all or none of them will produce cold cut.
+ either all or none of them will produce cold cuts.
\begin{lstcode}
- \FamilyBoolKey{butcher}{coldcut}%
- {@coldcut}
+ \FamilyBoolKey{butcher}{coldcuts}%
+ {@coldcuts}
\end{lstcode}
- A test, whether or not to produce cold cut, may be:
+ A test, whether or not to produce cold cuts, may be:
\begin{lstcode}
- \if@coldcut
+ \if@coldcuts
...
\else
...
\fi
\end{lstcode}
This would be the same in each of the three sausage packages, thereby
- defining the attribute ``coldcut'' as a family option:
+ defining the attribute ``coldcuts'' as a family option:
\begin{lstcode}[moretexcs={define@key}]
- \@ifundefined{if@coldcut}{%
- \expandafter\newif\csname if@coldcut\endcsname
+ \@ifundefined{if@coldcuts}{%
+ \expandafter\newif\csname if@coldcuts\endcsname
}{}%
- \DefineFamilyKey[]{butcher}{coldcut}[true]{%
- \FamilySetBool{butcher}{coldcut}%
- {@coldcut}%
+ \DefineFamilyKey[]{butcher}{coldcuts}[true]{%
+ \FamilySetBool{butcher}{coldcuts}%
+ {@coldcuts}%
{#1}%
}
\end{lstcode}
or shorter:
\begin{lstcode}
- \FamilyBoolKey[]{butcher}{coldcut}%
- {@coldcut}
+ \FamilyBoolKey[]{butcher}{coldcuts}%
+ {@coldcuts}
\end{lstcode}
using the additional information at
\autopageref{explain:scrbase.macro.DefineFamilyKey}, this is not only valid
@@ -589,7 +600,7 @@ possible and allowed. Currently, the only limitation is that
\PName{definition} has to be fully expandable and will be expanded during the
assignment.
\begin{Example}
- The sausage may be cut different. For example the cold cut may stay uncut or
+ The sausage may be cut different. For example the cold cuts may stay uncut or
will be cut roughly or may be cut thinly. This information should be stored
in command \Macro{cuthow}.
\begin{lstcode}
@@ -647,6 +658,85 @@ normally result in an error message about assigning an unknown value.
\EndIndex{Cmd}{FamilySetNumerical}%
\EndIndex{Cmd}{FamilyNumericalKey}%
+\begin{Declaration}
+ \Macro{FamilyCounterKey}\OParameter{family member}\Parameter{family}%
+ \Parameter{key}\Parameter{\LaTeX{} counter}\\
+% \hphantom{\XMacro{FamilyCounterKey}}%
+% \Parameter{\LaTeX{} counter}
+ \Macro{FamilySetCounter}\Parameter{family}%
+ \Parameter{key}\Parameter{\LaTeX{} counter}\Parameter{value}
+\end{Declaration}
+\BeginIndex{Cmd}{FamilyCounterKey}%
+\BeginIndex{Cmd}{FamilySetCounter}%
+Beside\ChangedAt{v3.12}{\Package{scrbase}} \Macro{FamilyNumercialKey} that
+defines a macro to a numeric value depending on a symbolic value, there are
+circumstances when a \PName{key} directly represents a \PName{\LaTeX{}
+ counter}, that should be assigned directly to a numeric value. In those
+cases, \Macro{FamilyCounterKey} can be used that internally will call
+\Macro{FamilySetCounter}. A primary test of the \PName{value} argument is done
+that only detects whether or not usage of \PName{value} as a number is
+plausible. The assignment is done, only if this plausibility test is
+successful. Nevertheless the assignment can still fail and result in a \TeX{}
+error. But if the plausibility test fails already, this is signalled by
+\Macro{FamilyKeyStateUnknownValue}.
+
+Please note\textnote{Attention!}, this command does not support an optional
+\PName{default}.%
+\EndIndex{Cmd}{FamilySetCounter}%
+\EndIndex{Cmd}{FamilyCounterKey}%
+
+\begin{Declaration}
+ \Macro{FamilyCounterMacroKey}\OParameter{family member}\Parameter{family}%
+ \Parameter{key}\Parameter{macro}\\
+ \Macro{FamilySetCounterMacro}\Parameter{family}%
+ \Parameter{key}\Parameter{macro}\Parameter{value}%
+\end{Declaration}
+\BeginIndex{Cmd}{FamilyCounterMacroKey}%
+\BeginIndex{Cmd}{FamilySetCounterMacro}%
+These\ChangedAt{v3.12}{\Package{scrbase}} two commands differ from the
+previously described \Macro{FamilyCounterKey} and \Macro{FamilySetCounter}
+only by the fact, that they do not assign a \PName{value} to a \PName{\LaTeX
+ counter}, but define a \Macro{macro} with the
+\PName{value}. Note\textnote{Attention}, that also an optional \PName{default}
+is not supported.%
+\EndIndex{Cmd}{FamilySetCounterMacro}%
+\EndIndex{Cmd}{FamilyCounterMacroKey}%
+
+\begin{Declaration}
+ \Macro{FamilyLengthKey}\OParameter{family member}\Parameter{family}%
+ \Parameter{key}\Parameter{length}\\
+ \Macro{FamilySetLength}\Parameter{family}%
+ \Parameter{key}\Parameter{length}\Parameter{value}\\
+ \Macro{FamilyLengthMacroKey}\OParameter{family member}\Parameter{family}%
+ \Parameter{key}\Parameter{Makro}\\
+ \Macro{FamilySetLengthMacro}\Parameter{family}%
+ \Parameter{key}\Parameter{Makro}\Parameter{value}%
+\end{Declaration}
+\BeginIndex{Cmd}{FamilyLengthKey}%
+\BeginIndex{Cmd}{FamilySetLength}%
+\BeginIndex{Cmd}{FamilyLengthMacroKey}%
+\BeginIndex{Cmd}{FamilySetLengthMacro}%
+With\ChangedAt{v3.12}{\Package{scrbase}} \Macro{FamilyLengthKey} you can
+define a \PName{key} that represents a \PName{length}. It does not matter
+whether the \PName{length} is a \LaTeX{} length, a \TeX{} skip or a \TeX{}
+dimension. Internally the \PName{length} will be set to the \PName{value}
+using \Macro{FamilySetLength}. Thereby a primary test is used to decide,
+whether or not it is plausible to assign \PName{length} to \PName{value}. The
+assignment is done only if this plausibility test is successful. Nevertheless,
+not all assignment errors can be recognised, so an inaccurate \PName{value}
+can still result in \TeX{} error. Recognised errors however will be signalled
+by \Macro{FamilyKeyStateUnknownValue}.
+
+In difference to this, \Macro{FamilyLengthMacroKey} and
+\Macro{FamilySetLengthMacro} do not assign \PName{value} to a \PName{length},
+but define a \Macro{macro} with this \PName{value}.
+
+Please note\textnote{Attention!}, these commands do not support an optional
+\PName{default} argument.%
+\EndIndex{Cmd}{FamilySetLengthMacro}%
+\EndIndex{Cmd}{FamilyLengthMacroKey}%
+\EndIndex{Cmd}{FamilySetLength}%
+\EndIndex{Cmd}{FamilyLengthKey}%
\begin{Declaration}
\Macro{FamilyStringKey}\OParameter{family member}\Parameter{family}%
@@ -716,25 +806,25 @@ separated list of allowed values in the form:
Currently\ChangedAt{v3.12}{\Package{scrbase}}, \PName{values list} is
not used by \Package{scrbase}.
\begin{Example}
- Now, for the cold cut, the choices should be cut or no-cut and in case of cut
+ Now, for the cold cuts, the choices should be cut or no-cut and in case of cut
rough or thin. Rough should be the default for cutting.
\begin{lstcode}
\@ifundefined{if@thincut}{%
\expandafter
\newif\csname if@thincut\endcsname}{}%
- \@ifundefined{if@coldcut}{%
+ \@ifundefined{if@coldcuts}{%
\expandafter
- \newif\csname if@coldcut\endcsname}{}
+ \newif\csname if@coldcuts\endcsname}{}
\DefineFamilyKey{butcher}%
- {coldcut}[true]{%
- \FamilySetBool{butcher}{coldcut}%
- {@coldcut}%
+ {coldcuts}[true]{%
+ \FamilySetBool{butcher}{coldcuts}%
+ {@coldcuts}%
{#1}%
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\@thincutfalse
\else
\ifstr{#1}{thin}{%
- \@coldcuttrue
+ \@coldcutstrue
\@thincuttrue
\FamilyKeyStateProcessed
}{}%
@@ -742,14 +832,14 @@ not used by \Package{scrbase}.
}%
\end{lstcode}
Let's have a look at the definition of \Option{butcher}:
- First of all, we try to set the boolean switch of cold cut using
+ First of all, we try to set the boolean switch of cold cuts using
\Macro{FamilySetBool}. After this command, we test whether or not
\Macro{FamilyKeyState} signals the success of the command with state
\Macro{FamilyKeyStateProcessed}. If so, only the thin cut has to be
deactivated.
In the other case, the value will be tested to be equal to \PValue{thin}. In
- that case, cold cut and thin cut are activated and the state will be
+ that case, cold cuts and thin cut are activated and the state will be
switched to \Macro{FamilyKeyStateProcessed}. If the last test failed also,
the failure state of \Macro{FamilySetBool} is still valid at the end of the
execution.
@@ -1083,7 +1173,7 @@ there is no corresponding internal command.%
\end{Declaration}
\BeginIndex{Cmd}{ifnumber}%
Note that this does not compare numbers. The \PName{then instructions} will
-be executed if the expansion of \PName{string} consists of digits
+be executed if the one step expansion of \PName{string} consists of digits
only. Otherwise the \PName{else instructions} will be used. There is no
corresponding internal command.
%
@@ -1096,9 +1186,9 @@ corresponding internal command.
\end{Declaration}
\BeginIndex{Cmd}{ifdimen}%
Note that this does not compare dimensions. The \PName{then instructions} will
-be executed, if the expansion of \PName{string} consists of digits and a valid
-unit of length. Otherwise, the \PName{else instructions} will be used. There
-is no corresponding internal command.
+be executed, if the one step expansion of \PName{string} consists of digits
+and a valid unit of length. Otherwise, the \PName{else instructions} will be
+used. There is no corresponding internal command.
%
\EndIndex{Cmd}{ifdimen}%
@@ -1192,6 +1282,11 @@ defined language, then an error message is given. Otherwise, the
\PName{term} for the language will be redefined according to
\PName{definition}.
+The\ChangedAt{v3.12}{\Package{scrbase}} command \Macro{defcaptionname} always
+defines the \PName{term}. So previous definitions of \PName{term} for the
+given \PName{language} will be overwritten. You may use this command even for
+undefined languages.
+
\KOMAScript{} employs \Macro{providecaptionname} in order to define the
commands in \autoref{sec:scrlttr2-experts.languages}.