What’s going on in my \include commands?

The original LaTeX provided the \include command to address the problem of long documents: with the relatively slow computers of the time, the companion \includeonly facility was a boon. With the vast increase in computer speed, \includeonly is less valuable (though it still has its place in some very large projects). Nevertheless, the facility is retained in current LaTeX, and causes some confusion to those who misunderstand it.

In order for \includeonly to work, \include makes a separate .aux file for each included file, and makes a ‘checkpoint’ of important parameters (such as page, figure, table and footnote numbers). As a direct result, it must clear the current page both before and after the \include command. (The requirement derives from the difficulties of observing page numbers.) What’s more, this mechanism doesn’t work if a \include command appears in a file that was \included itself: LaTeX diagnoses this as an error.

So, we can now answer the two commonest questions about \include:

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=include