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,
\begin{document} ... \end{document}
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.
\documentclass[11pt]{article} \begin{document} abc \input{a.tex} abc \include{b.tex} \end{document}
where files a.tex
and b.tex
will be placed in the same directory and contain text without a document block,
Contents of a.tex
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.