27

My problem is that I want to have different .tex files for the preamble, the presentation aroundings (my target is a beamer PDF file) and the content of the presentation.

Mostly I'll be working on the content file. I even think about partitioning this content .tex file into several chapter files for a better overview. My problem with this solution is that I have to open the presentation.tex file to typeset the whole beamer PDF for looking at the results of my previous changes on the content files. (My presentation.tex file includes the preamble and the content.)

Is there any way to get TeXShop to always typeset one particular file (my presentation.tex) although I'm currently working on a different one (e.g. the content.tex)?

A shortcut? A command in the .tex file? An option in TeXShop? Anything?

34

TeXshop, like TeXworks, allows you to define some stuff by special comments at the beginning of a file. To define a master file, add

% !TEX root = path/to/root.tex

to the beginning of your file. This will cause root.tex to be compiled instead of the current file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.