LaTeX: set custom line spacing except for some document parts

dan picture dan · Jul 15, 2009 · Viewed 22.7k times · Source

I need to have a 1.5 line spacing within my document but without some parts like the TOC, title page etc.

When I use this command to set the line spacing to 1.5:

\renewcommand{\baselinestretch}{1.50}\normalsize

the documents line spacing is set to 1.5.

How can I exclude some parts of the document from that setting?

Thanks for your help!

Answer

Alex Basson picture Alex Basson · Jul 15, 2009

You don't have to put that line in the preamble. You can put it in the document body, just before the text that you need spaced differently, and all the text prior to the \renewcommand line will remain unaffected:

\begin{document}

% This text has the original line spacing.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sed ante nisi.
Nam accumsan, justo at hendrerit feugiat, urna diam elementum dolor, eu
consectetur nunc magna eu ipsum. Praesent consequat magna et lectus convallis
tempus. Nullam sed nunc augue. Vivamus a nisl vel risus condimentum posuere
aliquet ac sapien. Vestibulum ultrices sollicitudin blandit. Morbi nec augue
mauris. Praesent aliquam erat urna, condimentum semper nisi. Aenean a odio
elit. Fusce eu justo nec odio consectetur bibendum.

% This text will have 1.5 line spacing.
\renewcommand{\baselinestretch}{1.50}\normalsize

Ut vitae mauris neque, sed pellentesque urna. Mauris faucibus, augue eu
feugiat mollis, dui metus fermentum nibh, eget ultrices ipsum tortor
vehicula neque. Proin nec molestie nulla. Cras et odio in ante venenatis
tincidunt sit amet eget felis. Maecenas pretium magna vitae nibh hendrerit
nec lobortis sapien placerat. Proin diam lacus, vulputate ac commodo a,
convallis ut nunc. Sed sit amet ante purus. Integer porttitor molestie orci
ut adipiscing. Maecenas consequat turpis quis nunc fermentum cursus. Etiam
commodo justo eu nunc eleifend fringilla. Nam in neque augue, at feugiat metus.
Integer luctus risus et ipsum vulputate vulputate. Phasellus eget lectus dolor,
a pellentesque nunc. In hac habitasse platea dictumst. Duis est lorem, placerat
ut pharetra sed, sagittis at dui. Nam congue dui rhoncus urna mattis eget
vestibulum tortor feugiat. Nullam mauris sapien, sodales non rutrum imperdiet,
fermentum non nisl.

\end{document}