LaTeX Search Path
I recently had need to put a .bst file in my LaTeX search path. This turned out to be difficult to search for. I found a lot of pages and style files telling users to put such and such file in their LaTeX search path. I began to wonder if I was the only LaTeX user on earth who had no idea what the LaTeX search path was.
With some effort I found that the global path’s root is usually something like /usr/share/texmf. I’m not interested in putting it in the global path though. We have home directories for a reason here.
Finally I found the answer, with some creative googling. The answer depends on your distribution/OS. Apparently on Debian it’s ~/.texmf-config (untested). The MacTeX distribution (which I have installed) looks in ~/Library/texmf. The macports build (don’t ask) looks in ~/texmf, which I learned only by trial and error. My guess is that latter answer is the answer if you build by yourself, and so might be a good initial guess no matter what the distribution.
So, I did this:
mkdir -p ~/Library/texmf/bibtex/bst
ln -s ~/Library/texmf ~/texmf
mv acm-annotated.bst ~/texmf/bibtex/bst
November 9th, 2007 at 11:30
Nice tip. Do you know if there is a way to add a directory to the LaTeX search path dynamically? I.e., inside a .tex file?
November 15th, 2007 at 04:38
Have you used the TEXINPUTS environment variable?
see http://myitcv.org.uk/latex/tips_and_tricks.html#answer9
I put all my figures in a the subdirectory figures of my project. So, I put the following in my .bashrc file:
This worked for me.
November 26th, 2007 at 13:23
Thank you Edwin, this saved me a lot of trouble :)