The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

A Directory Structure for TeX Files


Next: , Up: (dir)

A Directory Structure for TeX Files

Copyright © 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2004 TeX Users Group.

Permission to use, copy, and distribute this document without modification for any purpose and without fee is hereby granted, provided that this notice appears in all copies. It is provided “as is” without expressed or implied warranty.

Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the modifications are clearly marked and the document is not represented as the official one.

This document is available on any CTAN host (see Appendix Related references). Please send questions or suggestions by email to tds@tug.org. We welcome all comments. This is version 1.1.

--- The Detailed Node Listing ---

Introduction

General

Top-level directories

Macros

Fonts

Summary

Unspecified pieces

Implementation issues

Example implementation-specific trees

Is there a better way?

Font structure


Next: , Previous: Top, Up: Top

1 Introduction

TeX is a powerful, flexible typesetting system used by many people around the world. It is extremely portable and runs on virtually all operating systems. One unfortunate side effect of TeX's flexibility, however, is that there has been no single “right” way to install it. This has resulted in many sites having different installed arrangements.

The primary purpose of this document is to describe a standard TeX Directory Structure (TDS): a directory hierarchy for macros, fonts, and the other implementation-independent TeX system files. As a matter of practicality, this document also suggests ways to incorporate the rest of the TeX files into a single structure. The TDS has been designed to work on all modern systems. In particular, the Technical Working Group (TWG) believes it is usable under MacOS, MS-DOS, OS/2, Unix, VMS, and Windows NT. We hope that administrators and developers of both free and commercial TeX implementations will adopt this standard.

This document is intended both for the TeX system administrator at a site and for people preparing TeX distributions—everything from a complete runnable system to a single macro or style file. It may also help TeX users find their way around systems organized this way. It is not a tutorial: we necessarily assume knowledge of the many parts of a working TeX system. If you are unfamiliar with any of the programs or file formats we refer to, consult the references in Appendix Related references.


Next: , Up: Introduction

1.1 History

Version 1.0 of the TDS was released in February 2003.

Version 1.1 was released in June 2004, with the following non-editorial changes:


Next: , Previous: History, Up: Introduction

1.2 The role of the TDS

The role of the TDS is to stabilize the organization of TeX-related software packages that are installed and in use, possibly on multiple platforms simultaneously.

At first glance, it may seem that the Comprehensive TeX Archive Network (CTAN) fulfills at least part of this role, but this is not the case. The role of CTAN is to simplify archiving and distribution, not installation and use.

In fact, the roles of the TDS and CTAN are frequently in conflict, as we will see. For distribution, many different types of files must be combined into a single unit; for use, it is traditional to segregate files (even similar files) from a single package into separate, occasionally distant, directories.


Previous: The role of the TDS, Up: Introduction

1.3 Conventions

In this document, / is used to separate filename components; for example, texmf/fonts. This is the Unix convention but the ideas are in no way Unix-specific.

In this document, “TeX” generally means the TeX system, including Metafont, DVI drivers, utilities, etc., not just the TeX program itself.

The word “package” in this document has its usual meaning: a set of related files distributed, installed, and maintained as a unit. This is not a LaTeX2e package, which is a style file supplementing a document class.

We use the following typographic conventions:


Next: , Previous: Introduction, Up: Top

2 General

This section describes common properties throughout the TDS tree.


Next: , Up: General

2.1 Subdirectory searching

Older TeX installations store large numbers of related files in single directories, for example, all TFM files and/or 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. A site may wish to install dozens of packages. Aside from anything else, listing that many directories would produce search 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 requires implementations to 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 More on subdirectory searching).


Next: , Previous: Subdirectory searching, Up: General

2.2 Rooting the tree

In this document, we shall designate the root TDS directory by texmf (for “TeX and Metafont”). We recommend using that name where possible, but the actual name of the directory is up to the installer. On PC networks, for example, this could map to a logical drive specification such as T:.

Similarly, the location of this directory on the system is site-dependent. It may be at the root of the file system; on Unix systems, /usr/local/share, /usr/local, /usr/local/lib, and /opt are common choices.

The name texmf was chosen for several reasons: it reflects the fact that the directory contains files pertaining to an entire TeX system (including Metafont, MetaPost, BibTeX, etc.), not just TeX itself; and it is descriptive of a generic installation rather than a particular implementation.

