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 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>/ .pool, .fmt, .base or .mem: $TEXMF/web2cand for modern systems (distributed in 2005 or later, such as teTeX 3.0, using TDS v1.1 layouts):
.map: $TEXMF/fonts/map/<syntax>/<bundle>/ .enc: $TEXMF/fonts/enc/<syntax>/<bundle>/Where of course <package>, <font> and <supplier> depend upon what’s appropriate for the individual file. The <syntax> (for
.map
and .enc
files) is a categorisation based
on the way the files are written; typically, it’s the name of a
program such as dvips or pdftex.
“Straight” (La)TeX input can take other forms than the .sty
,
.cls
or .fd
listed above, too. Examples are
.sto
and .clo
for package and class options,
.cfg
for configuration information, and so on.
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