I tried to use the instructions from this link to split my current master thesis into multiple .tex files using the subfiles package.
However, I am unable to compile more than a single file. I have reproduced a minimalist version of the code to highlight the issue.
%test_main.tex:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{expl3}
\usepackage{subfiles}
\begin{document}
\subfile{test1}
\subfile{test2}
\end{document}
%test1.tex
\documentclass[test_main.tex]{subfiles}
\begin{document}
This is the first document.
\end{document}
%test2.tex
\documentclass[test_main.tex]{subfiles}
\begin{document}
This is the second document.
\end{document}
All three documents (test_main.tex, test1.tex, test2.tex) are located in a single folder. I can compile text_main.tex without receiving a single error message or warning, however the resulting .pdf contains only "This is the first document.".
Does anybody have a clue of what is going on?
\subfile{test 1}? And what is the result of compilingtest2.texalone? – Hafid Boukhoulda Mar 04 '21 at 12:03So it only compiles the first subfile and ignore the second. Actually, it ignores everything past the first \subfile{...} command.
– Zigzagoon2 Mar 04 '21 at 15:00I am not exactly sure of my technical specs (as I set up my LaTeX environment quite a while ago), but I am working with TeXworks and MiKTeX.
– Zigzagoon2 Mar 05 '21 at 16:44test_main.loglocated in the same directory. – Hafid Boukhoulda Mar 05 '21 at 21:30