0% found this document useful (0 votes)
402 views448 pages

Scrguien

some document that goes over latex stuff
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
402 views448 pages

Scrguien

some document that goes over latex stuff
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

KOMA - Script

a versatile LATEX 2 bundle

Note: This document is a translation of the German KOMA-Script manual. Several


authors have been involved to this translation. Some of them are native English speakers,
others like me are not. Improvements of the translation by native speakers or experts are
welcome at all times!

The Guide

KOMA - Script
Markus Kohm
2015-10-03

Authors of the KOMA - Script Bundle: Frank Neukam, Markus Kohm, Axel Kielhorn

Legal Notes:
There is no warranty for any part of the documented Software. The authors have taken
care in the preparation of this book, but make no expressed or implied warranty of any kind
and assume no responsibility for errors or omissions. No liability is assumed for incidental
or consequential damages in connection with or arising out of the use of the information or
programs contained here.
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and the authors were
aware of a trademark claim, the designations have been printed with initial capital letters or
in all capitals.

English translation of this manual by: Kevin Pfeiffer, Gernot Hassenpflug, Krickette
Murabayashi, Markus Kohm, Jens-Uwe Morawski, Jana Schubert, Jens Hhne, Harald Bongartz, Georg Grandke, Raimund Kohl, Stephan Hennig, Melvin Hendrix, and Arndt Schubert.
Free screen version without any optimization of paragraph and page breaks
This guide is part of KOMA-Script, which is free under the terms and conditions of LATEX
Project Public License Version 1.3c. A version of this license, which is valid to KOMAScript, is part of KOMA-Script (see lppl.txt). Distribution of this manual even if it is
printed is allowed provided that all parts of KOMA-Script are distributed. Distribution
without the other parts of KOMA-Script needs a explicit, additional authorization by the
authors.

To All Friends of Typography!

Chapter 0.

Preface to the English KOMA - Script Guide


The translation of the German KOMA -Script guide is still a work in progress and a never
ending story. I always try to have an English user guide with all descriptions of the German
one. But as long as I have to do the primary translation, these translations not only can but
should be improved.
Currently, whole chapter 15 is not a translation from the German manual but the primary
description from the implementation of the package. Nevertheless, a native or very advanced
English speaker with basic TeX knowledge is urgently needed to translate the German text or
to improve my own translation.
A real gap is the chapter about scrjura. Currently there isnt such a chapter, neither in the
German nor in the English manual. But there is a chapter at the German KOMA - Script book.
If someone would translate it, I would add this chapter and the translation to the manuals.
So this English guide is complete but nevertheless not as good as the German one. Currently
there are only a few editors for the English guide, who improve my translation for free. Many
thanks to them for their very good job! Nevertheless, additional editors or translators would
be welcome!

Contents

Contents
Preface to the English KOMA - Script Guide
1.

Introduction
1.1.
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.
Structure of the Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.
History of KOMA - Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.
Special Thanks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5.
Legal Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.6.
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.7.
Bug Reports and Other Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.8.
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Part I:
KOMA - Script for Authors

7
19
19
19
20
21
22
22
22
22

23

2.

Construction of the Page Layout with typearea


2.1.
Fundamentals of Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.
Page Layout Construction by Dividing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.
Page Layout Construction by Drawing a Circle . . . . . . . . . . . . . . . . . . . . . . .
2.4.
Early or late Selection of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5.
Compatibility with Earlier Versions of KOMA - Script . . . . . . . . . . . . . . . . . . .
2.6.
Options and Macros to Influence the Page Layout . . . . . . . . . . . . . . . . . . . . .
2.7.
Paper Format Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.8.
Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24
24
26
28
28
29
30
44
46

3.

The Main Classes: scrbook, scrreprt, and scrartcl


3.1.
Early or late Selection of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.
Compatibility with Earlier Versions of KOMA - Script . . . . . . . . . . . . . . . . . . .
3.3.
Draft Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.
Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.5.
Selection of the Document Font Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6.
Text Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7.
Document Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.8.
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.9.
Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.10. Paragraph Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50
50
50
51
51
52
53
59
65
66
70

Contents
3.11.
3.12.
3.13.
3.14.
3.15.
3.16.
3.17.
3.18.
3.19.
3.20.
3.21.
3.22.
3.23.
3.24.
4.

Detection of Odd and Even Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Head and Foot Using Predefined Page Styles . . . . . . . . . . . . . . . . . . . . . . . . .
Interleaf Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Demarcation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Structuring of Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dicta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Floating Environments of Tables and Figures . . . . . . . . . . . . . . . . . . . . . . . . .
Margin Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

72
73
78
80
84
85
104
106
114
115
131
132
132
135

The New Letter Class scrlttr2


4.1.
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.
Pseudo-Lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3.
Early or late Selection of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4.
Compatibility with Earlier Versions of KOMA - Script . . . . . . . . . . . . . . . . . . .
4.5.
Draft Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6.
Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.7.
General Structure of Letter Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.8.
Selection of Document or Letter Font Size . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.9.
Text Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.10. Note Paper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.11. Paragraph Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.12. Detection of Odd and Even Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.13. Head and Foot Using Predefined Page Style . . . . . . . . . . . . . . . . . . . . . . . . . .
4.14. Interleaf Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.15. Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.16. Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.17. Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.18. Floating Environments of Tables and Figures . . . . . . . . . . . . . . . . . . . . . . . . .
4.19. Margin Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.20. Closing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.21. Letter Class Option Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.22. Address Files and Circular Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

