Difference between \input{filename} and \input{filename} in the main tex file.
1 Answers
When working on big documents, you might want to split the input file into several parts. LaTeX has two commands that help you to do that.
\include{filename}
Use this command in the document body to insert the contents of another file named filename.tex.
Note that LATEX will start a new page before processing the material input from filename.tex. The second command can be used in the preamble. It allows you to instruct LATEX to only input some of the \included files.
\includeonly{filename,filename,…}
After this command is executed in the preamble of the document, only
\include commands for the filenames that are listed in the argument of the
\includeonly command will be executed.
The \include command starts typesetting the included text on a new
page. This is helpful when you use \includeonly, because the page breaks
will not move, even when some include files are omitted. Sometimes this
might not be desirable.
In this case, use the \input{filename} command. It simply includes the file specified. No flashy suits, no strings
attached.
- 1,475
