The setspace package source indicates:
Three commands,
\singlespacing
,\onehalfspacing
, and\doublespacing
, are for use in the preamble to set the overall spacing for the document. If a different spacing is required then the\setstretch{baselinestretch}
command can be used in the preamble to set the baselinestretch appropriately.
The implication seems to be that the commands are not meant to be used outside the preamble – but in practice, it appears to work.
This is useful, because in most situations one would want to keep normal spacing on \maketitle
and \tableofcontents
:
\documentclass{article}
\usepackage{mwe}
\usepackage{setspace}
\usepackage{hyperref}
\title{Test}
\begin{document}
\maketitle
\tableofcontents
\setstretch{1.5}
\blinddocument
\end{document}
Will using \setstretch
outside the preamble cause problems, as the documentation would suggest?