[OS X TeX] Per-folder project root
Herbert Schulz
herbs at wideopenwest.com
Mon Oct 12 21:11:21 CEST 2009
On Oct 12, 2009, at 1:16 PM, Chris Goedde wrote:
> On Oct 12, 2009, at 12:21 PM, Herbert Schulz wrote:
>> Howdy,
>>
>> I guess I don't really understand what you're trying to accomplish.
>> What do you mean by a ``project root folder''? It almost sound like
>> you have a particular file that contains definitions that are used
>> by the other files. If that is the case why not just make the file
>> containing the definitions generic (no documentclass, etc.) and
>> just \input it into the other files. A bit more sophisticated is to
>> create your own package, put it somewhere in ~/Library/texmf/tex/
>> latex/ (where ~ is you HOME directory) and then just \usepackage in
>> each file to include the definitions. That way each document is
>> completely separate.
>
> You should read about project root files in texshop help; they're
> something different.
>
> In regards to Themis' suggestion to use the %!TEX syntax, I'd
> forgotten about that. I guess I don't like to clutter up my files
> with front-end specific information. I'd rather do things through
> the front end itself (which is why I use the "Set Project Root" menu
> item). I'd just like to be able to set the project root for every
> file in a given folder with a single setting.
>
> Chris
Howdy,
The TeXShop model of a project is that there is a single file (e.g., a
book) that \include's (or \input's) other files (e.g., chapters). Each
of the ``chapters'' then has a line
% !TEX root = path/to/root.tex
where the `path/to/root.tex' is either an absolute or relative path
(e.g., ../root.tex if it's one directory up from the chapter file).
That way you can edit one of the chapters and the when you Typeset
TeXShop will compile the root file.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the macostex-archives
mailing list