After lots of googling and hair-tearing, I'm turning grey and old, and no
wiser…
EDIT : see bottom for a half-cooked solution.
I switched from LaTeX plain classes (article
, report
, etc.) to Koma-Script.
And from fancyhdr
to scrpage2
/scrheadings
for headers and footers.
Problem is, I utterly fails to properly manage the footer position and height.
I banged my head on the same problem for the headers, and found the
headheight
option which solved this point. Not so for the footer.
Minimal example :
\documentclass[headheight=1.2cm,headsepline,footsepline,footbotline]{scrartcl}
\usepackage{scrpage2}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\pagestyle{scrheadings}
\setkomafont{pagehead}{\normalfont\sffamily}
\setkomafont{pagefoot}{\normalfont\sffamily}
\ihead{}
\chead{}
\ohead{
Line 1 \\ Line 2 \\ Line 3\\Line 4
}
\ifoot{}
\cfoot{\scriptsize%
Line 1 \\ Line 2 \\ Line 3\\Line 4
}
\ofoot{}
\begin{document}
\lipsum[10-20]
\end{document}
Cannot post an image, I'm too new here 🙁
It should be obvious (even if in real life I do not use the footsepline and
footbotline) that the footer height is not properly computed or taken into
account.
And it's placed far too high on the page (that's not visible in the image
above).
Any idea on how to solve those two problems?
EDIT :
After a lots of tries and reading, I found something that gets me closer to my target (while waiting for the next release of KomaScript, as said in comment 1). My documents now start with
\documentclass[headheight=1.2cm,headsepline]{scrartcl}
\usepackage[bottom=2cm,footskip=8mm]{geometry}
It's the bottom
abd footskip
parameters of geometry
package that are relevant. The footer is properly placed (not too high) and I have no overlapping between page text and footer.
Best Answer
Since version 3.12 KOMA-Script provides the options
footheight
– equivalent of theheadheight
option for the footerfootlines
– specify number of lines of the footer instead of the height (default is1.25
), equivalent of the optionheadlines
(provided since v3.00, default1.25
).If used in combination with the
scrpage2
successorscrlayer-scrpage
which knows aboutfootheight
the setup would beI used
footheight=38pt
becausefootlines
seems to assume the base font size which is too large since you're using\scriptsize
. I found38pt
by using a too small value and looking in the log file at the resulting warning which one is needed...BTW: I would specify
\scriptsize
in thepagefoot
KOMA-font instead of placing it in\cfoot
: