Macros

The common current practice of lumping files into a small number of directories has the disadvantage of making it difficult to determine which input files are associated with which macro packages, and may result in version mismatches and other errors when a package is upgraded, especially if the names of some files change.

To help solve this maintenance problem, the TDS specifies that macros shall be stored in separate directories, one for each package:

texmf/tex/format/package/

format

is the name of the TeX format that uses these files. plain, amstex, texinfo, latex, and musictex are examples of format. By providing a format directory, path searching can be limited to only those directories that contain relevant files.

Although some of these formats can also be used as macro packages, the TDS nevertheless stores them as formats. By adjusting the TeX inputs search path, it is straightforward to use them as macro packages under another format, whereas placing them in the tree of another format would completely obscure their possible use as a format.

The following format names are reserved:

The plain directory is for files which are useful with the Plain TeX format and others compatible with Plain: testfont.tex, manmac.tex, webmac.tex, etc., as well as plain.tex itself and the canonical example story.tex. The generic directory, by contrast, contains files which can also be used with LaTeX and other formats as well as Plain: path.sty, texnames.sty, null.tex, etc.

Thus, for almost every format, it is correct to search at least the format directory, and then the generic directory (in that order). Other directories may be searched as well. For example, the amstex, plain, and generic directories should be searched when using AMS-TeX, because AMS-TeX is compatible with Plain. This does not mean only those directories must be searched: a recursive search beginning at texmf/tex is a correct path for TeX inputs in a TDS tree.

package

is the name of a package. amslatex and babel are examples of package.

The following package names are reserved:

In the case where a format consists of only a single file and has no auxiliary packages, that file can simply be placed in the format directory, instead of format/base. For example, Texinfo goes in texmf/tex/texinfo/texinfo.tex, not texmf/tex/texinfo/base/texinfo.tex.