Welcome to the UK List of
TeX Frequently Asked Questions
on the Web


The index of Frequently Asked Questions about TeX is searchable.

Please enter your keyword here:   then press here: ,    or:

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:

Go to previous question, or next question

Go to FAQ home.

URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=include

Comments, suggestions, or error reports? - see “how to improve the FAQ”.

This is FAQ version 3.27, released on 2013-06-07.