setspace provides 4 commands intended for use in the preamble:
\singlespacing
\doublespacing
\onehalfspacing
\setstretch{<factor>}
Alternatively, the package options singlespacing
, onehalfspacing
or doublespacing
may be used in place of the first three. singlespacing
is default.
In addition, a further option nodisplayskipstretch
may be set to prevent extra spacing around display environments.
For use in the body of the document, the package provides 4 environments:
\begin{singlespace}...\end{singlespace}
\begin{singlespace*}...\end{singlespace*}
\begin{onehalfspace}...\end{onehalfspace}
\begin{doublespace}...\end{doublespace}
\begin{spacing}{<factor>}...\end{spacing}
Although the preamble commands will work in the document body, they are not designed for use there and will result in sub-optimal spacing in many cases. This is because the environments do more than simply switch the stretch using the \...ing
commands.
For example, here's the definition of singlespace
:
\newenvironment{singlespace}{% from setspace.sty
\vskip \baselineskip
\setstretch {\setspace@singlespace}%
\vskip -\baselineskip
}{%
\par
}
In contrast, here's the definition of \singlespacing
:
\newcommand{\singlespacing}{% from setspace.sty
\setstretch {\setspace@singlespace}% normally 1
\vskip \baselineskip % Correction for coming into singlespace
}
While \setstretch {\setspace@singlespace}
is the same in both definitions, the adjustments differ in other ways because the environment makes adjustments specifically required in the case of line spacing changes within a document.
The difference between singlespace
and singlespace*
is in the specific adjustments made. Here's singlespace*
:
\newenvironment{singlespace*}{% from setspace.sty
\setstretch {\setspace@singlespace}%
\vskip -\baselineskip
}{%
\vskip -0.5\baselineskip
}
As can be seen, the vertical spacing changes differ between the two environments and between both environments and \singlespacing
.
Similar differences exist for the other preamble command/corresponding environment pairs.
In general, therefore, it is best to use the environments intended for use within the body within the body. In some cases, the differences will not change the output because, for example, there's a page break at the start and end of the changed line-spacing anyway. But the differences will matter in other cases so it is best to use the environments as a routine within the document body unless there is some special reason to do otherwise.
\documentclass...
...
\usepackage{setspace}
\setstretch{1.8}
...
\begin{document}
...
\begin{singlespace}
<bibliography commands go here>
\end{singlespace}
...
\end{document}
\usepackage{setspace}\doublespacing
. – cfr Feb 21 '16 at 19:40\doublespacing
is equivalent to\setstretch
with a factor somewhere between 1.618 and 1.667. Since the OP appears to be interested in a factor of 1.8, I'd use\setstretch{1.8}
. – Mico Feb 21 '16 at 19:43\begin{singlespace}... \end{singlespace}
or you can say\singlespacing
to switch indefinitely, although the\...ing
versions are intended primarily for preamble use. – cfr Feb 21 '16 at 19:56setspace
uses a stretch factor somewhere between 1.618 and 1.667, MS Word, I believe, uses a stretch factor of 2.0 (yikes!). – Mico Feb 21 '16 at 20:04\setstretch{1.8}
in the preamble and then put\begin{singlespace}... \end{singlespace}
around the bibliography? Will that work? – cfr Feb 21 '16 at 20:43