When using the following for my main TeX file Graduation_report.tex
, in the main folder:
\documentclass[11pt,a4paper]{report}
\input{Preamble.tex}
\begin{document}
\subfile{Introduction/Introduction.tex}
\end{document}
and the following for my subfile Introduction.tex
(which is in the folder Introduction
)
\documentclass[../Graduation_report.tex]{subfiles}
\begin{document}
...
\end{document}
I get the error 'Preamble.tex not found
'. However, when I just paste my Preamble in the main file (Graduation_report.tex
), instead of using \input
, it works. Is there a solution to input my preamble in the main file? So that I can create my preamble in a separate TeX file and still run my subfiles separately with the same preamble.
Preamble.tex
in relation toGraduation_report.tex
?subfiles
with sub-directories isn't a good idea. You could extend environment variableTEXINPUTS
or modify\input@path
similar to packageimport
../Introduction/Introduction.tex
is not. Subfiles package causes./Introduction/Introduction.tex
to be compiled with./Graduation_report.tex
preamble, therefore the complier searches\input{Preamble.tex}
(you can omit.tex
) inside the folder./Introduction/
.