# Change line spacing with setspace without changing space before chapter headings

I want to use onehalfspacing throughout my document except for the bibliography, the TOC and the list of figures and what so not. I could put all of these in groups and change the spacing within them, but doing so changes the space above their chapter headings. It looks bad when all the chapter headings are a certain distance from the top of the page except for the aforementioned parts of the document.

Is there any way to make setspace not change the spacing of the headings or is there any equivalent to \AfterTOCHead for the LOF, bibliography and so on?

MWE:

document.tex:

\documentclass{scrreprt}

\usepackage[onehalfspacing]{setspace}
\usepackage{biblatex}
\usepackage{blindtext}

\begin{document}
\tableofcontents
\blinddocument
\autocite{small}
\begingroup
\singlespacing
\printbibliography
\endgroup
\chapter*{appendix}
\blindtext
\end{document}

mybib.bib:

@article{small,
author = {Freely, I.P.},
title = {A small paper},
journal = {The journal of small papers},
year = 1997,
volume = {-1},
note = {to appear},
}

In this MWE, the TOC heading and the chapter heading are all on the same position and the bibliography heading is higher towards the top of the page.

• please add a small bib file to the question, not use an external link – David Carlisle Sep 6 '19 at 9:23
• Okay, I added a bib file to the MWE. – pomeloy Sep 6 '19 at 14:55

biblatex has a similar hook \AtBeginBibliography:

\documentclass{scrreprt}

\usepackage[onehalfspacing]{setspace}
\usepackage{biblatex}
\usepackage{blindtext}

\AtBeginBibliography{\singlespacing}