137
137
142
143
143
143
143
143
153
155
158
187
188
188
192
192
192
192
193
193
193
195
201

10

Contents
5.

Adapting Page Headers and Footers with scrlayer-scrpage


5.1.
Early or late Selection of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.
Head and Foot Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3.
Text Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.
Usage of Predefined Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5.
Manipulation of Defined Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

206
206
207
207
209
219

6.

The Day of the Week Using scrdate

230

7.

Getting the Time with Package scrtime

235

8.

Access to Address Files with scraddr


8.1.
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.2.
Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.3.
Package Warning Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

237
237
238
239

9.

Creating Address Files from a Address Database

240

10. Making Basic Feature of the KOMA - Script Classes Available with Package
scrextend while Using Other Classes
10.1. Early or late Selection of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.2. Compatibility with Earlier Versions of KOMA - Script . . . . . . . . . . . . . . . . . . .
10.3. Optional, Extended Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.4. Draft Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.5. Selection of the Document Font Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.6. Text Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.7. Document Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.8. Detection of Odd and Even Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.9. Head and Foot Using Predefined Page Styles . . . . . . . . . . . . . . . . . . . . . . . . .
10.10. Interleaf Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.11. Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.12. Dicta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.13. Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.14. Margin Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

241
241
241
242
242
242
242
242
243
243
243
243
244
244
244

11. Support for Jurists with scrjura

245

11

Contents
Part II:
KOMA - Script for Advanced Users and Experts

246

12. Basic
12.1.
12.2.
12.3.
12.4.
12.5.
12.6.
12.7.

Functions of Package scrbase


Loading the Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Keys as Attributes of Families and their Members . . . . . . . . . . . . . . . . . . . . .
Conditional Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Definition of Language-Dependent Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Identification of KOMA - Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extension of the LATEX Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extension of the Mathematical Features of -TEX . . . . . . . . . . . . . . . . . . . . .

247
247
248
259
263
266
267
268

13. Control Package Dependencies with scrlfile


13.1. About Package Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13.2. Actions Prior to and After Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13.3. Replacing Files at Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13.4. Prevent File Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

269
269
270
274
277

14. Economise and Replace Files Using scrwfile


14.1. General Modifications of the LATEX Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . .
14.2. The Single File Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14.3. The Clone File Write Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14.4. Note on State of Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14.5. Known Package Incompatibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

280
280
281
281
282
283

15. Management of Tables and Lists of Contents Using tocbasic


15.1. Basic Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15.2. Creating a Table of Contents or List of Something . . . . . . . . . . . . . . . . . . . . .
15.3. Internal Commands for Class and Package Authors . . . . . . . . . . . . . . . . . . . .
15.4. A Complete Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15.5. Everything with One Command Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

284
284
287
294
296
298

16. Hacks for Third-Party Packages by Package scrhack


16.1. State of Development Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16.2. Early or late Selection of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16.3. Usage of tocbasic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16.4. Incorrect Expectations to \@ptsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16.5. Special Case hyperref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16.6. Inconsistent Handling of \textwidth and \textheight . . . . . . . . . . . . . . . . .

303
303
303
303
304
304
305

12

Contents
17. Defining Layers and Page Styles Using scrlayer
17.1. State of Development Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17.2. Early or late Selection of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17.3. Some Generic Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17.4. Declaration of Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17.5. Declaration and Management of Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . .
17.6. Head and Foot Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17.7. Manipulation of Defined Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17.8. End User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

306
306
306
306
308
319
327
327
329

18. Additional Features of scrlayer-scrpage


18.1. Manipulation of Defined Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18.2. Definition of new Pairs of Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18.3. Definition of Simple Page Styles with Three Parts in Head and Foot . . . . . . .
18.4. Definition of Complex Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

332
332
335
337
339

19. Note
19.1.
19.2.
19.3.
19.4.
19.5.

Columns with scrlayer-notecolumn


Note about the State of Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Early or late Selection of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Declaration of new Note Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Making a Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Force Output of Note Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

343
343
344
344
348
351

20. Additional Information about package typearea


20.1. Expert Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20.2. Local Settings with File typearea.cfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20.3. More or Less Obsolete Options and Commands . . . . . . . . . . . . . . . . . . . . . . .

354
354
356
356

21. Additional Information about the Main Classes scrbook, scrreprt, and
scrartcl as well as the Package scrextend
21.1. Additional Information to User Commands . . . . . . . . . . . . . . . . . . . . . . . . . .
21.2. Cooperation and Coexistence of KOMA - Script and Other Packages . . . . . . .
21.3. Expert Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21.4. More or Less Obsolete Options and Commands . . . . . . . . . . . . . . . . . . . . . . .

357
357
357
357
378

22. Additional Information about the Letter Class scrlttr2 and the Letter Package
scrletter
22.1. Pseudo-Lengths for Experienced Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.1.1. Folding Marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.1.2. Letterhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.1.3. Addressee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

379
379
385
387
388

13

