When I try to prevent widows/orphans by increasing \widowpenaltyand clubpenalty, LaTeX usually decides to either make the page one line shorter (to prevent an orphan) or one line longer (to prevent a widow on the next page). How do I make LaTeX attempt to minimize widows/orphans, but without using this method? I have a vertical rubber length skip every few paragraphs and I was hoping LaTeX would use that instead.

Follow-up question: Making the page one line shorter or longer is permissible in a book if the facing page is shortened/lengthened by the same number of lines. Is there a way to let LaTeX make a page one line shorter or longer as long as the two facing page of a spread are always the same length?

Here's my MWE. Notice that on same pages there's a widow/orphan and the facing page has a different length. For example, on pages 8-9 we get two pages of unequal length for no apparent reason!

\documentclass[11pt, icelandic, leqno]{book}
\usepackage[textwidth=112mm,textheight=190mm, paperwidth=153mm, paperheight=230mm]{geometry}

%\usepackage[utf8]{inputenc} % if using utf8

% To avoid headers and footers
% choose one of the below:

%\usepackage[defaultlines=2, all]{nowidow}



    {}{}{\textsc{\thesection{} \sectiontitle{}}}





  • see for example tex.stackexchange.com/questions/248417/… Aug 9, 2015 at 20:15
  • I just found out that the textheight and baselineskip were incompatible (textheight was not equal to a whole number og baselineskips + topskip). Adding the heightrounded option to geometry fixed this. An answer to the follow-up question (if an answer exists) is still appreciated.
    – Peter
    Aug 10, 2015 at 15:19

1 Answer 1


I found out that the reason LaTeX didn't have consistent textheight (one \baselineskip less on one page, one \baselineskip more on another) was that the \textheight and \baselineskip set by

\usepackage[textwidth=112mm,textheight=190mm, paperwidth=153mm, paperheight=230mm]{geometry}

were incompatible. It is my understanding that if \textheight is not equal to n times \baselineskip plus \topskip for some integer n, then an underfull vbox is unavoidable in some cases, prompting LaTeX to break pages in weird places.

Thankfully, there's an easy fix. Just use the option heightrounded:

\usepackage[textwidth=112mm,textheight=190mm, paperwidth=153mm, paperheight=230mm heightrounded]{geometry}

It will round \textheight to a better value. You can also set it manually.

With this setting and moderate values of \widowpenalty and \clubpenalty (I'm using 500), you shouldn't run into this problem. If you want to prevent a widow or orphan by increasing/decreasing the text height on both pages of a spread, you can add \enlargethispage{\baselineskip} (or -\baselineskip) on both sides of the page break. I'm not aware of a better solution yet.

You must log in to answer this question.

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