3.1. Early or late Selection of Options
All of what is described in
section 2.4
is generally applicable.
3.2. Compatibility with Earlier Versions of KOMA-Script
It applies, mutatis mutandis, what is written in
section 2.5
.
Table 3.1.: Correspondence between standard classes and
KOMA-Script classes
standard class KOMA-Script class
article
scrartcl
report
scrreprt
book
scrbook
letter
scrlttr2
50
Chapter 3.
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 38
. 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 24
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
51
Chapter 3.
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 37
) or two-column
typesetting with option twocolumn (see
page 38
) 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 29
,
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 36
). 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 lenghts 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
!
52
Chapter 3.
The default at scrbook, scrreprt, and scrartcl is fontsize=11pt. In contrast, the default 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. Un-
fortunately, 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.
53
Chapter 3.
In the example above, the notation “\molec C6” is used. This makes use of the fact that
arguments consisting of only one character do not have to be enclosed in parentheses. That is why
“\molec C6” is similar to “\molec{C}{6}”. You might already know this from indices or powers
in mathematical environments, such as “$x^2$” instead of “$x^{2}$” for “x
2
”.
\setkomafont{element }{commands }
\addtokomafont{ element }{ commands }
\usekomafont{element }
With
v2.8p
the help of the two commands \setkomafont and \addtokomafont, it is possible to
define the commands that change the characteristics of a given element . Theoretically, all
possible statements including literal text could be used as commands . You should, however,
absolutely limit yourself to those statements that really switch only one font attribute. This
will usually be the commands \normalfont, \rmfamily, \sffamily, \ttfamily, \mdseries,
\bfseries
, \upshape, \itshape, \slshape, and \scshape, as well as the font size commands
\Huge
, \huge, \LARGE, \Large, \large, \normalsize, \small, \footnotesize, \scriptsize,
and \tiny. The description of these commands can be found in [
OPHS11
], [
Tea05b
], or
[
Tea05a
]. Color switching commands like \normalcolor (see [
Car05
] and [
Ker07
]) are also
acceptable. The behavior when using other commands, especially those that make redefinitions
or generate output, is not defined. Strange behavior is possible and does not represent a bug.
The command \setkomafont provides a font switching command with a completely new
definition. In contrast to this, the \addtokomafont command merely extends an existing
definition. It is recommended to not use both commands inside the document body, but
only in the document preamble. Usage examples can be found in the paragraphs on the
corresponding element. Names and meanings of the individual items are listed in
table 3.2
.
The default values are shown in the corresponding paragraphs.
With command \usekomafont the current font style may be changed into the font style of
the selected element .
Example: Assume that you want to use for the element captionlabel the same font speci-
fication that is used with descriptionlabel. This can be easily done with:
\setkomafont{captionlabel}{%
\usekomafont{descriptionlabel}%
}
You can find other examples in the paragraphs on each element.
54
Chapter 3.
Table 3.2.: Elements whose type style can be changed with the KOMA-Script command \setkomafont
or \addtokomafont
author
v3.12
author of the document on the main title, i. e., the argument of \author when
\maketitle
will be used (see
section 3.7
,
page 61
)
caption
text of a table or figure caption (see
section 3.20
,
page 117
)
captionlabel
label of a table or figure caption; used according to the element caption (see
sec-
tion 3.20
,
page 117
)
chapter
title of the sectional unit \chapter (see
section 3.16
,
page 89
)
chapterentry
table of contents entry of the sectional unit \chapter (see
section 3.9
,
page 67
)
chapterentrypagenumber
page number of the table of contents entry of the sectional unit \chapter, variation
on the element chapterentry (see
section 3.9
,
page 67
)
chapterprefix
chapter number line at setting chapterprefix=true or appendixprefix=true (see
section 3.16
,
page 85
)
date
v3.12
date of the document on the main title, i. e., the argument of \date when \maketitle
will be used (see
section 3.7
,
page 61
)
dedication
v3.12
dedication page after the main title, i. e., the argument of \dedication when
\maketitle
will be used (see
section 3.7
,
page 63
)
descriptionlabel
labels, i. e., the optional argument of \item in the description environment (see
section 3.18
,
page 108
)
dictum
dictum, wise saying, or smart slogan (see
section 3.17
,
page 103
)
. . .
55
Chapter 3.
Table 3.2.: Elements whose type style can be changed (continuation)
dictumauthor
author of a dictum, wise saying, or smart slogan; used according to the element
dictumtext
(see
section 3.17
,
page 103
)
dictumtext
another name for dictum
disposition
all sectional unit titles, i. e., the arguments of \part down to \subparagraph and
\minisec
, including the title of the abstract; used before the element of the corre-
sponding unit (see
section 3.16
ab
page 84
)
footnote
footnote text and marker (see
section 3.14
,
page 80
)
footnotelabel
mark of a footnote; used according to the element footnote (see
section 3.14
,
page 80
)
footnotereference
footnote reference in the text (see
section 3.14
,
page 80
)
footnoterule
horizontal rule
v3.07
above the footnotes at the end of the text area (see
section 3.14
,
page 83
)
labelinglabel
labels, i. e., the optional argument of \item in the labeling environment (see
sec-
tion 3.18
,
page 108
)
labelingseparator
separator, i. e., the optional argument of the labeling environment; used according
to the element labelinglabel (see
section 3.18
,
page 108
)
minisec
title of \minisec (see
section 3.16
ab
page 95
)
pagefoot
only used if package scrlayer-scrpage has been loaded (see
chapter 5
,
page 212
)
. . .
56
Chapter 3.
Table 3.2.: Elements whose type style can be changed (continuation)
pagehead
another name for pageheadfoot
pageheadfoot
the head of a page, but also the foot of a page (see
section 3.12
ab
page 72
)
pagenumber
page number in the header or footer (see
section 3.12
)
pagination
another name for pagenumber
paragraph
title of the sectional unit \paragraph (see
section 3.16
,
page 89
)
part
title of the \part sectional unit, without the line containing the part number (see
section 3.16
,
page 89
)
partentry
table of contents entry of the sectional unit \part (see
section 3.9
,
page 67
)
partentrypagenumber
Page number of the table of contents entry of the sectional unit \part variation on
the element partentry (see
section 3.9
,
page 67
)
partnumber
line containing the part number in a title of the sectional unit \part (see
section 3.16
,
page 89
)
publishers
v3.12
publishers of the document on the main title, i. e., the argument of \publishers
when \maketitle will be used (see
section 3.7
,
page 61
)
section
title of the sectional unit \section (see
section 3.16
,
page 89
)
sectionentry
table of contents entry of sectional unit \section (only available in scrartcl, see
section 3.9
,
page 67
)
. . .
57
Chapter 3.
Table 3.2.: Elements whose type style can be changed (continuation)
sectionentrypagenumber
page number of the table of contents entry of the sectional unit \section, variation
on element sectionentry (only available in scrartcl, see
section 3.9
,
page 67
)
sectioning
another name for disposition
subject
categorization of the document, i. e., the argument of \subject on the main title
page (see
section 3.7
,
page 61
)
subparagraph
title of the sectional unit \subparagraph (see
section 3.16
,
page 89
)
subsection
title of the sectional unit \subsection (see
section 3.16
,
page 89
)
subsubsection
title of the sectional unit \subsubsection (see
section 3.16
,
page 89
)
subtitle
subtitle of the document, i. e., the argument of \subtitle on the main title page
(see
section 3.7
,
page 61
)
title
main title of the document, i. e., the argument of \title (for details about the title
size see the additional note in the text of
section 3.7
from
page 61
)
titlehead
v3.12
head above the main title of the document, i. e., the argument of \titlehead when
\maketitle
will be used (see
section 3.7
,
page 61
)
\usefontofkomafont{element }
\useencodingofkomafont{element }
\usesizeofkomafont{element }
\usefamilyofkomafont{element }
\useseriesofkomafont{element }
\useshapeofkomafont{element }
Sometimes
v3.12
and despite the recommendation users use the font setting feature of elements
not only for font settings but for other settings too. In this case it may be useful to
switch only to the font setting of an element but not to those other settings. You may
use \usefontofkomafont in such cases. This will activate the font size and baseline skip, the
58
Chapter 3.
font encoding, the font family, the font series, and the font shape of an element, but no further
settings as long as those further settings are local.
You may also switch to one of those attributes only using one of the other commands. Note,
that \usesizeofkomafont will activate both, the font size and the baseline skip.
You should not misunderstand these commands as a legitimation of using all kind of com-
mands at the font setting of an element. Hence this would result in errors sooner or later (see
section 21.3
,
page 389
).
3.7. Document Titles
In general we distinguish two kinds of document titles. First known are title pages. In this
case the document title will be placed together with additional document information, like the
author, on a page of its own. Besides the main title page, several further title pages may exist,
like the half-title or bastard title, publisher data, dedication, or similar. The second known
kind of document title is the in-page title. In this case, the document title is placed at the top
of a page and specially emphasized, and may be accompanied by some additional information
too, but it will be followed by more material in the same page, for instance by an abstract, or
the table of contents, or even a section.
titlepage=simple switch
titlepage=firstiscover
Using \maketitle (see
page 59
), this option
v3.00
switches between document title pages and in-
page title. For simple switch , any value from
table 2.5
,
page 38
may be used.
The option titlepage=true or titlepage makes L
A
TEX use separate pages for the titles.
Command \maketitle sets these pages inside a titlepage environment and the pages nor-
mally have neither header nor footer. In comparison with standard L
A
TEX, KOMA-Script
expands the handling of the titles significantly.
The option titlepage=false specifies that an in-page title is used. This means that the
title is specially emphasized, but it may be followed by more material on the same page, for
instance by an abstract or a section.
The third choice,
v3.12
titlepage=firstiscover
does not only select title pages. It addition-
ally prints the first title page of \maketitle, this is either the extra title or the main title,
as a cover page. Every other setting of option titlepage would cancel this setting. The
margins of the cover page are given by \coverpagetopmargin, \coverpagebottommargin,
\coverpageleftmargin
und \coverpagerightmargin. The defaults of these depend on the
lengths \topmargin and \evensidemargin and can be changed using \renewcommand.
The default of classes scrbook and scrreprt is usage of title pages. Class scrartcl, on the other
hand, uses in-page titles as default.
59
Chapter 3.
\begin{titlepage}
. . .
\end{titlepage}
With the standard classes and with KOMA-Script, all title pages are defined in a special
environment, the titlepage environment. This environment always starts a new page — in
the two-sided layout a new right page — and in single column mode. For this page, the style
is changed by \thispagestyle{empty}, so that neither page number nor running heading are
output. At the end of the environment the page is automatically shipped out. Should you not
be able to use the automatic layout of the title pages provided by \maketitle, that will be
described next; it is advisable to design a new one with the help of this environment.
Dostları ilə paylaş: |