tolerance=9999A Directory Structure for FilesTUG Working Group on a Directory Structure
(TWGTDS)2GELLMU Edition edited by W.F.HammondUlrik Vieths markup and processing
scheme for the 0.995 version of this document helped crystallize the
idea for GELLMU in the mind of the editor.This version was reedited technically for Generalized Extensible
LaTeXLike MarkUp (GELLMU) on 13Jul2000Copyright 1994, 95, 96, 97, 98, 99 Users GroupPermission 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 warrantyPermission 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 oneThis document is available on any CTAN host
(Appendixiref="sec:Related-references"sec:Related-references has a complete reference)
Please send questions or suggestions by email to
tdstug.org or by postal mail to Karl Berry, 135 Center
Hill Road, Plymouth, MA 02360, USA We welcome all comments1IntroductionSU-11.1The role of the TDSSU-1.11.2ConventionsSU-1.22GeneralSU-22.1Subdirectory searchingSU-2.12.2Rooting the treeSU-2.22.3Local additionsSU-2.32.4Duplicate filenamesSU-2.43Toplevel directoriesSU-33.1MacrosSU-3.13.2FontsSU-3.23.3Nonfont MetaFont filesSU-3.33.4MetaPostSU-3.43.5BibTeXSU-3.53.6DocumentationSU-3.63.7ExtensionsSU-3.74SummarySU-44.1Documentation
tree summarySU-4.1AppendixAUnspecified piecesSU-5A.1Portable filenamesSU-5.1AppendixBImplementation issuesSU-6B.1Adoption of the TDSSU-6.1B.2More on subdirectory searchingSU-6.2B.3Example implementationspecific treesSU-6.3AppendixCIs there a better way?SU-7C.1Macro structureSU-7.1C.2Font structureSU-7.2C.3Documentation structureSU-7.3AppendixDRelated referencesSU-8AppendixEContributorsSU-9pagebreak1Introduction 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 s flexibility,
however, is that there has been no single right way to
install it This has resulted in many sites having different installed
arrangementsThe primary purpose of this document is to describe a standard
Directory Structure (TDS): a directory hierarchy for macros,
fonts, and the other implementationindependent system files As
a matter of practicality, this document also suggests ways to
incorporate the rest of the 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, msdos, os2, Unix, vms, and
Windows nt We hope that administrators and developers of both
free and commercial implementations will adopt this standardThis document is intended both for the system administrator at a
site and for people preparing distributionseverything from a
complete runnable system to a single macro or style file It may also
help 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 system If you are unfamiliar with any of the programs
or file formats we refer to, consult the references in
Appendixiref="sec:Related-references"sec:Related-references1.1The role of the TDSThe role of the TDS is to stabilize the organization of
related software packages that are installed and in use, possibly
on multiple platforms simultaneouslyAt first glance, it may seem that the Comprehensive Archive
Network (CTAN) archives fulfill 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 useIn fact, the roles of the TDS and CTAN are frequently in
conflict, as you will see elsewhere in this document 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, directories1.2ConventionsIn this document, is used to separate filename components;
for example, texmffonts This is the Unix convention but the
ideas are in no way UnixspecificIn this document, generally means the system, including
MetaFont, DVI drivers, utilities, etc., not just the
program itselfThe 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 package, which is a style file supplementing
a document classWe use the following typographic conventions:
literal Literal text such as filename is
typeset in typewriter typereplaceable Replaceable text such as
package, identifying a class of things, is typeset in
italics inside angle brackets2GeneralThis section describes common properties throughout the TDS tree2.1Subdirectory searchingMany installations store large numbers of related files in single
directories, for example, all TFM files andor all
input filesThis monolithic arrangement hinders maintenance of a 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 nameTherefore, 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 systemsAlso, 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 timeconsuming and errorprone
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
burdenAs 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 , 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 recursivetoonelevel searches, may also be
provided We encourage implementors to provide subdirectory searching
at the option of the installer and user for all pathsThe TDS does not specify a syntax for specifying recursive
searching, but we encourage implementors to provide interoperability
(see Appendixiref="sec:More-on-subdirectory-searching"sec:More-on-subdirectory-searching)2.2Rooting the treeIn this document, we shall designate the root TDS directory by
texmf (for 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
sitedependent It may be at the root of the file system; on Unix
systems, usrlocalshare, usrlocal,
usrlocallib, and opt are common choicesThe name texmf was chosen for several reasons: it reflects the fact
that the directory contains files pertaining to an entire system
(including MetaFont, MetaPost, BibTeX, etc.), not just itself; and it
is descriptive of a generic installation rather than a particular
implementationA site may choose to have more than one TDS hierarchy installed
(for example, when installing an upgrade) This is perfectly legitimate2.3Local additionsThe 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
distribution; another site might consider local only those files
that were actually developed at the local site and not distributed
elsewhereWe recognize two common methods for local additions to a distributed
texmf tree Both have their place; in fact, some sites may employ
both simultaneously:
A completely separate tree which is a TDS structure
itself; for example, usrlocalumbtex at the University of
Massachusetts at Boston This is another example of the multiple
texmf hierarchies mentioned in the previous sectionA 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
purposeWe recommend using local for siteadapted 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 releasesOne common case of local additions is dynamically generated files, e.g.,
PK fonts by the MakeTeXPK script originated by
Dvips A site may store the generated files directly in
any of:
No one solution will be appropriate for all sites2.4Duplicate filenamesDifferent 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:
Names of input files must be unique within each firstlevel
subdirectory of texmftex and texmftexgeneric, but not
within all of texmftex; i.e., different formats may have
files by the same name (Sectioniref="sec:Macros"sec:Macros discusses this
further.) Thus, no single formatindependent path specification, such
as a recursive search beginning at texmftex specifying no other
directories, suffices So implementations must provide formatdependent
path specifications, for example via wrapper scripts or configuration
filesMany font files will have the same name (e.g., cmr10.pk),
as discussed in Sectioniref="sec:Valid-font-bitmaps"sec:Valid-font-bitmaps Implementations
must distinguish these files by mode and resolutionAll implementations we know of already have these capabilitiesOne place where duplicate names are likely to occur is not an exception:
Names of MetaFont input files (as opposed to bitmaps) must be unique
within all of texmffonts In practice, this is a problem with
some variants of Computer Modern which contain slightly modified files
named punct.mf, romanl.mf, and so on We believe the only
feasible solution is to rename the derivative files to be
unique3Toplevel directoriesThe directories under the texmf root identify the major components of
a system (see Sectioniref="sec:Summary"sec:Summary for a summary) A site
may omit any unneeded directoriesAlthough the TDS by its nature can specify precise locations only
for implementationindependent files, we recognize that installers may
well wish to place other files under texmf to simplify administration
of the tree, especially if it is maintained by someone other than
the system administrator Therefore, additional toplevel directories
may be presentThe toplevel directories specified by the TDS are:
texfor files (Sectioniref="sec:Macros"sec:Macros)fontsfor fontrelated files (Sectioniref="sec:Fonts"sec:Fonts)metafontfor MetaFont files which are not fonts (Sectioniref="sec:Non-font-MF-files"sec:Non-font-MF-files)metapostfor MetaPost files (Sectioniref="sec:MetaPost"sec:MetaPost)bibtexfor BibTeX files (Sectioniref="sec:BibTeX"sec:BibTeX)docfor user documentation (Sectioniref="sec:Documentation"sec:Documentation)source for sources This includes both traditional
program sources (for example, Web2c sources go in
texmfsourceweb2c) and, e.g., dtx sources (which
go in texmfsourcelatex) The TDS leaves unspecified any
structure under sourcesource is intended for files which are not needed at runtime by
any program; it should not be included in any search path For
example, plain.tex does not belong under texmfsource,
even though it is a source file in the sense of not being derived
from another file (It goes in texmftexplainbase, as explained
in Sectioniref="sec:Macros"sec:Macros)implementation for implementations (examples:
emtex, web2c), to be used for whatever purpose deemed
suitable by the implementor or administrator Files that cannot
be shared between implementations, such as pool files (tex.pool)
and memory dump files (plain.fmt) go here, in addition to
implementationwide configuration files See
Appendixiref="sec:Example-implementation-specific-trees"sec:Example-implementation-specific-trees for examples of real
implementation treesextension for programspecific input files for new
programs (examples: etex, pdftex, omega) that are
extensions of , MetaFont, or any standard program See
Sectioniref="sec:Extensions"sec:Extensionsprogram for programspecific input and
configuration files for any related programs (examples:
mft, dvips) In fact, the tex, metafont,
metapost, bibtex, and extension items above
may all be seen as instances of this case3.1Macros macro files shall be stored in separate directories, segregated
by format and package name (we use format in its traditional
sense to mean a usefully dumpable package):
texmftexformatpackageformat is a format name (examples: amstex,
latex, plain, texinfo)The TDS allows distributions that can be used as either formats or
packages (e.g., Texinfo, Eplain) to be stored at either level, at the
option of the format author or administrator We recommend that
packages used as formats at a particular site be stored at the
format level: by adjusting the inputs search path,
it will be straightforward to use them as macro packages under another
format, whereas placing them in another tree completely obscures their
use as a formatThe TDS reserves the following format names:
generic, for input files that are useful across a wide
range of formats (examples: null.tex, path.sty)
Generally, this means any format that uses the category codes of Plain
and does not rely on any particular format This is in contrast
to those files which are useful only with Plain (which go under
texmftexplain), e.g., testfont.tex and plain.tex
itselflocal, for local additions See
Sectioniref="sec:Local-additions"sec:Local-additionsThus, for almost every format, it is necessary to search at least the
format directory and then the generic directory (in
that order) Other directories may need to be searched as well,
depending on the format When using AMS, for example, the
amstex, plain, and generic directories should be
searched, because AMS is compatible with Plainpackage is a package name (examples:
babel, texdraw)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
formatbase For example, Texinfo goes in
texmftextexinfotexinfo.tex, not
texmftextexinfobasetexinfo.texThe TDS reserves the following package names:
base, for the base distribution of each format,
including files used by initex when dumping format files For
example, in the standard distribution, the ltx files
created during the build process shall be stored in the base
directoryhyphen, for hyphenation patterns, including the original
American English hyphen.tex These are typically used only by
initex In most situations, this directory need exist only under the
generic formatimages, for image input files, such as Encapsulated
PostScript figures Although it is somewhat nonintuitive for these to
be under a directory named tex, needs to read these
files to glean bounding box or other information A mechanism for
sharing image inputs between and other typesetting programs
(e.g., Interleaf, FrameMaker) is beyond the scope of the
TDS In most situations, this directory need exist only under
the generic formatlocal, for local additions and configuration files See
Sectioniref="sec:Local-additions"sec:Local-additionsmisc, for packages that consist of a single file An
administrator or package maintainer may create directories for
singlefile packages at his discretion, instead of using misc3.2FontsFont files shall be stored in separate directories, segregated by file
type, font supplier, and typeface (PK and GF files need
additional structure, as detailed in the next section):texmffontstypesuppliertypefacetype is the type of font file The TDS
reserves the following type names:
As usual, a site may omit any of these directories that are unnecessary
(gf is a particularly likely candidate for omission)supplier is a name identifying font source
(examples: adobe, ams, public) The TDS
reserves the following supplier names:
ams, for the American Mathematical Societys AMSfonts
collectionlocal, for local additions See Sectioniref="sec:Local-additions"sec:Local-additionspublic, for freely redistributable fonts where the supplier
neither (1)requested its own directory (e.g., ams), nor
(2)also made proprietary fonts (e.g., adobe) It does not
contain all extant freely distributable fonts, nor are all files therein
necessarily strictly public domaintmp, for dynamicallygenerated fonts, as is traditional on
some systems It may be omitted if unnecessary, as usualtypeface is the name of a typeface family
(examples: cm, euler, times) The TDS
reserves the following typeface names:
cm (within public), for the 75 fonts defined in
Computers and Typesetting, VolumeElatex (within public), for those fonts distributed
with in the base distributionlocal, for local additions See Sectioniref="sec:Local-additions"sec:Local-additionsSome concrete examples:
For complete supplier and typeface name lists, consult
Filenames for fonts (see
Appendixiref="sec:Related-references"sec:Related-references)3.2.1Font bitmapsFont 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 bitmapFollowing common practice, the TDS segregates fonts with
different device types into separate directories See modes.mf
in Appendixiref="sec:Related-references"sec:Related-references for recommended mode namesSome 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
system is the assumption of a single target resolutionTwo 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., dpi300cmr10.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:
mode is a name which identifies the device type
(examples: cx, ljfour, modeless) Usually, this is
the name of the MetaFont mode used to build the PK file For fonts
rendered as bitmaps by a program that does not distinguish between
different output devices, the mode name shall be simply
modeless The mode level shall not be omitted,
even if only a single mode happens to be in usedpinnn specifies the resolution of the font
(examples: dpi300, dpi329)dpi stands for
dots per inch, i.e., pixels per inch We recognize that pixels per
millimeter is used in many parts of the world, but dpi is too
traditional in the world to consider changing nowThe integer nnn is to be calculated as if using MetaFont
arithmetic and then rounded; i.e., it is the integer MetaFont uses in its
output gf filename We recognize small differences in the
resolution are a common cause of frustration among users, however, and
recommend implementors follow the level0 DVI driver standard
(see Appendixiref="sec:Related-references"sec:Related-references) in bitmap font searches by
allowing a fuzz of 0.2 (with a minimum of 1) in the
dpiImplementations may provide extensions to the basic naming scheme, such
as long filenames (as in the original MetaFont) and font library files (as
in ems .fli files), provided that the basic scheme is also
supported3.2.2Valid font bitmapsThe 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
510 magnifications for 23 modes
(Sectioniref="sec:Duplicate-filenames"sec: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
fontThis 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
Appendixiref="sec:Related-references"sec: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 rebuilt3.3Nonfont MetaFont filesMost MetaFont input files are font programs or parts of font programs and
are thus covered by the previous section However, a few nonfont input
files do exist Such files shall be stored in:texmfmetafontpackagepackage is the name of a
MetaFont package (for example, mfpic)The TDS reserves the following package names:
base, for the standard MetaFont macro files as described in
The MetaFontbook, such as plain.mf and expr.mflocal, for local additions See Sectioniref="sec:Local-additions"sec:Local-additionsmisc, for MetaFont packages consisting of only a single file
(for example, modes.mf) An administrator or package maintainer
may create directories for singlefile packages at his discretion,
instead of using misc3.4MetaPostMetaPost is a picturedrawing language developed by John Hobby, derived
from Knuths MetaFont Its primary purpose is to output Encapsulated PostScript
instead of bitmapsMetaPost input files and the support files for MetaPostrelated utilities
shall be stored in:texmfmetapostpackagepackage 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 futureThe TDS reserves the following package names:
base, for the standard MetaPost macro files, such as
plain.mp, mfplain.mp, boxes.mp, and
graph.mp This includes files used by inimp when dumping mem
files containing preloaded macro definitionslocal, for local additions See
Sectioniref="sec:Local-additions"sec:Local-additionsmisc, for MetaPost packages consisting of only a single file
An administrator or package maintainer may create directories for
singlefile packages at his discretion, instead of using miscsupport, for additional input files required by MetaPost
utility programs, including a font map, a character adjustment table,
and a subdirectory containing lowlevel MetaPost programs for rendering
some special characters3.5BibTeXBibTeXrelated files shall be stored in:
The bib directory is for BibTeX database (.bib) files,
the bst directory for style (.bst) filespackage is the name of a BibTeX package The
TDS reserves the following package names (the same
names are reserved under both bib and bst):
base, for the standard BibTeX databases and styles, such
as xampl.bib, plain.bstlocal, for local additions See
Sectioniref="sec:Local-additions"sec:Local-additionsmisc, for BibTeX packages consisting of only a single
file An administrator or package maintainer may create directories for
singlefile packages at his discretion, instead of using misc3.6DocumentationMost packages come with some form of documentation: user manuals,
example files, programming guides, etc In addition, many independent
files not part of a macro or other package describe various aspects of
the systemThe 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:texmfdoccategory...category identifies the general topic of documentation
that resides below it; for example, a format name (latex),
program name (bibtex, tex), language (french,
german), or other system components (web, fonts)The TDS reserves the following categories:
Within each category tree for a format, the
directory base is reserved for base documentation distributed by
the formats maintainersgeneral, for standalone documents not specific to any
particular program (for example, Joachim Schrods Components
of )help, for metainformation, such as faqs, David
Jones macro index, etchtml, for html documentsinfo, for processed Texinfo documents (Info files, like
anything else, may also be stored outside the TDS, at the
installers option.)
local, for local additions See
Sectioniref="sec:Local-additions"sec:Local-additionsThe doc directory is intended for implementationindependent and
operating systemindependent documentation
files Implementationdependent files shall be stored elsewhere, as
provided for by the implementation andor administrator (for
example, VMS help files under texmfvmshelp)The documentation directories may contain sources, DVI
files, PostScript files, text files, example input files, or any other useful
documentation format(s)See Sectioniref="sec:Documentation-tree-summary"sec:Documentation-tree-summary for a summary3.7ExtensionsNew programs that are extensions of old ones shall use a new toplevel
directory name for their extensionspecific input files The new
directory shall have the same general structure as the toplevel
directory of the original program, and the new program almost certainly
should search the original toplevel directoryFor example, several variants of that recognize additional
commands have been released Input files that use these new commands
cannot be placed in the toplevel tex directory, since the
original program cannot read them So they must go in a new
directory, with the same package structure as tex (see
Sectioniref="sec:Macros"sec:Macros)Using e as an example, we have the following:
A new toplevel (in texmf) directory etexSince e is an extension of , texmfetex
follows the same conventions as texmftextexmfetex contains only especific filese searches first texmfetex, then texmftexThese same principles hold for PDF, Omega, and (most probably)
future variants of or MetaFontpagebreak4SummaryA 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 levelll
bibtexBibTeX input files
. bibBibTeX databases
. . base base distribution (e.g., xampl.bib)
. . misc singlefile databases
. package name of a package
. bstBibTeX style files
. . base base distribution (e.g., plain.bst, acm.bst)
. . misc singlefile styles
. package name of a package
doc see Sectioniref="sec:Documentation"sec:Documentation and the summary below
etex as with tex, below
fonts fontrelated 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)
. . . . . dpinnn font resolution (for pk and gf only)
implementation implementations, by name (e.g., emtex)
local files created or modified at the local site
metafontMetaFont (nonfont) input files
. base base distribution (e.g., plain.mf)
. misc singlefile packages (e.g., modes.mf)
. package name of a package (e.g., mfpic)
metapostMetaPost input and support files
. base base distribution (e.g., plain.mp)
. misc singlefile packages
. package name of a package
. support support files for MetaPostrelated utilities
mftMFT inputs (e.g., plain.mft)
programrelated programs, by name (e.g., dvips)
source program source code by name (e.g., latex, web2c)
tex input files
. format name of a format (e.g., plain)
. . base base distribution for format (e.g., plain.tex)
. . misc singlefile packages (e.g., webmac.tex)
. . local local additions to or local configuration files for format
. . package name of a package (e.g., graphics, mfnfss)
pagebreak4.1Documentation
tree summaryA skeleton of a TDS directory tree under texmfdoc This
is not to imply these are the only entries allowedll
ams
. amsfontsamsfonts.faq, amfndoc
. amslatexamslatex.faq, amsldoc
. amstexamsguide, joyerr
bibtexBibTeX
. basebtxdoc.tex
fonts
. fontnameFilenames for fonts
. oldgermcorkpapr
format name of a format (e.g., generic, latex)
. base for the base distribution
. misc for contributed singlefile package documentation
. package for package
general across programs, generalities
. errataerrata, errata[18]
. texcompComponents of
generic for nonformatspecific packages
. babel
. germangermdoc
help metainformation
. ctan info about CTAN mirror sites
. faq faqs of comp.text.tex, etc
html html files
info gnu Info files, made from Texinfo sources
latex example of format
. baseltnews, guide, etc
. graphicsgrfguide
local sitespecific documentation
programrelated programs, by name (examples follow)
metafontmfbook.tex, metafontforbeginners, etc
metapostmpman, manfig, etc
textexbook.tex, A Gentle Introduction to , etc
webwebman, cwebman
pagebreakAppendicesAppendixAUnspecified piecesThe TDS cannot address the following aspects of a functioning
system:
The location of executable programs: this is too sitedependent
even to recommend a location, let alone require one A site may place
executables outside the texmf tree altogether (e.g.,
usrlocalbin), in a platformdependent directory within
texmf, or elsewhereUpgrading 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
installationsThe location of implementationspecific files (e.g., .fmt files): by their nature, these must be left to the
implementor or maintainer See
Appendixiref="sec:Example-implementation-specific-trees"sec:Example-implementation-specific-treesPrecisely when a package or file should be considered local,
and where such local files are installed See
Sectioniref="sec:Local-additions"sec:Local-additions for more discussionA.1Portable filenamesThe TDS cannot require any particular restriction on filenames in
the tree, since the names of many existing files conform to no
standard scheme For the benefit of people who wish to make a portable
distribution or installation, however, we outline here the
necessary restrictions The TDS specifications themselves are
compatible with theseISO9660 is the only universally acceptable file system format
for CDROMs A subset thereof meets the stringent limitations of
all operating systems in use today It specifies the following:
File and directory names, not including any directory path or
extension part, may not exceed eight charactersFilenames may have a single extension Extensions may not exceed
three characters Directory names may not have an extensionNames and extensions may consist of only the characters
AZ, 09, and underscore
Lowercase letters are excludedA period separates the filename from the extension and is always
present, even if the name or extension is missing (e.g.,
FILENAME. or .EXT)A version number, ranging from 132767, is appended to the file
extension, separated by a semicolon (e.g., FILENAME.EXT;1)Only eight directory levels are allowed, including the toplevel
(mounted) directory (see Sectioniref="sec:Rooting-the-tree"sec:Rooting-the-tree) Thus, the
deepest valid ISO9660 path is:
texmfL2L3L4L5L6L7L8FOOBAR;112345678
The deepest TDS path needs only seven levels:
texmffontspkcxpubliccmdpi300cmr10pk1234567Some systems display a modified format of ISO9660 names,
mapping alphabetic characters to lowercase, removing version numbers and
trailing periods, etcBefore the December 1996 release, used mixedcase names for
font descriptor files Fortunately, it never relied on case alone to
distinguish among the files Nowadays, it uses only monocase namesAppendixBImplementation issuesWe believe that the TDS can bring a great deal of order to the
current anarchic state of many 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 dropin distribution packages for
B.1Adoption of the TDS[This section is retained purely for historical purposes; the TDS
is now quite firmly entrenched in most distributions.]We recognize that adoption of TDS will not be immediate or
universal Most administrators will not be inclined to make the
final switch until:
Clear and demonstrable benefits can be shown for the TDSTDScompliant versions of all key programs are available
in ported, welltested formsA settling period has taken place, to flush out problems The
public release of the first draft of this document was the first step in
this processConsequently, most of the first trials of the TDS will be made by
members of the TDS committee andor developers of related
software This has already taken place during the course of our
deliberations (see Appendixiref="sec:Related-references"sec:Related-references for a sample
tree available electronically) They will certainly result in the
production of a substantial number of TDScompliant packages
Indeed, the te and Live
distributions are TDScompliant and in use now at many sitesOnce installable forms of key TDScompliant packages are more
widespread, some administrators will set up TDScompliant
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 OS and package dependencies, package interdependencies, and
other details not addressed by this TDS versionAfter most of the dust has settled, hopefully even conservative
administrators will begin to adopt the TDS Eventually, most
sites will have adopted the common structure, and most packages
will be readily available in TDScompliant formWe believe that this process will occur relatively quickly The
TDS committee spans a wide range of interests in the
community Consequently, we believe that most of the key issues
involved in defining a workable TDS definition have been covered,
often in detail developers have been consulted about
implementation issues, and have been trying out the TDS
arrangement Thus, we hope for few surprises as implementations matureFinally, there are several (current or prospective) publishers of
CDROMs These publishers are highly motivated to work out
details of TDS implementation, and their products will provide
inexpensive and convenient ways for experimentallyminded
administrators to experiment with the TDSEfforts are under way to set up a TDS Registry that will
coordinate assignment of TDScompliant directory names and
provide a definitive database of TDScompliant software
distributions (Perhaps this could also serve many sites as the
definition of when a package is local.) For now, distribution through
CTAN serves as an imprecise registryB.2More on subdirectory searchingRecursive subdirectory searching is the ability to specify a search not
only of a specified directory d, but recursively of all
directories below dSince the TDS specifies precise locations for most files, with no
extra levels of subdirectories allowed, true recursive searching is not
actually required for a TDScompliant implementation We do,
however, strongly recommend recursive searching as the most
userfriendly and natural approach to the problem, rather than
convoluted methods to specify paths without recursionThis feature is already supported by many implementations of and
companion utilities, for example DECUS for VMS,
Dvips(k), em (and its drivers),
PubliC , Web2c, Xdvi(k),
and YY The Kpathsea library is a reusable
implementation of subdirectory searching for , used in a number of
the above programsEven if your 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 variablesThe 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 wellorganized TDS,
for the reasons stated in Sectioniref="sec:Subdirectory-searching"sec: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 systemDifferent implementations specify subdirectory searching differently
In the interest of typographic clarity, the examples here do not use the
replaceable fontDvips: via a separate
TEXFONTSSUBDIR environment variableem:t:subdir; t:subdir for
a single level of searchingKpathsea:texmfsubdirVMS:texmf:[subdir...]Xdvi (patchlevel 20):texmfsubdir;
texmfsubdir for a single level of searching Version 20.50
and above support the notationYY :t:subdir or
t:subdirB.3Example implementationspecific treesThe TDS cannot specify a precise location for
implementationspecific files, such as texmfini, because a site
may have multiple implementationsNevertheless, 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 warningWe 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 helpfulB.3.1AmiWeb2c 2.0(Email schererphysik.rwthaachen.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 belowThanks 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 preservedIn addition to Kpathseas notation recursive path search may
also be started by DEVICE:, e.g., TeXMF:
will scan this specific device completelyBinaries coming with the AmiWeb2c distribution are installed in the
directory binamiweb2c outside the common TDS tree
sharetexmf In addition to the set of AmiWeb2c binaries
you will find two subdirectories local and pastex
with auxiliary programsA stripped version of the Pas system (used by kind permission of
Georg Hemann) is coming with AmiWeb2c, preinstalled in its own
sharetexmfamiweb2cpastex directory If you want to use
Pas you have to assign the name TeX: to this placeDocumentation files in AmigaGuide format should be stored at
docguide similar to docinfoB.3.2Public DECUS If another VMS implementation besides Public DECUS
appears, the top level implementation directory name will be modified to
something more specific (e.g., vmsdecus)ll
texmf
. vms VMS implementation specific files
. . exe enduser 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
B.3.3Web2c 7All implementationdependent system files (.pool,
.fmt, .base, .mem) are stored by default directly
in texmfweb2c The configuration file texmf.cnf and
various subsidiary MakeTeX... scripts used as subroutines are
also stored thereNon specific files are stored following the GNU coding
standards Given a root directory prefix
(usrlocal by default), we have default locations as follows:
ll
See ftp://ftp.gnu.org/pub/gnu/standards.text 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 usrlocaltexmfAppendixCIs 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:
Path searching control at the level If documents could
restrict subdirectory searching to a subdirectory via some portable
syntax in file names, restrictions on uniqueness of filenames could be
relaxed considerably (with the cooperation of the formats), and the
search path would not need to depend on the formatMultiple logical texmf trees For example, a site might have
one (readonly) location for stable files, and a different (writable)
location for dynamicallycreated fonts or other files It would be
reasonable for two such trees to be logically merged when searchingC.1Macro structureThe TWG settled on the
formatpackage arrangement after long
discussion about how best to arrange the filesThe primary alternative to this arrangement was a scheme which reversed
the order of these directories:
packageformat 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 formatpackage
structure won for a couple of reasons:
It is closer to current practice; in fact, several members of the
TWG have already implemented the TDS hierarchy The
alternative is not in use at any known site, and the TWG felt it
wrong to mandate something with which there is no practical experienceThe alternative arrangement increases the number of toplevel
directories, so the files that must be found using subdirectory
searching are spread out in a wide, shallow tree This could have a
profound impact on the efficiency of subdirectory searchingC.2Font structureThe 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 is what made the previous arrangement
with all files in a single directory untenable, and therefore what
initiated the TDS effortC.2.1Font file type locationWe considered the supplierfirst arrangement in use at many sites:texmffontssuppliertypefacetypeThis 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 to
search through all the directories that contain PK files in all
modes and at all resolutionsIn 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 entirelyWe also considered segregating all fontrelated files strictly by file
type, so that MetaFont sources would be in a directory
texmffontsmf, property list files in texmffontspl, the
various forms of Type1 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 beneficialC.2.2Mode and resolution locationWe considered having the mode at the bottom of the font tree:
texmffontspksuppliertypefacemodedpiIn this case, however, it is difficult to limit subdirectory searching
to the mode required for a particular deviceWe then considered moving the dpinnn up to below
the mode:
texmffontspkmodedpisuppliertypefaceBut then it is not feasible to omit the dpinnn
level altogether on systems which can and do choose to use long
filenamesC.2.3Modeless bitmapsThe TDS specifies using a single directory modeless as
the mode name for those utilities which generate bitmaps, e.g.,
texmffontsmodelesstimes This has the considerable advantage
of not requiring each such directory name to be listed in a search pathAn alternative was to use the utility name below which all such
directories could be gathered That has the advantage of separating,
say, gsftopkgenerated bitmaps from ps2pkgenerated 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 PKID byteWe are making an implicit assumption that MetaFont is the only program
producing modedependent 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 happenC.3Documentation structureWe 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 sourcesWe 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
afterAppendixDRelated referencesThis appendix gives pointers to related files and other documentsIn this document, CTAN: means the root of an
anonymous ftp CTAN tree This is both a host name and a directory
name For example:
Finger ctantug.org for a complete list of CTAN sites,
there are mirrors worldwideHere are the references:
The TDS mailing list archives can be retrieved via ftp from:
A sample TDS tree: CTAN:tdsA collection of BibTeX databases and styles:
ftp://ftp.math.utah.edu/pub/tex/bibComponents of by Joachim Schrod:
CTAN:documentationcomponentsofTeXThe level0 DVI driver standard:
CTAN:dviwaredrivstandardlevel0Filenames for fonts:
CTAN:documentationfontname This distribution includes
recommended supplier and typeface namesISO9660 CDROM file system standard:
http://www.iso.ch/cate/cat.htmlA complete set of MetaFont modes:
CTAN:fontsmodesmodes.mf This file includes recommended mode
namesAppendixEContributorsThe TWG had no formal meetings; electronic mail was the primary
communication mediumSebastian Rahtz is the Users Group Technical Council
liaison Norman Walsh is the committee chairOriginal contributors:
BarbaraBeetonKarlBerryVickiBrownDavidCarlisleThomasEsserAlanJeffreyJorgKnappenPierreMacKayRichMorinSebastianRahtzJoachimSchrodChristianSpielerElizabethTachikawaPhilipTaylorUlrikViethPaulVojtaNormanWalshAdditional contributors:
DavidAspinallNelsonBeebeHarrietBortonBartChildsDamianCugleyAlanDunwellMichaelFergusonErikFrambachBernardGaulleJeffreyGealowGeorgeGreenwadeThomasHerterBertholdHornCharlesKarneyDavidKastrupDavidKellermanWonkooKimRichardKinchRobinKirkhamAlexKokEberhardMattesBobMorrisLennyMuellnerOrenPatashnikDavidRheadAndreasSchererMarkSinkeAndrewTrevorrowDougWaudCheeWaiYeung