A site may choose to have more than one TDS hierarchy installed (for example, when installing an upgrade). This is perfectly legitimate.


Next: , Previous: Rooting the tree, Up: General

2.3 Local additions

The TDS cannot specify precisely when a package is or is not a “local addition”. Each site must determine this according to its own conventions. At the two extremes, one site might wish to consider “nonlocal” all files not acquired as part of the installed TeX distribution; another site might consider “local” only those files that were actually developed at the local site and not distributed elsewhere.

We recognize two common methods for local additions to a distributed texmf tree. Both have their place; in fact, some sites employ both simultaneously:

  1. A completely separate tree which is a TDS structure itself; for example, /usr/local/umbtex at the University of Massachusetts at Boston. This is another example of the multiple texmf hierarchies mentioned in the previous section.
  2. A directory named local at any appropriate level, for example, in the format, package, and supplier directories discussed in the following sections. The TDS reserves the directory name local for this purpose.

    We recommend using local for site-adapted configuration files, such as language.dat for the Babel package or graphics.cfg for the graphics package. Unmodified configuration files from a package should remain in the package directory. The intent is to separate locally modified or created files from distribution files, to ease installing new releases.

One common case of local additions is dynamically generated files, e.g., PK fonts by the mktexpk script (which originated in Dvips as MakeTeXPK). A site may store the generated files directly in any of:

No one solution will be appropriate for all sites.


Previous: Local additions, Up: General

2.4 Duplicate filenames

Different files by the same name may exist in a TDS tree. The TDS generally leaves unspecified which of two files by the same name in a search path will be found, so generally the only way to reliably find a given file is for it to have a unique name. However, the TDS requires implementations to support the following exceptions:

All implementations we know of already have these capabilities.

One place where duplicate names are likely to occur is not an exception:


Next: , Previous: General, Up: Top

3 Top-level directories

The directories under the texmf root identify the major components of a TeX system (see Section Summary for a summary). A site may omit any unneeded directories.

Although the TDS by its nature can specify precise locations only for implementation-independent files, we recognize that installers may well wish to place other files under texmf to simplify administration of the TeX tree, especially if it is maintained by someone other than the system administrator. Therefore, additional top-level directories may be present.

The top-level directories specified by the TDS are:


Next: , Up: Top-level directories

3.1 Macros

