How to include TeX files in a stack?
Note the inclusion of the (relative) path as well as the filename of file2.tex. Note that file2.tex does not have its own preamble, document class, \\begin {document} etc.
How to include filename.tex in latex?
[&input&] {filename} imports the commands from filename.tex into the target file, it’s equivalent to typing all the commands from filename.tex right into the current file where the [&input&] line is.
Can you use \\ include inside a main file?
You can’t nest \\include files. You can’t use \\include inside a file which is read by \\include. This is by intention and is because to avoid issues with the .aux files. Otherwise three .aux files (main, parent \\include, child \\include) would be open at the same time which was deemed to complicated I guess.
Why does Tex not include files from parent directory?
Perhaps your TeX configuration does not allow to include files from the parent directory, using ../ will not work then. What distribution do you use? You could avoid that if you put the image and chapter directories below the directory of the root file.
How to insert inline code in a LaTeX document?
You can add inline code with { t code } or exttt { code }. If you want to format the inline code, then it would be best to make your own command breaklines isn’t required, but I find it useful. Be aware that you’ll have to specify \sepackage { listings } for this one.
When to use \\ include or \\ input in TeX LaTeX?
If you don’t want the page break, use \\input { }. The major reason you would want to use \\include rather than \\input is the \\includeonly command, which can save compilation time when writing your document. Thanks for contributing an answer to TeX – LaTeX Stack Exchange!
How to create a multi file LaTeX project?
You will also need to use the \\subfix command with the relative folder path when specifying \\graphicspath in introduction.tex : Then the actual contents is typed inside \\begin {document} and \\end {document}. Everything outside this environment will be ignored, or more specifically, will be considered as part of the preamble.