TeX search paths

It is convenient to be able to add things to TeX (eg macros from specific publishers, revtex, Chinese/Japanese capability, etc) whilst neither modifying the RPM-installed TeX distribution, nor messing around with environment variables.

If your TeX system is properly configured, then you can add extra components (format files for journals, etc) in a 'texmf' directory tree in your home directory or in /usr/local/share/texmf. The file structure must mirror that of /usr/share/texmf, so that, for example, the directory containing revtex goes in ~/texmf/tex/latex, or /usr/local/share/texmf/tex/latex

Newer versions of the teTeX distribution do this automatically. Older versions may need tweaking. For tetex-2.x (Fedora Core 3 and earlier), edit /usr/share/texmf/web2c/texmf.cnf, and set

----
TEXMFLOCAL = /usr/local/share/texmf
HOMETEXMF = $HOME/texmf
TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN}
----

In tetex-3.x (Fedora Core 4 and later) the texmf.cnf layout has been changed, and the default works properly:

----
TEXMFLOCAL = /usr/local/share/texmf
TEXMFHOME = $HOME/texmf
TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
----

(note that these lines do not occur consecutively in the file).

The leading '!!' means always look in the ls-R database file, so every time you add some component to /usr/local/share/texmf you must remake the database with the command

> mktexlsr  # (same as "texhash")

Valid XHTML 1.0!