[Tex/LaTex] How to add an extra searchable dir with personal style files to TeXLive, NOT under ~/Library/texmf

macrostexlivetexmf

Migrated from Win-MiKTeX (WMTX) to MacOSX-Aquamacs with TeXLive (MXATL), I have my personal .sty/.cls files somewhere under my homedir. So I go with ShreevatsaR's comments from Aug. 5 on this site under 'where-do-i-place-my-own-sty-files-to-make-them-available' link text.

And in my case, the question remains, how to make the system MXATL aware of these files. Previously, WMTX, I could add a directory and then run something like texhash. Now I added the directory to all the relevant TeX File entries in Aquamacs-Wp-Tex-AUCTex-Tex File groups, restarted Aquamacs, even ran texhash in sudo mode, and placed an alias under ~/Library/texmf to no avail.

What did I do wrong? Or can I add this dir somehow to the dirs that texhash updates, as I cannot see it mentioned in the terminal output of texhash? Or do I just have to go with ~/Library/texmf :-(?

Thanks, Henk van Dorp

Best Answer

Reading through the TeX Live manual, the best way to achieve what you want seems to be to alter where TEXMFHOME points to. This is where TeX looks for your personal files, and has standard setting ~/Library/texmf, as you probably know!

At the Terminal, typing

sudo tlmgr conf texmf TEXMFHOME "~/texmf"

will alter the location to ~/texmf, which would be the normal setting on Unix systems other than a Mac. Note that this alters the setting system-wide, but I'm guessing that for most people this will be acceptable.

If you want to have more than one possible location (say retaining the standard setting and adding another one), then a colon is used to separate the list:

sudo tlmgr conf texmf TEXMFHOME "~/Library/texmf:~/texmf"

By the way, for recent releases of TeX Live you don't need to run texhash for your local tree. The database is only required for the 'big' installation tree, while the local tree will be scanned when TeX runs. The assumption is that the local tree will always be relatively small, so this is an acceptable performance hit.

Related Question