Contents
22.1.4. Senders Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.1.5. Business Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.1.6. Subject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.1.7. Closing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.1.8. Letter Footer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Variables for Experienced Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Differences in the Page Styles of scrletter . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Differences in the Handling of lco-Files in scrletter . . . . . . . . . . . . . . . . . . . .
lco-Files for Experienced Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.5.1. Survey of Paper Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22.5.2. Visualization of Positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Language Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
From Obsolete scrlettr to Current scrlttr2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .

390
390
391
392
392
393
395
396
396
396
397
400
403

A. Japanese Letter Support for scrlttr2


A.1. Japanese standard paper and envelope sizes . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1.1. Japanese paper sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1.2. Japanese envelope sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2. Provided lco files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.3. Examples of Japanese letter usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.3.1. Example 1: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.3.2. Example 2: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

405
405
405
406
410
412
412
413

Change Log

414

Bibliography

423

Index
General Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index of Commands, Environments, and Variables . . . . . . . . . . . . . . . . . . . . . . . . . .
Index of Lengths and Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index of Elements with Capability of Font Adjustment . . . . . . . . . . . . . . . . . . . . . . .
Index of Files, Classes, and Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index of Class and Package Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

428
428
432
442
443
444
445

22.2.
22.3.
22.4.
22.5.
22.6.
22.7.

14

List of Figures

List of Figures
2.1.

Double-sided layout with the box construction of the classical division factor
of 9, after subtraction of a binding correction . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.1.
3.3.
3.2.
3.4.
3.5.
3.6.
3.7.
3.8.
3.9.
3.10.

Parameters that control the footnote layout . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Example: Usage of \captionaboveof inside another floating environment . . . .
Example: A rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Figure beside description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Description centered beside figure . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Figure title top beside . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Default figure caption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Figure caption with slightly hanging indention . . . . . . . . . . . . . . . . .
Example: Figure caption with hanging indention and line break . . . . . . . . . . . .
Example: Figure caption with hanging indention at the second line . . . . . . . . .

83
121
121
123
124
125
127
127
127
127

4.1.
4.2.
4.3.
4.4.
4.5.
4.6.

General structure of a letter document with several individual letters . . . . . . . .


General structure of a single letter within a letter document . . . . . . . . . . . . . . .
Example: letter with addressee and opening . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: letter with addressee, opening, text, and closing . . . . . . . . . . . . . . . .
Example: letter with addressee, opening, text, closing, and postscript . . . . . . .
Example: letter with addressee, opening, text, closing, postscript, and
distribution list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: letter with addressee, opening, text, closing, postscript,
distribution list, and enclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: letter with addressee, opening, text, closing, postscript,
distribution list, enclosure, and insane large font size . . . . . . . . . . . . . . . . . . . . .
schematic display of the note paper with the most important commands and
variables for the drafted elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: letter with addressee, opening, text, closing, postscript,
distribution list, enclosure, and hole puncher mark . . . . . . . . . . . . . . . . . . . . . .
Example: letter with sender, addressee, opening, text, closing, postscript,
distribution list, and enclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: letter with sender, separation rule, addressee, opening, text,
closing, signature, postscript, distribution list, enclosure, and puncher hole
mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: letter with extended sender, separation rule, addressee, opening,
text, closing, signature, postscript, distribution list, enclosure, and puncher
hole mark; standard vs. extended letterhead . . . . . . . . . . . . . . . . . . . . . . . . . . .

144
145
148
149
150

4.7.
4.8.
4.9.
4.10.
4.11.
4.12.
4.13.

152
153
156
159
161
165
166
170

15

List of Figures
4.14. Example: letter with extended sender, separation rule, addressee, opening,
text, closing, signature, postscript, distribution list, enclosure, and puncher
hole mark; left vs. right aligned letterhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.15. Example: letter with extended sender, logo, separation rule, addressee,
opening, text, closing, signature, postscript, distribution list, enclosure, and
puncher hole mark; left vs. right aligned vs. centered sender . . . . . . . . . . . . . . .
4.16. Example: letter with extended sender, logo, addressee, additional sender
information, opening, text, closing, signature, postscript, distribution list,
enclosure, and puncher hole mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.17. Example: letter with extended sender, logo, addressee, additional sender
information, place, date, opening, text, closing, signature, postscript,
distribution list, enclosure, and puncher hole mark . . . . . . . . . . . . . . . . . . . . . .
4.18. Example: letter with extended sender, logo, addressee, additional sender
information, place, date, subject, opening, text, closing, signature, postscript,
distribution list, enclosure, and puncher hole mark . . . . . . . . . . . . . . . . . . . . . .
4.19. Example: letter with extended sender, logo, addressee, additional sender
information, place, date, subject, opening, text, closing, modified signature,
postscript, distribution list, enclosure, and puncher hole mark . . . . . . . . . . . . .
4.20. Example: letter with extended sender, logo, addressee, additional sender
information, place, date, subject, opening, text, closing, modified signature,
postscript, distribution list, enclosure, and puncher hole mark using a lco-file .
5.1.
5.2.

171
173
179
183
186
195
198

Commands to define the page head . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211


Commands to define the page footer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

18.1. Elements of a three parts page style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338


19.1. An example page to the example of chapter 19 . . . . . . . . . . . . . . . . . . . . . . . . . 353
22.1. Schematic of the pseudo-lengths for a letter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

