I am preparing a thesis including equations, figures, and tables. I have read up on combining LaTeX files, but my problem persists. I created the main file and imported preamble, chapterfiles, and bibliography into the main file. Chapter files having tables do not get processed without the required packages, but the declared packages are only in the preamble file and not in the chapter files. On the other hand, if I declare packages in the chapter files, the compiler gives error saying I cannot declare packages before \documentclass{}. But, I have to use only one \documentclass{} right? How to solve this problem? Please help me.
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
|
||||
|
In the main file you can insert subdocuments with You can also use In any case, the
It might be any part of the main document content, or the preamble, but not a standalone document as:
This is because However, you can skip this unnecessary code just loading the package This is a MWE of a main file:
|
|||
|
|
standalonedocumentclass for them. – marczellm Jan 9 at 12:02importdo you mean\import? You can import chapter files but you can not import the preamble documents (you could\inputthem, but it is more normal to put them explicitly in the main file) – David Carlisle Jan 9 at 12:13