Working with multi-file documents

A large LaTeX project may be best split into multiple files, each containing a well-defined section of the bigger work. This split makes it easier to manage the project.

The root file in a multi-file project is the one containing a document block of the following type,

What makes a .tex file a root file

Note this refers to LaTeX. A plain TeX root file will have a different, simpler markers in it (for instance a \bye command).

Subfiles are included into the root file using \input{...} or \include{...} commands.

A multi-file LaTeX document: root.tex

where files a.tex and b.tex will be placed in the same directory and contain text without a document block,

a.tex to be used with above example
Contents of a.tex
b.tex to be used with above example
Contents of b.tex

Together the three files root.tex, a.tex and b.tex will form a multi-file LaTeX project. Any large piece of work such as a thesis or a book may be better served by a multi-file project structure.