16

List of Tables

List of Tables
2.1. Type area dimensions dependent on DIV for A4 . . . . . . . . . . . . . . . . . . . . . . . .
2.2. Predefined settings of DIV for A4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3. Symbolic values for the DIV option and the DIV argument to \typearea . . . . .
2.4. Symoblic BCOR arguments for \typearea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5. Standard values for simple switches in KOMA - Script . . . . . . . . . . . . . . . . . . . .
2.6. Output driver for option pagesize=output driver . . . . . . . . . . . . . . . . . . . . .

32
33
35
37
38
47

3.1.
3.2.

50

3.3.
3.4.
3.5.
3.6.
3.7.
3.8.
3.9.
3.10.
3.11.
3.12.
3.13.
3.14.
3.15.
3.16.
3.17.
3.18.
3.19.
3.20.
3.21.
3.22.

Class correspondence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Elements whose type style can be changed with the KOMA - Script command
\setkomafont or \addtokomafont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Font defaults for the elements of the title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Main title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Possible values of option toc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Font style defaults of the elements of the table of contents . . . . . . . . . . . . . . . .
Possible values of option parskip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Default values for the elements of a page style . . . . . . . . . . . . . . . . . . . . . . . . . .
Macros to set up page style of special pages . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Available numbering styles of page numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Available values for option footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Available values for option open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Available values for option headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Available values of option numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Default font sizes for different levels of document structuring . . . . . . . . . . . . . .
Default settings for the elements of a dictum . . . . . . . . . . . . . . . . . . . . . . . . . . .
Available values for option captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Font defaults for the elements of figure or table captions . . . . . . . . . . . . . . . . . .
Example: Measure of the rectangle in figure 3.2 . . . . . . . . . . . . . . . . . . . . . . . . .
Available values for option listof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Available values of option bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Available values of option index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.1. Alphabetical list of all supported variables in scrlttr2 . . . . . . . . . . . . . . . . . . . . .


4.2. Alphabetical list of elements whose font can be changed in scrlttr2 using the
commands \setkomafont and \addtokomafont . . . . . . . . . . . . . . . . . . . . . . . . .
4.3. Combinable values for the configuration of folding marks with option
foldmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4. Available values for option fromalign with scrlttr2 . . . . . . . . . . . . . . . . . . . . . .
4.5. Possible values of option fromrule with scrlttr2 . . . . . . . . . . . . . . . . . . . . . . . . .

55
63
63
67
69
71
75
76
78
81
86
87
90
93
105
117
120
121
130
134
136
137
155
160
163
163

17

List of Tables
4.6.
4.7.
4.8.
4.9.
4.10.
4.11.
4.12.
4.13.
4.14.
4.15.
4.16.
4.17.
4.18.

Predefined descriptions of the variables of the letterhead . . . . . . . . . . . . . . . . . .


Predefined description and content of the separators at the letterhead
without option symbolicnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
available values for option addrfield using scrlttr2 . . . . . . . . . . . . . . . . . . . . . .
Predefined font style for the elements of the address field. . . . . . . . . . . . . . . . . .
available values for option priority in scrlttr2 . . . . . . . . . . . . . . . . . . . . . . . . .
Possible values of option locfield with scrlttr2 . . . . . . . . . . . . . . . . . . . . . . . . .
Possible value of option refline with scrlttr2 . . . . . . . . . . . . . . . . . . . . . . . . . .
predefined descriptions of variables of the reference line . . . . . . . . . . . . . . . . . . .
font style default of elements of the reference line . . . . . . . . . . . . . . . . . . . . . . .
predefined descriptions of subject-related variables . . . . . . . . . . . . . . . . . . . . . .
available values of option subject with scrlttr2 . . . . . . . . . . . . . . . . . . . . . . . . .
available values of option pagenumber with scrlttr2 . . . . . . . . . . . . . . . . . . . . . .
predefined lco-files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

168
168
175
176
176
177
180
181
182
183
184
190
199

5.1.

Elements of scrlayer-scrpage whose type style can be changed with


KOMA - Script command \setkomafont or \addtokomafont . . . . . . . . . . . . . . . 208
5.2. Possible values for option markcase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
5.3. Symbolic values for options headwidth and footwidth . . . . . . . . . . . . . . . . . . . 228
10.1. optional available extended features of scrextend . . . . . . . . . . . . . . . . . . . . . . . . 242
12.1. Overview of usual language dependent terms . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
15.1. Options for command \DeclareNewTOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
15.2. Comparison of example environment remarkbox and environment figure . . . . 302
17.1. Options for the definition of page layers with description of the corresponding
layer attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
17.2. The hook options for page styles (in order of execution) . . . . . . . . . . . . . . . . . . 321
18.1. The layers scrlayer-scrpage defines to a page style . . . . . . . . . . . . . . . . . . . . . . . . 340
19.1. Options for the declaration of note columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
21.1.
21.2.
21.3.
21.4.
21.5.

Style-independent attributes at the declaration of section-like commands . . . . .


