1

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?

1 Answer 1

1

If you are worried about a global change, mid document, you can always use an environment for a temporary change.

\documentclass{article}
\usepackage{mwe}
\usepackage{setspace}
\usepackage{hyperref}

\title{Test}
\setstretch{1.5}

\begin{document}
\begin{singlespace}
\maketitle

\tableofcontents
\end{singlespace}

\blinddocument

\end{document}

This would seem to provide the same result as the OP's MWE.

1
  • Thank you – I'm still curious to know if it's allowable to use the setspace commands outside the preamble, but that's certainly a good solution to this particular problem. Mar 18, 2019 at 20:08

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.