[OS X TeX] Where does TeX look for files?

Alain Schremmer schremmer.alain at gmail.com
Mon Apr 19 02:40:05 CEST 2010


On Apr 18, 2010, at 6:07 PM, André Bellaïche wrote:

> Is there a similar way to instruct TeX to look for sty files, font  
> files, etc. in a specified directory, not by changing the paths in  
> some Unix way, but by means of a macro from inside the tex file you  
> are typesetting?

Here is a way to keep your sty files *together* with the tex file you  
are typesetting

1) Get the SymbolicLinker.plugin
2) Place it in Library > Contextual Menu Items
3) Place "MyStyFile.sty" wherever you want, e.g. along with the tex  
file you are typesetting but not necessarily so.
4) Make a symbolic link by right clicking MyStyFile.sty and selecting  
"Make Symbolic Link" at the bottom of the Contextual Menu
5) Move the symbolic link in ~ / Library / texmf / tex / latex  with  
your other sty files
6) Remove the text " symlink" after "sty"
7) Place "\usepackage{MyStyFile}" in the preamble of the tex file you  
are typesetting

That's it.

In fact, if you have several sty files in the same place---I do  
because that's where I keep the preambles for various the parts of   
the magnum opus---you can put them all in a folder and just symlink  
the folder instead of all the individual sty files.

Regards
--schremmer


More information about the macostex-archives mailing list