Attributes of the style section declaring a section-like command . . . . . . . . . . .
Attributes of the style chapter declaring a section-like command . . . . . . . . . . .
Attributes of the style part declaring a section-like command . . . . . . . . . . . . . .
Defaults of the chapter headings of scrbook and scrreprt subject to option
headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

363
364
365
366
367

18

List of Tables
21.6. Default of the headings of scrbook and scrreprt . . . . . . . . . . . . . . . . . . . . . . . . . . 367
22.1. Pseudo-lengths provided by class scrlttr2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
22.2. Language-dependent forms of the date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
22.3. Default settings for language-dependent terms . . . . . . . . . . . . . . . . . . . . . . . . . 403
A.1.
A.2.
A.3.
A.4.
A.5.
A.6.
A.7.

ISO and JIS standard paper sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Japanese B-series variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Main Japanese contemporary stationary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Japanese ISO envelope sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Japanese envelope sizes 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Supported Japanese envelope types and the window sizes and locations . . . . . .
lco files provided by scrlttr2 for Japanese window envelopes . . . . . . . . . . . . . . .

406
406
407
408
409
411
412

19

Chapter 1.

Introduction
This chapter includes important information about the structure of the manual and the history
of KOMA-Script, which begins years before the first version. You will also find information
for those who have not installed KOMA-Script or encounter errors.

1.1. Preface
KOMA-Script is very complex. This is evidenced by the fact that it consists of not only a single
class or a single package, but a bundle of many classes and packages. Although the classes are
designed as a counterpart to the standard classes, that does not necessarily mean that they
only have the commands, environments, and setting of the standard classes or imitate their
appearance. The capabilities of KOMA - Script surpass the capabilities of the standard classes
considerably. Some of them are to be regarded as a supplement to the basic skills of the LATEX
kernel.
The foregoing means that the documentation of KOMA - Script has to be extensive. In
addition, KOMA - Script usually is not taught. That means there is no teacher who knows
his students and can therefore choose the teaching and learning materials and adapt them
accordingly. It would be easy to write the documentation for any specific audience. The
difficulty is, however, that the guide must service all potential audiences. We, the authors,
have tried to create a guide that is suited for the computer scientist as well as the secretary
or the fishmonger. We have tried, although this is actually an impossible task. The result
consists of several compromises and we hope that you will keep this in mind when using it.
Your suggestions for improvement are, of course, always welcome.
Despite the volume of the manual, it is recommended to consult the documentation. Attention is drawn to the multi-part index at the end of this document. In addition to this guide,
documentation includes all the text documents that are part of the bundle. See manifest.tex
for a list of all of them.

1.2. Structure of the Guide


This manual consists of several parts. Theres a part for average users, another part for
advanced users and experts, and an appendix with additional examples and information for
those who always want to know more.
Part I is recommended for all KOMA - Script users. This means that you may find here
even some information for newcomers to LATEX. In particular, this part is enhanced by many
examples to the average user that are intended to illustrate the explanations. Do not be afraid
to try these examples yourself and in modifying them to find out how KOMA - Script works.
Nevertheless the KOMA - Script user guide is not intended to be a LATEX primer. Those new

20

scrartcl

Chapter 1.
to LATEX should look at The Not So Short Introduction to LATEX 2 [OPHS11] or LATEX 2
for Authors [Tea05b] or a LATEX reference book. You will also find useful information in
the many LATEX FAQs, including the TEX Frequently Asked Questions on the Web [FAQ13].
Although the length of the TEX Frequently Asked Questions on the Web is considerably long,
it is nevertheless quite useful not only to those having problems using LATEX or KOMA - Script.
Part II is recommended for advanced KOMA - Script users. These are all of you who already
know LATEX, maybe worked with KOMA - Script for a while, and want to learn more about
KOMA-Script internals, interaction of KOMA - Script with other packages, and how to use
KOMA-Script as an answer to special demands. For this purpose we will have a closer look
at some aspects from part I again. In addition some instructions that have been implemented
for advanced users and experts, especially, will be documented. This is complemented by the
documentation of packages that are normally hidden to the user insofar as they do their work
under the surface of the classes and user packages. These packages are specifically designed
to be used by other authors of classes and packages.
The appendix, which may be found only in the German book version, contains information
which is beyond what is covered in part I and part II. Advanced users may find background information on issues of typography to give them a basis for their own decisions. In addition, the
appendix provides examples for aspiring authors of packages. These examples are less intended
to be simply transferred. Rather, they convey knowledge of planning and implementation of
projects as well as some basic LATEX instructions for authors of packages.
If you are only interested in using a single KOMA - Script class or package you can probably
successfully avoid reading the entire guide. Each class and package typically has its own
chapter; however, the three main classes (scrbook, scrrprt, and scrartcl) are introduced together
in chapter 3. Where an example or note only applies to one or two of the three classes, e. g.,
scrartcl, it is called out in the margin, as shown here with scrartcl.
The primary documentation for KOMA - Script is in German and has been translated for your
convenience; like most of the LATEX world, its commands, environments, options, etc., are in
English. In a few cases, the name of a command may sound a little strange, but even so, we hope
and believe that with the help of this guide, KOMA - Script will be usable and useful to you.

1.3. History of KOMA - Script


