10

I have a spacing issue while using the memoir class. The main problem is that after the first paragraph there is a line skip and an indentation and afterwards, all the paragraphs are indented properly and there is no line skip. Here is a MWE:

\documentclass[11pt,twoside,openright]{memoir}
\usepackage[size=pocket,trim,bleed]{createspace}
%\usepackage[paperwidth=4.25in, paperheight=6.875in,bindingoffset=.75in]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tgtermes}

\usepackage{mathpazo}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{lipsum}
%\usepackage{type1cm}
%\usepackage{lettrine}

%\checkandfixthelayout

% See the ``Memoir customise'' template for some common customisations
% Don't forget to read the Memoir manual: memman.pdf

%\title{TITLE OF BOOK}
%\author{NAME OF AUTHOR}
%\date{} % Delete this line to display the current date

%% BEGIN TITLE

\makeatletter
\def\maketitle{%
  \null
  \thispagestyle{empty}%
  \vfill
  \begin{center}\leavevmode
    \normalfont
    {\LARGE\raggedleft \@author\par}%
    \hrulefill\par
    {\huge\raggedright \@title\par}%
    \vskip 1cm
%    {\Large \@date\par}%
  \end{center}%
  \vfill
  \null
  \cleardoublepage
  }
\makeatother
\author{AUTHOR}
%\author{NAME OF AUTHOR}
\title{TITLE}
%\date{}










%%% BEGIN DOCUMENT

\begin{document}
\pdftitle{TITLE}
\pdfauthor{AUTHOR}
\pdfsubject{SUBJECT}
\chapterstyle{bianchi}

\let\cleardoublepage\clearpage


\maketitle






\frontmatter

\null\vfill

\begin{flushleft}

Copyright \copyright  
%\textit{TITLE}

All rights reserved.

ISBN: 

ISBN--13: 
\bigskip





\end{flushleft}
\let\cleardoublepage\clearpage
\clearpage
\tableofcontents

    \chapter{Introduction}
    \lipsum[1]

    \lipsum[2]

    \lipsum[3]

\mainmatter
\sloppy
%Input all of the chapter here


\backmatter


\end{document}

I also get an underfull \vbox which is something I do not know how to fix. Maybe the two are related?

EDIT:

I changed the document to fit createspace's guidelines but now the \vbox is back. I have attempted to use \vfil option but that is not working. What could be the issue?

\documentclass[11pt,twoside,openright]{memoir}
\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lipsum}

\geometry{
    paperheight=8.00in,
    top=.75in,
    bottom=.75in, 
    paperwidth=5.25in,
    inner=.38in,
    outer=.75in,
    bindingoffset=.75in,
}

\begin{document}
\chapterstyle{bianchi}

\tableofcontents*

\let\cleardoublepage\clearpage
\clearpage

\pagenumbering{roman}
    \chapter{Introduction Chapter}
    \vfil   
    \lipsum[1-10]

\mainmatter
\sloppy

%Input all of the chapter hermane
\pagenumbering{arabic}
    \chapter{Awesome chapter}
    \vfil
    \lipsum[1-20]   
\end{document}

UPDATE

I used \raggedbottom in the preamble as suggested before and that seems to have rid me of all of \vbox errors. I will look through the entire file and update again.

UPDATE 2

\raggedbottom fixed 99.99% of the issues except I get 1 overfull \vbox. The exact error is:

Overfull \vbox (13.59999pt too high) has occurred while \output is active []

1 Answer 1

15

The problem is that your settings and packages define a stretchable dimension for \parskip, i.e. a dimension which can increase or decrease (within some limits) in order of producing always a completely filled page (which is the \vbox).

TeX had troubles finding the point at which to end your first page. At some point, there was not enough space to put another line, but if he breaks the page at that point, there is not enough material to produce a completely filled page (i.e: the last line will not be aligned with the bottom). So it uses the stretchable space he can find in the page. Apparently the only stretchable space he found was \parskip. Even using that, the stretchabilty allowed by \parskip was not enough, so TeX had to stretch it beyond its limit (hence the Underful box message).

The "problem" has an easy solution:

  1. Set \parskip=0pt. This disables its stretchability and the distance between paragraphs will be always zero, so when TeX cannot fill the page completely, it will insert space at the bottom and complain about Underfill vbox.
  2. Put \raggedbottom in the preamble. This adds an infinitely stretchable space at the end of each page. This solution produces the same results than 2, but no Underfull messages will be produced, because that infinite glue will "absorb" all deficit.

Anyway, I suspect that the problem is that createspace style is trying to set all settings so that all pages have lines in a "grid", i.e. the baselines of all text are the same page after page. Probably first page breaks somehow the layout because of the title.

If I'm right, then you won't get more underfull boxes nor extra parskips in the remaining of the document, until the next chapter heading, which can break the layout again.

If this is the case, the better solution would be to insert stretchable space around the chapter heading. This way in those problematic pages TeX would choose that space to "absorb" the deficit, instead of choosing parskip. To do so:

\chapter{Introduction}
\vfil

For more information about stretchable glue you can read my answer to another question.

Update

I did some experiments, and I concluded that I guessed correctly the causes and best solution of the problem.

The cause is that createspace tries to typeset all pages on the same grid, by enforcing the alignment of the bottom line of each page. However, the first page is different because of the chapter title, which introduces an spacing which is not multiple of baselineskip, and causes problems of alignment.

The following screenshot shows how, in your original document, the baselines of the first and second page do not match:

Bad

Using \raggedbottom technique makes the gap between paragraph to disappear, but worsens the problem of the baseline matching, because now the bottom page is not uniform (and the middle lines still do not match correctly):

raggedbottom

Using \vfil after \chapter solves all the issues:

enter image description here

6
  • Thanks for the fantastic answer! However, I have one question. In the preamble, I should add \raggedbottom and then after the chapter heading, I should add \vfil right?
    – Jeel Shah
    Commented Mar 12, 2013 at 10:43
  • 1
    @gekkostate Updated answer, use only the \vfil trick and forget about \raggedbottom.
    – JLDiaz
    Commented Mar 12, 2013 at 10:56
  • After inserting the original text, the problem is back. With ipsum, it's working perfectly but with the new text it is not. It's evident that there is a problem with my text but what could it be? I have 1 \begin{quote} and that's it.
    – Jeel Shah
    Commented Mar 12, 2013 at 17:43
  • @gekkostate quote will introduce glue for example \setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@} in 10pt article class. Commented Mar 13, 2013 at 1:34
  • @JLDiaz I have updated the post because since I have changed the document to fit creatspace's guidelines but now the issue with the \vbox and annoying paragraph issue is back. Should I be using raggedbottom now?
    – Jeel Shah
    Commented Apr 11, 2013 at 16:03

You must log in to answer this question.

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