Subdirectory searching

Many TEX installations store large numbers of related files in single directories, for example, all |TFM| files andor all TEX input files.

This monolithic arrangement hinders maintenance of a TEX system: it is difficult to determine what files are used by what packages, what files need to be updated when a new version is installed, or what files should be deleted if a package is removed. It is also a source of error if two or more packages happen to have input files with the same name.

Therefore, the TWG felt each package should be in a separate directory. But we recognized that explicitly listing all directories to be searched would be unbearable. There are dozens of packages a site may wish to install. Aside from anything else, listing that many directories would lead to paths many thousands of characters long, overflowing the available space on some systems.

Also, if all directories are explicitly listed, installing or removing a new package would mean changing a path as well as installing or removing the actual files. This would be a time-consuming and error-prone operation, even with implementations that provide some way to specify the directories to search at runtime. On systems without runtime configuration, it would require recompiling software, an intolerable burden.

As a result, the TWG concluded that a comprehensive TDS required that implementations of TEX must support some form of implicit subdirectory searching. More precisely, implementations must make it possible to specify that TEX, METAFONT, and their companion utilities search in both a specified directory and recursively through all subdirectories of that directory when looking for an input file. (Other forms of subdirectory searching, for example recursive-to-one-level searches, may also be provided.) We encourage implementors to provide subdirectory searching (at the option of the installer and user) for all paths.

The TDS does not specify a syntax for specifying recursive searching, but we encourage implementors to provide interoperability (see Section B.2).