In the early 1990s, Frank Neukam needed a method to publish an instructors lecture notes. At
that time LATEX was LATEX2.09 and there was no distinction between classes and packages
there were only styles. Frank felt that the standard document styles were not good enough
for his work; he wanted additional commands and environments. At the same time he was
interested in typography and, after reading Tschicholds Ausgewhlte Aufstze ber Fragen der
Gestalt des Buches und der Typographie (Selected Articles on the Problems of Book Design and
Typography) [Tsc87], he decided to write his own document style and not just a one-time
solution to his lecture notes, but an entire style family, one specifically designed for European

21

Chapter 1.
and German typography. Thus Script was born.
Markus Kohm, the developer of KOMA - Script, came across Script in December 1992 and
added an option to use the A5 paper format. At that time neither the standard style nor
Script provided support for A5 paper. Therefore it did not take long until Markus made the
first changes to Script. This and other changes were then incorporated into Script-2, released
by Frank in December 1993.
Beginning in mid-1994, LATEX 2 became available and brought with it many changes. Users
of Script-2 were faced with either limiting their usage to LATEX 2 s compatibility mode or
giving up Script altogether. This situation led Markus to put together a new LATEX 2 package,
released on 7 July 1994 as KOMA - Script; a few months later Frank declared KOMA - Script to
be the official successor to Script. KOMA - Script originally provided no letter class, but this
deficiency was soon remedied by Axel Kielhorn, and the result became part of KOMA - Script
in December 1994. Axel also wrote the first true German-language user guide, which was
followed by an English-language guide by Werner Lemberg.
Since then much time has passed. LATEX has changed in only minor ways, but the LATEX
landscape has changed a great deal; many new packages and classes are now available and
KOMA-Script itself has grown far beyond what it was in 1994. The initial goal was to provide good LATEX classes for German-language authors, but today its primary purpose is to
provide more-flexible alternatives to the standard classes. KOMA - Scripts success has led
to e-mail from users all over the world, and this has led to many new macros all needing
documentation; hence this small guide.

1.4. Special Thanks


Acknowledgements in the introduction? No, the proper acknowledgements can be found in
the addendum. My comments here are not intended for the authors of this guide and
those thanks should rightly come from you, the reader, anyhow. I, the author of KOMA Script, would like to extend my personal thanks to Frank Neukam. Without his Script family,
KOMA-Script would not have come about. I am indebted to the many persons who have
contributed to KOMA - Script, but with their indulgence, I would like to specifically mention
Jens-Uwe Morawski and Torsten Krger. The English translation of the guide is, among many
other things, due to Jenss untiring commitment. Torsten was the best beta-tester I ever had.
His work has particularly enhanced the usability of scrlttr2 and scrpage2. Many thanks to all
who encouraged me to go on, to make things better and less error-prone, or to implement
additional features.
Thanks go as well to DANTE, Deutschsprachige Anwendervereinigung TEX e.V, (the
German-Language TEX User Group). Without the DANTE server, KOMA - Script could not
have been released and distributed. Thanks as well to everybody in the TEX newsgroups and
mailing lists who answer questions and have helped me to provide support for KOMA - Script.

22

Chapter 1.

1.5. Legal Notes


KOMA-Script was released under the LATEX Project Public License. You will find it in the file
lppl.txt. An unofficial German-language translation is also available in lppl-de.txt and is
valid for all German-speaking countries.
This document and the KOMA - Script bundle are provided as is and without warranty of
any kind.

1.6. Installation
The three most important TEX distributions, MacTEX, MiKTEX, and TEX Live, make KOMA Script available by their package management software. It is recommended to make installations and updates of KOMA - Script using these tools. Nevertheless the manual installation
without using the package managers has been described in the file INSTALL.txt, that is part
of every legal KOMA - Script bundle. You should also read the documentation that comes with
the TEX distribution you are using.

1.7. Bug Reports and Other Requests


If you think you have found an error in the documentation or a bug in one of the KOMA - Script
classes, one of the KOMA - Script packages, or another part of KOMA - Script, please do the
following: first have a look on CTAN to see if a newer version of KOMA - Script is available; if
a newer version is available, install the applicable section and try again.
If you are using the most recent version of KOMA - Script and still have a bug, please provide
a short LATEX document that demonstrates the problem. You should only use the packages
and definitions needed to demonstrate the problem; do not use any unusual packages.
By preparing such an example it often becomes clear whether the problem is truly a KOMA Script bug or something else. To find out the version numbers of all packages in use, simply
put \listfiles in the preamble of your example and read the end of the log-file.
Please report KOMA - Script (only) bugs to [email protected]. If you want to ask your
question in a Usenet group, mailing list, or Internet forum, you should also include such an
example as part of your question.

1.8. Additional Information


Once you become an experienced KOMA - Script user you may want to look at some more
advanced examples and information. These you will find on the KOMA - Script documentation
web site [KDP]. The main language of the site is German, but nevertheless English is welcome.

