Use \singlespacing in scrheading and \onehalfspacing in the main document
First, prepend \setstretch{1}
to the argument of \chead
. (Don't use \singlespacing
because that would add extra space at the start.) Second, because a singlespaced line's height is 0.8 times the height of a onehalfspaced line, change headlines=3
to headlines=2.4
.
\documentclass[fontsize=14pt,headlines=2.4,headinclude]{scrartcl}
\usepackage[onehalfspacing]{setspace}
\usepackage{lipsum}
\usepackage{scrpage2}
\chead{\setstretch{1}Some really long text\\ that takes\\more than one line}
\pagestyle{scrheadings}
\begin{document}
\lipsum
\end{document}
I'd use a \parbox
; but since scrpage2
already uses a \parbox
itself for placing the header, the final result will be almost unpredictable, unless we do the trick of hiding the height of the box
\documentclass[fontsize=14pt,headlines=3,headinclude]{scrartcl}
\usepackage[pass,showframe]{geometry} % just to draw frames
\usepackage{fontspec}
\setmainfont{CMU Serif}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{scrpage2}
\chead{%
\parbox[b][0pt]{\textwidth}{
\singlespacing\centering
Some really long text\\
that takes\\
more than one line\vspace{-\dp\strutbox}
}%
}
\pagestyle{scrheadings}
\begin{document}
\onehalfspacing
\lipsum
\end{document}
The final \vspace
is meant to push the bottom line in the “really correct” position (a couple of points, actually).
Since 2013 scrpage2
is obsolete. Since version 3.24 the official successor scrlayer-scrpage
has an option singlespacing
to set the page head and footer in singlespacing:
\documentclass[fontsize=14pt,headlines=3,headinclude]{scrartcl}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage[singlespacing]{scrlayer-scrpage}
\chead{Some really long text\\ that takes\\more than one line}
\pagestyle{scrheadings}
\begin{document}
\onehalfspacing
\lipsum
\end{document}
results in: