7

I am using the documentclass book and seems to be getting this error message on every page, but nothing visibly broken. Below is my preamble:

\usepackage[a4paper,left=1.5in,right=1.5in,top=1in,bottom=1in]{geometry}
\usepackage{setspace} %for doublespacing
\usepackage{blindtext}
\usepackage{fancyhdr}
\setlength{\parindent}{4em} %spacing of beginning of a new paragraph
\setlength{\parskip}{1em}   %spacing between paragraphs
\doublespacing %double spacing
\renewcommand{\cleardoublepage}{\clearpage} %for the headings

Any thoughts?

  • Welcome to TeX.SX! Please provide the code of a small document illustrating the problem, starting with \documentclass and ending with \end{document}. The code above in itself does not lead to any problems. – gernot Oct 06 '16 at 12:56
  • why have you redefined \clearpage (it is unlikely to be the best way to do whatever is intended) – David Carlisle Oct 06 '16 at 13:12

2 Answers2

7

You have specified a page size and removed any stretch space between paragraphs, so if you have a page of text that has no display material there is no way for tex to fill the page unless the textheight is an exact multiple of baselineskip, plus the 1em for each paragraph separation.

Perhaps you want \raggedbottom to allow (every) page to be short, it is hard to tell just from teh fragments that you have shown.

David Carlisle
  • 757,742
  • Thank you kind soul on internet, it worked like charm. But what raggedbottom does? Will it change my page margins etc? I googled it but dont quite understand. – lizardfireman Oct 06 '16 at 13:04
  • 1
    @lin raggedbottom is like raggedright but for pages not for lines, it stops tex trying to make every page have the bottom line at the same place which is impossible the way you have specified the spacing, – David Carlisle Oct 06 '16 at 13:11
  • This helped me to fix that pesky warning that had been haunting me around for a while. However, is the result of the command a good practice in terms of style? – mrbolichi Mar 28 '17 at 13:09
  • @c4tich raggedbottom is fine for informal reports etc but most published books would have the equivalent of flushbottom, especially "two side" settings where you want the baselines on both pages of the spread to have aligned bottom lines. – David Carlisle Mar 28 '17 at 17:20
  • Not sure if I understood you. My document is a master thesis, so it's quite formal. Is it correct to use this command in my document? – mrbolichi Mar 28 '17 at 21:06
  • @c4tich there is no correct or not correct, it's like saying is it correct to use Times Roman. it is a style choice. – David Carlisle Mar 28 '17 at 21:10
4

You have to announce \doublespacing before geometry sets up the page dimensions; you also should add heightrounded and give a little flexibility to \parskip.

\documentclass{book}

\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{setspace} %for doublespacing

\doublespacing %double spacing
\geometry{
  a4paper,
  left=1.5in,
  right=1.5in,
  top=1in,
  bottom=1in,
  heightrounded,
}


\setlength{\parindent}{4em} %spacing of beginning of a new paragraph
\setlength{\parskip}{1em plus 0.1em}   %spacing between paragraphs
%\renewcommand{\cleardoublepage}{\clearpage} %for the headings

\usepackage{lipsum}

\begin{document}

\lipsum[1-30]

\end{document}

But do you really want a large parindent, a non zero parskip along with double spacing? The end result is horrible!

enter image description here

egreg
  • 1,121,712