[OS X TeX] Re: TeXShop Feature Request

Herbert Schulz herbs at wideopenwest.com
Mon Mar 9 16:19:53 EDT 2009

On Mar 9, 2009, at 2:58 PM, Cameron Bracken wrote:

>> Howdy,
> Another way of ``solving'' the problem of having .texshop files  
> around is to
>> include the line
> %%!TEX root = path/to/the/root.tex
> in each of the included files. This tell TeXShop to open (an  
> minimize) the
>> root file and compile root.tex.
> Thanks, I wasn't aware of this.  Is there a reference for all of the  
> ``
> %%!TEX'' options.  The only other one I know if is TS-program.
> -Cameron


I know of a few:

%%!TEX TS-program = xxxxxxx

to tell TeX to execute the xxxxxxx engine (latex, pdflatex, xelatex,  
pdftex, xetex, etc.) when you press the Typset->Typeset (Cmd-T). I use  
this in my template so that I don't have to think about which engine  
to use for a particular file (e.g., did I include a jpg or eps image  
or do I need special processing using a custom engine?).

%%!TEX encoding = yyyy

if I need a special encoding because I want to embed some non-ascii  
characters directly in my file. You can get a list of encodings  
understood by TeXShop by looking at Help->TeXShop Help Panel and  
search for `encoding'. The Add Additional Typesetting Engines choice  
has the list (weird as it may seem). I've only used UTF-8 Unicode  
(especially for xelatex), MacOSRoman (for some local documents that  
only go out as pdf files) and IsoLatin (Latin 1, which is used heavily  
on Windows and *nix systems).

%%!TEX root = rootfile.tex

as you've seen already.

%%: tagname

to add a tag to TeXShop's Tags drop down list in the source window.

There may be more but I don't use them so even if I ever knew about  
them I've forgotten (I am getting on in age :-)).

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

More information about the MacOSX-TeX mailing list