Part I.
KOMA - Script for Authors
In this part you may find information for authors of articles, reports, books, and letters. It is
assumed that the average user is less interested in the implementation of KOMA - Script or in
the problems of implementing KOMA - Script. Also, the average user isnt interested in obsolete
options and instructions. He wants to know how he can achieve things using current options
and instructions. Some users may be interested in typographic background information.
In this part, the few passages that contain additional information and justification, and
therefore are of less interest for the impatient reader, have been set in sans serif font and can be
skipped if necessary. For those who are interested in more information about implementation,
side effects with other packages, and obsolete options and instructions, please refer to part II
on page 247. Furthermore, that part of the KOMA - Script guide describes all the features that
were created specially for writers of packages and classes.

24

Chapter 2.

Construction of the Page Layout with typearea


Many LATEX classes, including the standard classes, present the user with the largely fixed
configuration of margins and typearea. With the standard classes, the configuration determined is very much dependent on the chosen font size. There are separate packages, such as
geometry (see [Ume10]), which give the user complete control, but also full responsibility, of
the settings of typearea and margins.
KOMA-Script takes a somewhat different approach with its typearea package. Here the
user is given several construction setting and automatization possibilities based on established
typography standards in order to help guide him or her in making a good choice.
It should be noted that the typearea package makes use of the scrbase package. The latter
is explained in the expert section of this document in chapter 12 from page 247 onwards. The
majority of the rules documented there are however not directed at the user, but rather at
authors of classes and packages.

2.1. Fundamentals of Page Layout


If you look at a single page of a book or other printed materials, you will see that it consists of
top, bottom, left, and right margins, a (running) head area, the text block, and a (running) foot
area. There is also a space between the head area and the text block, and between the text block
and the foot area. The relations between these areas are called the page layout.
The literature contains much discussion of different algorithms and heuristic approaches for
constructing a good page layout [Koh02]. Often mentioned is an approach which involves diagonals
and their intersections. The result is a page where the text block proportions are related to the
proportions of the page. In a single-sided document, the left and the right margin should have
equal widths. The relation of the upper margin to the lower margin should be 1:2. In a double-sided
document (e. g. a book) however, the complete inner margin (the margin at the spine) should be
the same as each of the two outer margins; in other words, a single page contributes only half of
the inner margin.
In the previous paragraph, we mentioned and emphasized the page. Erroneously, it is often
thought that with the page format the page is the same as the paper format. However, if you look
at a bound document, it is obvious that part of the paper vanishes in the binding and is no longer
part of the visible page. For the page layout, it is not the format of the paper which is important,
it is the impression of the visible page to the reader. Therefore, it is clear that the calculation
of the page layout must account for the lost paper in the binding and add this amount to the
width of the inner margin. This is called the binding correction. The binding correction is therefore
calculated as part of the gutter , not the visible inner margin.
The binding correction depends on the process of actually producing the document and thus
cannot be calculated in general. Every production process needs its own parameter. In professional

25

Chapter 2.
binding, this parameter is not too important since the printing is done on oversized paper which is
then cropped to the right size. The cropping is done in a way so that the relations for the visible
double-sided page are as explained above.
Now we know about the relations of the individual parts of a page. However, we do not yet
know about the width and the height of the text block. Once we know one of these values, we can
calculate all the other values from the paper format and the page format or the binding correction.
textblock height : textblock width = page height : page width
top margin : foot margin = 1 : 2
left margin : right margin = 1 : 1
half inner margin : outer margin = 1 : 2
page width = paper width binding correction
top margin + bottom margin = page height textblock height
left margin + right margin = page width textblock width
half inner margin + outer margin = page width textblock width
half inner margin + binding correction = gutter
The values left margin and right margin only exist in a single-sided document while
half inner margin and outer margin only exist in a double-sided document. In these equations,
we work with half inner margin since the full inner margin belongs to a double-page. Thus, one
page has only half of the inner margin, half inner margin.
The question of the width of the textblock is also discussed in the literature. The optimum
width depends on several factors:
size, width, type of the font used
line spacing
word length
available room
The importance of the font becomes clear once you think about the meaning of serifs. Serifs are
fine strokes finishing off the lines of the letters. Letters whose main strokes run orthogonal to the
text line disturb the flow rather than keeping and leading the eye along the line. Those letters
then have serifs at the ends of the vertical strokes so that the horizontal serifs can help lead the
eye horizontally. In addition, they help the eye to find the beginning of the next line more quickly.
Thus, the line length for a serif font can be slightly longer than for a sans serif font.
With leading is meant the vertical distance between individual lines of text. In LATEX, the leading
is set at about 20% of the font size. With commands like \linespread or, better, packages like
setspace (see [TF11]), the leading can be changed. A wider leading helps the eye to follow the

26

