UK TeX FAQ -- question label wherefiles

### Where to put new files

Where precisely you put files that you have downloaded does depend on what TeX distribution you have. However, assuming that you have one of the modern TDS-compliant distributions (such as teTeX, fpTeX or mikTeX) there are some general rules that you can follow:

(1) Always install new files in a local texmf tree. The root directory will be named something like:

     teTeX:          /usr/share/texmf-local/ or
                     /usr/local/share/texmf/
     fpTeX:          c:\Programs\TeXLive\texmf-local\
     mikTeX:         c:\localtexmf\

(In fact, a teTeX system can be asked to tell you what its local root is; on a Unix system, the command to use is:

>     kpsewhich -expand-var \$TEXMFLOCAL

the output being the actual path.)

Let's write `$TEXMF` for this root, whatever it is for your system.

(2) In your local texmf tree, imitate the directory structure in your main tree. Here are some examples of where files of given extensions should go:

    .sty, .cls or .fd: $TEXMF/tex/latex/<package>/
    .dvi, .ps or .pdf: $TEXMF/doc/latex/<package>/
    .mf:   $TEXMF/fonts/source/<supplier>/<font>/
    .tfm:  $TEXMF/fonts/tfm/<supplier>/<font>/
    .vf:   $TEXMF/fonts/vf/<supplier>/<font>/
    .afm:  $TEXMF/fonts/afm/<supplier>/<font>/
    .pfb:  $TEXMF/fonts/type1/<supplier>/<font>/
    .ttf:  $TEXMF/fonts/truetype/<supplier>/<font>/

Where of course <package>, <font> and <supplier> depend upon what's appropriate for the individual file.

Note that <font> may stand for a single font or an entire family: for example, files for all of Knuth's Computer Modern fonts are to be found in `.../public/cm`, with various prefixes as appropriate.

The font "supplier" public is a sort of hold-all for "free fonts produced for use with (La)TeX": as well as Knuth's fonts, public's directory holds fonts designed by others (originally, but no longer exclusively, in Metafont).

Some packages have configuration files (commonly with file suffix `.cfg`), and occasionally other run-time files. The package documentation should mention these things, but sometimes doesn't. A common exception is the `.drv` file, used by some packages as part of the documentation building process; this is a hang-over from the pre-LaTeX2e predecessor of the package documentation process.

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wherefiles