# Header with \scrpage2 and \chead is too big

I'm currently working on a paper for which we have to use a header (relatively big) and I used the package \scrpage2 and \chead, but the header is now overlapping the main text.

It should look like this:

However, it currently looks like this:

Here is the code I'm using:

\documentclass[12pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{anysize}
\usepackage{caption} \captionsetup[table]{singlelinecheck=false}
\marginsize{25mm}{25mm}{25mm}{25mm}
\addtokomafont{captionlabel}{\bfseries}
\usepackage{textcomp}
\usepackage{cite}
\usepackage[onehalfspacing]{setspace}
\usepackage[small]{titlesec}
\usepackage[version=3]{mhchem}
\usepackage{tabularx, booktabs}
\usepackage{float}
\usepackage{pbox}
\usepackage{scrpage2}\pagestyle{scrheadings}
\chead{\includegraphics[width=1cm, height=1cm]{UHH} Universit{\"a}t Hamburg     Grundpraktikum in Physikalischer Chemie
Versuchsprotokoll  Versuchsdatum: 10.04.2015, Version  vom 14.04.2015
Assistent(in):  Gruppe: }

\begin{document}

hey, this is my example hey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my example

\end{document}


Can you help me fix this?

Denise

• try to add \headheight=2cm Apr 11, 2015 at 20:54
• \setlength{\headheight}{3\baselineskip}
– user31729
Apr 11, 2015 at 20:55

## 2 Answers

Different approach using the successor scrlayer-scrpage instead of the obsolete scrpage2.

Using headinclude we define, that the head is part of the typearea, which in this example might not even be true.Using headlines we can give some height value and don't have to manually set the headheight.

With onpsinit we give a command that is to be executed every time a page style is called, in this case we set the linespread to 1.

I defined the logo to be left of the bunch of text, it is to crowded there anyway.

\documentclass[12pt,demo,headlines=3,headinclude]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage[onehalfspacing]{setspace}
\usepackage{blindtext}
\usepackage{scrlayer-scrpage}
\KOMAoptions{onpsinit=\linespread{1}\selectfont}
\ihead{\includegraphics[width=2\baselineskip,height=2\baselineskip]{UHH}}
\chead{\parbox{.75\textwidth}{\centering Universit{\"a}t Hamburg     Grundpraktikum in Physikalischer
Chemie Versuchsprotokoll  Versuchsdatum: 10.04.2015, Version  vom
14.04.2015 Assistent(in):  Gruppe: }}

\begin{document}

\blindtext

\end{document}


You have some issues:

1. the interline space should be reduced in the heading;
2. the heading should be lifted up in the top margin.

The first issue is solved by saying \setstretch{1}; the second by setting the heading in a bottom aligned zero height box.

\documentclass[12pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{anysize}
\usepackage{caption}
\usepackage{textcomp}
\usepackage{cite}
\usepackage[onehalfspacing]{setspace}
\usepackage[small]{titlesec}
\usepackage[version=3]{mhchem}
\usepackage{tabularx, booktabs}
\usepackage{float}
\usepackage{pbox}
\usepackage{scrpage2}\pagestyle{scrheadings}

\captionsetup[table]{singlelinecheck=false}

\marginsize{25mm}{25mm}{25mm}{25mm}

\addtokomafont{captionlabel}{\bfseries}

\chead{\parbox[b][0pt]{\textwidth}{\setstretch{1}\centering
\includegraphics[width=1cm, height=1cm]{UHH}
Universit{\"a}t Hamburg Grundpraktikum in Physikalischer
Chemie Versuchsprotokoll
Versuchsdatum: 10.04.2015,
Version vom 14.04.2015 \\
Assistent(in):  Gruppe: }}
\setlength{\headheight}{1.1\baselineskip}

\begin{document}

hey, this is my example hey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my examplehey, this is my example

\end{document}


• I am now allowed to upvote yet, but that was very helpful - thank you! Apr 12, 2015 at 9:23