# Are \onehalfspacing and {spacing}{1.5} Supposed to Yield Different Results?

I am working on a document which requires for a very small portion of the text, that the spacing between the lines be increased. However, and I don't know why, the \begin{onehalfspacing} ... \end{onehalfspacing} does not work.

Thus, I sought out an alternative approach, and came up with \begin{spacing}{1.5} ... \end{spacing} which definitely increased the spacing between the lines in the document I am working on.

However, in trying to figure out why the first approach was not working, I discovered that the two approaches yield different results.

Consider the code,

\documentclass{book}
\usepackage{setspace}
\usepackage{lipsum}

\begin{document}
\thispagestyle{empty}

\begin{onehalfspacing}
\lipsum[3] \vspace{20pt}
\end{onehalfspacing}

\begin{spacing}{1.5}
\lipsum[3]
\end{spacing}
\end{document}


which produces the output:

Now, the way I am seeing it, the two results, which I thought should be the same, are different.

QUESTION: What is causing the discrepancy between the two outputs; and which of the two renders a more accurate output of one-and-a-half spacing? Finally, if \spacing{1.5} is not accurate, does anyone know the scaling factor I should use to make it as close to one-and-a-half spacing as possible---as this approach works in my document whereas \onehalfspacing (for some unbeknownst reason) does not.

Thank you.

The environment name is onehalfspace, not onehalfspacing AND, it is (for a 10pt document) equivalent to \begin{spacing}{1.25}.

\documentclass{book}
\usepackage{setspace}
\usepackage{lipsum}

\begin{document}
\thispagestyle{empty}

\begin{onehalfspace}
\lipsum[3] \vspace{20pt}
\end{onehalfspace}

\begin{spacing}{1.25}
\lipsum[3]
\end{spacing}
\end{document}


Here is the relevant code from the style file:

% one and a half spacing is 1.5 x pt size
\newenvironment{onehalfspace}{%
\begingroup
\onehalfspacing
}{%
\restore@spacing
}


where

\newcommand{\onehalfspacing}{%
\setstretch{1.25}%  default
\ifcase \@ptsize \relax % 10pt
\setstretch {1.25}%
\or % 11pt
\setstretch {1.213}%
\or % 12pt
\setstretch {1.241}%
\fi
}


and

\newenvironment{spacing}[1]{%
\par
\begingroup             % moved from \endspacing by PGBR 29-1-91
\setstretch {#1}%
}{%
\restore@spacing
}

• Thank you kindly for this informative answer. Feb 5 at 21:35

The command name convention is explained in the package comments eg

% one and a half spacing is 1.5 x pt size
\newenvironment{onehalfspace}{%


so note it is 150% of the nominal font size, not of the original baseline spacing.

\documentclass{article}

\usepackage{setspace}

\begin{document}

\begin{onehalfspace}
\showthe\baselineskip
\end{onehalfspace}
\end{document}


Produces

> 15.0pt.
l.8   \showthe\baselineskip


15 being 1.5 times 10pt which is the current font size.

• I was in the process of accepting the first as your answer arrived, so I was unable to weigh the two. But I am grateful for your help once again. Feb 5 at 21:38
• actually if I'd read Steven's in detail and noticed he'd posted that package fragment I'd have probably just left a comment but I'll leave it here now. @mlchristians Feb 5 at 21:40