3

Like recommend in the KOMA-Script documentation on p 40, I want to set the spacing for all lists and my title page single spaced although I have onehalf spaced text. Now the second page of every list is single spaced too. This is correct. But the problem is the header and the footer. The lines and text of the first and the second page differs. How can I solve this problem? Here is a minimal example:

\documentclass[BCOR=10mm,DIV=11]
{scrreprt}
\usepackage{setspace}
\usepackage{blindtext}
\usepackage[
    automark,                               %% Kapitelangaben in Kopfzeile automatisch erstellen
    headsepline, 
    footsepline, 
    plainheadsepline, 
    plainfootsepline
]{scrlayer-scrpage}

\setkomafont{captionlabel}{\bfseries}           %% Label-Bildunterschrift fett
\setkomafont{pageheadfoot}{\small}          %% Kopfzeile klein
\setheadsepline{0.4pt}                          %% Kopf-Linie
\setfootsepline{0.4pt}                          %% Fuß-Linie

\pagestyle{scrheadings}
\ihead[]{}
\chead[]{}
\ohead[\headmark]{\headmark}

\ifoot[]{}
\cfoot[\pagemark]{\pagemark}
\ofoot[]{}

\AfterTOCHead{\singlespacing}
\onehalfspacing
\KOMAoptions{DIV=last}

\begin{document}

\begin{spacing}{1}
\title{Titel}
\author{1}
\end{spacing}

\begin{spacing}{1}
\maketitle
\end{spacing}

\tableofcontents

\chapter{Test}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test1}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test2}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test3}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext

\chapter{Test4}
\subsection{1}
\subsection{2}
\Blindtext
\end{document}
1

There are options to use hooks for the pagestyles. To ensure that all headers and footers are one half spaced insert

\KOMAoptions{onpsinit=\onehalfspacing}

after loading the scrlayer-scrpage package.

enter image description here

\documentclass[BCOR=10mm,DIV=11]{scrreprt}
\usepackage{setspace}
\usepackage{microtype}
\usepackage{blindtext}
\usepackage[
    automark,
    headsepline=.4pt,% but .4pt is the standard value
    footsepline=.4pt,% but .4pt is the standard value
    plainheadsepline, 
    plainfootsepline,
]{scrlayer-scrpage}

\KOMAoptions{onpsinit=\onehalfspacing}% header and footer one half spaced

\pagestyle{scrheadings}
\clearpairofpagestyles% to clear the header and footer 
\ohead[\headmark]{\headmark}
\cfoot[\pagemark]{\pagemark}

\setkomafont{captionlabel}{\bfseries}
\setkomafont{pageheadfoot}{\small}

\AfterTOCHead{\singlespacing}

\onehalfspacing
\KOMAoptions{DIV=last}

\begin{document}
\title{Titel}
\author{1}

\begin{spacing}{1}
\maketitle
\end{spacing}
\tableofcontents

\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\end{document}

Note that the commands \setheadsepline and \setfootsepline are depreciated. You can set this line widths as values of the options headsepline and footsepline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.