# Overfull box and broken pagination

I'm working on a large document in Emacs (23.2.1) org-mode (7.8.06) which I export to LaTeX. At present, the outline/structure of the document has been created, but not any of the content. The LaTeX version (which consists of \section, \subsection, \subsubsection and items mainly) has broken pagination, a blank page and text that runs off the page.

I shortened the document by moving \end{document} around to try to find the problem. In some cases, the document rendered correctly. This seems to be related to too many "section"-type headings in LaTeX with no content.

\usepackage[english]{babel}
\usepackage{blindtext}


to my document and then inserted \blindtext "content" for most of the sections/subsections. The document now renders correctly.

The documentclass is article and the only package loaded is hypperref.

Are there any known issues with pdflatex/pdftex where a document contains only/mainly section headings and not much, if any, content? The only relevant error message pdflatex generated was:

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


I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).

An example can be found here. The only required package is hyperref.

-
You probably have a gigantic tabular that can't be split across pages: use longtable loading the package with the same name. –  egreg May 30 '12 at 10:11
No table or tabular in the document. –  SabreWolfy May 30 '12 at 10:14
A full example is necessary. Have you a minipage somewhere? –  egreg May 30 '12 at 10:18
I've added a link to an exmaple at the end of the question. –  SabreWolfy May 30 '12 at 10:31

A document that consists only of headings, e.g., \section, \subsection, etc. does not have any legal breakpoint. Thus you get a single huge page. Or more exactly you get a single empty page followed by another page containing all your headings because LaTeX has (for technical reasons) a legal breakpoint at the beginning of a document. This breakpoint is never being used as long as there is another breakpoint in the remainder of the first page.

LaTeX doesn't break between a section and the first line (or rather 2 lines) of a following paragraph, and if a heading is followed immediately by another heading a break between them is also disallowed to avoid having a heading at the bottom of a page.

So you need to get some breakpoints into it, either by putting some bits of text in or by putting \pagebreak[1] before some or all \section commands.

Once you fill your document with real text you can then remove them again.

-
Could the empty page be discarded at shipout time? What is the legal break? a whatsit? –  Bruno Le Floch Jun 18 '12 at 8:20
@Bruno the legal break is the mark mechanism initialization if I remember correctly. Discarding the empty page would be difficult as it is next to impossible to identify if this is an deliberately empty page or one that just "happened". It might be possible to suppress the legal break point, but as this is the only situation where it is taken, my position is that it is better left alone. –  Frank Mittelbach Jun 18 '12 at 8:25
Thank you for the explanation. –  Bruno Le Floch Jun 18 '12 at 8:27
Normally you don't want a page break directly after a \section title. So LaTeX inhibits it there. It can't know that you want them now and so you get overfull pages as LaTeX can't find a point to break the page. And an \mbox{} or some arbitrary text after some of the heading commands.