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

Herbert Schulz herbs at wideopenwest.com
Sun Apr 18 18:50:36 EDT 2010


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

> I have been told many times that tex looks for files in
> 
> - some special subdirectories in texlive/2008
> - some special subdirectories in texlive/texmf-local
> - your working directory, but NOT the subdirectories of the working directory
> 
> (suppose you are using TexLive 2008).
> 
> But I have also learn how to instruct TeX to look elsewhere in some cases:
> 
> - by using \graphicspath for graphic files
> - by using \pdfmapfile for supplementary map files
> 
> 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?
> 
> André Bellaïche
> Université Paris 7

Howdy,

Did you install TeX Live directly or via MacTeX? The TeX Live installed by MacTeX has one change from the default TeX Live installation: personal files are in a tree that starts at ~/Library/texmf/ rather than the default ~/texmf/ (I think). If the file isn't found there it looks in /usr/local/texlive/texmf-local/ and then in trees that start in /usr/local/texlive/2008/ (e.g., /usr/local/texlive/2009/texmf-dist/). I know that /usr/local/texlive/... is the root for MacTeX installed TeX Live and I think it is the default for plain TeX Live.

Finally, in any of the trees, sty, tex, fd, cls, clo, and many other package associated files are placed in [...]/tex/latex/ (or sub-directories of that directory) where [...] is the path for one of the tree roots, e.g., ~/Library/texmf for your personal tree. Bibliography (bib) files go into [...]/bibtex/bib/ (or sub-directories...) and bibliography style files (bst) go into [...]/bibtex/bst/ (or...). Font related files go into the proper sub-directory (e.g., tfm, afm, type1, map, etc.) of [...]/fonts/.

Hope that helps.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the MacOSX-TeX mailing list