Page LayoutOverfull \vbox warning despite \enlargethispage

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Klausiber
Posts: 16
Joined: Sun Apr 14, 2013 11:41 pm

Overfull \vbox warning despite \enlargethispage

Post by Klausiber »

Improving the overall layout of my thesis I learned about \looseness and \enlargethispage which helped me a lot in avoiding unwanted page breaks.

However, in one place where I use \enlargethispage LaTeX keeps showing the following message:
Overfull \vbox (0.94386pt too high) has occurred while \output is active
It does not matter how much I enlarge the page, the message stays the same unless I make the page large enough to contain text from the following paragraph/page. I chose the value .7\baselineskip because that is the smallest possible value that results in the page break at my preferred location.

Here's a MWE where I replaced almost all the text with equivalent \vspace:

Code: Select all

\documentclass[a4paper,BCOR=1.5cm,headsepline,DIV=12,final,english]{scrbook}

\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{cfr-lm}


\begin{document}
\chapter{Chap}
\section{Sec}
\subsection{Subsec}
Some text here until a new paragraph begins on the next page.
\clearpage
\vspace*{10\baselineskip}

\enlargethispage*{.7\baselineskip}
\subsubsection{Subsec}
\vspace*{17\baselineskip}

\paragraph{Para}
Paragraph begins.
\vspace*{12\baselineskip}

Just some filler text that represents the final lines that should go on this page. Please note, that these are not supposed to become a widow.


\paragraph{Para}
Some more text on the following page. This also should stay here and not become an orphan.

\end{document}
I know that <1pt isn't actually worth the effort (and that I can simply disable the warning), but now I'm really curious why this warning persists.


Addendum: In the meantime I did some further experiments and it seems that the warning is directly related to the \enlargethispage command. Even when I omit some lines (in my example simply by shrinking the inserted vspace) the warning still remains - unless part of the following paragraph fits on the page. It doesn't matter whether the unmodified (i.e. not enlarged) page can fit the content. Take this new example where I just the right amount of vspace so all the intended content fits on the page but LaTeX does not put the following paragraph at the bottom as well:

Code: Select all

\documentclass[a4paper,BCOR=1.5cm,headsepline,DIV=12,final,english]{scrbook}

\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{cfr-lm}


\begin{document}
\chapter{Chap}
\section{Sec}
\subsection{Subsec}
Some text here until a new paragraph begins on the next page.
\clearpage
\vspace*{10\baselineskip}

\enlargethispage*{.7\baselineskip}
\subsubsection{Subsec}
\vspace*{15\baselineskip}

\paragraph{Para}
Paragraph begins.
\vspace*{12\baselineskip}

Just some filler text that represents the final lines that should go on this page. Please note, that these are not supposed to become a widow.


\paragraph{Para}
Some more text on the following page. This also should stay here and not become an orphan.

\end{document}
With the \enlargethispage*{.7\baselineskip} line the warning occurs, without the line the warning is gone. Even more strangely, the wording of the warning changes to the following when I use the non-starred version of enlargethispage:
Underfull \vbox (badness 3333) has occurred while \output is active
According to the documentation the only difference should be that the starred version tries to "squeeze" the page contents - which is almost impossible in my example due to the vspace commands. Why is the vbox underfull without squeezing but overfull with squeezing. That makes no sense!?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply