Learn how to use LaTex to create technical documents, or any type of document, with these easy to follow instructions on setting up and creating high quality documentation.

Using Input or Include Commands

In a root file, referencing chapter file can be done using either the include or the input commands.

When referencing external chapters to include them in the output stream while generating a LaTeX document, you can use either \input or \include.

The following provided an explanation of the difference between using the \input{filename} and include{filename}.

Note: For more information about input and include and their differences, see this topic on tex.stackexchange.com: When should I use input vs. include

## Using the input Command

The command \input{filename} imports the commands from filename.tex into the target file. It’s equivalent to typing all the commands from filename.tex into the current file at the location of the \input line.

For example, the following list of chapters use the \input command to insert the files into the typesetting stream for output.

For most purposes, the \input command is sufficient. If you want more control over placement of content, then use the \include command.

## Using the include Command

The command include{filename} add a \clearpage before and after the insertion of the LaTex file into the typesetting stream. This results in the chapter starting on a new page.

Here is an example list of chapters which use the \include command to insert the files into the typesetting stream for output.

There is much more to these commands, so let Google be your guide.