Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
136
Table 3.20.: Available values for option listof (continuation)
numbered
, totocnumbered, tocnumbered, numberedtotoc
The lists of floating environments, e. g., list of figures and list of tables, would get a
numbered heading and therefor generate an entry at the table of contents.
totoc
, toc, notnumbered
The lists of floating environments, e. g., list of figures and list of tables, would gen-
erate an entry at the table of contents, but their headings are not numbered.
\listoftables
\listoffigures
These commands generate a list of tables or figures. Changes in the document that modify
these lists will require two L
A
TEX runs in order to take effect. The layout of the lists can be
influenced by the option
listof
with values graduated or flat (see
page 133
). Moreover, the
values listof and listofnumbered of option
toc
(see
section 3.9
) as well as the values totoc
and numbered of the previous described option
listof
have influence to the lists of floating
environments.
Mostly the lists of floating environment may be found after the table of contents. But some
publishers like to have these lists at the appendix. Nevertheless the author of this guide prefers
to find them immediately after the table of contents.
3.21. Margin Notes
Aside from the text area, that normally fills the typing area, usually a marginalia column may
be found. Margin notes will be printed at this area. At lot of them may be found in this
manual.
\marginpar[margin note left ]{margin note }
\marginline{margin note }
Usually margin notes in L
A
TEX are inserted with the command \marginpar. They are placed
in the outer margin. In documents with one-sided layout the right border is used. Though
\marginpar
can take an optional different margin note argument in case the output is in
the left margin, margin notes are always set in justified layout. However, experience has
shown that many users prefer left- or right-aligned margin notes instead. To facilitate this,
KOMA-Script offers the command \marginline.
Example: In this document, sometimes, the class name scrartcl can be found in the margin.
This can be produced with:
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
137
\marginline{\texttt{scrartcl}}
Instead of \marginline you could have used \marginpar. In fact the first com-
mand is implemented internally as:
\marginpar[\raggedleft\texttt{scrartcl}]
{\raggedright\texttt{scrartcl}}
Thus \marginline is really only an abbreviated writing of the code above.
Experts and advanced users may find information about problems using \marginpar at
section 21.1
,
page 441
. These are valid for \marginline also.
3.22. Appendix
The appendix of a document contains mainly the enclosures to the document. These are
typically bibliography, index, glossary. But only for this parts nobody would and should start
an appendix, because the formation of these already distinguishes them from the main docu-
ment. But if there are additional elements at the appendix, i. e., cited third party documents,
endnotes, figures or tabulars, the standard elements like the bibliography should also be part
of the appendix.
\appendix
The appendix in the standard as well as the KOMA-Script classes is introduced with
\appendix
. This command switches, among other things, the chapter numbering to upper case
letters, also ensuring that the rules according to [
DUD96
] are followed (for German-speaking
regions). These rules are explained in more detail in the description of the option
numbers
in
section 3.16
,
page 93
.
Die output of the chapter headings in the appendix are influenced by the options
scrbook
,
scrreprt
chapterprefix
and
appendixprefix
. See
section 3.16
,
page 91
for more information.
Please note that \appendix is a command, not an environment! This command does not
expect any argument. Chapters and sections in the appendix uses
\chapter
and
\section
just as does the main text.
3.23. Bibliography
The bibliography opens up external resources. Mainly bibliographies will be made by program
B
IB
TEX or biber using an external file in database like structure. Thereby B
IB
TEX style
influences not only the formation of the bibliography entries but also their sorting. Using an
additional bibliography style like natbib, babelbib, or biblatex limits the influence of KOMA-
Script to the bibliography hardly. In such cases it is important so see the manual of the
bibliography package! General information about bibliography may be found in [
OPHS11
].
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
138
bibliography=selection
For a start, selection
v3.00
may be any already defined bibliography formation style. There are
two predefined formation styles at KOMA-Script. You should not misconceive them with the
styles used by B
IB
TEX which you may select using \bibstyle. While B
IB
TEX influences not
only the sorting but also the contents of the bibliography, KOMA-Script influences only some
basic features of the bibliography or a tiny amount of formation features of the entries to the
bibliography.
Option bibliography=oldstyle selects a compact formation of the bibliography entries.
In this case command
\newblock
inside of the entries will only result in a small horizontal
distance. The name is a result of the fact, that this is the mostly used classic kind of bibli-
ography. In opposite to thisbibliography=openstyle. selects a more modern and open kind
of bibliography. The name is a result of the fact, that command
\newblock
inserts a para-
graph break. The entries will be more structured by this. They are less compact and seem
more relaxed or open. Information about definition of new formation styles may be found in
description of command
\newbibstyle
in
section 21.3
at
page 462
.
Beside the formation style one more feature may be selected using selection . The bib-
liography is a kind of contents list. But instead of listing contents of the document itself, it
references to external contents. Because of this, someone may say, that the bibliography is a
chapter or section on its own and should have a chapter or section number. You may select
this with option bibliography=totocnumbered which will therefor also generate an entry to
the table of contents.In my opinion the bibliography is nothing you’ve written on your own
and so does not merits a numbered entry to the table of contents. A entry without number
may be set with option bibliography=totoc. Nevertheless, the default would be neither a
number nor an entry to the table of contents and corresponds to bibliography=nottotoc.
For more information see option
toc
in
section 3.9
, especially values bibliographynumbered,
bibliography
, and nobibliography to this option at
page 69
.
Sometimes
v3.12
it is not usefull to have one bibliography for the whole document but a bibliog-
raphy at every chapter of a document made using scrbook or scrreprt. In that case you’d need
the bibliography itself not to be a chapter but one level below, a section. You may achieve
this using Option bibliography=leveldown. You may use this also if you’d combine several
lists and the bibliography together below one heading. So this option is also available with
scrartcl.
A summary of all available values for option bibliography may be found in
table 3.21
.
Nevertheless you should note, that additional values may be generated using
\newbibstyle
.
\setbibpreamble{preamble }
The command \setbibpreamble can be used to set a preamble for the bibliography. This
can be achieved by placing the preamble before the command for issuing the bibliography.
However, it need not be directly in front of it. For example, it could be placed at the be-
ginning of the document. Similar to the options
bibliography=totoc
and
bibliography=
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
139
Table 3.21.: Predefined values of option bibliography to select the formation of the bibliography
leveldown
v3.12
The bibliography will use a heading of one step lower section level than default.
nottotoc
The bibliography will neither have an entry at the table of contents nor a number,
oldstyle
The bibliography will use the classic, compact formation, where
\newblock
generates
an expandable horizontal distance only.
openstyle
The bibliography will use the structured, open formation, where
\newblock
generates
a paragraph break.
totoc
The bibliography will have an entry at the table of contents but no number.
totocnumbered
The bibliography will have an entry at the table of contents and a number at the
heading.
totocnumbered
, this command can only be successful if you have not loaded a package which
prevents this by redefining the thebibliography environment. Even though the natbib pack-
age makes unauthorized use of internal macros of KOMA-Script it could be achieved that
\setbibpreamble
works with the current version of natbib (see [
Dal10
]).
Example: You want to point out that the sorting of the references in the bibliography is not
according to their occurrence in the text, but in alphabetical order. You use the
following command:
\setbibpreamble{References are in alphabetical order.
References with more than one author are sorted
according to the first author.\par\bigskip}
The \bigskip command makes sure that the preamble and the first reference are
separated by a large vertical space.
\BreakBibliography{interruption code }
This
v3.00
command exists only if the environment thebibliography has not been redefined by
another package. It provides a break at the bibliography. The interruption code will be
expanded inside a group. Such a break may be, e. g., a heading using
\minisec
. Unfortunately
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
140
it is not possible to add this command to the B
IB
TEX database using, e. g., a special kind of
B
IB
TEX entry. Because of this, users may use is currently only if they make the bibliography
on their own. Because of this usage is very limited.
\AfterBibliographyPreamble{code }
\AtEndBibliography{code }
In
v3.00
some cases it may be useful to add some code after the bibliography preamble or just
before the end of the bibliography. This may be achieved using one of this instructions.
Example: You want to set the bibliography not justified but ragged right. This may be
achieved using:
\AfterBibliographyPreamble{\raggedright}
You may place this instruction anywhere before the bibliography. Nevertheless
it is recommended to do so at the preamble of the document or inside your own
package.
The functionality of this instruction depends on cooperation with packages modifying the
bibliography, if such a package should be used (see
section 21.2
,
page 441
).
3.24. Index
For general information about making an index see [
OPHS11
], [
Lam87
], and [
Keh97
]. Using
a package, that redefines commands or environments for the index, may limit the influence of
KOMA-Script to the index hardly. This would be valid, e. g., for usage of package index but
not for usage of package splitidx (see [
Koh14b
]).
index=selection
v3.00
The index is chapter (scrbook or scrreprt) or section (scrartcl) without heading number or
entry at the table of contents by default or option index=default. The index does not
need an entry at the table of contents, because it should always be the last element of a
document. Nevertheless, such an entry may be achieved using option index=totoc. You
v3.18
can
even number the index using option index=numbered. See also option
toc
with value index
or indexnumbered in
section 3.9
from
page 69
onward.
A summary of all available values for option index may be found in
table 3.22
.
Chapter 3: The Main Classes: scrbook, scrreprt, and scrartcl
141
Table 3.22.: Available values of option index
default
, nottotoc, plainheading
The index will not have an entry at the table of contents.
numbered
, totocnumbered
v3.18
The index will have an entry at the table of contents and also will have a heading
number.
totoc
, toc, notnumbered
The index will have an entry at the table of contents, but will not have a heading
number.
\setindexpreamble{ preamble }
Similarly to the bibliography you can use a preamble to the index. This is often the case if
you have more than one index or if you use different kinds of referencing by highlighting the
page numbers in different ways.
Example: You have a document in which terms are both defined and used. The page numbers
of definitions are in bold. Of course you want to make your reader aware of this
fact. Thus you insert a preamble for the index:
\setindexpreamble{In \textbf{bold} printed page numbers are
references to the definition of terms. Other page numbers
indicate the use of a term.\par\bigskip}
Please note that the page style of the first page of the index is changed. The applied page
style is defined in the macro
\indexpagestyle
(see
section 3.12
,
page 79
).
The production, sorting and output of the index is done by the standard L
A
TEX packages
and additional programs. Similar to the standard classes KOMA-Script only provides the
basic macros and environments.
Chapter 4: The New Letter Class scrlttr2
142
The New Letter Class scrlttr2
Letters are quite different from articles, reports, books, and suchlike. That alone justifies a
separate chapter about the letter class. But there is another reason for a chapter on scrlttr2.
This class has been redeveloped from scratch and provides a new user interface different
from every other class the author knows of. This new user interface may be uncommon, but
the author is convinced both experienced and new KOMA-Script users will benefit from its
advantages.
4.1. Variables
Apart from options, commands, environments, counters and lengths, additional elements have
already been introduced in KOMA-Script. A typical property of an element is the font style
and the option to change it (see
section 4.9
,
page 164
). At this point we now introduce
variables. Variables have a name by which they are called, and they have a content. The
content of a variable can be set independently from time and location of the actual usage in the
same way as the contents of a command can be separated from its usage. The main difference
between a command and a variable is that a command usually triggers an action, whereas
a variable only consists of plain text which is then output by a command. Furthermore, a
variable can additionally have a description which can be set and output.
This section specifically only gives an introduction to the concept of variables. The following
examples have no special meaning. More detailed examples can be found in the explanation
of predefined variables of the letter class in the following sections. An overview of all variables
is given in
table 4.1
.
Table 4.1.: Alphabetical list of all supported variables in scrlttr2
addresseeimage
instuctions, that will be used to print the Port-Payé head of option
addrfield=
backgroundimage
or the Port-Payé addressee of option
addrfield=image
(
sec-
tion 4.10
,
page 182
)
backaddress
return address for window envelopes (
section 4.10
,
page 182
)
backaddressseparator
separator within the return address (
section 4.10
,
page 182
)
. . .
Chapter 4: The New Letter Class scrlttr2
143
Table 4.1.: Alphabetical list of all supported variables in scrlttr2 (continuation)
ccseparator
separator between title of additional addressees, and additional addressees (
sec-
tion 4.7
,
page 159
)
customer
customer number (
section 4.10
,
page 189
)
date
date (
section 4.10
,
page 189
)
emailseparator
separator between e-mail name and e-mail address (
section 4.10
,
page 176
)
enclseparator
separator between title of enclosure, and enclosures (
section 4.7
,
page 159
)
faxseparator
separator between title of fax, and fax number (
section 4.10
,
page 176
)
firstfoot
page
v3.08
foot of the note paper (
section 4.10
,
page 196
)
firsthead
page
v3.08
head of the note paper (
section 4.10
,
page 182
)
fromaddress
sender’s address without sender name (
section 4.10
,
page 172
)
frombank
sender’s bank account (
section 4.10
,
page 196
)
fromemail
sender’s e-mail (
section 4.10
,
page 176
)
fromfax
sender’s fax number (
section 4.10
,
page 176
)
fromlogo
commands for inserting the sender’s logo (
section 4.10
,
page 180
)
frommobilephone
v3.12
sender’s mobile telephone number (
section 4.10
,
page 176
)
. . .
Chapter 4: The New Letter Class scrlttr2
144
Table 4.1.: Alphabetical list of all supported variables in scrlttr2 (continuation)
fromname
complete name of sender (
section 4.10
,
page 172
)
fromphone
sender’s telephone number (
section 4.10
,
page 176
)
fromurl
a URL of the sender, e. g., the URL of his homepage (
section 4.10
,
page 176
)
fromzipcode
zip code or postcode of the sender used at the Port-Payé head of option
addrfield=
PP
(
section 4.10
,
page 182
)
invoice
invoice number (
section 4.10
,
page 189
)
location
more details of the sender (
section 4.10
,
page 187
)
myref
sender’s reference (
section 4.10
,
page 189
)
nextfoot
page
v3.08
foot using page style headings or myheadings (
section 4.13
,
page 203
)
nexthead
page
v3.08
head using page style headings or myheadings (
section 4.13
,
page 203
)
phoneseparator
separator between title of telephone and telephone number (
section 4.10
,
page 176
)
place
sender’s place used near date (
section 4.10
,
page 182
)
placeseparator
separator between place and date (
section 4.10
,
page 190
)
PPdatamatrix
instruction, that print the data array of option
addrfield=PP
(
section 4.10
,
page 182
)
. . .
Chapter 4: The New Letter Class scrlttr2
145
Table 4.1.: Alphabetical list of all supported variables in scrlttr2 (continuation)
PPcode
instructions for the sender’s identification code of option
addrfield=PP
(
section 4.10
,
page 182
)
signature
signature beneath the ending of the letter (
section 4.20
,
page 212
)
specialmail
mode of dispatch (
section 4.10
,
page 182
)
subject
letter’s subject (
section 4.10
,
page 193
)
subjectseparator
separator between title of subject and subject (
section 4.10
,
page 193
)
title
letter title (
section 4.10
,
page 192
)
toaddress
address of addressee without addressee name (
section 4.10
,
page 182
)
toname
complete name of addressee (
section 4.10
,
page 182
)
yourmail
date of addressee’s referenced mail (
section 4.10
,
page 189
)
yourref
addressee’s reference (
section 4.10
,
page 189
)
zipcodeseparator
separator between the zip code’s or postcode’s title and the code itself (
section 4.10
,
page 182
)
\setkomavar{name }[description ]{content }
\setkomavar*{name }{description }
With the command \setkomavar you determine the content of the variable name . Using
an optional argument you can at the same time change the description of the variable. In
contrast, \setkomavar* can only set the description of the variable name .
|