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?
Asked
Active
Viewed 1,771 times
1
-
Texworks support socalled magic comments where you can specify what the master file is. Just Google "Texworks magic comments" – daleif Aug 21 '15 at 06:21
-
2http://www.texdev.net/2011/03/24/texworks-magic-comments/ – daleif Aug 21 '15 at 06:22
-
1Thanks @daleif, easy to find when you know what to google for ;) – LEGEND383 Aug 21 '15 at 06:31
-
Related: http://tex.stackexchange.com/q/78101/73 – Joseph Wright Aug 21 '15 at 06:54
1 Answers
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