1

I am using miktex, texworks and pdflatex to compile my document, which is in multiple parts. When compiling the main file (which includes all of the other parts using \include{}) it works fine, however when compiling the child parts I hit the problem of them not being complete documents (they only have a section command and the contents of that section). This means I have to have the main file open in the background and keep alt-tabbing when I want to recompile the document. Is there a way to tell it that when I compile one of the child parts it should actually compile the main file?

Torbjørn T.
  • 206,688
LEGEND383
  • 369

1 Answers1

4

Thanks to @daleif's comment above I found the answer to be adding

% !Tex root = main.tex

to the top of the child files.

LEGEND383
  • 369