|
These two commands are very often used in a wrong way.
- The command \input{file_name} inserts the file
as is! This means that the \input command is
replaced exactly with the contents of the file. Therefore this inserted file cannot be a complete
LaTeX file, because \input makes no difference between preamble and text. In fact of
these behaviour the \input command can be used in preambles, too. You can write the whole
preamble in a file like myText.pre and insert it in the preamble of your text with
\input{myText.pre} as the only command in your preamble.
Every single change in any of the included files makes a new compilation of all files possible.
Input-commands can be nested.
-
The command \include{file_name} makes sense when you want
to split your document in different parts, which can be handled as stand-alone-documents. Remember
that in this case all documents must have the same documentclass and the same preamble.
|