I am trying to create a custom header including an image with a certain height. In an recent project, I have used the fancyhdr which worked pretty well. However, as the usage of fancyhdr together with KOMA classes is discouraged I would like to switch to scrlayer-scrpage.
Basically, it works but extra vertical space is added below the image. This looks strange and yields an overfull vbox warning. The following MWE demonstrates this behaviour:
\documentclass[twoside]{scrartcl}
%
\newlength{\theLogoHeight}
\setlength{\theLogoHeight}{10mm}
%
\usepackage[showframe]{geometry}
\newgeometry{top=3\theLogoHeight,
headheight=\theLogoHeight,
headsep=\theLogoHeight,
footskip=\theLogoHeight,
bottom=2\theLogoHeight,
inner=2\theLogoHeight,
outer=2\theLogoHeight
}
%
\RequirePackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\clearpairofpagestyles
\newpairofpagestyles{firstpage}{%
\chead{%
\rule{0.1cm}{\theLogoHeight}%
}%
}
%
\begin{document}
\thispagestyle{firstpage}
Test Text Test Text Test Text Test Text Test Text Test Text
\end{document}
What is the reason for this extra vertical space? And how can I get rid of it?


geometrypackage. – carlosvalderrama Jan 10 '20 at 14:50