4

how would I go about manipulating the line spacing in the preamble? I am using the 'book' document class.

Thanks a lot.

13
  • 1
    What do you mean with "preamble"? Can you please add an example to your question tomake it clearer?
    – Mensch
    Jan 17, 2015 at 14:52
  • Hi and welcome, Package setspace is commonly used to change the line spacing of documents.
    – Johannes_B
    Jan 17, 2015 at 14:54
  • @Johannes_B Thanks for all the responses. Do I simply write \setspace{} anywhere in the preamble?
    – John Doe
    Jan 17, 2015 at 14:56
  • 1
    Depends on what you are trying to achieve, but usepackage{setspace} might be a good idea. and then \onehalfspacing. I really can't be more specific, as the question (currently) is very unclear.
    – Johannes_B
    Jan 17, 2015 at 15:06
  • 1
    The command in the setspace package is \setstretch{value}. But beware things are not as simple as one might think. For instance, ‘doublespacing’ does not mean \setstretch{2}, but a value which slightly varies with the font size, and is approximately 1.667
    – Bernard
    Jan 17, 2015 at 15:30

1 Answer 1

8

As described in the comments above, you may use setspace package for adjusting line spacing.

\documentclass{book}
\usepackage[math]{blindtext}
\usepackage{setspace}
%\singlespacing
\onehalfspacing
%\doublespacing
% or
%\setstretch{1.25}   %% change this number as you wish. 1.667 is double spacing.

\begin{document}
  \blinddocument
\end{document}

If you don't want to use packages

\documentclass{book}
\usepackage[math]{blindtext}
\def\baselinestretch{3}
\begin{document}
  \blinddocument
\end{document}

or

\documentclass{book}
\usepackage[math]{blindtext}
\setlength{\baselineskip}{3\baselineskip}
\begin{document}
  \blinddocument
\end{document}

If you want to complicate things further

\documentclass{book}
\usepackage[math]{blindtext}
\newcommand{\setlinespacing}[1]%
           {\setlength{\baselineskip}{#1 \baselineskip}}
\def\baselinestretch{1}
\begin{document}
  \setlinespacing{3}   %% this is not triple line spacing
  \blinddocument
\end{document}

Hope I have confused you enough with more complicated scenarios. Better use setspace package and live happy. :-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .