texblog

Quick note on line spacing

There are two different ways to change line spacing in LaTeX. One is simpler, the other requires a package, but is more flexible.

Let’s start easy.

The linespread-command:

To change the line spacing for the entire document, you can use the linespread command in your preamble:

\linespread{<factor>}

The factor is somewhat confusing. For double-spacing you have to use 1.6 and for one-and-a-half spacing 1.3. Not very intuitive, but I’m sure there is a reason for it.

The setspace-package:

Personally, I prefer the setspace package, which is more straight forward in usage, provides more flexibility and is easy to use as well:

\usepackage{setspace}
\singlespacing
\onehalfspacing
\doublespacing
\setstretch{<factor>} % for custom spacing

You can change spacing back and forth within your document using the commands above.
However, in order to stay on top of things, it’s usually better using an environment to change vertical spacing locally.

\begin{doublespace}
...
\end{doublespace}

or

\begin{spacing}{2.0}
...
\end{spacing}

Finally, the package provides improved vertical spacing on top and below of itemize and quote environments, for any other than single-space content:

\usepackage{setspace}
\doublespacing
...
\begin{singlespace*}
\begin{quote}
Quote
\end{quote}
\end{singlespace*}

And that’s the difference:

Default vertical spacing

Improved vertical spacing

The package is documented within the style-file

Exit mobile version