§ 1 Kein Witz ohne
Publikum
Ein Witz kann nur dort witzig
sein, wo er auf ein Publikum
trifft.
§ 2 Komik der Kultur
(1) Die Komik eines Witzes
kann durch das kulturelle
Umfeld, in dem er erzählt
wird, bestimmt sein.
(2) Die Komik eines Witzes
kann durch das kulturelle
Umfeld, in dem er spielt,
bestimmt sein.
1
You should note, that deactivation of the option can result in lost notes at the end of the
document. So you should insert
\clearnotecolumns
before \end{document} if you deactivate
the option.
This should answer the question from the end of the last section. By default the section
would be output even if it would need the output of one more page. But because this would be
done after the end of the
addmargin
environment, the forced output could overlap with main
text after that environment. So it would be useful to either add one more synchronisation
point or to force the output explicitly immediately at the end of the
addmargin
environment.
The result of the example is shown in
figure 19.1
.
Chapter 20: Additional Information about package typearea
437
Additional Information about package typearea
This chapter gives additional information about package typearea. Some parts of the chapter
are subject to the KOMA-Script book [
Koh14a
] only. This should not be a problem, because
the average user, who only want to use the package, does not need the information that is
addressed to users with non-standard requirements or who want to write their own packages
using typearea. Another part of the information describes features of typearea that exist only
because of compatibility to former releases of KOMA-Script or the standard classes. The
features, that exist only because of compatibility to former KOMA-Script releases, are printed
with a sans serif font. You should not use them any longer.
20.1. Experimental Features
This section describes experimental features. Experimental in this context means, the function
of a feature is not guarantied. There are two reasons for this. First of all the final function is
not yet defined or implementation is not yet established. Second reason is, that a feature may
depend on internal functions of other packages and therefore the feature can not be guarantied,
if the other package changes.
usegeometry=simple switch
Usually typearea simply ignores whether or not it is used in any constellation with package
geometry (see [
Ume10
]). This means, geometry does not recognize any page parameter change
done with typearea, especially if you change the page size or page orientation — a feature not
provided by geometry itself.
Once you set option usegeometry, typearea tries to translate all of its options into op-
tions of geometry. If you use typearea inside the document, it even calls \newgeometry. But
since geometry does not provide changes of page size or page orientation with \newgeometry,
typearea uses internal macros and lengths of geometry to, nevertheless, provide such changes.
This has been tested with geometry 5.3 up to 5.6.
Note that using geometry and changing page size or orientation with typearea and active
usegeometry
does not mean, that geometry will automatically use the new paper size in an
expected manner. geometry has an over estimated amount of options. So you often need
to set up the margins and size of typing area newly using \newgeometry, because otherwise
the typing area may be to large or to small. Nevertheless the combination of typearea with
option usegeometry and package geometry can offer additional features or at least option
usegeometry
can improve the co-existence of both packages.
Chapter 20: Additional Information about package typearea
438
areasetadvanced=simple switch
\areaset[BCOR ]{width }{height }
Usually
\areaset
does not care for options to define height of page header or page footer
or whether or not margin elements should be part of the typing area same like
\typearea
.
With option areasetadvance you can change this at most. Nevertheless, settings that result
in same size of typing area still need not result in same top margin and bottom margin. This
is, because
\typearea
only changes the bottom margin to have a integer number of lines in
the typing area and
\areaset
always sets the ratio 1:2 for top margin to bottom margin.
So the identical sizes of typing areas my be shifted vertically a little bit depending on which
command has been used.
20.2. Expert Commands
This section describes commands that are not of interest for average users. Nevertheless these
commands provide additional features for experts. Because the information is addressed to
experts it’s condensed.
\activateareas
Package typearea uses this command to assign settings of typing area and margins to internal
L
A
TEX lengths, whenever the type area is newly calculated inside of the document, i˙e., after
\begin{document}
. If option
pagesize
has been used, it will be executed again afterward.
With this, e. g., the page size may vary inside of a PDF document.
Experts may use this command, if they change lengths like \textwidth or \textheight
inside a document manually for any reason. Nevertheless the expert himself is responsible for
eventually needed page breaks before or after usage of \activateareas. Moreover all changes
of \activateareas are local!
\storeareas{\command}
\BeforeRestoreareas{code }
\BeforeRestoreareas*{code }
\AfterRestoreareas{code }
\AfterRestoreareas*{code }
With \storeareas a \command will be defined that may be used to restore all current settings
of typing area and margins. This provides to store the current settings, change them, do
anything with valid changed settings and restore the previous settings afterwards.
Example: You want a landscape page inside a document with portrait format. No problem
using \storeareas:
Chapter 20: Additional Information about package typearea
439
\documentclass[pagesize]{scrartcl}
\begin{document}
\noindent\rule{\textwidth}{\textheight}
\storeareas\MySavedValues
\KOMAoptions{paper=landscape,DIV=current}
\noindent\rule{\textwidth}{\textheight}
\clearpage
\MySavedValues
\noindent\rule{\textwidth}{\textheight}
\end{document}
Command
\clearpage
before calling \MySavedValues is important to restore the
saved values at the next page.
In the example \noindent has been used to avoid the paragraph indent of the black boxes.
Without these commands the boxes would not show the typing area correctly.
Please note that neither \storeareas nor the defined \command should be used inside a
group. Internally \newcommand is used to define the \command. So re-usage of a \command to
store settings again would result in a corresponding error message.
Often
v3.18
it is useful to automatically execute commands like
\cleardoubleoddpage
be-
fore restoring the settings of a \command generated by \storeareas.
You can do
so using \BeforeRestoreareas or \BeforeRestoreareas*.
Analogously you can use
\AfterRestoreareas
or \AfterRestoreareas* to automatically execute code after restoring
the settings. The variants with and without star differs so that the star variant changes only
the auto-execution code of future command s and the variant without star also changes the
auto-execution code of already defined command s.
\AfterCalculatingTypearea{instructions }
\AfterCalculatingTypearea*{instructions }
\AfterSettingArea{instructions }
\AfterSettingArea*{instructions }
These commands manage hooks. \AfterCalculatingTypearea and it’s star version pro-
vide experts to execute instructions every time typearea has recalculated the typing
area and margins either implicitly or because of an explicit usage of
\typearea
. Similar
\AfterSettingArea
v3.11
and it’s star version provide execution of instructions every time
\areaset
has been used. While normal versions work globally the influence of the star
versions is only local. The instructions will be executed instantly before execution of
\activateareas
.
Chapter 20: Additional Information about package typearea
440
20.3. Local Settings with File typearea.cfg
Sorry, currently additional information to this may be found at the same point of the German
KOMA-Script book [
Koh14a
] only.
20.4. More or Less Obsolete Options and Commands
Sorry, currently additional information to this may be found at the same point of the German
KOMA-Script book [
Koh14a
] only.
Chapter 21: Additional Information about the Main Classes and scrextend
441
Additional Information about the Main Classes scrbook, scrreprt,
and scrartcl as well as the Package scrextend
This chapter gives additional information about the KOMA-Script classes scrbook, scrreprt,
and scrartcl. Some of the features are also available for package scrextend. Some parts of the
chapter are subject to the KOMA-Script book [
Koh14a
] only. This should not be a problem,
because the average user, who only want to use the package, will not need the information, that
is addressed to users with non-standard requirements or who want to write their own classes
using a KOMA-Script class. Another part of the information describes features of the classes
that exist only because of compatibility to former releases of KOMA-Script or the standard
classes. The features, that exist only because of compatibility to former KOMA-Script releases,
are printed with a sans serif font. You should not use them any longer.
Sorry, currently additional information to this may be found at the same point of the German
KOMA-Script book [
Koh14a
] only.
21.1. Additional Information to User Commands
Sorry, currently additional information to this may be found at the same point of the German
KOMA-Script book [
Koh14a
] only.
21.2. Cooperation and Coexistence of KOMA-Script and Other Packages
Sorry, currently additional information to this may be found at the same point of the German
KOMA-Script book [
Koh14a
] only.
21.3. Expert Commands
This sections described commands, that are more or less out of average user’s interest. Nev-
ertheless these commands provide additional features for experts. Because the information is
addressed to experts it’s condensed.
\KOMAClassName
\ClassName
\KOMAClassName
stores the name of the currently used KOMA-Script class. If someone wants
to know, whether or not or a KOMA-Script class is used or which KOMA-Script is used this
may be tested with this command. In difference to this, \ClassName tells which would be the
standard class, that has been replaced by a KOMA-Script class.
Please note, that the existence of
\KOMAScript
is not a indication for the usage of a KOMA-
Script class. First of all: Every KOMA-Script package and not only KOMA-Script classes
Chapter 21: Additional Information about the Main Classes and scrextend
442
define \KOMAScript. Furthermore other packages may also define the KOMA-Script word
mark with this name.
\addtocentrydefault{level }{number }{heading }
The
v3.08
KOMA-Script classes do not use \addcontentsline directly.
Instead they call
\addtocentrydefault
with similar arguments. The command may be used for both, en-
tries with and without number. Thereby level is the textual sectioning level, i. e., part,
chapter
, section, subsection, subsubsection, paragraph, or subparagraph. The already
formatted sectioning number is given by the second argument, number . This argument may
be empty. The text of the entry is given by argument heading . It is recommended to protect
fragile commands inside this argument with prefix \protect.
There’s one speciality for argument number . An empty argument signalizes, that an entry
without number should be generated. KOMA-Script uses
\addcontentsline{toc}{level }{heading }
for this. Nevertheless, if the argument is not empty an entry with number will be made and
number
is the already formatted heading number. KOMA-Script uses
\addcontentsline{toc}{level }{%
\protect
\numberline
{number }heading %
}
to make this.
Package authors an authors of wrapper classes may redefined this command to manipulate
the entries. For example one could suggest
\renewcommand{\addtocentrydefault}[3]{%
\ifstr{#3}{}{%
\ifstr{#2}{}{%
\addcontentsline{toc}{#1}{#3}%
}{%
\addcontentsline{toc}{#1}{\protect\numberline{#2}#3}%
}%
}%
}%
to omit entries with empty heading . In real live this would not be needed, because the KOMA-
Script classes already use another method to suppress empty entries. See the description of
the structuring commands in
section 3.16
from
page 95
onward for this.
Chapter 21: Additional Information about the Main Classes and scrextend
443
\addparttocentry{number }{heading }
\addchaptertocentry{number }{heading }
\addsectiontocentry{number }{heading }
\addsubsectiontocentry{number }{heading }
\addsubsubsectiontocentry{number }{heading }
\addparagraphtocentry{number }{heading }
\addsubparagraphtocentry{number }{heading }
The
v3.08
KOMA-Script classes call the previously described command
\addtocentrydefault
di-
rectly only if no individual command for the level has been defined or if that command
is \relax. Nevertheless, the default definition of all these individual commands simply call
\addtocentrydefault
with their own level passing their arguments through.
\raggedchapterentry
Previous
v3.21
versions of KOMA-Script provide a feature for printing chapter entries at the table
of contents left-aligned instead of justified by defining command \raggedchapterentry to be
\raggedright
. Officially this feature has been removed from KOMA-Script version 3.21 on.
Indeed attribute raggedentrytext of toc-entry style tocline of package tocbasic has been
implemented to use such a macro \raggedentry level entry as an indicator for left-aligned
text. If such a macro is \raggedright, the text is printed left-aligned. With any other
definition the text is printed justified.
With this implementation of raggedentrytext full compatibility to the previous docu-
mentation of \raggedchapterentry is reached. As stated formerly, other definitions of
\raggedchapterentry
— and now also of \raggedsectionentry and similar macros for other
entry levels — could result in the potentially unexpected effect of justified text.
Nevertheless, it is recommended to use the attribute of style tocline to select justified or
left-aligned text.
\@fontsizefilebase
\changefontsizes{font size }
The prefix scrsize for file names of font size files, that has been mentioned in
section 21.1
at
page 441
is only the default of the internal macro \@fontsizefilebase. This default
is used only, if the macro has not already be defined when loading a KOMA-Script class
or package scrextend. Authors of wrapper classes may define this macro with another file
name prefix to use completely different font size files. Also authors of wrapper classes could
change or deactivate the fallback solution for unknown font sizes by redefinition of macro
\changefontsizes
. This macro has exactly one argument: the wanted font size .
Chapter 21: Additional Information about the Main Classes and scrextend
444
\newkomafont[warning message ]{element }{default }
\aliaskomafont{alias name }{element }
Experts may use \newkomafont to define a default for the font style of an element . After
this that default may be changed using commands
\setkomafont
and
\addtokomafont
(see
section 3.6
,
page 57
). Of course this is not enough to use the defined font style. The expert
himself has to prepare his code to use command
\usekomafont
(see
page 57
) with that element
at his code definitions.
The optional argument warning message defines a warning message, that KOMA-Script
will show whenever the default font style of that element will be changed. The sender of the
warning in such cases will be the used KOMA-Script class or package scrextend.
Command \aliaskomafont defines an alias name to an already defined element . KOMA-
Script will inform the user automatically about the real name of the element, whenever an
alias name
will be used. An alias name may be used, e. g., if a developer finds a better
name for an element, that has been defined formerly with another name, if the old name
should still be usable because of compatibility. Also an alias name s may increase usability,
because different users may find different names more or less intuitive. KOMA-Script itself
defines a lot of alias name s for several element s.
\addtokomafontrelaxlist{macro }
\addtokomafontgobblelist{macro }
As already mentioned in
part I
of this manual, font settings of elements should consist only
in commands to select the size, family, coding, series, shape, or colour. At least changing the
colour is not always transparent in L
A
TEX and therefore could result in unwanted effects if
someone uses
\usekomafont
at an inappropriate state.
Users tend to use different, somehow critical things in the font setting of an element, e. g.,
\MakeUppercase
at the very end of the setting. As long as possible, the internal usage of font
settings has been implemented so that such forbidden settings do not matter. Even using a
command that expects an argument, e. g., \textbf instead of \bfseries, would work mostly,
if it the last one in the font setting of an element — but without warranty.
Inside KOMA-Script, sometimes, it was necessary to restrict the font change to real font
settings. This has been done, e. g., using
\usefontofkomafont
instead of
\usekomafont
(see
section 3.6
,
page 62
).
Nevertheless, command
\usefontofkomafont
and it’s siblings have some limitations.
Therefore you must not use a command that always needs a fully expandable argument inside
the font setting of an element. But this is exactly what \MakeUppercase needs. Therefore
v3.17
KOMA-Script holds a list of macros, which should become \relax inside
\usefontofkomafont
and it’s siblings. Amongst others, \normalcolor, \MakeUppercase, and \MakeLowercase are
part of that list. More macros can be added one by one using \addtokomafontrelaxlist.
Note that macro will be set simply to \relax.
So if macro really has an argu-
ment, the argument will be execute locally. Therefore you must not add commands like
Chapter 21: Additional Information about the Main Classes and scrextend
445
\setlength
to the list. The user himself is responsible for all errors resulting in the usage
of \addtokomafontrelaxlist. Additionally this command should not be misunderstood as a
legitimation for adding all kind of commands to the font setting of an element!
If
v3.19
a macro and it’s first argument should be ignored locally inside
\usefontofkomafont
and
it’s siblings, you can use \addtokomafontgobblelist instead of \addtokomafontrelaxlist.
An example for this is the command \color, that has to be ignored with the colour name and
therefore is a default member of the gobble-list.
\IfExistskomafont{element }{then code }{else code }
Which
v3.15
elements are defined depends on the version of KOMA-Script. So sometimes it may
be useful to be able to test, whether or not an element exists. The command executes the
then code
only if an element has been defined using
\newkomafont
or
\aliaskomafont
and
therefore can be changed using
\setkomafont
or
\addtokomafont
and can be used by one of
the \use...komafont commands. Otherwise it executes the else code .
\setparsizes{indent }{distance }{last line end space }
With this command KOMA-Script provides to set the indent of the first line of a new para-
graph, the distance between paragraphs and the white space that has to be at the end of the
last line of each paragraph. This command should be used whenever changes should also be
recognized by option
parskip=relative
. KOMA-Script itself uses this command, e. g., with
\setparsizes{0pt}{0pt}{0pt plus 1fil}
to switch of paragraph indent and distance between paragraphs and to allow any white space
at the end of the last line of paragraphs. This make sense, if a paragraph consists of a box
only, that should be printed without vertical distance but with the whole column width. If,
in opposite to that, the box should only span the whole width but should be printed with the
current settings of paragraph indent and distance between paragraphs, usage of
\setlength{\parfillskip}{0pt plus 1fil}
would be recommended.
Since KOMA-Script 3.17
v3.17
changing or reactivation of the typing area or the margins (see
chapter 2
) will also reactivate the values of \setparsizes if they have not been changed
since the last usage of this command. This is one more reason not to change these values
without using KOMA-Script. With compatibility to a KOMA-Script version prior to 3.17
(see
section 3.2
,
page 53
, option
version
) this reactivation of the \setparsizes values is
deactivated.
Sorry, currently additional information to this may be found at the same point of the German
KOMA-Script book [
Koh14a
] only.
|