Here is the installed TeX & Metafont hierarchy (as of 31dec93) that
we have been working on.  Please send comments to mackay@cs.washington.edu,
unixtex@u.washington.edu, and kb@cs.umb.edu.
(Especially if you try to actually install TeX like this!)

First, pick a root directory for the library files:
TEXMFROOT = /usr/local/lib/texmf

(Or, in make variable terms: $(datadir)/texmf.)

All the files are installed relative to $TEXMFROOT.  Top-level directories:
bibtex		-- see below
fonts 		   for these
tex		   three
mf		-- utility MF sources
                   ({plain, expr, null, io, slant, modes, ...}.mf)
ini		-- .base, .fmt, .pool
dvips		-- only if you have a PostScript printer, naturally

In general, where possible, the same setup as ctan is clearly a win.

Under bibtex:
bib	(xampl.bib & some of Nelson's bib files)
bst	(at least standard and semi-standard)
doc	(btxbst.doc, btxdoc.*, btxhak.tex)

Under dvips, have the .pro/.ps/psfonts.map files.

Under tex, at least:
plain	({plain, manmac, null, plain, story, testfont, webmac}.tex,
	 perhaps also texinfo.tex, eplain.tex, other single-file sources)
latex	(with subdirectories base/ for M&S's files, and contrib/ for
	 other people's styles)
tugboat	(tugboat.cmn, tugboat.sty, etc.)
mft	(*.mft)

Also under tex/ would go many other things:
dvips	(rotate.tex, epsf.sty, etc.)
texdraw
musictex
...

Having a whole separate tree for the utility MF sources seems pointless,
since there are so few of them. Most .mf files go under fonts/.

Under fonts:
<source>/<typeface>/
  for <source> in public, adobe, ams, bitstream, urw, ...
  for public/<typeface> in cm, concrete, punk, ...
  for ams/<typeface> in euler, msym, ...
  for adobe/<typeface> in times, palatino, avantgarde, ...

Under .../<source>/<typeface>/
src/*.mf
tfm/*.tfm
vf/*.vf
afm/*.afm
pk/$MAKETEX_MODE (including pseudo-modes for gsrenderfont, pstopk, gsftopk)
type1/*.{pfa,pfb,gsf}
truetype/whatever

For example:
/usr/local/lib/texmf/fonts/public/cm/pk/cx/cmr10.300pk
/usr/local/lib/texmf/fonts/public/sauter/src/b-cmbx.mf
/usr/local/lib/texmf/fonts/adobe/utopia/type1/putr.pfa

All the names which can be matched by the paths you actually use need to
be unique. If you have two 300dpi devices, say `cx' and `qms', you can
set their PK paths for dvips in their printer-specific configuration
file. Conceivably you could instead make the default path include
`$MAKETEX_MODE' (kpathsea sets this as it runs), but I'm not quite sure
what all the ramifications of that are.


Here are default variable values that go with the above:

TEXMFROOT = /usr/local/lib/texmf

% Read all relevant configuration files along this path, not just the first.
TEXCONFIG = .:~:$TEXMFROOT

% Although it's pointless to search the adobe, bitstream, etc. directories
% for Metafont sources, we want at least ams/ and public/, and unknown others.
MFINPUTS  = .:$TEXMFROOT/mf:$TEXMFROOT/fonts//src//
TEXINPUTS = .:$TEXMFROOT/tex//

TEXFORMATS = .:$TEXMFROOT/ini
MFBASES    = .:$TEXMFROOT/ini
TEXPOOL = .:$TEXMFROOT/ini
MFPOOL  = .:$TEXMFROOT/ini

% Fonts for everyone.
TFMFONTS = .:$TEXMFROOT/fonts//tfm
VFFONTS = .:$TEXMFROOT/fonts//vf
PKFONTS = .:$TEXMFROOT/fonts//pk//

% .bib and .bst files.
BIBINPUTS = .:$TEXMFROOT/bibtex/bib
BSTINPUTS = .:$TEXMFROOT/bibtex/bst

% PostScript prologues and downloadable fonts.
PSHEADERS = .:$TEXMFROOT/dvips:$TEXMFROOT/fonts//type1

From mackay@cs.washington.edu Wed Dec 29 16:27:02 1993
Date: Wed, 29 Dec 1993 13:27:08 -0800
From: mackay@cs.washington.edu (Pierre MacKay)
Subject: Directory tree

# The write-black, bitmapped type1 and write-white choices at this site
set WB=cx
set WW=ricoh
set BM=ps-to-pk
#
# use the ${} variable form throughout---it saves grief.
#
set USRLOCAL=/usr2/local

set TEXMFRT=${USRLOCAL}/lib/texmf
setenv TEXROOT ${TEXMFRT}/tex
setenv TEXFONTS .:${TEXROOT}/fonts//
setenv TEXINPUTS .:${TEXROOT}/inputs//
setenv TEXFORMATS .:${TEXROOT}/formats
setenv TEXPOOL ${TEXFORMATS}

setenv MFROOT ${TEXMFRT}/mf
setenv MFINPUTS .:${MFROOT}/inputs:${TEXROOT}/fonts/public//src
setenv MFBASES ${MFROOT}/bases
setenv MFPOOL ${MFBASES}/bases

# The 00[TFM.VF,XDVI] directories are "accelerators" where links
# to files that are in extremely frequent use are placed.
#
# The 00PK directory is where MakeTeXPK stores its
# output.  It must therefore be in both XDVI and DVIPS paths.
# It can also be used as an "accelerator" directory for
# links to frequently used PK files.  But don't store write-white
# fonts there unless you are unlucky enough to have a write-white
# printer.
#
# XDVIFONTS takes write-white fonts from the ricoh set
# but since we don't have to worry about write-white printers
# any more, the ricoh directories contain only resolutions
# below 360 dpi.  Above that it doesn't really matter very much
# when all you are concerned with is screen preview.
# Don't leave out the ${BM} part of the XDVI path if type1
# fonts are in use.
# NOTE: Locally, if we decide to use MakeTeXPK at all with XDVI, 
# we will set it to produce fonts for the hardcopy printer only
setenv TFMFONTS .:${TEXROOT}/fonts/00TFM:${TEXROOT}/fonts//tfm
setenv VFFONTS .:${TEXROOT}/fonts/00VF:${TEXROOT}/fonts//vf
setenv XDVIFONTS .:${TEXROOT}/fonts/00XDVI:${TEXROOT}/fonts/00PK:${TEXROOT}/fonts//${WW}:${TEXROOT}/fonts//${BM}:${TEXROOT}//${WB}
setenv DVIPSFONTS .:${TEXROOT}/fonts/00PK:${TEXROOT}//${WB}
setenv PKFONTS $DVIPSFONTS
setenv TEXPKS $DVIPSFONTS

This sets up the common root "texmf" for both TEXROOT and MFROOT,
but puts both TEXROOT and MFROOT into the environment.  Saves
much typing.  

[TEX,MF]POOL really don't need a separate path, since it is
only in a run of ini[tex,mf] that they are ever likely to be
needed.  So TEXFORMATS and MFBASES is the obvious place.  

For BM I have changed from the specific "ps2pk" to a more general
"ps-to-pk" because I sometimes find that pfb2mf->METAFONT->pk works
better than ps2pk for a screen image.
