When I try to prevent widows/orphans by increasing \widowpenalty
and 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[icelandic]{babel}
\usepackage{lmodern}
%\usepackage[utf8]{inputenc} % if using utf8
\usepackage[T1]{fontenc}
\usepackage[parfill]{parskip}
\setlength{\parindent}{0.5cm}
\setlength{\parskip}{0pt}
\usepackage{microtype}
\usepackage{lipsum}
\frenchspacing
% To avoid headers and footers
% choose one of the below:
%\usepackage[defaultlines=2, all]{nowidow}
%\widowpenalty10000
%\clubpenalty10000
\widowpenalty300
\clubpenalty300
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\filright\normalfont\LARGE\bfseries}
{\icelandicordinal{chapter}~\MakeLowercase\chaptertitlename}
{20pt}
{\huge}
\usepackage{titleps}
\newpagestyle{myfancy}{
\sethead[\textsc{\chaptertitle}][][]
{}{}{\textsc{\thesection{} \sectiontitle{}}}
\setfoot[\usepage][][]
{}{}{\usepage}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Title}
\author{Author}
\date{}
\pagestyle{empty}
\begin{document}
\maketitle
\cleardoublepage
\pagestyle{myfancy}
\chapter*{Intro}
\sethead[\textsc{Intro}][][]
{}{}{\textsc{Intro}}
%\lipsum[4-57]
\lipsum[4-8]
\medskip
\lipsum[9-15]
\medskip
\lipsum[16-23]
\medskip
\lipsum[24-35]
\medskip
\lipsum[36-40]
\medskip
\lipsum[41-52]
\medskip
\lipsum[53-57]
\end{document}
textheight
andbaselineskip
were incompatible (textheight was not equal to a whole number og baselineskips + topskip). Adding theheightrounded
option togeometry
fixed this. An answer to the follow-up question (if an answer exists) is still appreciated.