Example: Assume you want a title page on which only the word “Me” stands at the top on
the left, as large as possible and in bold — no author, no date, nothing else. The
following document creates just that:
\documentclass{scrbook}
\begin{document}
\begin{titlepage}
\textbf{\Huge Me}
\end{titlepage}
\end{document}
It’s simple, isn’t it?
\maketitle[page number ]
While the the standard classes produce at least one title page that may have the three items
title, author, and date, with KOMA-Script the \maketitle command can produce up to six
pages. In contrast to the standard classes, the \maketitle macro in KOMA-Script accepts an
optional numeric argument. If it is used, this number is made the page number of the first title
page. However, this page number is not output, but affects only the numbering. You should
choose an odd number, because otherwise the whole count gets mixed up. In my opinion there
are only two meaningful applications for the optional argument. On the one hand, one could
give to the half-title the logical page number −1 in order to give the full title page the number
1. On the other hand, it could be used to start at a higher page number, for instance, 3, 5, or
7, to accommodate other title pages added by the publishing house. The optional argument
is ignored for in-page titles. However, the page style of such a title page can be changed by
redefining the \titlepagestyle macro. For that see
section 3.12
,
page 75
.
The following commands do not lead immediately to the ship-out of the titles. The typeset-
ting and ship-out of the title pages are always done by \maketitle. By the way, you should
note that \maketitle should not be used inside a titlepage environment. Like shown in the
examples, one should use either \maketitle or titlepage only, but not both.
The commands explained below only define the contents of the title pages. Because of this,
they have to be used before \maketitle. It is, however, not necessary and, when using, e. g.,
60
Chapter 3.
the babel package, not recommended to use these in the preamble before \begin{document}
(see [
BB13
]). Examples can be found at the end of this section.
\extratitle{half-title }
In earlier times the inner book was often not protected from dirt by a cover. This task was then
taken over by the first page of the book which carried mostly a shortened title called the half-title.
Nowadays the extra page is often applied before the real full title and contains information about
the publisher, series number and similar information.
With KOMA-Script it is possible to include a page before the real title page. The
half-title
can be arbitrary text — even several paragraphs. The contents of the half-title
are output by KOMA-Script without additional formatting. Their organisation is completely
left to the user. The back of the half-title remains empty. The half-title has its own title page
even when in-page titles are used. The output of the half-title defined with \extratitle takes
place as part of the titles produced by \maketitle.
Example: Let’s go back to the previous example and assume that the spartan “Me” is the
half-title. The full title should still follow the half-title. One can proceed as follows:
\documentclass{scrbook}
\begin{document}
\extratitle{\textbf{\Huge Me}}
\title{It’s me}
\maketitle
\end{document}
You can center the half-title horizontally and put it a little lower down the page:
\documentclass{scrbook}
\begin{document}
\extratitle{\vspace*{4\baselineskip}
\begin{center}\textbf{\Huge Me}\end{center}}
\title{It’s me}
\maketitle
\end{document}
The command \title is necessary in order to make the examples above work
correctly. It is explained next.
61
Chapter 3.
\titlehead{title head }
\subject{subject }
\title{title }
\subtitle{subtitle }
\author{author }
\date{date }
\publishers{publisher }
\and
\thanks{ footnote }
The contents of the full title page are defined by seven elements. The output of the full title
page occurs as part of the title pages of \maketitle, whereas the now listed elements only
define the corresponding elements.
The title head is defined with the command \titlehead. It is typeset in regular justifi-
cation and full width at the top of the page. It can be freely designed by the user.
The subject is output immediately above the title .
The title is output with a very large font size. Beside all other element the font size is,
however, not affected by the font switching element title (see
table 3.2
,
page 62
).
The subtitle
v2.97c
is set just below the title.
Below the subtitle appears the author . Several authors can be specified in the argument
of \author. They should be separated by \and.
Below the author or authors appears the date. The default value is the present date, as
produced by \today. The \date command accepts arbitrary information — even an empty
argument.
Finally comes the publisher . Of course this command can also be used for any other
information of little importance. If necessary, the \parbox command can be used to typeset
this information over the full page width like a regular paragraph instead of centering it. Then
it is to be considered equivalent to the title head. However, note that this field is put above
any existing footnotes.
Footnotes on the title page are produced not with \footnote, but with \thanks. They serve
typically for notes associated with the authors. Symbols are used as footnote markers instead
of numbers. Note, that \thanks has to be used inside the argument of another command,
e. g., at the argument author of the command \author.
While
v3.12
printing the title elements the equal named font switching elements will be used for
all them. The defaults, that may be found in
table 3.3
, may be changed using the commands
\setkomafont
and \addtokomafont (see
section 3.6
,
page 53
).
With the exception of titlehead and possible footnotes, all the items are centered hor-
izontally. The information is summarised in
table 3.4
. Please note, that for the main title
\huge
will be used after the font switching element \title. So you cannot change the size of
the main title using \setkomafont or \addtokomafont.
Example: Assume you are writing a dissertation. The title page should have the university’s
name and address at the top, flush left, and the semester, flush right. As usual, a
62
Chapter 3.
Table 3.3.: Font defaults for
the elements of the title
Element name Default
author
\Large
date
\Large
dedication
\Large
publishers
\Large
subject
\normalfont\normalcolor\bfseries\Large
subtitle
\usekomafont{title}\large
title
\usekomafont{disposition}
titlehead
title is to be used, including author and delivery date. The adviser must also be
indicated, together with the fact that the document is a dissertation. This can be
obtained as follows:
\documentclass{scrbook}
\usepackage[english]{babel}
\begin{document}
\titlehead{{\Large Unseen University
\hfill SS~2002\\}
Higher Analytical Institute\\
Mythological Rd\\
34567 Etherworld}
\subject{Dissertation}
\title{Digital space simulation with the DSP\,56004}
\subtitle{Short but sweet?}
\author{Fuzzy George}
\date{30. February 2002}
\publishers{Adviser Prof. John Eccentric Doe}
\maketitle
\end{document}
Table 3.4.: Font and
horizontal position-
ing of the elements
in the main title
page in the order
of their vertical po-
sition from top to
bottom when type-
set with \maketitle
Element
Command
Font
Orientation
Title head \titlehead
\usekomafont{titlehead}
justified
Subject
\subject
\usekomafont{subject}
centered
Title
\title
\usekomafont{title}\huge
centered
Subtitle
\subtitle
\usekomafont{subtitle}
centered
Authors
\author
\usekomafont{author}
centered
Date
\date
\usekomafont{date}
centered
Publishers \publishers \usekomafont{publishers} centered
63
Chapter 3.
A frequent misunderstanding concerns the role of the full title page. It is often erroneously
assumed that the cover or dust cover is meant. Therefore, it is frequently expected that the title
page does not follow the normal page layout, but has equally large left and right margins.
However, if one takes a book and opens it, one notices very quickly at least one title page under
the cover within the so-called inner book. Precisely these title pages are produced by \maketitle.
As is the case with the half-title, the full title page belongs to the inner book, and therefore
should have the same page layout as the rest of the document. A cover is actually something that
should be created in a separate document. The cover often has a very individual format. It can
also be designed with the help of a graphics or DTP program. A separate document should also
be used because the cover will be printed on a different medium, possibly cardboard, and possibly
with another printer.
Nevertheless, since KOMA-Script 3.12 the first title page of \maketitle can be printed as a
cover page with different margins. For more information about this see the description of option
titlepage=firstiscover
on
page 58
.
\uppertitleback{titlebackhead }
\lowertitleback{titlebackfoot }
With the standard classes, the back of the title page of a double-side print is left empty.
However, with KOMA-Script the back of the full title page can be used for other information.
Exactly two elements which the user can freely format are recognized: titlebackhead and
titlebackfoot
. The head can reach up to the foot and vice versa. If one takes this manual as
an example, the exclusion of liability was set with the help of the \uppertitleback command.
\dedication{dedication }
KOMA-Script provides a page for dedications. The dedication is centered and uses a slightly
larger type size. The back is empty like the back page of the half-title. The dedication page
is produced by \maketitle and must therefore be defined before this command is issued.
Example: This time assume that you have written a poetry book and you want to dedicate
it to your wife. A solution would look like this:
\documentclass{scrbook}
\usepackage[english]{babel}
\begin{document}
\extratitle{\textbf{\Huge In Love}}
\title{In Love}
\author{Prince Ironheart}
\date{1412}
\lowertitleback{This poem book was set with%
the help of {\KOMAScript} and {\LaTeX}}
\uppertitleback{Selfmockery Publishers}
\dedication{To my treasure hazel-hen\\
64
Chapter 3.
in eternal love\\
from your dormouse.}
\maketitle
\end{document}
Please use your own favorite pet names.
3.8. Abstract
Particularly with articles, more rarely with reports, there is a summary directly under the
scrartcl
,
scrreprt
title and before the table of contents. When using an in-page title, this summary is normally
a kind of left- and right-indented block. In contrast to this, a kind of chapter or section is
printed using title pages.
abstract=simple switch
v3.00
In the standard classes the abstract environment sets the text “Abstract” centered before
scrreprt
,
scrartcl
the summary text. This was normal practice in the past. In the meantime, newspaper reading
has trained readers to recognize a displayed text at the beginning of an article or report as
the abstract. This is even more true when the text comes before the table of contents. It is
also surprising when precisely this title appears small and centered. KOMA-Script provides
the possibility of including or excluding the abstract’s title with the options abstract. For
simple switch
, any value from
table 2.5
,
page 38
may be used.
Books typically use another type of summary. In that case there is usually a dedicated
summary chapter at the beginning or end of the book. This chapter is often combined with
the introduction or a description of wider prospects. Therefore, the class scrbook has no
abstract
environment. A summary chapter is also recommended for reports in a wider sense,
like a Master’s or Ph.D. thesis.
\begin{abstract}
. . .
\end{abstract}
scrartcl
,
scrreprt
Some L
A
TEX classes offer a special environment for this summary, the abstract environment.
This is output directly, as it is not a component of the titles set by \maketitle. Please note
that abstract is an environment, not a command. Whether the summary has a heading or
not is determined by the option abstract (see above).
With books (scrbook) the summary is frequently a component of the introduction or a
separate chapter at the end of the document. Therefore no abstract environment is provided.
When using the class scrreprt it is surely worth considering whether one should not proceed
likewise. See commands \chapter* and \addchap or \addchap* at
section 3.16
from
page 94
onwards.
When using an in-page title (see option titlepage,
section 3.7
,
page 58
), the abstract is set
using the environment quotation (see
section 3.18
,
page 111
) internally. Thereby paragraphs
65
Chapter 3.
will be set with indentation of the first line. If that first paragraph of the abstract should not
be indented, this indent may be disabled using \noindent just after \begin{abstract}.
3.9. Table of Contents
The table of contents is normally set after the document title and an optional existing abstract.
Often one may find additional lists of floating environments, e. g., the list of tables and the
list of figures, after the table of contents (see
section 3.20
).
toc=selection
It is becoming increasingly common to find entries in the table of contents for the lists of tables
and figures, for the bibliography, and, sometimes, even for the index. This is surely also related
to the recent trend of putting lists of figures and tables at the end of the document. Both lists
are similiar to the table of contents in structure and intention. I’m therefore sceptical of this
evolution. Since it makes no sense to include only one of the lists of tables and figures in the
table of contents, there exists only one selection
v3.00
listof
that causes entries for both types
of lists to be included. This also includes any lists produced with version 1.2e or later of the
float package (see [
Lin01
]) or the floatrow (see [
Lap08
]). All these lists are unnumbered, since
they contain entries that reference other sections of the document. If one wants to ignore this
general agreement, one may use selection listofnumbered.
The option index=totoc causes an entry for the index to be included in the table of contents.
The index is unnumbered since it too only includes references to the contents of the other
sectional units. Despite
v3.18
objection of the author, KOMA-Script does also support to ignore
this general agreement using toc=indexnumbered.
The bibliography is a different kind of listing. It does not list the contents of the present
document but refers instead to external documents. For that reason, it could be argued
that it qualifies as a chapter (or section) and, as such, should be numbered. The option
toc=bibliographynumbered
has this effect, including the generation of the corresponding
entry in the table of contents. I personally think that this reasoning would lead us to consider
a classical list of sources also to be a separate chapter. On the other hand, the bibliography
is finally not something that was written by the document’s author. In view of this, the
bibliography merits nothing more than an unnumbered entry in the table of contents, and
that can be achieved with toc=bibliography.
The table of contents is normally
v2.8q
set up so that different sectional units have different
indentations. The section number is set left-justified in a fixed-width field. This default setup
is selected with the option
v3.00
toc=graduated
.
When there are many sections, the corresponding numbering tends to become very wide, so
that the reserved field overflows. The German FAQ [
Wik
] suggests that the table of contents
should be redefined in such a case. KOMA-Script offers an alternative format that avoids the
problem completely. If the option toc=flat is selected, then no variable indentation is applied
66
Chapter 3.
to the titles of the sectional units. Instead, a table-like organisation is used, where all unit
numbers and titles, respectively, are set in a left-justified column. The space necessary for the
unit numbers is thus determined automatically.
The
table 3.5
shows an overview of possible values for selection of toc.
Table 3.5.: Possible values of option toc to set form and contents of the table of contents
bibliography
, bib
The bibliography will be represented by an entry at the table of contents, but will
not be numbered.
bibliographynumbered
, bibnumbered, numberedbibliography, numberedbib
The bibliography will be represented by an entry at the table of contents and will
be numbered.
chapterentrywithdots
, chapterentrydotfill
v3.15
The chapter entries of classes scrbook and scrreprt also use dots to separate the
headings text from the page number.
chapterentrywithoutdots
, chapterentryfill
v3.15
The chapter entries of classes scrbook and scrreprt use white space to separate the
headings text from the page number.
flat
, left
The table of contents will be set in table form. The numbers of the headings will be
at the first column, the heading text at the second column, and the page number at
the third column. The amount of space needed for the numbers of the headings will
be determined by the detected needed amount of space at the previous L
A
TEX run.
graduated
, indent, indented
The table of contents will be set in hierarchical form. The amount of space for the
heading numbers is limited.
index
, idx
The index will be represented by an entry at the table of contents, but will not be
numbered.
indexnumbered
v3.18
The index will be represented by an entry at the table of contents and will be
numbered.
. . .
67
Chapter 3.
Table 3.5.: Possible values of option toc (continuation)
listof
The lists of floating environments, e. g., the list of figures and the list of tables, will
be represented by entries at the table of contents, but will not be numbered.
listofnumbered
, numberedlistof
The lists of floating environments, e. g., the list of figures and the list of tables, will
be represented by entries at the table of contents and will be numbered.
nobibliography
, nobib
The bibliography will not be represented by an entry at the table of contents.
noindex
, noidx
The index will not be represented by an entry at the table of contents.
nolistof
The lists of floating environments, e. g., the list of figures and the list of tables, will
not be represented by entries at the table of contents.
sectionentrywithdots
, sectionentrydotfill
v3.15
The section entries of class scrartcl also use dots to separate the headings text from
the page number.
sectionentrywithoutdots
, sectionentryfill
v3.15
The section entries of class scrartcl use white space to separate the headings text
from the page number.
chapterentrydots=simple switch
sectionentrydots=simple switch
These
v3.15
options configure a dotted separation line between the text and the page number of the
chapter entries of classes scrbook and scrreprt, or of the section entries of class scrartcl in the
scrbook
,
scrreprt
scrartcl
table of contents. For simple switch , any value from
table 2.5
,
page 38
may be used. The
default is false. It selects an empty gap instead of dots.
If a dotted line is selected, you can change their font using element chapterentrydots or
sectionentrydots
. The font also depends on the element of the page number of the entry
(see also
section 3.6
,
page 53
and
table 3.2
,
page 54
). The defaults of the elements are shown
in
table 3.6
. Please note that the dots of all entries are equally aligned only if all dots use the
same font.
\tableofcontents
The production of the table of contents is done by the \tableofcontents command. To get
a correct table of contents, at least two L
A
TEX runs are necessary after every change. The
68
Chapter 3.
Table 3.6.: Font style de-
faults of the elements of
the table of contents
Element
Default font style
partentry
\usekomafont{disposition}\large
partentrypagenumber
chapterentry
\usekomafont{disposition}
chapterentrydots
\normalfont
chapterentrypagenumber
sectionentry
\usekomafont{disposition}
sectionentrydots
\normalfont
sectionentrypagenumber
contents and the form of the table of contents may be influenced with the above described
option toc. After changing the settings of this option, at least two L
A
TEX runs are needed
again.
The entry for the highest sectional unit below \part, i. e., \chapter with scrbook and
scrreprt or \section with scrartcl is not indented. There are no dots between the text of the
sectional unit heading and the page number. The typographic reasons for this are that the
font is usually different, and the desire for appropriate emphasis. The table of contents of this
manual is a good example of these considerations. The font style
v2.97c
is, however, affected by the
settings of the element partentry, and for classes scrbook and scrreprt by chapterentry, and
for class scrartcl by sectionentry. The font style of the page numbers may be set dissenting
from these elements using partentrypagenumber and chapterentrypagenumber respectively
sectionentrypagenumber
(see
section 3.6
,
page 53
, and
table 3.2
,
page 54
). If the optional
dots of the entries of \chapter or \section are used, you can change their font using element
chapterentrydots
or sectionentrydots. The font also depends on the element of the page
number of the entry (see also
section 3.6
,
page 53
and
table 3.2
,
page 54
). The defaults of the
elements are shown in
table 3.6
. Please note that the dots of all entries are aligned same only
if all dots use the same font.
tocdepth
Normally, the units included in the table of contents are all the units from \part to
\subsection
for the classes scrbook and scrreprt or from \part to \subsubsection for the
class scrartcl. The inclusion of a sectional unit in the table of contents is controlled by the
counter tocdepth. This has the value −1 for \part, 0 for \chapter, and so on. By increment-
ing or decrementing the counter, one can choose the lowest sectional unit level to be included
in the table of contents. The same happens with the standard classes.
Please note that for \part the values of tocdepth and secnumdepth (see
section 3.16
,
page 100
) are not the same in scrartcl. Therefore, you should not use \partnumdepth to set
scrartcl
the value of tocdepth.
69
Chapter 3.
Example: Assume that you are preparing an article that uses the sectional unit
\subsubsection
. However, you do not want this sectional unit to appear in the
table of contents. The preamble of your document might contain the following:
\documentclass{scrartcl}
\setcounter{tocdepth}{2}
You set the counter tocdepth to 2 because you know that this is the value for
\subsection
. If you know that scrartcl normally includes all levels down to
\subsubsection
in the table of contents, you can simply decrement the counter
tocdepth
by one:
\documentclass{scrartcl}
\addtocounter{tocdepth}{-1}
How much you should add to or subtract from the tocdepth counter can also be
found by looking at the table of contents after the first L
A
TEX run.
A small hint in order that you do not need to remember which sectional unit has which number:
in the table of contents count the number of units required extra or less and then, as in the
above example, use \addtocounter to add or subtract that number to or from tocdepth.
3.10. Paragraph Markup
The standard classes normally set paragraphs indented and without any vertical inter-
paragraph space. This is the best solution when using a regular page layout, like the ones
produced with the typearea package. If neither indentation nor vertical space is used, only
the length of the last line would give the reader a reference point. In extreme cases, it is
very difficult to detect whether a line is full or not. Furthermore, it is found that a marker
at the paragraph’s end tends to be easily forgotten by the start of the next line. A marker
at the paragraph’s beginning is more easily remembered. Inter-paragraph spacing has the
drawback of disappearing in some contexts. For instance, after a displayed formula it would
be impossible to detect if the previous paragraph continues or if a new one begins. Also, when
starting to read at the top of a new page it might be necessary to look at the previous page
in order determine if a new paragraph has been started or not. All these problems disappear
when using indentation. A combination of indentation and vertical inter-paragraph spacing
is extremely redundant and therefore should be avoided. The indentation is perfectly suffi-
cient by itself. The only drawback of indentation is the reduction of the line length. The
use of inter-paragraph spacing is therefore justified when using short lines, for instance in a
newspaper.
parskip=manner
Once in a while there are requests for a document layout with vertical inter-paragraph spac-
ing instead of indentation. The KOMA-Script classes provide with option parskip
v3.00
several
70
Chapter 3.
capabilities to use inter-paragraph spacing instead of paragraph indent.
The manner consists of two elements. The first element is either full or half, meaning the
space amount of one line or only half of a line. The second element is “*”, “+”, or “-”, and
may be omitted. Without the second element the last line of a paragraph will end with white
space of at least 1 em. With the plus character as second element the white space amount will
be a third, and with the asterisk a fourth, of the width of a normal line. The minus variant
does not take care about the white space at the end of the last line of a paragraph.
The setting may be changed at any place inside the document. In this case the command
\selectfont
v3.08
will be called implicitly. The change will be valid and may be seen from the
next paragraph.
Besides the resulting eight possible combinations for manner , the values for simple switches
shown at
table 2.5
,
page 38
may be used. Switching on the option would be the same as
using full without annex and therefore will result in inter-paragraph spacing of one line with
at least 1 em white space at the end of the last line of each paragraph. Switching off the
options would reactivate the default of 1 em indent at the first line of the paragraph instead
of paragraph spacing. All the possible values of option parskip are shown in
table 3.7
.
Table 3.7.: Possible values of option parskip to select the paragraph mark
false
, off, no
paragraph indentation instead of vertical space; the last line of a paragraph may be
arbitrarily filled
full
, true, on, yes
one line vertical space between paragraphs; there must be at least 1 em free space in
the last line of a paragraph
full-
one line vertical space between paragraphs; the last line of a paragraph may be
arbitrarily filled
full+
one line vertical space between paragraphs; there must be at least a third of a line
free space at the end of a paragraph
full*
one line vertical space between paragraphs; there must be at least a quarter of a line
free space at the end of a paragraph
. . .
71
Chapter 3.
Table 3.7.: Possible values of option parskip (continuation)
half
half a line vertical space between paragraphs; there must be at least 1 em free space
in the last line of a paragraph
half-
one line vertical space between paragraphs
half+
half a line vertical space between paragraphs; there must be at least a third of a line
free space at the end of a paragraph
half*
half a line vertical space between paragraphs; there must be at least a quarter of a
line free space at the end of a paragraph
never
there
v3.08
will be no inter-paragraph spacing even if additional vertical spacing is needed
for the vertical adjustment with \flushbottom
All eight full and half option values also change the spacing before, after, and inside
list environments. This avoids the problem of these environments or the paragraphs inside
them having a larger separation than the separation between the paragraphs of normal text.
Additionally, these options ensure that the table of contents and the lists of figures and tables
are set without any additional spacing.
The default behaviour of KOMA-Script follows parskip=false. In this case, there is no
spacing between paragraphs, only an indentation of the first line by 1 em.
3.11. Detection of Odd and Even Pages
In double-sided documents we distinguish left and right pages. Left pages always have an
even page number, right pages always have an odd page number. Thus, they are most often
referred to as even and odd pages in this guide. This also means that the detection of a left
or right page is same as detection of even and odd page numbers.
There’s no distinction in left and right pages in single-sided documents. Nevertheless there
are pages with even or odd page numbers.
\ifthispageodd{true part }{false part }
If one wants to find out with KOMA-Script whether a text falls on an even or odd page, one
can use the \ifthispageodd command. The true part argument is executed only if the
command falls on an odd page. Otherwise the false part argument is executed.
72
Chapter 3.
Example: Assume that you simply want to show whether a text will be placed onto an even
or odd page. You may achieve that using
This page has an \ifthispageodd{odd}{even}
page number.
which will result in the output
This page has an even page number.
Because the \ifthispageodd command uses a mechanism that is very similar to a label
and a reference to it, at least two L
A
TEX runs are required after every text modification. Only
then the decision is correct. In the first run a heuristic is used to make the first choice.
At
section 21.1
,
page 386
experts may find more information about the problems detecting
left and right pages or even and odd page number.
3.12. Head and Foot Using Predefined Page Styles
One of the general characteristics of a document is the page style. In L
A
TEX this means mostly
the contents of headers and footers.
headsepline=simple switch
footsepline=simple switch
In
v3.00
order to have or not to have a rule separating the header from the text body, use the option
headsepline
with any value shown in
table 2.5
,
page 38
. Activation of the option will result
in such a separation line. Similarly, activation of option footsepline switches on a rule above
the foot line. Deactivation of any of the options will deactivate the corresponding rule.
These options have no effect with the page styles empty and plain, because there is no
header in this case. Such a line always has the effect of visually bringing header and text body
closer together. That does not mean that the header must now be moved farther from the text
body. Instead, the header should be considered as belonging to the text body for the purpose
of page layout calculations. KOMA-Script takes this into account by automatically passing
the option headinclude to the typearea package whenever the headsepline option is used.
KOMA-Script behaves similar to footinclude using footsepline. Package scrlayer-scrpage
(see
chapter 5
) adds additional features to this.
\pagestyle{page style}
\thispagestyle{local page style }
Usually one distinguishes four different page styles:
empty is the page style with entirely empty headers and footers. In KOMA-Script this is
completely identical to the standard classes.
73
Chapter 3.
headings is the page style with running headings in the header. These are headings for which
titles are automatically inserted into the header. With the classes scrbook and scrreprt
scrbook
,
scrreprt
the titles of chapters and sections are repeated in the header for double-sided layout —
with KOMA-Script on the outer side, with the standard classes on the inner side. The
page number is set on the outer side of the footer with KOMA-Script; with the standard
classes it is set on the inner side of the header. In one-sided layouts only the titles of
the chapters are used and are, with KOMA-Script, centered in the header. The page
numbers are set centered in the footer with KOMA-Script. scrartcl behaves similarly, but
scrartcl
starting a level deeper in the section hierarchy with sections and subsections, because
the chapter level does not exist in this case.
While the standard classes automatically set running headings always in capitals,
KOMA-Script applies the style of the title. This has several typographic reasons. Cap-
itals as a decoration are actually far too strong. If one applies them nevertheless, they
should be set in a one point smaller type size and with tighter spacing. The standard
classes do not take these points into consideration.
Beyond this KOMA-Script classes support rules below the head and above the foot using
options headsepline and footsepline which are described above.
myheadings corresponds mostly to the page style headings, but the running headings are
not automatically produced — they have to be defined by the user. The commands
\markboth
and \markright can be used for that purpose (see below).
plain is the page style with empty header and only a page number in the footer. With the
standard classes this page number is always centered in the footer. With KOMA-Script
the page number appears on double-sided layout on the outer side of the footer. The
one-sided page style behaves like the standard setup.
The page style can be set at any time with the help of the \pagestyle command and takes
effect with the next page that is output. If one uses \pagestyle just before a command, that
results in an implicit page break and if the new page style should be used at the resulting new
page first, a \cleardoublepage just before \pagestyle will be useful. But usually one sets
the page style only once at the beginning of the document or in the preamble.
To change the page style of the current page only, one uses the \thispagestyle command.
This also happens automatically at some places in the document. For example, the instruction
\thispagestyle{\chapterpagestyle}
is issued implicitly on the first page of a chapter.
Please note that the change between automatic and manual running headings is no longer
performed by page style changes when using the scrlayer-scrpage package, but instead via
special instructions. The page styles headings and myheadings should not be used together
with this package.
In order to change the font style used in the header, footer, or for the page number
v2.8p
, please
use the interface described in
section 3.6
,
page 53
. The same element is used for header
74
Chapter 3.
Table 3.8.: Default values for the ele-
ments of a page style
Element
Default value
pagefoot
pageheadfoot
\normalfont\normalcolor\slshape
pagenumber
\normalfont\normalcolor
and footer, which you can designate with pageheadfoot. The element for the page number
within the header or footer is called pagenumber. The element pagefoot, that is additionally
supported by the KOMA-Script classes, will be used only if a page style has been defined that
has text at the foot line, using package scrlayer-scrpage (see
chapter 5
,
page 212
).
The default settings can be found in
table 3.8
.
Example: Assume that you want to set header and footer in a smaller type size and in italics.
However, the page number should not be set in italics but bold. Apart from the
fact that the result will look horrible, you can obtain this as follows:
\setkomafont{pageheadfoot}{%
\normalfont\normalcolor\itshape\small
}
\setkomafont{pagenumber}{\normalfont\bfseries}
If you want only that, in addition to the default slanted variant, a smaller type
size is used, it is sufficient to use the following:
\addtokomafont{pagehead}{\small}
As you can see, the last example uses the element pagehead. You can achieve the
same result using pageheadfoot instead (see
table 3.2
on
page 54
).
It is not possible to use these methods to force capitals to be used automatically for the
running headings. For that, please use the scrlayer-scrpage package (see
chapter 5
,
page 221
).
If you define your own page styles, the commands \usekomafont{pageheadfoot},
\usekomafont{pagenumber}
, and \usekomafont{pagefoot} can be useful. If you do not
use the KOMA-Script package scrlayer-scrpage (see
chapter 5
) for that, but, for example, the
package fancyhdr (see [
vO04
]), you can use these commands in your definitions. Thereby you
can remain compatible with KOMA-Script as much as possible. If you do not use these com-
mands in your own definitions, changes like those shown in the previous examples have no
effect. The package scrlayer-scrpage takes care to keep the maximum possible compatibility
with other packages itself.
\markboth{left mark }{right mark }
\markright{right mark }
With page style myheadings, there’s no automatic setting of the running head. Instead of
this one would set it with the help of commands \markboth and \markright. Thereby left
75
Chapter 3.
Table 3.9.: Macros to set up page style of special pages
\titlepagestyle
Page style for a title page when using in-page titles.
\partpagestyle
Page style for the pages with \part titles.
\chapterpagestyle
Page style for the first page of a chapter.
\indexpagestyle
Page style for the first page of the index.
mark
normally will be used at the head of even pages and right mark at the heads of odd
pages. With one-sided printing, only the right mark exists. Using package scrlayer-scrpage,
the additional command \markleft exists.
The commands may be used with other page styles too. Combination with automatic
running head, e. g., with page style headings, limits the effect of the commands until the next
automatic setting of the corresponding marks.
\titlepagestyle
\partpagestyle
\chapterpagestyle
\indexpagestyle
For some pages, a different page style is chosen with the help of the command \thispagestyle.
Which page style this actually is, is defined by these four macros, of which \partpagestyle
and \chapterpagestyle are found only with classes scrbook and scrreprt, but not in scrartcl.
scrbook
,
scrreprt
The default value for all four cases is plain. The meaning of these macros can be taken from
table 3.9
. The page styles can be redefined with the \renewcommand macro.
Example: Assume that you want the pages with a \part heading to have no number. Then
you can use the following command, for example in the preamble of your document:
\renewcommand*{\ Dostları ilə paylaş: |