# How to enforce the text filled in flowchart follow single line space?

My document is in a doublespace environment using elsarticle template, that is the whole document is two double line space .

I searched the solutions, like setspace package. I used it as follows:

\usepackage{setspace}
\begin{singlespace}
my flowchart
\end{singlespace}


The result is that the flowchart and following content are all single line space. In order to keep the content following the flowchart double line space, I do it as follows:

\usepackage{setspace}
\begin{singlespace}
my flowchart
\end{singlespace}

\begin{doublespace}
following content
\end{doublespace}


But it did not work. The results is the same as previous one.

Can anyone help me out? Any suggestion will be greatly appreciated!

• can you post a small example so the we can see what you mean exactly? – percusse Jun 12 '13 at 6:08
• One can nest a singlespace environment inside a doublespace environment without problems. – Andrew Swann Jun 12 '13 at 6:12
• @ percusse I want to post a small example but many files consisit the elsarticle template. So it must upload the relative documents. – user22986 Jun 12 '13 at 6:33
• @Andrew Swann Can you leave a simple example? I am beginner in compiling tex. Thanks! – user22986 Jun 12 '13 at 6:34

You say that (a) you use elsarticle class and (b) that you enclosed the body of the text in a doublespace environment. I guess that you do not use \doublespacing in your preamble as the ruins layouts of titles. Anyway, you can get a single space region inside the double spaced body by simply using the singlespacing environment. In the code below the lipsum package and the \lipsum commands just produce some text for demonstration purposes:

\documentclass[preprint,12pt]{elsarticle}
\usepackage{amssymb}
\journal{Nuclear Physics B}
\usepackage{setspace}
\usepackage{lipsum}
\begin{document}

\begin{doublespace}
\lipsum[1]
\begin{singlespace}
\lipsum[2]
\end{singlespace}
\lipsum[3]
\end{doublespace}
\end{document}


Essentially the same output (slightly less widely doublespaced) is produced from:

\documentclass[authoryear,preprint,review,12pt]{elsarticle}

\usepackage{amssymb}
\journal{Nuclear Physics B}
\usepackage{setspace}
\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{singlespace}
\lipsum[2]
\end{singlespace}
\lipsum[3]
\end{document}


Internally elsarticle does not use setspace but defines a baselinestretch parameter \@blstr to be 1.5 in the review style.

• Actually, I used the \documentclass[authoryear,preprint,review,12pt]{elsarticle}, which automatically generates double linespace content without \begin{doublespace} and \end{doublespace}. Then I tried to single line space of the content in flowchart using my mentioned way. But it didn't work out. Thanks for your reply! – user22986 Jun 12 '13 at 6:56