CTAN and the TeX Directory Structure

CTAN Announcements ctan-ann at dante.de
Mon May 28 13:51:35 CEST 2012


* TDS layout on CTAN: the problem.

CTAN was developed as a means of unifying access to TeX-related
material; in pre-CTAN days, packages to use with TeX were dotted
on ftp sites around the net, according to the whim of the sites'
maintainers.  To find a file, you prowled the mailing lists and news
groups until someone mentioned the file.

CTAN, therefore, provides uniform access to a range of files, and
those files may be found at the same place on any conforming CTAN site
or mirror.  The structure of the directory tree on a CTAN site is
designed to ease browsing: packages form the leaf nodes of the tree
(either as single files or as directories containing several files).
The big distributions can be viewed, in this sense, as packages.
Above all, the interested user can browse the tree to find out what
CTAN offers.

Methods of access have changed, too; CTAN sites originally offered no
more than FTP access.  Today's archives offer web access as well (and
rsync access for mirrors), and the CTAN team and its helpers provide
many other related services, including a catalogue, an index of
packages "by topic" (i.e., by subject and usage areas).

However, CTAN remains careful not to lose sight of a vital part of its
original brief: an archive that users may browse.

Separately from the development of CTAN, a TUG working group defined
the TeX Directory Structure (TDS), which makes possible TeX systems
that offer efficient access to huge numbers of TeX-related files, in
an efficient way.  Most (if not all) modern TeX distributions lay out
files in TDS-compiant way; but constructing a TDS-compliant form of a
package is not trivial.  How, then, is the user to decide where to put
files of a new package?

An obvious solution is to provide packages on the archive laid out
according to TDS format.  Unfortunately, this conflicts with the
requirement that people may browse CTAN; TDS layout could have been
designed to discourage people from browsing -- it is typically
dominated by directories whose only contents are links to other
directories.

* The CTAN team's solution

The CTAN team have decided that packages on the archive shall remain
in a browsing-friendly layout.  In parallel, a new "install" tree has
been created.  The install tree's structure parallels those of the
main trees: for any package

   foo/bar/baz/...

on the main tree "foo", a TDS-structured ZIP file would be found at

   install/foo/bar/baz.tds.zip

which may be used to update a TeX system.

The CTAN team will check that baz.tds.zip correctly covers the package
material, when each version of baz is uploaded.  The check is not
guaranteed to spot every problem, but it detects gross errors (such as
updating a file zot.tex in the main tree, but not updating the copy in
baz.tds.zip)

Note that, in most cases, the usefulness of the .tds.zip is
transitory: most modern distributions provide most (free) packages, so
that after a day or so, a new (version of a) package will be available
via the distribution's update mechanism.

* Anomalies.

Overall, banishing TDS-format layouts remains our aim, but we can't
possibly claim that the policy has always been applied as we would
like.  All over the archive there are packages that are variously
"wrong" (by our reckoning above).  We shall not be correcting these
packages, unless new versions are uploaded, or some other imperative
arises.

Another (inevitable) anomaly is the TeX distributions.  CTAN archives
provide a repository from which users load a distribution, and which
supplies updates as parts of the distribution are upgraded.  We do not
expect to "improve" the distributions' layout (that is, any change
will come from the distribution managers).


  The CTAN Team
   (What is left of it)



More information about the Ctan-ann mailing list