Chapter 2.
line. A very wide leading, on the other hand, disturbs reading because the eye has to move a
wide distance between lines. Also, the reader becomes uncomfortable because of the visible stripe
effect. The uniform gray value of the page is thereby spoiled. Still, with a wider leading, the lines
can be longer.
The literature gives different values for good line lengths, depending on the author. To some
extent, this is related to the native language of the author. Since the eye jumps from word to
word, short words make this task easier. Considering all languages and fonts, a line length of 60
to 70 characters, including spaces and punctuation, forms a usable compromise. This requires
well-chosen leading, but LATEXs default is usually good enough. Longer line lengths should only
be considered for highly-developed readers who spend several hours daily reading. However, even
for such readers, line lengths greater than 80 characters are unsuitable. In any case, the leading
must be appropriately chosen. An extra 5% to 10% is recommended as a good rule of thumb.
With fonts such as Palatino, which require some 5% more leading even at normal line lengths,
even more can be required.
Before looking at the actual construction of the page layout, there are just some minor things
left to know. LATEX does not start the first line in the text block of a page at the upper edge of the
text block, but sets the baseline at a defined distance from the top of the text block. Also, LATEX
knows the commands \raggedbottom and \flushbottom. \raggedbottom specifies that the
last line of a page should be positioned wherever it was calculated. This means that the position
of this line can be different on each page, up to the height of one line in combination of the
end of the page with titles, figures, tables or similar, even more. In double-sided documents this
is usually undesirable. \flushbottom makes sure that the last line is always at the lower edge of
the text block. To achieve this, LATEX sometimes needs to stretch vertical glue more than allowed.
Paragraph skip is such a stretchable, vertical glue, even when set to zero. In order to not stretch
the paragraph skip on normal pages where it is the only stretchable glue, the height of the text
block should be set to a multiple of the height of the text line, including the distance from the
upper edge of the text block to the first line.
This concludes the introduction to page layout as handled by KOMA - Script. Now, we can
begin with the actual construction.

2.2. Page Layout Construction by Dividing


The easiest way to make sure that the text area has the same ratios as the page is as follows:
First, subtract the part BCOR, required for the binding correction, from the inner edge of
the paper, and divide the rest of the page vertically into DIV rows of equal height.
Next, divide the page horizontally into the same number (DIV) of columns.
Then, take the uppermost row as the upper margin and the two lowermost rows as the lower
margin. If you are printing double-sided, you similarly take the innermost column as the inner
margin and the two outermost columns as the outer margin.

27

Chapter 2.
1

5
6
7

page layout left

binding correction

page layout right

5
6
7

Figure 2.1.: Double-sided layout with the box construction of the classical division factor of 9, after
subtraction of a binding correction

Then add the binding correction BCOR to the inner margin.


What now remains of the page is the text area. The width and the height of the text area and
margins result automatically from the number of rows and columns DIV. Since the margins always
need three stripes, DIV must be necessarily greater than three. In order that the text area occupy
at least twice as much space as the margins, DIV should really be equal to or greater than 9. With
this value, the construction is also known as the classical division factor of 9 (see figure 2.1).
In KOMA-Script, this kind of construction is implemented in the typearea package, where the
bottom margin may drop any fractions of a line in order to conform with the minor condition for
the text area height mentioned in the previous paragraph, and thereby to minimize the mentioned
problem with \flushbottom. For A4 paper, DIV is predefined according to the font size (see
table 2.2, page 33). If there is no binding correction (BCOR = 0 pt), the results roughly match
the values of table 2.1, page 32.
In addition to the predefined values, one can specify BCOR and DIV as options when loading the
package (see section 2.4, from page 30 onwards). There is also a command to explicitly calculate
the type area by providing these values as parameters (also see section 2.4, page 36).
The typearea package can automatically determine the optimal value of DIV for the font and
leading used. Again, see section 2.4, page 33.

28

Chapter 2.

2.3. Page Layout Construction by Drawing a Circle


In addition to the page layout construction method previously described, a somewhat more classical
method can be found in the literature. The aim of this method is not only to obtain identical
ratios in the page proportions, but it is considered optimal when the height of the text block is the
same as the width of the page. The exact method is described in [Tsc87].
A disadvantage of this late Middle Age method is that the width of the text area is no longer
dependent on the font. Thus, one does not choose the text area to match the font, but the author
or typesetter has to choose the font according to the text area. This can be considered a must.
In the typearea package this construction is changed slightly. By using a special (normally
meaningless) DIV value or a special package option, a DIV value is chosen to match the perfect
values of the late Middle Age method as closely as possible. See also section 2.4, page 33.

2.4. Early or late Selection of Options


In this section a peculiarity of KOMA -Script is presented, which, apart from the typearea
package, is also relevant to other KOMA - Script packages and classes. 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 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 }

v3.00

In LATEX, 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 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 LATEX, for example [OPHS11].
When using a KOMA - Script class, no options should be passed on unnecessary, explicit
loading of the typearea or scrbase packages. The reason for this is that the class already loads
these packages without options and LATEX refuses multiple loadings of a package with different
option settings.
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

29

Chapter 2.
constructs may break inside the optional argument of these commands. Because of this, the
usage of a LATEX 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 LATEX 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 }

v3.00

KOMA-Script 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 .
If in the option list one sets an option to a disallowed value, or the value list contains
an invalid value, then an error is produced. If LATEX is run in an interactive mode, then it stops at
this point. Entering h displays a help screen, in which also the valid values for the corresponding
option are given.
If a value includes an equal sign or a comma, then the value must be enclosed in curly
brackets.
To implement this possibility KOMA - Script uses the commands \FamilyOptions and
\FamilyOption with the family KOMA. More information on these commands is found in section 12.2, page 252.

2.5. Compatibility with Earlier Versions of KOMA - Script


Those who achieve their documents in source code set utmost value to the fact that future
LATEX runs will yield exactly the same result.