# Double spacing does not work

I cannot generate double spacing. I tried the following, but without success:

\documentclass[a4paper,12pt]{report}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew,latin1]{inputenc}

\usepackage{setspace}
\onehalfspacing

\begin{document}

AAAAAAAAAAAAAAAAAAAAAAAAAAA
\doublespacing
BBBBBBBBBBBBBBBBBBBBBBBBBBB

\end{document}


Can someone help me to get doublespacing between the two lines?

• \doublespacing needs to precede the text that is to be spaced out. – barbara beeton Apr 20 '14 at 15:31
• When I use your code, I get one line of A's and B's, but putting a blank line between the A's and the \doublespacing command seems to work. – cjohnson Apr 20 '14 at 15:31
• I have a large document, I tried placing \doublespacing above, between, with blank line as cjohnson suggested, but nothing works... – DatamineR Apr 20 '14 at 15:38

This may not be exactly what you want, but try putting a blank line before the \doublespacing command.

\documentclass[a4paper,12pt]{report}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew,latin1]{inputenc}

\usepackage{setspace}
\onehalfspacing

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed hendrerit
sagittis orci. Nulla bibendum sed dui non condimentum. Suspendisse
libero mi, iaculis at justo vel, tincidunt tristique mi. Vestibulum
tellus massa, sollicitudin in pulvinar vitae, adipiscing ornare sapien.
Donec porttitor eu diam vitae eleifend.

\doublespacing
\noindent Nullam id ullamcorper lacus,
eget pellentesque purus. Integer quis mattis sem. Mauris quis tincidunt
mi. Sed consectetur justo sed porta lacinia. In nunc felis, ornare a
arcu quis, porttitor sollicitudin nunc. Nam molestie, sem quis aliquam
adipiscing, nisl est pulvinar lacus, eget egestas nisi libero in turpis.
\end{document}


This produces the following.

• @Jubobs I thought the same but now I realise that it is an answer. It just is not very obviously one. cjohnson, can you show how your solution works by adapting the MWE from the question and including the full code? That will make it obvious that you are providing a solution and not just seconding the question. – cfr Apr 20 '14 at 16:00
• Sorry, I did not have the reputation to make comment at first. – cjohnson Apr 20 '14 at 20:58