178

This is my code

\documentclass[12pt,a4paper]{book} 
\renewcommand{\baselinestretch}{1.5} 
\begin{document}
\include{Chapter1}
\end{document}

I have please a question:

I would change the line spacing (1.5 --> 1.0) of a page inside the document and not the entire document and the size of the words, how can I do please?

1
  • after using your code my chapters start being displayed on the left side (which is odd and wrong) - how can I make latex display them on the right (also known as the right) side again? I'm using the {book} class.
    – TheChymera
    Nov 14, 2013 at 19:19

3 Answers 3

160

You can use \setstretch{}. If you want to only affect a certain content you can use it with a group.

enter image description here

You can also apply any size changing switches such as \small or \tiny inside the {} group as well.

Code

\documentclass[12pt,a4paper]{book} 
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{setspace}

\renewcommand{\baselinestretch}{1.5} 

\begin{document}
\lipsum[1]
{\setstretch{1.0}\color{blue}
\lipsum[2]
}
\lipsum[3]
\end{document}
14
  • 13
    Just remember to end the paragraph before the final } (\lipsum adds a \par at its end). Using \linespread{1.5} (or some command of setspace) is better than redefining \baselinestretch.
    – egreg
    Nov 22, 2012 at 21:47
  • 1
    @Peter Thank you so much :) Please i have another question: i have used \documentclass[12pt,a4paper]{book} and i'd like to change the size 12 to 10 of one paragraph inside the document, Have you an idea please ?
    – researcher
    Dec 21, 2012 at 13:25
  • 2
    @researcher: You could try using the answers from LaTeX — specify font point size? and keep the change to be within a group (either inside a brace group {}, or within \begingroup, \endgroup pair. If that does not help you achieve the desired results you should post a separate question. Also, please note that you should use the full username with the @ syntax. I was only notified of this as it was a comment to an answer of mine. Dec 21, 2012 at 19:01
  • i set \fontsize{10} just before the text ?
    – researcher
    Dec 21, 2012 at 19:19
  • @researcher: fontsize has two parameters, not one. Dec 21, 2012 at 19:20
32

Alternatively, the following solution is a bit cleaner:

\documentclass[12pt,a4paper]{book} 
\usepackage{lipsum}
\usepackage{setspace}

\begin{document}

\onehalfspacing % Set line spacing to 1.5

\lipsum[1]

\singlespacing % Reset line spacing to 1 from here on
\lipsum[2]
\onehalfspacing % Reset line spacing to 1.5 from here on

\lipsum[3]
\end{document}

For other values, you can use e.g. \setstretch{1.125} instead of \singlespacing and \onehalfspacing.

The advantage of this method is that you don't need a closing statement, such as end{} or a curly bracket.

1
  • It looks like this also works (on Overleaf, at least) without adding the package setspace.
    – Adam_G
    Jan 7, 2022 at 21:23
27

Other values

Other line spacing values that lie in between onehalf, single and double can also be achieved with:

\usepackage{setspace}

\begin{spacing}{1.125}
…
\end{spacing}
1
  • Note that this solution increases the spacing of all lines, if you have e.g. 2 lines, both will have the spacing of 1.125
    – barfoos
    Sep 2, 2022 at 7:47

You must log in to answer this question.

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