Your home TEXMF tree

Something useful that I thought I ought to bring to your notice. Some of you might be using BIBTEX, and wondering if there is a way of maintaining one copy of your ref.bib that is accessible from any directory, without needing to specify the path in the TeX file which references ref.bib. (Quite independent of where your ref.bib is, if you are using BIBTEX and are pained by the need to issue multiple commands for each compile, you should consider using latexmk or rubber.)

Enter your local TEXMF tree, where you can put these files. Your typesetting programs (tex, latex, pdflatex, xelatex, bibtex, …) always search in this directory (and subdirectories) for files that have been included in your source document. The simplest way to set this up is to create the directory ~/texmf (~/Library/texmf on Mac OS X), and various subdirectories under it. For instance, my ref.bib is in ~/Library/texmf/bibtex/bib.

It is also useful in other cases. For instance, I have one copy of llncs.cls, under ~/Library/texmf/tex/latex/classes-extra, and bussproofs.sty under ~/Library/texmf/tex/latex/styles-extra. A TEXMF tree has a predefined structure, but the leaves can be extended to your heart’s content. For instance, classes-extra and styles-extra are not necessary. All that is required is that extra .cls and .sty files are put in some subdirectory under ~/Library/texmf/tex/latex.

Happy(!?) LaTeXing!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s