tds: More on subdirectory searching

 
 B.2 More on subdirectory searching
 ==================================
 
 Recursive subdirectory searching is the ability to specify a search not
 only of a specified directory `D', but recursively of all directories
 below `D'.
 
    Since the TDS specifies precise locations for most files, with no
 extra levels of subdirectories allowed, true recursive searching is not
 actually required for a TDS-compliant implementation. We do, however,
 strongly recommend recursive searching as the most user-friendly and
 natural approach to the problem, rather than convoluted methods to
 specify paths without recursion.
 
    This feature is already supported by many implementations of TeX and
 companion utilities, for example DECUS TeX for VMS, Dvips(k), emTeX
 (and its drivers), PubliC TeX, Web2C, Xdvi(k), and Y&YTeX.  The
 Kpathsea library is a reusable implementation of subdirectory searching
 for TeX, used in a number of the above programs.
 
    Even if your TeX implementation does not directly support
 subdirectory searching, you may find it useful to adopt the structure if
 you do not use many fonts or packages. For instance, if you only use
 Computer Modern and AMS fonts, it would be feasible to store them in
 the TDS layout and list the directories individually in configuration
 files or environment variables.
 
    The TWG recognizes that subdirectory searching places an extra
 burden on the system and may be the source of performance bottlenecks,
 particularly on slower machines.  Nevertheless, we feel that
 subdirectory searching is imperative for a well-organized TDS, for the
 reasons stated in Section ⇒Subdirectory searching.  Implementors
 are encouraged to provide enhancements to the basic principle of
 subdirectory searching to avoid performance problems, e.g., the use of
 a filename cache (this can be as simple as a recursive directory
 listing) that is consulted before disk searching begins.  If a match is
 found in the database, subdirectory searching is not required, and
 performance is thus independent of the number of subdirectories present
 on the system.
 
    Different implementations specify subdirectory searching differently.
 In the interest of typographic clarity, the examples here do not use the
 `REPLACEABLE' font.
 
    * Dvips: via a separate `TEXFONTS_SUBDIR' environment variable.
 
    * emTeX: `t:\subdir!!'; `t:\subdir!' for a single level of searching.
 
    * Kpathsea: `texmf/subdir//'
 
    * VMS: `texmf:[subdir...]'
 
    * Xdvi (patchlevel 20): `texmf/subdir/**'; `texmf/subdir/*' for a
      single level of searching.  Version 20.50 and above support the
      `//' notation.
 
    * Y&Y TeX: `t:/subdir//' or `t:\subdir\\'.