2

I have got a problem with an abstract. I created a PHD Thesis in Latex. I use thesis document style. I want abstract to be doublespaced. I put that code to obtained it:

{\doublespacing
 \newpage\ifpdf\pdfbookmark[1]{Acknowledgement}{label:ack}\fi\input{acknowledge.tex}
 \newpage\ifpdf\pdfbookmark[1]{Abstract}{label:abst}\fi     \input{abstract.tex}
}

Unfortunately, everything is doublespaced, except the end of the abstract (see picture): The interline attribute is changed in the end of the abstract

Does anybody has any suggestions? Regards.

3
  • 2
    Welcome to TeX.SE! I'm afraid that without more information about the contents of the file abstract.tex it's going to be impossible to diagnose with certainty what's going on. Real quick, though: What happens if you insert the instruction \par between \input{abstract.tex} and the closing } curly brace? Incidentally, do you use the setspace package, or is \doublespacing defined by you directly?
    – Mico
    Nov 9, 2013 at 9:31
  • I use setspace package. Your clues helped me. I just put \par between \input{abstract.tex} and now everything is ok :). Thank you for help.
    – user39748
    Nov 9, 2013 at 12:45
  • I think that with the doublespace environment (see my answer) it would work without you having to add \par to all your paragraphs.
    – nickie
    Nov 9, 2013 at 13:03

2 Answers 2

1

It's important to realize that the line spacing in effect for a given paragraph is determined by the settings that apply at the end of that paragraph, not by those at the paragraph's beginning.

Your code snippet doesn't indicate what comes immediately after the end of the group in which \doublespacing is in force. It also doesn't indicate what's at the end of the file abstract.tex -- specifically, whether there's either an implicit paragraph break (e.g., one or more all-blank lines) or an explicit paragraph break (e.g., \par). At any rate, it appears to be the case that there is currently no implicit or explicit paragraph break between the end of abstract.tex and the subsequent material; it would certainly explain why the final paragraph of the abstract is spaced differently from the preceding one.

There are several remedies, which all come down to providing that all-important paragraph break at the end of the abstract:

  • Insert a \par statement between \input{abstract.tex} and the group's closing right curly brace, or immediately after that right curly brace.

  • Insert one or more all-blank lines either immediately before or immediately after the right curly brace that terminates the scope of the \doublespacing command. (All-blank lines act like an implicit \par statement.)

  • Use the doublespacing environment -- also provided by the setspace package -- instead of the \doublespacing command. Upon entering this environment, LaTeX will execute the command \doublespacing for you. When exiting from this environment, LaTeX will execute the command \restore@spacing; that command, in turn, executes -- you guessed it -- \par.

1

Although I did not test it with the thesis package, I believe that the following could solve your problem. Compare the following two documents:

\documentclass[11pt]{article}
\usepackage{setspace}
\begin{document}
{\doublespacing                            % see here!
First paragraph, first line \newline
First paragraph, second line \newline
First paragraph, third line

Second paragraph, first line \newline
Second paragraph, second line \newline
Second paragraph, third line
}                                          % and here!
\end{document}

wrong

and

\documentclass[11pt]{article}
\usepackage{setspace}
\begin{document}
\begin{doublespace}                        % see here!
First paragraph, first line \newline
First paragraph, second line \newline
First paragraph, third line

Second paragraph, first line \newline
Second paragraph, second line \newline
Second paragraph, third line
\end{doublespace}                          % and here!
\end{document}

correct

Therefore, I think you should fix your code to:

\begin{doublespace}
 \newpage\ifpdf\pdfbookmark[1]{Acknowledgement}{label:ack}\fi\input{acknowledge.tex}
 \newpage\ifpdf\pdfbookmark[1]{Abstract}{label:abst}\fi     \input{abstract.tex}
\end{doublespace}

You must log in to answer this question.

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