[Tex/LaTex] Use \singlespacing in scrheading and \onehalfspacing in the main document

header-footerkoma-scriptline-spacingscrpage2setspace

I'm writing an article using KOMA-script scrartcl class. The main text uses \onehalfspacing option from setspace package. In my article I have headings with couple lines of text set up using scrpage2 package. What I'm trying to achieve is to use \singlespacing only in headings.

Something like this:

\documentclass[fontsize=14pt,headlines=3,headinclude]{scrartcl}
\usepackage{xltxtra}
\setmainfont{CMU Serif}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{scrpage2}
\chead{Some really long text\\ that takes\\more than one line}
\pagestyle{scrheadings}

\begin{document}
\onehalfspacing
\lipsum
\end{document}

Result

I'd like that some really long text to have single spacing. Is it possible? Reading KOMA-script manual I didn't find anything suggesting about spacing in headings.

Best Answer

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}