Description of the TeXDist directory structure. Version 1. 

This structure is meant to provide an abstraction of various TeX installs that may reside anywhere on Disk (e.g. in /sw for Fink, /usr/local/texlive/2005 fo TeX Live 2005, /opt for DarwinPorts, etc.)

Warning: this document is for Unix-savvy people only and has as its main goal the documentation of a technical solution, not the use of this solution (which is quite simple). As an ordinary end user, you will hardly have to know or understand any of this, except maybe for the part about the texdist program below, which you may want to use as an end user if you have multiple TeX distributions on your system. This will however better be explained elsewhere without the confusing technical stuff here.

TeXDist directory structure contents

The TeXDist directory structure format contains a Contents subdirectory.

The Foo/Contents subdirectory contains
- A Root symbolic link. This links to the root of the TeX distribution. E.g. for TeX Live 2005, this is /usr/local/texlive/2005 and for gwTeX (2006) this is /usr/local/gwTeX.
- A Programs subdirectory. This subdirectory contains links to the actual directories of the binaries and scripts, one link for each hardware architecture. For gwTeX, this is ../Root/bin/powerpc-apple-darwin-current for powerpc and ../Root/bin/i386-apple-darwin-current for x86. If a future distribution would have universal binaries, each link for an architecture would point to the same directory containing the universal binaries. With links for each architecture, the TeXDist directory structure becomes a kowledge base/abstraction for how a TeX distribution looks, but it does not contain the actual situation of the TeX distribution it points to.
One remark on the root: there are two ways of creating the Root link in the TeXDist directory structure: absolute and relative:
- If the link inside the TeXDist directory structure is relative (e.g. ../../../../../usr/local/gwTeX), it will work independently form the mount point of the volume. E.g. if you boot from another disk and your original Startup Disk with gwTeX installed is mounted as /Volumes/MyOtherStartupDisk, you can still use the TeXDist directory structure to get to your TeX on your MyOtherStartupDisk volume. But when you change the location of the TeXDist directory structure within your volume, it probably will  not be correct anymore as it points to a TeX relative to its own position in the directory hierarchy.
- If the link inside the TeXDist directory structure is absolute (e.g. /usr/local/gwTeX) it will not work anymore when you boot form another disk. But you can move the TeXDist directory structure around when booted from the disk that has TeX in the absolute location (e.g. /usr/local/gwTeX) and the TeXDist directory structure will still have the correct information.
The preferred way is relative as moving these structures around is problematic anyway (because they are used as the basis for a bundle approach as well, see below).
- A TexmfLocal symbolic link. The TexmfLocal directory is where local additions are kept that are normally independent from the distribution version. On a pre-2006 gwTeX this is ../Root/share/texmf.local, on TeX Live the default for this is ../Root/../texmf-local and on a current gwTeX this is ../Root/texmf.pkgs
- A TexmfSysVar symbolic link. The TexmfSysVar directory is where distribution-dependent files are kept, amongst which the results of the updmap, fmtutil, texconfig, etc. commands as well as the compiled formats. On a pre-2006 gwTeX this is ../Root/share/texmf.local, on TeX Live this is ../Root/texmf-var and on a current gwTeX this is ../Root/texmf.local (note that gwTeX and TeX Live both did split the texmf-local tree, but that they both use texmf-local for a different part of the split. Te abstraction offered here (TexmfSysVar and TexmfLocal) hides that distinction.
- A Developer subdirectory if developer resourcs like libraries and C include files ara available. Inside Developer there is a Lib and an Include subdirectory which both contain symbolic links for the respective directories in the distribution. Links are given for each architecture (i386 and powerpc), if the resources in the distribution are universal (as is the case in gwTeX), both will point to the same directory.
- An AllTexmf subdirectory that contains links to all the texmf trees that are active in this distribution.
- A Doc subirectory that contains links to all doc subdirectories of all texmf trees of the distrubution.

TeXDist directory structure setup on your system

The TeXDist directory structures normally live inside your distribution, e.g. in /usr/local/gwTeX/texdist for gwTeX. Also there, a directory .DefaultTeX should be created that contains a link Content that links to a Content inside a TeXdist directory structure (or bundle, see below). Furthermore, a link /usr/texbin should be set up which should link to ../Library/TeX/Distributions/.DefaultTeX/Contents/Programs/i386 on intel systems and ../Library/TeX/Distributions/.DefaultTeX/Contents/Programs/powerpc on ppc systems. This is a system architecture dependent link to the appropriate binaries for your system and this is why it lives in /usr, next to /usr/bin and /usr/sbin, etc. /usr/texbin should be used to change system-wide PATH settings and can be used to set a system-specific TeX PATH in your frontend preferences.

Man entries can be used like this (entries in your man configuration file)
	MANPATH /Library/TeX/Distributions/.DefaultTeX/Contents/Man
	MANPATH_MAP /usr/texbin /Library/TeX/Distributions/.DefaultTeX/Contents/Man
These will make the current active TeX available via the man command and will make searching for these fast. The gwTeX i-Package takes care of this.

TeXDist directory structure usage

What does this all do?

As said earlier, TeXDist directory structures are meant to be descriptions of TeX distributions on your system. Their content is only an abstraction of the capabilities of the distribution, but not the actualities. E.g., if a user installs gwTeX without the man pages, the link gwTeX/Contents/Man will be nonfunctional. It is also for  this reason that the programs and developer entries are split into pointers for each architecture. That means that from the TeXDist directory structure itself, no direct information can be gained that describes where to find the architecture-dependent stuff for the actual architecture the TeXDist directory structure resides on. There are two other ways this can be achieved:
	1. As above with /usr/texbin.
	2. Frontends can directly use /Library/TeX/.Distributions/DefaultTeX/Contents/Programs/powerpc or /Library/TeX/.Distributions/DefaultTeX/Contents/Programs/i386. 

.texdist bundle interface to the TeXDist directory structure

In /Library/TeX/Distributions you will find Foo.texdist directories. This is the central repositry of TeX DIstribution information in .texdist bundles.

As soon as the first program that claims to recognize .texdist is installed on a system, the .texdist bundles will change to real objects in the Finder and in standard Apple Open panels. Changing distribution will be as easy for the end user as opening the .texdist bundle with the frontend. If the user selects, say, /Library/TeX/Distributions/TeXLive-2005.texdist, the frontend (when running on an intel machine) will select /Library/TeX/.Distributions/TeXLive-2005/Contents/Programs/i386 as its TeX programs path. This could even be set per-document, e.g. you have your old project that compiles perfectly with TeX Live 2003 but not with a more modern TeX, just tell your frontend to compile it with the older distribution.

All /Library/TeX/Distributions/Foo.texdist/Contents are links that link to a Contents folder inside a TeXDist structure. Normally, a TeX distribution will carry its own structure, e.g. gwTeX contains /usr/local/gwTeX/texdist/gwTeX and /Library/TeX/Distributions/gwTeX.texdist/Contents links to /usr/local/gwTeX/texdist/gwTeX/Contents.

For older distributions that do not carry their own TeXDist structures, there are "Factory Default" TeXDist structures in /Library/TeX/Distributions/.FactoryDefaults. These provide he abstractions for distributions like TeX Live 2004 – 2006 and gwTeX 2003 – 2005 when installed with default choises (e.g. TL 2005 installs in /usr/local/texlive/2005 and the shared texmf-local tree lives in /usr/local/texlive). Access via .texdist bundles in /Library/TeX/Distributions to the factory defaults are provided.

System wide settings

Changing the system-wide TeX distribution in use requires one simple change: Soft Linking /Library/TeX/Distributions/.DefaultTeX/Contents to the inside of one of the available TeXDist directory structures. E.g., in a shell command this would be
	sudo rm /Library/TeX/Distributions/.DefaultTeX/Contents
	sudo ln -s ../gwTeX.texdist/Contents /Library/TeX/Distributions/.DefaultTeX
and your system-wide setup would be gwTeX. Note that this does not guarantee that the underlying TeX distribution is available.

If the PATH entry for your shell is extended with /usr/texbin (the gwTeX i-Package, hopefully amongst others, sets this up) and your MANPATH with /Library/TeX/Distrbutions/.DefaultTeX/Man (ditto), any change you make in the selection of the system-wide default TeX distribution is automatically picked up on the command line. No need to change command line settings anymore.

The texdist program

A script named texdist is placed in /Library/TeX/.scripts (invisible in the Finder) and it is symlinked from /usr/local/bin. The script provides an interface to the TeX Distribution structures. Basic functions are listing and running commands. E.g.

	texdist gwTeX "kpsewhich fmtutil.cnf"

will run the "kpsewhich fmtutil.cnf" command with the gwTeX distribution, while

	texdist TeXLive-2005 "kpsewhich fmtutil.cnf"

will do the same with the TeX Live 2005 distribution. See "texdist --usage" for complete instructions.

Example long directory listing for /usr/texbin and /Library/TeX on an Intel Mac

lrwxr-xr-x   1 root  wheel  63 Dec 14 22:07 /usr/texbin -> ../Library/TeX/Distributions/.DefaultTeX/Contents/Programs/i386

/Library/TeX:
total 16
drwxr-xr-x    6 root  admin   204 Dec 14 18:16 .
drwxrwxr-t   48 root  admin  1632 Dec 14 18:16 ..
drwxr-xr-x    3 root  admin   102 Dec 14 18:16 .scripts
drwxr-xr-x   10 root  admin   340 Dec 14 22:07 Distributions
lrwxr-xr-x    1 root  admin    38 Dec 14 18:16 Documentation -> Distributions/.DefaultTeX/Contents/Doc
lrwxr-xr-x    1 root  admin    39 Dec 14 18:16 Root -> Distributions/.DefaultTeX/Contents/Root

/Library/TeX/.scripts:
total 24
drwxr-xr-x   3 root    admin    102 Dec 14 18:16 .
drwxr-xr-x   6 root    admin    204 Dec 14 18:16 ..
-rwxr-xr-x   1 gerben  gerben  8300 Dec 14 22:04 texdist

/Library/TeX/Distributions:
total 32
drwxr-xr-x   10 root  admin    340 Dec 14 22:07 .
drwxr-xr-x    6 root  admin    204 Dec 14 18:16 ..
drwxr-xr-x    3 root  admin    102 Dec 14 18:16 .DefaultTeX
drwxr-xr-x    6 root  admin    204 Dec 14 22:07 .FactoryDefaults
-rw-r--r--    1 root  admin  15311 Dec 14 18:16 TeXDist-description.rtf
drwxr-xr-x    3 root  admin    102 Dec 14 18:16 TeXLive-2004.texdist
drwxr-xr-x    3 root  admin    102 Dec 14 18:16 TeXLive-2005.texdist
drwxr-xr-x    3 root  admin    102 Dec 14 18:16 TeXLive-2006.texdist
drwxr-xr-x    3 root  admin    102 Dec 14 18:16 gwTeX-2003-2005.texdist
drwxr-xr-x    3 root  admin    102 Dec 14 22:07 gwTeX.texdist

/Library/TeX/Distributions/.DefaultTeX:
total 8
drwxr-xr-x    3 root  admin  102 Dec 14 18:16 .
drwxr-xr-x   10 root  admin  340 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   25 Dec 14 18:16 Contents -> ../gwTeX.texdist/Contents

/Library/TeX/Distributions/.FactoryDefaults:
total 0
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 .
drwxr-xr-x   10 root  admin  340 Dec 14 22:07 ..
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 TeXLive-2004
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 TeXLive-2005
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 TeXLive-2006
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 gwTeX-2003-2005

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2004:
total 0
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 .
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 ..
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 Contents

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2004/Contents:
total 48
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 .
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 ..
drwxr-xr-x    7 root  admin  238 Dec 14 22:07 AllTexmf
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 Doc
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 Info -> ../../../../../../usr/local/texlive/2004/texmf/doc/info
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 Man -> ../../../../../../usr/local/texlive/2004/texmf/doc/man
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 Programs
lrwxr-xr-x    1 root  admin   23 Dec 14 22:07 Root -> /usr/local/texlive/2004
-rw-r--r--    1 root  admin    2 Dec 14 22:07 TeXDistVersion
lrwxr-xr-x    1 root  admin   47 Dec 14 22:07 TexmfLocal -> ../../../../../../usr/local/texlive/texmf-local
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 TexmfSysVar -> ../../../../../../usr/local/texlive/2004/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2004/Contents/AllTexmf:
total 40
drwxr-xr-x    7 root  admin  238 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 texmf -> ../../../../../../..//usr/local/texlive/2004/texmf
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 texmf-dist -> ../../../../../../..//usr/local/texlive/2004/texmf-dist
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-doc -> ../../../../../../..//usr/local/texlive/2004/texmf-doc
lrwxr-xr-x    1 root  admin   51 Dec 14 22:07 texmf-local -> ../../../../../../..//usr/local/texlive/texmf-local
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-var -> ../../../../../../..//usr/local/texlive/2004/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2004/Contents/Doc:
total 32
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 texmf-dist-doc -> ../../../../../../..//usr/local/texlive/2004/texmf-dist
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 texmf-doc -> ../../../../../../..//usr/local/texlive/2004/texmf
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-doc-doc -> ../../../../../../..//usr/local/texlive/2004/texmf-doc
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-var-doc -> ../../../../../../..//usr/local/texlive/2004/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2004/Contents/Programs:
total 16
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   59 Dec 14 22:07 i386 -> ../../../../../../../usr/local/texlive/2004/bin/i386-darwin
lrwxr-xr-x    1 root  admin   64 Dec 14 22:07 powerpc -> ../../../../.././../../usr/local/texlive/2004/bin/powerpc-darwin

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2005:
total 0
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 .
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 ..
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 Contents

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2005/Contents:
total 48
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 .
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 ..
drwxr-xr-x    7 root  admin  238 Dec 14 22:07 AllTexmf
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 Doc
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 Info -> ../../../../../../usr/local/texlive/2005/texmf/doc/info
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 Man -> ../../../../../../usr/local/texlive/2005/texmf/doc/man
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 Programs
lrwxr-xr-x    1 root  admin   23 Dec 14 22:07 Root -> /usr/local/texlive/2005
-rw-r--r--    1 root  admin    2 Dec 14 22:07 TeXDistVersion
lrwxr-xr-x    1 root  admin   47 Dec 14 22:07 TexmfLocal -> ../../../../../../usr/local/texlive/texmf-local
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 TexmfSysVar -> ../../../../../../usr/local/texlive/2005/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2005/Contents/AllTexmf:
total 40
drwxr-xr-x    7 root  admin  238 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 texmf -> ../../../../../../..//usr/local/texlive/2005/texmf
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 texmf-dist -> ../../../../../../..//usr/local/texlive/2005/texmf-dist
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-doc -> ../../../../../../..//usr/local/texlive/2005/texmf-doc
lrwxr-xr-x    1 root  admin   51 Dec 14 22:07 texmf-local -> ../../../../../../..//usr/local/texlive/texmf-local
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-var -> ../../../../../../..//usr/local/texlive/2005/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2005/Contents/Doc:
total 32
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 texmf-dist-doc -> ../../../../../../..//usr/local/texlive/2005/texmf-dist
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 texmf-doc -> ../../../../../../..//usr/local/texlive/2005/texmf
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-doc-doc -> ../../../../../../..//usr/local/texlive/2005/texmf-doc
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-var-doc -> ../../../../../../..//usr/local/texlive/2005/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2005/Contents/Programs:
total 16
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   59 Dec 14 22:07 i386 -> ../../../../../../../usr/local/texlive/2005/bin/i386-darwin
lrwxr-xr-x    1 root  admin   64 Dec 14 22:07 powerpc -> ../../../../.././../../usr/local/texlive/2005/bin/powerpc-darwin

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2006:
total 0
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 .
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 ..
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 Contents

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2006/Contents:
total 48
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 .
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 ..
drwxr-xr-x    7 root  admin  238 Dec 14 22:07 AllTexmf
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 Doc
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 Info -> ../../../../../../usr/local/texlive/2006/texmf/doc/info
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 Man -> ../../../../../../usr/local/texlive/2006/texmf/doc/man
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 Programs
lrwxr-xr-x    1 root  admin   23 Dec 14 22:07 Root -> /usr/local/texlive/2006
-rw-r--r--    1 root  admin    2 Dec 14 22:07 TeXDistVersion
lrwxr-xr-x    1 root  admin   47 Dec 14 22:07 TexmfLocal -> ../../../../../../usr/local/texlive/texmf-local
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 TexmfSysVar -> ../../../../../../usr/local/texlive/2006/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2006/Contents/AllTexmf:
total 40
drwxr-xr-x    7 root  admin  238 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 texmf -> ../../../../../../..//usr/local/texlive/2006/texmf
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 texmf-dist -> ../../../../../../..//usr/local/texlive/2006/texmf-dist
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-doc -> ../../../../../../..//usr/local/texlive/2006/texmf-doc
lrwxr-xr-x    1 root  admin   51 Dec 14 22:07 texmf-local -> ../../../../../../..//usr/local/texlive/texmf-local
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-var -> ../../../../../../..//usr/local/texlive/2006/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2006/Contents/Doc:
total 32
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   55 Dec 14 22:07 texmf-dist-doc -> ../../../../../../..//usr/local/texlive/2006/texmf-dist
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 texmf-doc -> ../../../../../../..//usr/local/texlive/2006/texmf
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-doc-doc -> ../../../../../../..//usr/local/texlive/2006/texmf-doc
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf-var-doc -> ../../../../../../..//usr/local/texlive/2006/texmf-var

/Library/TeX/Distributions/.FactoryDefaults/TeXLive-2006/Contents/Programs:
total 16
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 .
drwxr-xr-x   11 root  admin  374 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   59 Dec 14 22:07 i386 -> ../../../../../../../usr/local/texlive/2006/bin/i386-darwin
lrwxr-xr-x    1 root  admin   64 Dec 14 22:07 powerpc -> ../../../../.././../../usr/local/texlive/2006/bin/powerpc-darwin

/Library/TeX/Distributions/.FactoryDefaults/gwTeX-2003-2005:
total 0
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 .
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 ..
drwxr-xr-x   12 root  admin  408 Dec 14 22:07 Contents

/Library/TeX/Distributions/.FactoryDefaults/gwTeX-2003-2005/Contents:
total 48
drwxr-xr-x   12 root  admin  408 Dec 14 22:07 .
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 ..
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 AllTexmf
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 Developer
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 Doc
lrwxr-xr-x    1 root  admin   38 Dec 14 22:07 Info -> ../../../../../../usr/local/teTeX/info
lrwxr-xr-x    1 root  admin   37 Dec 14 22:07 Man -> ../../../../../../usr/local/teTeX/man
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 Programs
lrwxr-xr-x    1 root  admin   33 Dec 14 22:07 Root -> ../../../../../../usr/local/teTeX
-rw-r--r--    1 root  admin    2 Dec 14 22:07 TeXDistVersion
lrwxr-xr-x    1 root  admin   51 Dec 14 22:07 TexmfLocal -> ../../../../../../usr/local/teTeX/share/texmf.local
lrwxr-xr-x    1 root  admin   51 Dec 14 22:07 TexmfSysVar -> ../../../../../../usr/local/teTeX/share/texmf.local

/Library/TeX/Distributions/.FactoryDefaults/gwTeX-2003-2005/Contents/AllTexmf:
total 32
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 .
drwxr-xr-x   12 root  admin  408 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   48 Dec 14 22:07 texmf -> ../../../../../../../usr/local/teTeX/share/texmf
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf.gwtex -> ../../../../../../../usr/local/teTeX/share/texmf.gwtex
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf.local -> ../../../../../../../usr/local/teTeX/share/texmf.local
lrwxr-xr-x    1 root  admin   54 Dec 14 22:07 texmf.tetex -> ../../../../../../../usr/local/teTeX/share/texmf.tetex

/Library/TeX/Distributions/.FactoryDefaults/gwTeX-2003-2005/Contents/Developer:
total 0
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 .
drwxr-xr-x   12 root  admin  408 Dec 14 22:07 ..
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 Include
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 Lib

/Library/TeX/Distributions/.FactoryDefaults/gwTeX-2003-2005/Contents/Developer/Include:
total 16
drwxr-xr-x   4 root  admin  136 Dec 14 22:07 .
drwxr-xr-x   4 root  admin  136 Dec 14 22:07 ..
lrwxr-xr-x   1 root  admin   47 Dec 14 22:07 i386 -> ../../../../../../../../usr/local/teTeX/include
lrwxr-xr-x   1 root  admin   47 Dec 14 22:07 powerpc -> ../../../../../../../../usr/local/teTeX/include

/Library/TeX/Distributions/.FactoryDefaults/gwTeX-2003-2005/Contents/Developer/Lib:
total 16
drwxr-xr-x   4 root  admin  136 Dec 14 22:07 .
drwxr-xr-x   4 root  admin  136 Dec 14 22:07 ..
lrwxr-xr-x   1 root  admin   43 Dec 14 22:07 i386 -> ../../../../../../../../usr/local/teTeX/lib
lrwxr-xr-x   1 root  admin   43 Dec 14 22:07 powerpc -> ../../../../../../../../usr/local/teTeX/lib

/Library/TeX/Distributions/.FactoryDefaults/gwTeX-2003-2005/Contents/Doc:
total 32
drwxr-xr-x    6 root  admin  204 Dec 14 22:07 .
drwxr-xr-x   12 root  admin  408 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   52 Dec 14 22:07 texmf-doc -> ../../../../../../../usr/local/teTeX/share/texmf/doc
lrwxr-xr-x    1 root  admin   58 Dec 14 22:07 texmf-gwtex-doc -> ../../../../../../../usr/local/teTeX/share/texmf.gwtex/doc
lrwxr-xr-x    1 root  admin   58 Dec 14 22:07 texmf-local-doc -> ../../../../../../../usr/local/teTeX/share/texmf.local/doc
lrwxr-xr-x    1 root  admin   58 Dec 14 22:07 texmf-tetex-doc -> ../../../../../../../usr/local/teTeX/share/texmf.tetex/doc

/Library/TeX/Distributions/.FactoryDefaults/gwTeX-2003-2005/Contents/Programs:
total 16
drwxr-xr-x    4 root  admin  136 Dec 14 22:07 .
drwxr-xr-x   12 root  admin  408 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   66 Dec 14 22:07 i386 -> ../../../../../../../usr/local/teTeX/bin/i386-apple-darwin-current
lrwxr-xr-x    1 root  admin   69 Dec 14 22:07 powerpc -> ../../../../../../../usr/local/teTeX/bin/powerpc-apple-darwin-current

/Library/TeX/Distributions/TeXLive-2004.texdist:
total 8
drwxr-xr-x    3 root  admin  102 Dec 14 18:16 .
drwxr-xr-x   10 root  admin  340 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   41 Dec 14 18:16 Contents -> ../.FactoryDefaults/TeXLive-2004/Contents

/Library/TeX/Distributions/TeXLive-2005.texdist:
total 8
drwxr-xr-x    3 root  admin  102 Dec 14 18:16 .
drwxr-xr-x   10 root  admin  340 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   41 Dec 14 18:16 Contents -> ../.FactoryDefaults/TeXLive-2005/Contents

/Library/TeX/Distributions/TeXLive-2006.texdist:
total 8
drwxr-xr-x    3 root  admin  102 Dec 14 18:16 .
drwxr-xr-x   10 root  admin  340 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   41 Dec 14 18:16 Contents -> ../.FactoryDefaults/TeXLive-2006/Contents

/Library/TeX/Distributions/gwTeX-2003-2005.texdist:
total 8
drwxr-xr-x    3 root  admin  102 Dec 14 18:16 .
drwxr-xr-x   10 root  admin  340 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   44 Dec 14 18:16 Contents -> ../.FactoryDefaults/gwTeX-2003-2005/Contents

/Library/TeX/Distributions/gwTeX.texdist:
total 8
drwxr-xr-x    3 root  admin  102 Dec 14 22:07 .
drwxr-xr-x   10 root  admin  340 Dec 14 22:07 ..
lrwxr-xr-x    1 root  admin   50 Dec 14 22:07 Contents -> ../../../../usr/local/gwTeX/texdist/gwTeX/Contents

.texdist design and distribution issues (GW, 10 December 2006)

- Keeping the TeXDist structures in sync with the actual dynamic situation will be a nightmare if they would have to reflect the actual state of a TeX distribution. That goes for internal changes of the actual installations (e.g. does the user have man pages installed or not) and externals (eg. different layouts and locations one can choose on installation of certain TeX distributions. Hence, TeXDist directory structures offer an abstraction that depict a possible distribution layout and I ship .texdist for my own distributions as well as for a couple of TeX Live's when installed from the ISO image choosing a completely default install.
- Offering these standard descriptions makes it work for older installations without these installations having to change. E.g., the TL 2005 and earlier ISOs are not going to change. And at this stage, nor is TL2006. So, without me producing official TL TeXDist directory structures for 2005 and 2006, these will not have .texdist support and it will be difficult for users to switch between gwTeX and TL2005 or TL2006 (installed from ISO) in this way.
- I have decided in the end against only creating these when the TL install from ISO is already there (this was what I had originally) because it adds to the confusion because the order of install (ISO first gwTeX after or the other way around give different results).
- The offered TeXDist structures depict the official default installation. If you do an official install, it will just work.
- I have decided on /usr/texbin because /usr/local may be shared between systems of a different architecture, while this is *never* the case for /usr and the /usr/texbin link is hardware-architecture dependent.

10 Dec 2006, Gerben Wierda

PS. It turns out that Apple's ls program is somewhat unreliable with symlinks. Any "ls -l" command with an argument with a trailing slash, e.g. "ls -l /usr/texbin/" is supposed to resolve the chain of symlinks to the end and then display the contents of the symlinked directory. There is a bug in Mac OS X up to 10.4.8 at least, where this does not work properly. As a workaround, use "ls -lH" if you want to resolve all symlinks. Both the following commands should display the same output:

$ ls -l /usr/texbin/
lrwxr-xr-x   1 root  admin  37 Dec 10 23:29 /usr/texbin/ -> ../Root/bin/i386-apple-darwin-current

$ ls -Hl /usr/texbin
total 53416
-rwxr-xr-x   1 root    admin    84140 Dec  2 08:08 T1Wrap
-rwxr-xr-x   1 root    admin    94232 Dec  2 08:08 a2ping
-rwxr-xr-x   1 root    admin    88644 Dec  2 08:08 afm2pl
etc.

The first one is wrong and displays some intermediate symlink (unresolved) instead of the contents of /usr/texbin (fully resolved).