DeutschEnglish

Submenu

 - - - By CrazyStat - - -

27. March 2014

TeXworks: Compiling your main.tex from an included part

Filed under: Uncategorized — Tags: , — Christopher Kramer @ 18:31

In case you have split your LaTeX document (let’s say main.tex) into multiple parts (let’s say part01.tex, …) and use include or input to stick it back together, you cannot compile part01.tex because it misses all the header stuff. So you need to compile main.tex. But is there a way in TeXworks to compile it using the Play-Button or CTRL+T?

Yes, there is. Add this line at the top of part01.tex etc:

% !TEX root = main.tex

Then just compile your files normally. It will compile main.tex, show the main.pdf in the preview and you can even navigate nicely using the context menu from pdf to tex and back.

Recommendation

Try my Open Source PHP visitor analytics script CrazyStat.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment