mactexlion logo OX5

** Multiple TeX Distributions **


TWG  |  MacTeX  |  Donate  |  FAQ  |  Fonts  |  Help  |  References  |  Support  |  Acknowledgments  |  TUG





Support for Multiple TeX Distributions

In 2006, MacTeX installed Thomas Esser's teTeX distribution using a redistribution packaged by Gerben Wierda. In May of 2006, Esser announced the end of support for teTeX, and recommended that users switch to TeX Live. This caused a flurry of activity throughout the TeX world. The Mac OS X support for multiple distributions is one outcome of this activity.

MacTeX installs a data structure by Gerben Wierda and Jerome Laurens to support multiple TeX distributions on a machine. Users who installed last year's MacTeX-2011 will discover that their old TeX distribution has not been altered by MacTeX. Instead a new preference pane is available in Apple's System Preferences; this "TeX Distributions" pane lists available distributions on your machine. After installation of MacTeX-2012, it will list "TeX Live 2012" and might well list "TeXLive-2011", and other distributions as well. The currently active distribution will be selected in the pane. Select another distribution to make it active.

Changing distributions with the pane automatically changes PATH and MANPATH variables, so interaction with TeX via the command line will use the appropriate distribution. It also automatically reconfigures GUI applications so they use the new active distribution. To make this happen, a new symbolic link named /usr/texbin has been created. In the last year, almost all Macintosh TeX GUI applications have adopted this symbolic link as a default, so for example BibDesk, LaTeXiT, TeXShop, and TeXworks are now automatically configured to use the new data structure.

There is a new TeX Live distribution approximately once a year. Each such distribution is identified by year. By using the TeX Distributions pane, users can confidently install a new distribution without worrying that it will break projects currently underway. If there are problems with the 2012 version, these users can return to the 2011 version with a single preference pane click. When experiments show that the new distribution causes no problem, users can make it permanently active.

Incidentally, the data structure does not modify the actual TeX distribution in any way. It is ingeniously constructed so that, for instance, the preference pane needs to only change a single symbolic link to change the active TeX distribution.

TeX distributions are installed in locations which are usually not displayed in the Finder. But it is possible to inspect the currently active distribution by going to /Library/TeX/Root with Finder. This is a symbolic link to the full currently active distribution. Similarly, /Library/TeX/Documentation is a symbolic link to all documentation folders for the currently active distribution.

The data structure contains features which future GUI programs may use. For example, a TeX interface program could offer to typeset some files with one distribution and others with another, or to display a list of documentation for the currently active distribution.

The Fink and MacPorts TeX distributions present a special case. The data structure already supports these distributions, but unfortunately both Fink and MacPorts modify PATH to add their binary locations to the start of the variable. This makes it impossible for the TeX Distributions pane to switch the value of PATH when the users chooses a new active distribution. This problem is easily solved. After Fink or MacPorts modifies your PATH in its startup script, typically .profile, modify PATH a final time by adding /usr/texbin to its start.