[OS X TeX] Where does TeX look for files?
Herbert Schulz
herbs at wideopenwest.com
Mon Apr 19 08:37:48 EDT 2010
On Apr 19, 2010, at 2:46 AM, André Bellaïche wrote:
>
> Le 19 avr. 2010 à 00:50, Herbert Schulz a écrit :
>
>>
>> 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)
>>
>
> Thanks. In fact, I was looking for a way of keeping all the files needed for the making of a book: sty files and all font files. A kind of archive which be independent of the computer, of the system, of the distribution, of the user, etc.
>
> I have tried this for a book where the Math Time Pro fonts were used. I have put all the sty, tfm, pfb, fd, vf, map files in the same directory as the files of the book and transferred the whole directory to a PC equipped with MikTex, not forgetting to include the command \pdfmapfile{+mtpro2.map} in the main tex file. It worked without problems.
>
> The only drawback is that the directory of the book becomes a mess with hundred of files. And it is not possible to put everything in a subdirectory because TeX will not look into it. It wondered if it existed a command which would tell TeX to look into such and such subdirectory, similar to \graphicspath...
>
> André
Howdy,
The PATH that TeX, rather kpsewhich which is the common thread used by all the binaries, uses is defined in texmf.cnf which is found in /usr/local/texlive/2009/texmf/web2c/ (or .../2008/..., etc.) with changes for a particular system put into a texmf.cnf file in /usr/local/texlive/2009/ (or .../2008/, etc.). It is possible to edit the latter texmf.cnf (refer to the former for basic information) to customize things (you'll need to do that using sudo with TL from MacTeX) but be very careful since you could mess up the search PATH and not be able to find anything. Lots of danger signs here.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the MacOSX-TeX
mailing list