Chapter 2: Construction of the Page Layout with typearea
49
few good non-proportional fonts available. Hardly a text typeset in this way looks really good.
In many cases font designers try to increase the serifs on the ‘i’ or ‘l’ to compensate for the
different character width. This cannot work and results in a fragmented and agitated-looking
text. If one uses L
A
TEX for one’s paper, some of these rules have to be either ignored or at
least interpreted generously. For example one may interpret “60 characters per line” not as a
fixed, but as an average or maximal value.
As executed, record regulations are usually intended to obtain a usable result even if the
author does not know what needs to be considered. Usable frequently means readable and
correctable. In the author’s opinion the type area of a text set with L
A
TEX and the typearea
package meets these criteria well right from the start. Thus if one is confronted with regulations
which deviate obviously substantially from it, then the author recommends submitting an
extract from the text to the responsible person and inquiring whether it is permitted to
submit the work despite deviations in the format. If necessary the type area can be moderately
adapted by modification of option
DIV
. The author advises against the use of
\areaset
for
this purpose however. In the worst case one may make use of the geometry package (see
[
Ume10
]), which is not part of KOMA-Script, or change the type area parameters of L
A
TEX.
One may find the values determined by typearea in the log file of one’s document. Thus
moderate adjustments should be possible. However, one should make absolutely sure that
the proportions of the text area correspond approximately to those of the page including
consideration of the binding correction.
If it should prove absolutely necessary to set the text with a line spacing of 1.5, then one
should not under any circumstances redefine \baselinestretch. Although this procedure
is recommended all too frequently, it has been obsolete since the introduction of L
A
TEX2ε in
1994. In the worst case one may use the instruction \linespread. The author recommends
the package setspace (see [
TF11
]), which is not part of KOMA-Script. Also one should let
typearea recalculate a new type area after the conversion of the line spacing. However, one
should switch back to the normal line spacing for the title, preferably also for the table contents
and various listings — as well as the bibliography and the index. The setspace package offers
for this a special environment and its own instructions.
The typearea package, even with option
DIV=calc
, calculates a very generous text area.
Many conservative typographers will state that the resulting line length is still excessive. The
calculated DIV value may be found in the log file for the respective document. Thus one can
select a smaller value easily after the first L
A
TEX run.
The question is not infrequently put to the author, why he spends an entire chapter dis-
cussing type area calculations, when it would be very much simpler to merely give the world a
package with which anyone can adjust the margins like in a word processor. Often it is added
that such a package would in any case be the better solution, since everyone can judge for them-
selves how good margins are to be chosen, and that the margins calculated by KOMA-Script
are anyway not that great. The author takes the liberty of translating a suitable quotation
from [
WF00
]. One may find the original German words in the German scrguide.
Chapter 2: Construction of the Page Layout with typearea
50
The practice of doing things oneself is long-since widespread, but the results are
often dubious because layman typographers do not see what is incorrect and can-
not know what is important. Thus one becomes accustomed to incorrect and poor
typography.
[. . . ] Now the objection could be made that typography is dependent
on taste. If it concerned decoration, perhaps one could let that argument slip by;
however, since typography is primarily concerned with information, errors cannot
only irritate, but may even cause damage.
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
51
The Main Classes: scrbook, scrreprt, and scrartcl
The main classes of the KOMA-Script bundle are designed as counterparts to the standard
L
A
TEX classes. This means that the KOMA-Script bundle contains replacements for the three
standard classes: book, report, and article. There is also a replacement for the standard
class letter. The document class for letters is described in a separate chapter, because it is
fundamentally different from the three main classes (see
chapter 4
).
The simplest way to use a KOMA-Script class instead of a standard one is to substitute
the class name in the \documentclass command according to
table 3.1
. For example, you
may replace \documentclass{book} by \documentclass{scrbook}. Normally, the document
should be processed without errors by L
A
TEX, just like before the substitution. The look,
however, should be different. Additionally, the KOMA-Script classes provide new possibilities
and options that are described in the following sections.
Allow me an observation before proceeding with the descriptions of the options. It is often
the case that at the beginning of a document one is often unsure which options to choose for
that specific document. Some options, for instance the choice of paper size, may be fixed from
the beginning. But already the question of the size of the text area and the margins could be
difficult to answer initially. On the other hand, the main business of an author — planning the
document structure, writing the text, preparing figures, tables, lists, index, and other data —
should be almost independent of those settings. As an author you should concentrate initially
on this work. When that is done, you can concentrate on the fine points of presentation.
Besides the choice of options, this means correcting hyphenation, optimizing page breaks, and
the placement of tables and figures.
3.1. Early or late Selection of Options
All of what is described in
section 2.4
is generally applicable. So if you have alread read and
understood
section 2.4
you can switch to
section 3.2
,
page 53
.
In this section a peculiarity of KOMA-Script is presented, which, apart from the classes
scrbook, scrreprt, and scrartcl is also relevant to other KOMA-Script classes and packages.
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
Table 3.1.: Correspondence between standard classes and
KOMA-Script classes
standard class KOMA-Script class
article
scrartcl
report
scrreprt
book
scrbook
letter
scrlttr2
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
52
who are not only interested in a particular package or class, but wish to gain an overview
of KOMA-Script as a whole, may read the section in one chapter and may thereafter skip it
wherever coming across it in the document.
\documentclass[option list ]{KOMA - Script class }
\usepackage[option list ]{package list }
In L
A
TEX, provision is made for the user to pass class options as a comma-separated list of
keywords as optional arguments to \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 \usepackage. KOMA-Script expands
v3.00
the option mechanism for the
KOMA-Script classes and various packages to use further possibilities. Thus, most KOMA-
Script options can also take a value. An option may have not only the form Option , but
may also have the form option =value . Apart from this difference \documentclass and
\usepackage
function the same in KOMA-Script as described in [
Tea05b
] or any introduction
to L
A
TEX, for example [
OPHS11
].
When using a KOMA-Script class, no options should be passed on loading of the typearea
or scrbase packages. The reason for this is that the class already loads these packages without
options and L
A
TEX refuses multiple loadings of a package with different option settings. Actu-
ally, it is no longer necessary when using any KOMA-Script class to explicity load either one
of these packages.
You should note, that in opposite to the interface described below the options interface of
\documentclass
and \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 L
A
TEX length inside the value of an option would cause an error before KOMA-Script
can get the control over the option execution. So, if you want to use a L
A
TEX length, counter
or command a part of the value of an option, you have to use
\KOMAoptions
or
\KOMAoption
.
These commands will be described next.
\KOMAoptions{option list }
\KOMAoption{option }{value list }
KOMA-Script
v3.00
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 \KOMAoptions command. Each option in the option list has the
form option =value .
Some options also have a default value. If one does not give a value, i. e., gives the option
simply in the form 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 \KOMAoption, to pass a single option a list of values. The
individual values are given as a comma-separated value list .
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
53
To implement this possibility KOMA-Script uses the commands
\FamilyOptions
and
\FamilyOption
with the family “KOMA”. For more information in these commands see
part II
,
section 12.2
,
page 313
.
3.2. Compatibility with Earlier Versions of KOMA-Script
It applies, mutatis mutandis, what is written in
section 2.5
. So if you have alread read and
understood
section 2.5
you can switch to
page 54
,
page 54
.
Those who achieve their documents in source code set utmost value to the fact that future
L
A
TEX runs will yield exactly the same result. However, sometimes improvement and bug
corrections of classes will result in changes of the behaviour and make-up. But sometimes this
is not wanted.
version=value
version=first
version=last
Since
v2.96a
v2.9t
v3.01b
version 2.96a of KOMA-Script it’s your choice if your source code should result in the
same make-up at future L
A
TEX runs or if you like to participate in all improvements of new
releases of the class. You may select the compatible version of KOMA-Script with option
version
. Compatibility to the lowest supported KOMA-Script release may be achieved by
version=first
or version=2.9 or version=2.9t. Setting value to an unknown release
number will result in a warning message and selects version=first for safety.
With version=last the most recent version will be selected at every L
A
TEX run. Be warned,
though, that using version=last poses possibilities of compatibility issues for future L
A
TEX
runs. Option version without any value means the same.
v3.01a
This is the default behaviour as
long as you do not use any deprecated options.
If you use a deprecated option of KOMA-Script 2, KOMA-Script 3 will switch to version=
first
automatically. This will also result in a warning message that explains how to prevent
this switching. Alternatively you may select another adjustment using option version with
the wanted compatibility after the deprecated option.
Compatibility is primarily make-up compatibility. New features not related to the mark-up
will be available even if you switch compatibility to a version before first implementation of
the feature. Option version does not influence make-up changes that are motivated by bug
fixes. If you need bug compatibility you should physically save the used KOMA-Script version
together with your document.
Please note that you cannot change option version anymore after loading the class. There-
fore, the usage of option version within the argument of
\KOMAoptions
or
\KOMAoption
is
not recommended and will cause an error.
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
54
3.3. Draft Mode
Many classes and packages provide a draft mode aside from the final typesetting mode. The
difference of draft and final mode may be as manifold as the classes and package that support
these modes. For instance, the graphics and the graphicx packages do not actually output the
graphics in their own draft mode. Instead they output a framed box of the appropriate size
containing only the graphic’s file name (see [
Car05
]).
draft= simple switch
This option
v3.00
is normally used to distinguish between the draft and final versions of a document.
simple switch
value may be any standard value from
table 2.5
,
page 39
. In particular,
switching on the option activates small black boxes that are set at the end of overly long
lines. The boxes help the untrained eye to find paragraphs that have to be treated manually.
With the default draft=false option no such boxes are shown. Such overly long lines often
vanish using package microtype [
Sch13
].
3.4. Page Layout
Each page of a document is separated into several different layout elements, e. g., margins,
head, foot, text area, margin note column, and the distances between all these elements.
KOMA-Script additionally distinguishes the page as a whole also known as the paper and
the viewable area of the page. Without doubt, the separation of the page into the several
parts is one of the basic features of a class. Nevertheless at KOMA-Script the classes delegate
that business to the package typearea. This package may be used with other classes too. In
difference to those other classes the KOMA-Script classes load typearea on their own. Because
of this, there’s no need to load the package explicitly with \usepackage while using a KOMA-
Script class. Nor would this make sense or be useful. See also
section 3.1
.
Some settings of KOMA-Script classes do influence the page layout. Those effects will be
documented at the corresponding settings.
For more information about page size, separation of pages into margins and type area, and
about selection of one or two column typesetting see the documentation of package typearea.
You may find it at
chapter 2
from
page 25
onwards.
\flushbottom
\raggedbottom
In double-sided documents, it’s preferred to have the same visual baseline in not only the first lines
of the text areas in a double-side spread, but also in the last lines. If pages consist of text without
paragraphs or headlines only, this is the result in general. But a paragraph distance of half of a
line would be enough to prevent achieving this, if the difference in the number of paragraphs on
each page of the double-page spread is odd-numbered. In this case at least some of the paragraph
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
55
distances need to be shrunk or stretched to fit the rule again. TEX knows shrinkable and stretchable
distances for this purpose. L
A
TEX provides an automatism for this kind of vertical adjustment.
Using double-sided typesetting with option twoside (see
section 2.4
,
page 38
) or two-column
typesetting with option twocolumn (see
page 39
) switches on vertical adjustment also. But
v3.17
with compatibility selection to a KOMA-Script version prior to 3.17 (see
section 3.2
,
page 53
,
option
version
) this is not the case, if you use
\KOMAoption
or
\KOMAoptions
to change the
setting of these options.
Alternatively, vertical adjustment may be switched on at any time valid from the current
page using \flushbottom. \raggedbottom would have the opposite effect, switching off ver-
tical adjustment from the current page on. This is also the default at one-sided typesetting.
By the way, KOMA-Script uses a slightly modified kind of abdication of vertical adjustment.
This has been done to move footnotes to the bottom of the text area instead of having them
close to the last used text line.
3.5. Selection of the Document Font Size
The main document font size is one of the basic decisions for the document layout. The
maximum width of the text area, and therefore splitting the page into text area and margins,
depends on the font size as stated in
chapter 2
. The main document font will be used for most
of the text. All font variations either in mode, weight, declination, or size should relate to the
main document font.
fontsize=size
In contrast to the standard classes and most other classes that provide only a very limited
number of font sizes, the KOMA-Script classes offer the feature of selection of any desired
size
for the main document font. In this context, any well known TEX unit of measure may
be used and using a number without unit of measure means pt.
If you use this option inside the document, the main document font size and all dependent
sizes will change from this point. This may be useful, e. g., if the appendix should be set using
smaller fonts on the whole. It should be noted that changing the main font size does not result
in an automatic recalculation of type area and margins (see
\recalctypearea
,
section 2.4
,
page 37
). On the other hand, each recalculation of type area and margins will be done on
the basis of the current main font size. The effects of changing the main font size to other
additionally loaded packages or the used document class depend on those packages and the
class. This may even result in error messages or typesetting errors, which cannot be considered
a fault of KOMA-Script, and even the KOMA-Script classes do not change all lengths if the
main font size changes after loading the class.
This option is not intended to be a substitution for \fontsize (see [
Tea05a
]). Also, you
should not use it instead of one of the main font depending font size commands \tiny up to
\Huge
!The default at scrbook, scrreprt, and scrartcl is fontsize=11pt. In contrast, the default
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
56
of the standard classes would be 10pt. You may attend to this if you switch from a standard
class to a KOMA-Script class.
3.6. Text Markup
L
A
TEX offers different possibilities for logical and direct markup of text. Selection of the font
family commands, as well as choosing the font size and width is supported. More information
about the standard font facilities may be found at [
OPHS11
], [
Tea05b
], and [
Tea05a
].
\textsuperscript{Text }
\textsubscript{Text }
The L
A
TEX-Kern already defines the command \textsuperscript to superscript text. Unfor-
tunately, until release 2015/01/01 L
A
TEX itself does not offer a command to produce text in
subscript instead of superscript. KOMA-Script defines \textsubscript for this purpose.
Example: You are writing a text on human metabolism. From time to time you have to
give some simple chemical formulas in which the numbers are in subscript. For
enabling logical markup you first define in the document preamble or in a separate
package:
\ newcommand*{\molec}[2]{#1\ textsubscript{#2}}
Using this you then write:
The cell produces its energy partly from reaction of \molec C6\molec
H{12}\molec O6 and \molec O2 to produce \molec H2\Molec O{} and
\molec C{}\molec O2.
However, arsenic (\molec{As}{}) has a quite
detrimental effect on the metabolism.
The output looks as follows:
The cell produces its energy from reaction of C
6
H
12
O
6
and O
2
to produce
H
2
O and CO
2
. However, arsenic (As) has a quite detrimental effect on
the metabolism.
Some time later you decide that the chemical formulas should be typeset in sans
serif. Now you can see the advantages of using logical markup. You only have the
redefine the \molec command:
\newcommand*{\molec}[2]{\textsf{#1\textsubscript{#2}}}
Now the output in the whole document changes to:
The cell produces its energy partly from reaction of C
6
H
12
O
6
and O
2
to
produce H
2
O and CO
2
. However, arsenic (As) has a quite detrimental
effect on the metabolism.
|