[Tex/LaTex] When using \widowpenalty and \clubpenalty, how can I prevent spacing increasing

widows-orphans

I use \widowpenalty and \clubpenalty to avoid widow and orphan lines. However, latex automatically increases the line spacing of my document. How do I prevent the increment of line spacing while using these two variables?

Best Answer

Changing \widowpenalty and \clubpenalty does not alter the line spacing as the following example shows:

\documentclass{article}
\usepackage{kantlipsum}
\begin{document}
\noindent
\begin{minipage}{.5\textwidth}
  \widowpenalty0
  \clubpenalty0
  \kant[1]
\end{minipage}%
\begin{minipage}{.5\textwidth}
  \widowpenalty10000
  \clubpenalty10000
  \kant[1]
\end{minipage}
\end{document}

line spacing comparison

However, because increasing these penalties makes it harder for LaTeX to find good page breaks, additional spacing must appear somewhere to fill out the pages. Depending on your settings, this might be at the bottom of pages, between sections or paragraphs etc. Basically, the space has to go somewhere in order to ensure that, for example, an additional line or so gets pushed past a page break when needed.

Without an example, it isn't possible to say precisely what is going on in your case or how you might alter it.

But note that the more restrictions you place on LaTeX, the worse the results will be in general so constraining typesetting to exclude widows and orphans will force LaTeX to make worse choices than it otherwise would regarding other aspects of the document, probably including uneven and excessive spacing in some cases.

Related Question