latextextexstudio

Merge multiple chapters into one thesis document


I am fairly new to Latex. I have written my thesis in Latex. I have 6 chapters and have made individual stand-alone files for each chapter. The main \thesis folder has a total pf 8 folders containing chapters 1 to 6, bibliography and acknowledgments, (\thesis\ChapterOne.. so on) for each chapter with all the necessary figures, tables, etc.

I tried to put the thesis together using main.tex

\documentclass[12pt,a4paper,oneside]{report}

\begin{document}
\input{\...\thesis\acknowledgements\cacknowledgements.tex}
\input{\...\thesis\ChapterOne\ChapterOne.tex}
\input{\...\thesis\ChapteroTwo\ChapteroTwo.tex}
.
.
\end{document}

I am not able to compile the file and get this error

Can be used only in preamble. \usepackage

How do I get around this? I also need help with adding the table of contents and list of figures and tables. Any help is greatly appreciated.


Solution

  • I managed to do something similar with the subfiles package and a conditional like the one used here: http://xpt.sourceforge.net/techdocs/language/latex/latex23-Conditioning/ar01s02.html.