TeX macro files shall be stored in separate directories, segregated by TeX format and package name (we use `format' in its traditional TeX sense to mean a usefully \dump-able package):

     texmf/tex/format/package/


Up: Macros

3.1.1 Extensions

TeX has spawned many companion and successor programs (“engines”), such as PDFTeX, Omega, and others. The TDS specifies that the input files for such programs (using a TeX-like syntax) be placed within the top-level tex directory, either at the top level or within a format subdirectory, even though the original TeX program may not be able to read them. For example:

     texmf/tex/aleph
     texmf/tex/enctex

This is a change from TDS 1.0, which specified top-level extension directories for each such program. We felt the new approach is preferable, because:

Thus, in practice, having different top-level directories caused difficulties for everyone involved—users, package authors, site administrators, and system distributors.

Please contrast this approach with the implementation top-level subdirectory (Section Top-level directories), which is to be used for configuration files that (presumably) do not use TeX syntax and in any case should not be found along the main TeX input search path.


Next: , Previous: Macros, Up: Top-level directories

3.2 Fonts

Font files are stored in separate directories, segregated by file type, and then (in most cases) font supplier and typeface. PK and GF files need additional structure, as detailed in the next section.

     texmf/fonts/type/supplier/typeface/
     texmf/fonts/enc,lig,map/subpath/

Some concrete examples:

     texmf/fonts/source/public/pandora/pnr10.mf
     texmf/fonts/tfm/public/cm/cmr10.tfm
     texmf/fonts/type1/adobe/utopia/putr.pfa

For complete supplier and typeface name lists, consult Filenames for TeX fonts (see Appendix Related references).


Next: , Up: Fonts

3.2.1 Font bitmaps

Font bitmap files require two characteristics in addition to the above to be uniquely identifiable: (1) the type of device (i.e., mode) for which the font was created; (2) the resolution of the bitmap.

Following common practice, the TDS segregates fonts with different device types into separate directories. See modes.mf in Appendix Related references for recommended mode names.

Some printers operate at more than one resolution (e.g., at 300dpi and 600dpi), but each such resolution will necessarily have a different mode name. Nothing further is needed, since implicit in the TeX system is the assumption of a single target resolution.

Two naming strategies are commonly used to identify the resolution of bitmap font files. On systems that allow long filenames (and in the original Metafont program itself), the resolution is included in the filename (e.g., cmr10.300pk). On systems which do not support long filenames, fonts are generally segregated into directories by resolution (e.g., dpi300/cmr10.pk).

Because the TDS cannot require long filenames, we must use the latter scheme for naming fonts. So we have two more subdirectory levels under pk and gf:

     texmf/fonts/pk/mode/supplier/typeface/dpinnn/
     texmf/fonts/gf/mode/supplier/typeface/dpinnn/

Implementations may provide extensions to the basic naming scheme, such as long filenames (as in the original Metafont) and font library files (as in emTeX's .fli files), provided that the basic scheme is also supported.


Previous: Font bitmaps, Up: Fonts

3.2.2 Valid font bitmaps

The TWG recognizes that the use of short filenames has many disadvantages. The most vexing is that it results in the creation of dozens of different files with the same name. At a typical site, cmr10.pk will be the filename for Computer Modern Roman 10pt at 5–10 magnifications for 2–3 modes. (Section Duplicate filenames discusses duplicate filenames in general.)

To minimize this problem, we strongly recommend that PK files contain enough information to identify precisely how they were created: at least the mode, base resolution, and magnification used to create the font.

This information is easy to supply: a simple addition to the local modes used for building the fonts with Metafont will automatically provide the required information. If you have been using a local modes file derived from (or that is simply) modes.mf (see Appendix Related references), the required information is already in your PK files. If not, a simple addition based on the code found in modes.mf can be made to your local modes file and the PK files rebuilt.


Next: , Previous: Fonts, Up: Top-level directories

3.3 Non-font Metafont files

Most Metafont input files are font programs or parts of font programs and are thus covered by the previous section. However, a few non-font input files do exist. Such files shall be stored in:

     texmf/metafont/package/

package is the name of a Metafont package (for example, mfpic).

The TDS reserves the following package names:


Next: , Previous: Non-font Metafont files, Up: Top-level directories

3.4 MetaPost

MetaPost is a picture-drawing language developed by John Hobby, derived from Knuth's Metafont. Its primary purpose is to output Encapsulated PostScript instead of bitmaps.

MetaPost input files and the support files for MetaPost-related utilities shall be stored in:

     texmf/metapost/package/

package is the name of a MetaPost package. At the present writing none exist, but the TWG thought it prudent to leave room for contributed packages that might be written in the future.

The TDS reserves the following package names:


Next: , Previous: MetaPost, Up: Top-level directories

3.5 BibTeX

BibTeX-related files shall be stored in:

     texmf/bibtex/bib/package/
     texmf/bibtex/bst/package/

The bib directory is for BibTeX database (.bib) files, the bst directory for style (.bst) files.

package is the name of a BibTeX package. The TDS reserves the following package names (the same names are reserved under both bib and bst):


Next: , Previous: BibTeX, Up: Top-level directories

3.6 Scripts

The top-level scripts directory is for platform-independent executables, such as Perl, Python, and shell scripts, and Java class files. Subdirectories under scripts are package names. This eases creating distributions, by providing a common place for such platform-independent programs.

The intent is not for all such directories to be added to a user's command search path, which would be quite impractical. Rather, these executables are primarily for the benefit of wrapper scripts in whatever executable directory a distribution may provide (which is not specified by the TDS).

Truly auxiliary scripts which are invoked directly by other programs, rather than wrapper scripts, may also be placed here. That is, scripts also serves as a platform-independent analog of the standard Unix libexec directory.

We recommend using extensions specifying the language (such as .pl, .py, .sh) on these files, to help uniquely identify the name. Since the intent of the TDS is for programs in scripts not to be invoked directly by users, this poses no inconvenience.

For example, in the TeX Live distribution, the ConTeXt user-level program texexec can exist as a small wrapper script in each bin/platform/texexec (which is outside the texmf tree), which merely finds and calls texmf/scripts/context/perl/texexec.pl.

Examples:

     scripts/context/perl/texexec.pl
     scripts/context/ruby/examplex.rb
     scripts/thumbpdf/thumbpdf.pl

The TDS does not specify a location for platform-dependent binary executables, whether auxiliary or user-level.


Previous: Scripts, Up: Top-level directories

3.7 Documentation

Most packages come with some form of documentation: user manuals, example files, programming guides, etc. In addition, many independent files not part of any macro or other package have been created to describe various aspects of the TeX system.

The TDS specifies that these additional documentation files shall be stored in a structure that parallels to some extent the fonts and tex directories, as follows:

     texmf/doc/category/...

category identifies the general topic of documentation that resides below it; for example, a TeX format name (latex), program name (bibtex, tex), language (french, german), a file format (info, man), or other system components (web, fonts).

One possible arrangement is to organize doc by language, with all the other category types below that. This helps users find documentation in the language(s) in which they are fluent. Neither this nor any other particular arrangement is required, however.

Within each category tree for a TeX format, the directory base is reserved for base documentation distributed by the format's maintainers.

The TDS reserves the following category names:

The doc directory is intended for implementation-independent and operating system-independent documentation files. Implementation-dependent files are best stored elsewhere, as provided for by the implementation and/or TeX administrator (for example, VMS help files under texmf/vms/help).

The documentation directories may contain TeX sources, DVI files, PostScript files, text files, example input files, or any other useful documentation format(s).

See Section Documentation tree summary for a summary.


Next: , Previous: Top-level directories, Up: Top

4 Summary

A skeleton of a TDS texmf directory tree. This is not to imply these are the only entries allowed. For example, local may occur at any level.

       bibtex/           BibTeX input files
         bib/            BibTeX databases
           base/         base distribution (e.g., xampl.bib)
           misc/         single-file databases
         <package>/      name of a package
         bst/            BibTeX style files
           base/         base distribution (e.g., plain.bst, acm.bst)
           misc/         single-file styles
         <package>/      name of a package
       doc/              see Section Documentation and the summary below
       fonts/            font-related files
         <type>/         file type (e.g., pk)
           <mode>/       type of output device (for pk and gf only)
             <supplier>/     name of a font supplier (e.g., public)
               <typeface>/   name of a typeface (e.g., cm)
                 dpi<nnn>/   font resolution (for pk and gf only)
       <implementation>/ TeX implementations, by name (e.g., emtex)
       local/            files created or modified at the local site
       metafont/         Metafont (non-font) input files
         base/           base distribution (e.g., plain.mf)
         misc/           single-file packages (e.g., modes.mf)
         <package>/      name of a package (e.g., mfpic)
       metapost/         MetaPost input and support files
         base/           base distribution (e.g., plain.mp)
         misc/           single-file packages
         <package>/      name of a package
         support/        support files for MetaPost-related utilities
       mft/              MFT inputs (e.g., plain.mft)
       <program>/        TeX-related programs, by name (e.g., dvips)
       source/           program source code by name (e.g., latex, web2c)
       tex/              TeX input files
         <engine>/       name of an engine (e.g., aleph); can also be lower
         <format>/       name of a format (e.g., plain)
           base/         base distribution for format (e.g., plain.tex)
           misc/         single-file packages (e.g., webmac.tex)
           local/        local additions to or local configuration files for format
           <package>/    name of a package (e.g., graphics, mfnfss)
         generic/        format-independent packages
           hyphen/       hyphenation patterns (e.g., hyphen.tex)
           images/       image input files (e.g., Encapsulated PostScript)
           misc/         single-file format-independent packages (e.g., null.tex).
           <package>/    name of a package (e.g., babel)


Up: Summary

4.1 Documentation tree summary

An example skeleton of a TDS directory tree under texmf/doc. This is not to imply these are the only entries allowed, or that this structure must be followed precisely for the entries listed.

As mentioned, the texmf/doc tree may be organized by language, so that all documentation in French, say, is in a french subdirectory. In that case, the example structure here would be in a given language directory.

       ams/
         amsfonts/       amsfonts.faq, amfndoc
         amslatex/       amslatex.faq, amsldoc
         amstex/         amsguide, joyerr
       bibtex/           BibTeX
         base/           btxdoc.tex
       fonts/
         fontname/       Filenames for TeX fonts
         oldgerm/        corkpapr
       <format>/         name of a TeX format (e.g., generic, latex)
         base/           for the base distribution
         misc/           for contributed single-file package documentation
         <package>/      for package
       general/          across programs, generalities
         errata/         errata, errata[1-8]
         texcomp/        Components of TeX
       help/             meta-information
         ctan/           info about CTAN mirror sites
         faq/            FAQs of comp.text.tex, etc.
       info/             GNU Info files, made from Texinfo sources
       latex/            example of format
         base/           ltnews*, *guide, etc.
         graphics/       grfguide
       local/            site-specific documentation
       man/              Unix man pages
       <program>/        TeX-related programs, by name (examples follow)
       metafont/         mfbook.tex, metafont-for-beginners, etc.
       metapost/         mpman, manfig, etc.
       tex/              texbook.tex, A Gentle Introduction to TeX, etc.
       web/              webman, cwebman


Next: , Previous: Summary, Up: Top

Appendix A Unspecified pieces

The TDS cannot address the following aspects of a functioning TeX system:

  1. The location of executable programs: this is too site-dependent even to recommend a location, let alone require one. A site may place executables outside the texmf tree altogether (e.g., /usr/local/bin), in a platform-dependent directory within texmf, or elsewhere.
  2. Upgrading packages when new releases are made: we could find no way of introducing version specifiers into texmf that would do more good than harm, or that would be practical for even a plurality of installations.
  3. The location of implementation-specific files (e.g., TeX .fmt files): by their nature, these must be left to the implementor or TeX maintainer. See Section Example implementation-specific trees.
  4. Precisely when a package or file should be considered “local”, and where such local files are installed. See Section Local additions for more discussion.


Up: Unspecified pieces

A.1 Portable filenames

The TDS cannot require any particular restriction on filenames in the tree, since the names of many existing TeX files conform to no standard scheme. For the benefit of people who wish to make a portable TeX distribution or installation, however, we outline here the necessary restrictions. The TDS specifications themselves are compatible with these.

ISO-9660 is the only universally acceptable file system format for CD-ROMs. A subset thereof meets the stringent limitations of all operating systems in use today. It specifies the following:

Some systems display a modified format of ISO-9660 names, mapping alphabetic characters to lowercase, removing version numbers and trailing periods, etc.

Before the December 1996 release, LaTeX used mixed-case names for font descriptor files. Fortunately, it never relied on case alone to distinguish among the files. Nowadays, it uses only monocase names.


Next: , Previous: Unspecified pieces, Up: Top

Appendix B Implementation issues

We believe that the TDS can bring a great deal of order to the current anarchic state of many TeX installations. In addition, by providing a common frame of reference, it will ease the burden of documenting administrative tasks. Finally, it is a necessary part of any reasonable system of true “drop-in” distribution packages for TeX.


Next: , Up: Implementation issues

B.1 Adoption of the TDS

[This section is retained for historical purposes; the TDS is now quite firmly entrenched in most TeX distributions.]

We recognize that adoption of the TDS will not be immediate or universal. Most TeX administrators will not be inclined to make the final switch until:

Consequently, most of the first trials of the TDS will be made by members of the TDS committee and/or developers of TeX-related software. This has already taken place during the course of our deliberations (see Appendix Related references for a sample tree available electronically). They will certainly result in the production of a substantial number of TDS-compliant packages. Indeed, the teTeX and TeX Live distributions are TDS-compliant and in use now at many sites.

Once installable forms of key TDS-compliant packages are more widespread, some TeX administrators will set up TDS-compliant trees, possibly in parallel to existing production directories. This testing will likely flush out problems that were not obvious in the confined settings of the developers' sites; for example, it should help to resolve system and package dependencies, package interdependencies, and other details not addressed by this TDS version.

After most of the dust has settled, hopefully even conservative TeX administrators will begin to adopt the TDS. Eventually, most TeX sites will have adopted the common structure, and most packages will be readily available in TDS-compliant form.

We believe that this process will occur relatively quickly. The TDS committee spans a wide range of interests in the TeX community. Consequently, we believe that most of the key issues involved in defining a workable TDS definition have been covered, often in detail. TeX developers have been consulted about implementation issues, and have been trying out the TDS arrangement. Thus, we hope for few surprises as implementations mature.

Finally, there are several (current or prospective) publishers of TeX CD-ROMs. These publishers are highly motivated to work out details of TDS implementation, and their products will provide inexpensive and convenient ways for experimentally-minded TeX administrators to experiment with the TDS.


Next: , Previous: Adoption of the TDS, Up: Implementation issues

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.


Previous: More on subdirectory searching, Up: Implementation issues

B.3 Example implementation-specific trees

The TDS cannot specify a precise location for implementation-specific files, such as texmf/ini, because a site may have multiple TeX implementations.

Nevertheless, for informative purposes, we provide here the default locations for some implementations. Please contact us with additions or corrections. These paths are not definitive, may not match anything at your site, and may change without warning.

We recommend all implementations have default search paths that start with the current directory (e.g., .). Allowing users to include the parent directory (e.g., ..) is also helpful.


Next: , Up: Example implementation-specific trees

B.3.1 AmiWeb2c 2.0

(Email scherer@physik.rwth-aachen.de to contact the maintainer of this implementation.)

AmiWeb2c 2 is compatible with Web2c 7 to the greatest possible extent, so only the very few differences are described in this section. Detailed information about the basic concepts is given in the section for Web2c 7 below.

Thanks to the SELFAUTO mechanism of Kpathsea 3.0 no specific location for the installation of AmiWeb2c is required as long as the general structure of the distribution is preserved.

In addition to Kpathsea's // notation recursive path search may also be started by DEVICE:/, e.g., TeXMF:/ will scan this specific device completely.

Binaries coming with the AmiWeb2c distribution are installed in the directory bin/amiweb2c/ outside the common TDS tree share/texmf/. In addition to the set of AmiWeb2c binaries you will find two subdirectories local/ and pastex/ with auxiliary programs.

A stripped version of the PasTeX system (used by kind permission of Georg Heßmann) is coming with AmiWeb2c, pre-installed in its own share/texmf/amiweb2c/pastex/ directory. If you want to use PasTeX you have to assign the name TeX: to this place.

Documentation files in AmigaGuide format should be stored at doc/guide/ similar to doc/info/.


Next: , Previous: AmiWeb2c 2.0, Up: Example implementation-specific trees

B.3.2 Public DECUS TeX

If another VMS implementation besides Public DECUS TeX appears, the top level implementation directory name will be modified to something more specific (e.g., vms_decus).

       texmf/
         vms/            VMS implementation specific files
           exe/          end-user commands
             common/     command procedures, command definition files, etc.
             axp/        binary executables for Alpha AXP
             vax/        binary executables for VAX
           formats/      pool files, formats, bases
           help/         VMS help library, and miscellaneous help sources
           mgr/          command procedures, programs, docs, etc., for system management


Previous: Public DECUS TeX, Up: Example implementation-specific trees

B.3.3 Web2c 7

All implementation-dependent TeX system files (.pool, .fmt, .base, .mem) are stored by default directly in texmf/web2c. The configuration file texmf.cnf and various subsidiary MakeTeX... scripts used as subroutines are also stored there.

Non-TeX specific files are stored following the GNU coding standards. Given a root directory prefix (/usr/local by default), we have default locations as follows:

       <prefix>/         installation root (/usr/local by default)
         bin/            executables
         man/            man pages
         info/           info files
         lib/            libraries (libkpathsea.*)
         share/          architecture-independent files
           texmf/        TDS root
             web2c/      implementation-dependent files (.pool, .fmt, texmf.cnf, etc.)

See http://www.gnu.org/prep/standards_toc.html for the rationale behind and descriptions of this arrangement. A site may of course override these defaults; for example, it may put everything under a single directory such as /usr/local/texmf.


Next: , Previous: Implementation issues, Up: Top

Appendix C Is there a better way?

Defining the TDS required many compromises. Both the overall structure and the details of the individual directories were arrived at by finding common ground among many opinions. The driving forces were feasibility (in terms of what could technically be done and what could reasonably be expected from developers) and regularity (files grouped together in an arrangement that “made sense”).

Some interesting ideas could not be applied due to implementations lacking the necessary support:


Next: , Up: Is there a better way?

C.1 Macro structure

The TWG settled on the format/package arrangement after long discussion about how best to arrange the files.

The primary alternative to this arrangement was a scheme which reversed the order of these directories: package/format. This reversed arrangement has a strong appeal: it keeps all of the files related to a particular package in a single place. The arrangement actually adopted tends to spread files out into two or three places (macros, documentation, and fonts, for example, are spread into different sections of the tree right at the top level).

Nevertheless, the format/package structure won for a couple of reasons:


Next: , Previous: Macro structure, Up: Is there a better way?

C.2 Font structure

The TWG struggled more with the font directory structure than anything else. This is not surprising; the need to use the proliferation of PostScript fonts with TeX is what made the previous arrangement with all files in a single directory untenable, and therefore what initiated the TDS effort.


Next: , Up: Font structure

C.2.1 Font file type location

We considered the supplier-first arrangement in use at many sites:

     texmf/fonts/supplier/typeface/type/

This improves the maintainability of the font tree, since all files comprising a given typeface are in one place, but unless all the programs that search this tree employ some form of caching, there are serious performance concerns. For example, in order to find a TFM file, the simplest implementation would require TeX to search through all the directories that contain PK files in all modes and at all resolutions.

In the end, a poll of developers revealed considerable resistance to implementing sufficient caching mechanisms, so this arrangement was abandoned. The TDS arrangement allows the search tree to be restricted to the correct type of file, at least. Concerns about efficiency remain, but there seems to be no more we can do without abandoning subdirectory searching entirely.

We also considered segregating all font-related files strictly by file type, so that Metafont sources would be in a directory texmf/fonts/mf, property list files in texmf/fonts/pl, the various forms of Type 1 fonts separated, and so on. Although more blindly consistent, we felt that the drawback of more complicated path constructions outweighed this. The TDS merges file types (mf and pl under source, pfa and pfb and gsf under type1) where we felt this was beneficial.


Next: , Previous: Font file type location, Up: Font structure

C.2.2 Mode and resolution location

We considered having the mode at the bottom of the font tree:

     texmf/fonts/pk/supplier/typeface/mode/dpi/

In this case, however, it is difficult to limit subdirectory searching to the mode required for a particular device.

We then considered moving the dpinnn up to below the mode:

     texmf/fonts/pk/mode/dpi/supplier/typeface/

But then it is not feasible to omit the dpinnn level altogether on systems which can and do choose to use long filenames.


Previous: Mode and resolution location, Up: Font structure

C.2.3 Modeless bitmaps

The TDS specifies using a single directory modeless/ as the mode name for those utilities which generate bitmaps, e.g., texmf/fonts/modeless/times/. This has the considerable advantage of not requiring each such directory name to be listed in a search path.

An alternative was to use the utility name below which all such directories could be gathered. That has the advantage of separating, say, gsftopk-generated bitmaps from ps2pk-generated ones. However, we decided this was not necessary; most sites will use only one program for the purpose. Also, PK and GF fonts generally identify their creator in the font comment following the PK_ID byte.

We are making an implicit assumption that Metafont is the only program producing mode-dependent bitmaps. If this becomes false we could add an abbreviation for the program to mode names, as in mfcx vs. xyzcx for a hypothetical program Xyz, or we could at that time add an additional program name level uniformly to the tree. It seemed more important to concisely represent the current situation than to worry about hypothetical possibilities that may never happen.


Previous: Font structure, Up: Is there a better way?

C.3 Documentation structure

We considered placing additional documentation files in the same directory as the source files for the packages, but we felt that users should be able to find documentation separately from sources, since most users have no interest in sources.

We hope that a separate, but parallel, structure for documentation would (1) keep the documentation together and (2) make it as straightforward as possible for users to find the particular documentation they were after.


Next: , Previous: Is there a better way?, Up: Top

Appendix D Related references

This appendix gives pointers to related files and other documents. For CTAN references, we use http://www.ctan.org as the top-level domain only to make the links be live in this document. See http://www.ctan.org/tex-archive/CTAN.sites for a complete list of CTAN sites; there are mirrors worldwide.


Previous: Related references, Up: Top

Appendix E Contributors

The TWG has had no physical meetings; electronic mail was the communication medium.

Sebastian Rahtz is the TeX Users Group Technical Council liaison. Norman Walsh was the original committee chair. Karl Berry is the current editor.

The list of contributors has grown too large to fairly include, as some would surely be inadvertently omitted. Please consider the archives of the tds@tug.org and tex-live@tug.org mailing lists as the record of contributions.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.