TeXnik - Tips TeX and LaTeX


Welcome to the TeXnik website (under construction)

Input/Include
TUG logo

Main page

Index
UK FAQ
Documentation
Software
CTAN
Search CTAN:

Statistics

Google c.t.t.

Google d.c.t.t.

 


 


These two commands are very often used in a wrong way.
  1. 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.
  2. 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.

local time: Fri Apr 26 20:01:19 CEST 2024 ; file is: 1766.09092592593 days old
contact webmaster _at_ TeXnik.de