Chapter 2: Construction of the Page Layout with typearea
32
\documentclass[a4paper]{report}
\usepackage[BCOR=8.25mm]{typearea}
or
\documentclass[a4paper,BCOR=8.25mm]{report}
\usepackage{typearea}
when using BCOR as a global option.
When using a KOMA-Script class, the explicit loading of the typearea package can
be omitted:
\documentclass[BCOR=8.25mm]{scrreprt}
The option a4paper could be omitted with scrreprt, since this is a predefined setting
for all KOMA-Script classes.
If the option is only later set to a new value, one may then use, for example, the
following:
\documentclass{scrreprt}
\KOMAoptions{BCOR=8.25mm}
Thus, at the loading of the scrreprt class standard settings will be used. When
changing the setting with the use of the command
\KOMAoptions
or
\KOMAoption
a new page layout with new margins will automatically be calculated.
Please note that when using this option with one of the KOMA-Script classes as in the
example above, it must be used either as a class option, or passed via
\KOMAoptions
or
\KOMAoption
after loading the class. The typearea package should neither be loaded explicitly
with
\usepackage
when using a KOMA-Script class, nor should the option be given as an
optional argument thereto. If the option is changed via
\KOMAoptions
or
\KOMAoption
after
loading the package, the textblock and margins are automatically recalculated anew.
DIV=factor
With the aid of the option DIV=factor
v3.00
the number of stripes into which the page is divided
horizontally and vertically during the page layout construction is set. The exact construction
method is found in
section 2.2
. Of importance is that the larger the factor , the larger the
text block and the smaller the margins. Any integer value greater than 4 is valid for factor .
Please note that large values can lead to unfulfillment of various minor conditions in the type
area, depending on further options chosen. Thus, in an extreme case, the header may fall
outside of the page. Users applying the option DIV=factor are themselves responsible for
fulfillment of the marginal conditions and setting of a typographically aesthetic line length.
In
table 2.1
are found the type area sizes for several DIV factors for an A4 page without
binding correction. Here the minor conditions dependent on font size are not considered.
Chapter 2: Construction of the Page Layout with typearea
33
Table 2.1.: Type area dimensions dependent on DIV for A4 regardless of \topskip
Type area
Margins
DIV
width [mm] height [mm] top [mm] inner [mm]
6
105.00
148.50
49.50
35.00
7
120.00
169.71
42.43
30.00
8
131.25
185.63
37.13
26.25
9
140.00
198.00
33.00
23.33
10
147.00
207.90
29.70
21.00
11
152.73
216.00
27.00
19.09
12
157.50
222.75
24.75
17.50
13
161.54
228.46
22.85
16.15
14
165.00
233.36
21.21
15.00
15
168.00
237.60
19.80
14.00
Example: Assume one wants to write a meeting protocol, using the protocol class. The
document should be double-sided. In the company 12 pt Bookman font is used.
This font, which belongs to the standard PostScript fonts, is activated in L
A
TEX
with the command \usepackage{bookman}. The Bookman font is a very wide
font, meaning that the individual characters have a large width relative to their
height. Therefore, the predefined value for DIV in typearea is insufficient. Instead
of the value of 12 it appears after thorough study of this entire chapter that a value
of 15 should be most suitable. The protocol will not be bound but punched and
kept in a folder. Thus, no binding correction is necessary. One may then write:
\documentclass[a4paper,twoside]{protocol}
\usepackage{bookman}
\usepackage[DIV=15]{typearea}
On completion, it is decided that the protocols will from now on be collected and
bound quarterly into book format. The binding is to be a simple glue binding,
because it is only done to conform with ISO 9000 and nobody is actually going to
read them. For the binding including space lost in turning the pages, an average
of 12 mm is required. Thus, one may change the options of the typearea package
accordingly, and use the class for protocols conforming to ISO 9000 regulations:
\documentclass[a4paper,twoside]{iso9000p}
\usepackage{bookman}
\usepackage[DIV=15,BCOR=12mm]{typearea}
Of course, it is equally possible to use here a KOMA-Script class:
\documentclass[twoside,DIV=15,BCOR=12mm]{scrartcl}
Chapter 2: Construction of the Page Layout with typearea
34
Table 2.2.: Predefined settings of DIV for A4
base font size: 10 pt 11 pt 12 pt
DIV
:
8
10
12
\usepackage{bookman}
The a4paper option can be left out when using the scrartcl class, as it is predefined
in all KOMA-Script classes.
Please note that when using the DIV option with one of the KOMA-Script classes as in
the example above, it must be used either as a class option, or passed via
\KOMAoptions
or
\KOMAoption
after loading the class. The typearea package should neither be loaded explicitly
with
\usepackage
when using a KOMA-Script class, nor should the option be given as an
optional argument thereto. If the option is changed via
\KOMAoptions
or
\KOMAoption
after
loading the package, the textblock and margins are automatically recalculated anew.
DIV=calc
DIV=classic
As
v3.00
already mentioned in
section 2.2
, for A4 paper there are fixed predefined settings for the
DIV
value. These can be found in
table 2.2
. If a different paper format is chosen, then the
typearea package independently calculates an appropriate DIV value. Of course this same
calculation can be applied also to A4. To obtain this result, one simply uses the DIV=calc
option in place of the DIV=factor option. This option can just as easily be explicity given
for other paper formats. If one desires an automatic calculation, this also makes good sense,
since the possibility exists to configure different predefined settings in a configuration file (see
section 20.3
). An explicit passing of the DIV=calc option then overwrites such configuration
settings.
The classical page layout construction, the Middle Age book design canon, mentioned in
section 2.3
, is similarly selectable. Instead of the
DIV
= factor
or DIV=calc option, one may
use the DIV=classic option. A DIV value closest to the Middle Age book design canon is
then chosen.
Example: In the example using the Bookman font with the
DIV
= factor
option, exactly
that problem of choosing a more appropriate DIV value for the font arose. As a
variation on that example, one could simply leave the choice of such a value to the
typearea package:
\documentclass[a4paper,twoside]{protocol}
\usepackage{bookman}
\usepackage[DIV=calc]{typearea}
Chapter 2: Construction of the Page Layout with typearea
35
Please note that when using this option with one of the KOMA-Script classes as in the
example above, it must be used either as a class option, or passed via
\KOMAoptions
or
\KOMAoption
after loading the class. The typearea package should neither be loaded explicitly
with
\usepackage
when using a KOMA-Script class, nor should the option be given as an
optional argument thereto. If the option is changed via
\KOMAoptions
or
\KOMAoption
after
loading the package, the textblock and margins are automatically recalculated anew.
DIV=current
DIV=last
Readers
v3.00
who have followed the examples with acuity actually already know how to calculate
a DIV value dependent on the chosen font, when a KOMA-Script class is used together with
a font package.
The problem is that the KOMA-Script class already loads the typearea package itself. Thus, it
is not possible to pass options as optional arguments to
\usepackage
. It would also be pointless
to pass the
DIV=calc
option as an optional argument to
\documentclass
. This option would be
evaluated immediately on loading the typearea package and as a result the text block and margin
would be chosen according to the L
A
TEX standard font and not for the later loaded font. However,
it is quite possible to recalculate the text block and margins anew after loading the font, with the
aid of
\KOMAoptions
{
DIV=calc
}
or
\KOMAoption
{
DIV
}{calc}
. Via calc an appropriate DIV
value for a good line length is then chosen.
As it is often more practical to set the DIV option not after loading the font, but at a more
visible point, such as when loading the class, the typearea package offers two further symbolic
values for this option.
With DIV=current
v3.00
a renewed calculation of text block and margin is requested, in which
the currently set DIV will be used. This is less of interest for renewed type area calculations
after loading a different font; it is rather more useful for determining, for example, after
changing the leading, while keeping DIV the same, that the marginal condition is fulfilled that
\textheight
less \topskip is a multiple of \baselineskip.
With DIV=last
v3.00
a renewed calculation of text block and margin is requested, where exactly
the same setting is used as in the last calculation.
Example: Let us take up the previous example again, in which a good line length is required
for a type area using the Bookman font. At the same time, a KOMA-Script class is
to be used. This is easily possible using the symbolic value last and the command
\KOMAoptions
:
\documentclass[BCOR=12mm,DIV=calc,twoside]{scrartcl}
\ usepackage{bookman}
\KOMAoptions{DIV=last}
If it should later be decided that a different DIV value is required, then only the
setting of the optional argument to
\documentclass
need be changed.
Chapter 2: Construction of the Page Layout with typearea
36
Table 2.3.: Possible symbolic values for the DIV option or the DIV argument to
\typearea
[BCOR ]
{DIV }
areaset
Recalculate page layout.
calc
Recalculate type area including choice of appropriate DIV value.
classic
Recalculate type area using Middle Age book design canon (circle-based calculation).
current
Recalculate type area using current DIV value.
default
Recalculate type area using the standard value for the current page format and
current font size. If no standard value exists, calc is used.
last
Recalculate type area using the same DIV argument as was used in the last call.
A summary of all possible symbolic values for the DIV option can be found in
table 2.3
.
At this point it is noted that the use of the fontenc package can also lead to L
A
TEX loading a
different font.
Often the renewed type area calculation is required in combination with a change in the
line spacing (leading). Since the type area should be calculated such that an integer number
of lines fit in the text block, a change in the leading normally requires a recalculation of the
page layout.
Example: For a thesis document, a font of size 10 pt and a spacing of 1.5 lines is required. By
default, L
A
TEX sets the leading for 10 pt at 2 pt, in other words 1.2 lines. Therefore,
an additional stretch factor of 1.25 is needed. Additionally, a binding correction
of 12 mm is stipulated. Then the solution could be written as follows:
\documentclass[10pt,twoside,BCOR=12mm,DIV=calc]{scrreprt}
\linespread{1.25}
\KOMAoptions{DIV=last}
Since typearea always executes the command \normalsize itself upon calcula-
tion of a new type area, it is not necessary to activate the chosen leading with
\selectfont
after \linespread, since this will be used already in the recalcula-
tion.
When using the setspace package (see [
TF11
]), the same example would appear as
Chapter 2: Construction of the Page Layout with typearea
37
follows:
\ documentclass[10pt,twoside,BCOR=12mm,DIV=calc]{scrreprt}
\usepackage{setspace}
\onehalfspacing
\KOMAoptions{DIV=last}
As can be seen, with the use of the setspace package one no longer neesds to know
the correct stretch value.
At this point it should be noted that the line spacing for the title page should be
reset to the normal value.
\documentclass[10pt,twoside,BCOR=12mm,DIV=calc]
{scrreprt}
\usepackage{setspace}
\onehalfspacing
\AfterTOCHead{\singlespacing}
\KOMAoptions{DIV=last}
\begin{document}
\title{Title}
\author{Markus Kohm}
\begin{spacing}{1}
\maketitle
\end{spacing}
\tableofcontents
\chapter{Ok}
\end{document}
See further also the notes in
section 2.8
. The command
\AfterTOCHead
will be
described in
chapter 15
of
part II
on
page 353
.
Please note that when using this option with one of the KOMA-Script classes as in the
example above, it must be used either as a class option, or passed via
\KOMAoptions
or
\KOMAoption
after loading the class. The typearea package should neither be loaded explicitly
with
\usepackage
when using a KOMA-Script class, nor should the option be given as an
optional argument thereto. If the option is changed via
\KOMAoptions
or
\KOMAoption
after
loading the package, the textblock and margins are automatically recalculated anew.
\typearea[BCOR ]{DIV }
\recalctypearea
If the
DIV
option or the
BCOR
option is set after loading of the typearea package, then internally
the command \typearea is called. When setting the
DIV
option the symbolic value current
is used internally for BCOR , which for reasons of completeness is found also in
table 2.4
. When
setting the
BCOR
option, the symbolic value last is used internally for DIV . If it is instead desired
Chapter 2: Construction of the Page Layout with typearea
38
Table 2.4.: Possible symbolic BCOR arguments for \typearea[BCOR ]{DIV }
current
Recalculate type area with the currently valid BCOR value.
that the text block and margins should be recalculated using the symbolic value current for DIV ,
then \typearea[current]{current} can be used directly.
If both BCOR and DIV need changing, then it is recommended to use \typearea, since then
the text block and margins are recalculated only once. With
\KOMAoptions
{
DIV
= DIV ,
BCOR
=
BCOR }
the text block and margins are recalculated once for the change to DIV and again for
the change to BCOR .
The command \typearea is currently defined so as to make it possible to change the type
area anywhere within a document. Several assumptions about the structure of the L
A
TEX kernel
are however made and internal definitions and sizes of the kernel changed. There is a definite
possibility, but no guarantee, that this will continue to function in future versions of L
A
TEX2ε.
When used within the document, a page break will result.
Since \typearea[current]{last} or
\KOMAoptions
{
DIV=last
}
are often needed for recal-
culation of the type area, there exists specially the abbreviated command \recalctypearea
v3.00
.
Example: If one finds the notation
\KOMAoptions{DIV=last}
or
\typearea[current]{last}
for the recalculation of text block and margins too complicated for reasons of the
many special characters, then one may use more simply the following.
\recalctypearea
twoside=simple switch
twoside=semi
As already explained in
section 2.1
, the margin configuration is dependent on whether the
document is to be typeset single- or double-sided. For single-sided typesetting, the left and
right margins are equally wide, whereas for double-sided printing the inner margin of one
page is only half as wide as the corresponding outer margin. In order to implement this
distinction, the typearea package must be given the twoside option, if the document is to be
typeset double-sided. Being a simple switch , any of the standard values for simple switches
in
table 2.5
are valid. If the option is passed without a value, the value true is assumed,
so double-sided typesetting is carried out. Deactivation of the option leads to single-sided
typesetting.
Chapter 2: Construction of the Page Layout with typearea
39
Table 2.5.: Standard values for simple switches in KOMA-Script
Value Description
true
activates the option
on
activates the option
yes
activates the option
false
deactivates the option
off
deactivates the option
no
deactivates the option
Apart from the values in
table 2.5
the value semi
v3.00
can also be given. The value semi results
in a double-sided typesetting with single-sided margins and single-sided, i. e., not alternating,
margin notes. Nevertheless
v3.12
, since KOMA-Script version 3.12 binding corrections (see
BCOR
,
page 31
) will be part of the left margin on odd pages but part of the right margin on even pages.
But if you use compatibility with prior versions of KOMA-Script(see
section 2.5
,
page 30
),
binding correction will be part of the left margin on both pages while using twoside=semi.
The option can also be passed as class option in
\documentclass
, as package option to
\usepackage
, or even after loading of the typearea package with the use of
\KOMAoptions
or
\KOMAoption
. Use of the option after loading the typearea package results automatically in
recalculation of the type area using
\recalctypearea
(see
page 37
). If double-sided typeset-
ting was active before the option was set, then before the recalculation a page break is made
to the next odd page.
twocolumn=simple switch
For the calculation of a good type area with the help of
DIV=calc
it is useful to know in
advance if the document is to be typeset one-column or two-column. Since the observations
about line length in
section 2.1
then apply to each column, the width of a type area in a
two-column document can be up to double that in a one-column document.
To implement this difference, the typearea package must be told via the twocolumn option
whether the document is to be two-column. Since this is a simple switch , any of the standard
values for simple switches from
table 2.5
is valid. If the option is passed without a value, the
value true is assumed, i. e., two-column typesetting. Deactivation of the option results in
one-column typesetting.
The option can also be passed as class option in
\documentclass
, as package option to
\usepackage
, or even after loading of the typearea package with the use of
\KOMAoptions
or
\KOMAoption
. Use of the option after loading the typearea package results automatically in
recalculation of the type area using
\recalctypearea
(see
page 37
).
Chapter 2: Construction of the Page Layout with typearea
40
headinclude=simple switch
footinclude=simple switch
So far we have discussed how the type area is calculated and the relationship of the margins to
one another and between margins and text block. However, one important question has not been
answered: What constitutes the margins?
At first glance the question appears trivial: Margins are those parts on the right, left, top and
bottom which remain empty. But this is only half the story. Margins are not always empty. There
may be margin notes, for example (see
\marginpar
command in [
OPHS11
] or
section 3.21
).
One could also ask whether headers and footers belong to the upper and lower margins or to
the text. This can not be answered unambiguously. Of course an empty footer or header belongs
to the margins, since they can not be distinguished from the rest of the margin. A header or
footer that contains only a page number
1
will optically appear more like a margin. For the optical
appearance it is not important whether headers or footers are easily recognized as such during
reading. Of importance is only how a well-filled page appears when viewed out of focus. One could
use the glasses of one’s far-sighted grandparents, or, lacking those, adjust one’s vision to infinity
and look at the page with one eye only. Those wearing spectacles will find this much easier, of
course. If the footer contains not only the page number, but other material like a copyright notice,
it will optically appear more like a part of the text body. This needs to be taken into account when
calculating text layout.
For the header this is even more complicated. The header frequently contains running headings.
2
In the case of running headings with long chapter and section titles, the header lines will be very
long and appear to be part of the text body. This effect becomes even more significant when the
header contains not only the chapter or section title but also the page number. With material on
the right and left side, the header will no longer appear as an empty margin. It is more difficult if
the pagination is in the footer, and the length of the titles varies so that the header may appear
as a margin on one page and as text on another. However, these pages should not be treated
differently under any circumstances, as this would lead to vertically jumping headers. In this case
it is probably best to count the header as part of the text.
The decision is easy when text and header or footer are separated from the text body by a
line. This will give a “closed” appearance and header or footer become part of the text body.
Remember: It is irrelevant that the line improves the optical separation of text and header or
footer; only the appearance when viewed out of focus is important.
The typearea package cannot make the decision whether or not to count headers and footers
as part of the text body or the margin. Options headinclude and footinclude cause the
header or footer to be counted as part of the text. These options, being a simple switch
v3.00
,
understand the standard values for simple switches in
table 2.5
. One may use the options
without specifying a value, in which case the value true is used for the simple switch , i. e.,
1
Pagination refers to the indication of the page number.
2
Running headings refer to the repetition of a title in titling font, which is more often typeset in the page
header, less often in the page footer.
|