It is known that KOMA-Script has more flexibility than standard classes. One example is the ability to use any font size (e.g., 11.5pt). One problem appears though, which is headers and footers placing. In the standard classes, page numbers, e.g., in the bottom are placed wisely but in KOMA it is too close to the paper edge.
The question is how to force KOMA use the same distance for footers, headers, rules and margins as standard classes. Here is a MWE:
\documentclass[12pt,a4paper]{article}
\usepackage[margin=2cm]{geometry}
\begin{document}
A test document
\end{document}
which outputs the footer correctly:
Whereas using KOMA-Script:
\documentclass[12pt,a4paper]{scrartcl}
\usepackage[margin=2cm]{geometry}
\begin{document}
A test document
\end{document}
outputs this (undesired) behavior:
Any idea? Thank you.
EDIT:
The strange behavior in headers also can be shown by this example:
\documentclass[12pt,a4paper,headsepline,twoside=false]{scrbook}
\usepackage[left=3.50cm, right=2.50cm, top=2.5cm, bottom=2.5cm]{geometry}
\usepackage{pagegrid}
\begin{document}
\mainmatter
\chapter{Test Chapter}
\noindent
Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines.
\newpage
\noindent
Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines. Some plain text just to fill paragraph lines.
\end{document}
Problems in the header are shown in the following image:
Best Answer
If you want the same
footskip
as used by the standard classarticle
then change it to30pt
:Explanation:
With a KOMA-Script class the
\footskip
is set to3.5\baselineskip
. The standard classesarticle
andreport
use30pt
as\footskip
while thebook
class uses.35in
with fontsize10pt
,.38in
with11pt
and30pt
with fontsize12pt
. If you change only the margins using packagegeometry
the\footskip
is not changed even if you use a standard class. See the following example:Result:
As you can see the page number can be also too close to the paper edge even if the standard class
article
is used. Hence the page number is not placed wisely by the standard class - its baseline is simple placed30pt
below the text body.So if you change the margins manually it is your task to manually adjust the
footskip
.If the baseline of the page number should be in the middle of the white space you can use
footskip=1cm
(= half of the bottom margin). Or choose something likefootskip=\dimexpr1cm+.7ex\relax
if the page number should be nearly centered in the white space at the bottom.Update/Addition (regarding the changed question and a comment)
Here is your second example using the packages
showframe
andlayout
:Result:
As you can see the text body starts 2.5cm below of the paper edge. Note that the KOMA option
headsepline
sets the KOMAoptionheadinclude
for the KOMA packagetypearea
. But you change your layout usinggeometry
. So you have to tell this package that the header should be included. If you uncomment its optionincludehead
in the example you getNow the top of the header is 2.5cm below of the paper edge.
The command
\layout
from the packagelayout
shows us the exact valuesThe top of the header is
1inch+\voffset+\topmargin
below of the paper edge. Note that\voffset
is normally0pt
. With optionincludehead
this results in your 2.5cm (set bygeometry
).The text body starts
1inch+\voffset+\topmargin+\headheight+\headskip
below of the paper edge. Without optionincludehead
this results in 2.5cm (set bygeometry
).Using
geometry
you can controll:includehead
) or the distance to the top of the header by thegeometry
optiontop
geometry
optionheadheight
geometry
optionheadsep
See the documentation of
geometry
for more Information.