# [OS X TeX] Per-folder project root

Alain Schremmer schremmer.alain at gmail.com
Mon Oct 12 21:57:43 EDT 2009

On Oct 12, 2009, at 10:52 AM, Chris Goedde wrote:

> Is there a way to set a project root folder for an entire folder? I
> usually organize my lecture notes with a single tex file
> (Notes.tex) that inputs separate files for each lecture. It's a
> pain to make a separate project root file for each day's tex file.
> It would be great if there were a way to tell TeXShop to typeset
> any tex file in that directory using the same project root file.

This is not what you want, but here is what I do in a similar situation:

--- All "content files" are in a folder called "Contents" and start with

%!TEX root = ../Controls/\jobname.tex

--- In a parallel folder called "Controls", the corresponding
"control files" are just copies of the following template:

\documentclass[11pt]{book}
\usepackage{xxxxxx}
\begin{document}
\include{../Contents/\jobname}
\end{document}

renamed with the name of the corresponding contents file.

--- And of course, in a separate, parallel folder, I have

\documentclass[11pt]{book}
\usepackage{xxxxxx}
\begin{document}
\include{../Contents/381}
\include{../Contents/382}
\include{../Contents/383}
\include{../Contents/384}
\end{document}

Best regards
--schremmer