Horizontal values
The idea of KOMA-Script is:
If there are two pages side by side, then the white space at the left of the left page (even numbered) is the same as the white space at the right of the right page (odd numbered) and is the same as the white space between the text body of the left page and the text of the right page.
With DIV=12
, the outer margins get 2 units, the inner margins get 1 unit (because they sum up to 2 units from the even and odd page), the text width
gets 9 units:
unit width: 210mm / 12 = 17.5mm
outer margin: 2 * 17.5mm = 35mm
inner margin: 1 * 17.5mm = 17.5mm
text width: 9 * 17.5mm = 157.5mm
Thus the table values for the text width and inner margin are correct.
Text width
The value for \textwidth
is correct, the table says 157,50mm
and you get 157.49817mm
. (The English version should have replaced the comma by a period for the decimal separator.
Left margins
The left margin of an odd numbered page is an inner margin and should be 17.5mm:
25.4mm (TeX origin)
-7.89989mm (\oddsidemargin)
----------
17.50011mm
Correct (modulo rounding error)
The left margin of an even numbered page is an outer margin and should be 35mm:
25.4mm (TeX origin)
9.59988mm (\evensidemargin)
----------
34.99988mm
Correct (modulo rounding error)
Vertical values
DIV=12
means that the page height is divided into 12 units. The top margin is one unit, the bottom gets two units and the remaining 9 units go to the text height.
unit height: 297mm / 12 = 24.75mm
top margin: 1 * 24.75mm = 24.75mm
bottom margin: 2 * 24.75mm = 49.5mm
text height: 9 * 24.75mm = 222.75mm
Therefore the table values for the text height and the top margin are correct.
Top margin
Table value: 24,75mm
25.4mm (TeX origin)
-13.79442mm (\topmargin)
5.97475mm (\headheight)
7.1697mm (\headsep)
------------
24.75mm
Correct.
Text height
The table caption is not correctly translated, the German version also says, that \topskip
is not taken into account.
\@typearea
calculates the text height the following way:
RealTextHeight = topskip + n * baselineskip
with
n is a natural number
and
0 ≤ RealTextHeight - DivTextHeight < baselineskip
Thus the real text height depends on the value calculated via the div method, the setting of \topskip
(depends on font size) and \baselineskip
(also depends on font size).
Therefore the text height can be larger than the table value. The visual text height can even be larger, because the depth of the bottom box on the text area can descend up to \maxdepth
(= .5\topskip
with typearea
) below the text area.
The values for class option 11pt
(default):
\topskip: 11pt ≈ 3.86606mm
\baselineskip: 13.6pt ≈ 4.77985mm
\maxdepth: 5.5pt ≈ 1.93303mm
Then
\textheight = \topskip + 46 * \baselineskip
636.60028pt = 11pt + 46 * 13.6pt (modulo rounding error)
223.73679mm = 3.86606mm + 46 * 4.77985mm (modulo rounding error)
and
223.73679mm ≥ 222.75mm
223.73679mm < \topskip + 47 * \baselineskip
Therefore the text height is correct according to the algorithm used by \typearea
.
You are setting to much values and geometry warns you:
Package geometry Warning: Over-specification in `h'-direction.
`width' (430.0pt) is ignored.
Remove one of the inner/outer values and calculate the other from \oddsidemargin and bindingoffset:
\geometry{%
a4paper,
portrait,
textwidth=418.25555pt, % modifies \textwidth, the width of body
textheight=610pt, % modifies \textheight, the height of body
heightrounded,
inner=\dimexpr1in-12.5192pt-10mm\relax,
twoside,
bindingoffset=10mm,
headheight=17pt, % Alias: head
twoside,
}
Best Answer
If you do not set option
DIV
as class option packagetypearea
is loaded usingDIV=default
. That means: either there exists a default value (only for a4 paper and the fontsizes 10pt, 11pt or 12pt) orDIV=calc
is used automatically.Your example does not set
paper
,fontsize
orDIV
, so the defaultspaper=a4
,fontsize=11pt
,DIV=default
are used. This results in the preset valueDIV=10
.With
DIV=calc
packagetypearea
recalculates theDIV
value depending on the current font to get a recommended number of characters per line. In your example this isDIV=8
. You can find this value in the log file.If you do not want a change of
DIV
while the page layout is recalculated, do not useDIV=calc
. Replace it byDIV=current
(current value ofDIV
) orDIV=last
(last argument of optionDIV
- this could be a number or a symbolic value likedefault
).But if you change
BCOR
in the preamble the recalculation of the page layout is already done usingDIV=last
. In your example this would beDIV=default
resulting inDIV=10
. So there is no need to setDIV
again. See also DIV and BCOR setting in KOMA (best practices).Note that
\recalctypearea
recalculates the page layout using optionsBCOR=current
andDIV=last
.If the margins should be smaller set a larger
DIV
value i.e.DIV=12
.If you need special margins you could set KOMA-Script option
usegeometry
and load packagegeometry
to change the margins.