The TEX Live Guide
TEX Live 2008

Karl Berry, editor
http://tug.org/texlive/

August 2008

Contents

1 Introduction
 1.1 TEX Live and the TEX Collection
 1.2 Operating system support
 1.3 Basic installation of TEX Live
 1.4 Getting help
2 Overview of TEX Live
 2.1 The TEX Collection: TEX Live, proTEXt, MacTEX
 2.2 Top level TEX Live directories
 2.3 Overview of the predefined texmf trees
 2.4 Extensions to TEX
 2.5 Other notable programs in TEX Live
 2.6 Fonts in TEX Live
3 Installation
 3.1 Starting the installer
  3.1.1 Unix
  3.1.2 Mac OS X
  3.1.3 Windows
  3.1.4 The text installer
  3.1.5 The graphical installer
 3.2 Running the installer
  3.2.1 Binary systems menu (Unix only)
  3.2.2 Selecting what is going to be installed
  3.2.3 Directories
  3.2.4 Options
  3.2.5 Set up for running from DVD (text mode only)
 3.3 Command-line install options
  3.3.1 The location parameter
 3.4 Post-install actions
  3.4.1 Windows
  3.4.2 If symlinks were created
  3.4.3 Environment variables for Unix
  3.4.4 Environment variables: global configuration
  3.4.5 When running from DVD
  3.4.6 ConTEXt Mark IV
  3.4.7 Integrating local and personal macros
  3.4.8 Integrating third-party fonts
 3.5 Testing the installation
4 Network installations
5 Maximally portable TEX Live on DVD and USB
6 tlmgr: Managing your installation
 6.1 tlmgr GUI mode
 6.2 Sample tlmgr command-line invocations
7 Notes on Windows
 7.1 Windows-specific features
 7.2 Additional included software
 7.3 The Dviout previewer
 7.4 Links for additional downloadable software
 7.5 User Profile is Home
 7.6 The Windows registry
 7.7 Windows permissions
8 A user’s guide to Web2C
 8.1 Kpathsea path searching
  8.1.1 Path sources
  8.1.2 Config files
  8.1.3 Path expansion
  8.1.4 Default expansion
  8.1.5 Brace expansion
  8.1.6 Subdirectory expansion
  8.1.7 List of special characters and their meaning: a summary
 8.2 Filename databases
  8.2.1 The filename database
  8.2.2 kpsewhich: Standalone path searching
  8.2.3 Examples of use
  8.2.4 Debugging actions
 8.3 Runtime options
9 Acknowledgements
10 Release history
 10.1 Past
  10.1.1 2003
  10.1.2 2004
  10.1.3 2005
  10.1.4 2006–2007
 10.2 Present
 10.3 Future

1 Introduction

1.1 TEX Live and the TEX Collection

This document describes the main features of the TEX Live software distribution — TEX and related programs for GNU/Linux and other Unix flavors, Mac OS X, and Windows systems.

You may have acquired TEX Live by downloading, or on the TEX Collection DVD, which TEX usergroups distribute among their members. Section 2.1 briefly describes the contents of this DVD. Both TEX Live and the TEX Collection are cooperative efforts by the TEX user groups. This document mainly describes TEX Live itself.

TEX Live includes executables for TEX, LaTeX2e, ConTEXt, Metafont, MetaPost, BibTeX and many other programs; an extensive collection of macros, fonts and documentation; and support for typesetting in many different scripts from around the world.

TEX Live packages are regularly updated from CTAN: http://www.ctan.org.

For a brief summary of the major changes in this edition of TEX Live, see the end of the document, section 10 (p. 75).

1.2 Operating system support

TEX Live contains binaries for many Unix-based architectures, including Mac OS X. The included sources should enable installation on platforms for which we do not have binaries.

As to Windows: only Windows 2000 and later are supported. Windows 9x, ME and NT have been dropped. Because of this change, Windows requires much less special treatment compared to the Unix systems. There are no 64-bit executables for Windows, but the 32-bit executables should run on 64-bit systems.

See section 2.1 for alternate solutions for Windows and Mac OS X.

1.3 Basic installation of TEX Live

You can install TEX Live either from DVD or over the Internet. The net installer itself is small, and downloads everything requested from the Internet. The net installer is an attractive option if you need only a fraction of the complete TEX Live.

The DVD installer lets you install to a local disk, but you can also run TEX Live directly from the DVD (or from a DVD image, if your system supports that).

This is described in the installation sections following, but here is a quick start:

1.4 Getting help

The TEX community is both active and friendly, and most serious questions end up getting answered. However, the support is informal, done by volunteers and casual readers, so it’s especially important that you do your homework before asking. (If you prefer guaranteed commercial support, you can forego TEX Live completely and purchase a vendor’s system; http://tug.org/interest.html#vendors has a list.)

Here is a list of resources, approximately in the order we recommend using them:

Getting Started
If you are new to TEX, the web page http://tug.org/begin.html gives a brief introduction to the system.
TEX FAQ
The TEX FAQ is a huge compendium of answers to all sorts of questions, from the most basic to the most arcane. It is included on TEX Live in texmf-doc/doc/english/FAQ-en/html/index.html, and is available on the Internet through http://www.tex.ac.uk/faq. Please check here first.
TEX Catalogue
If you are looking for a specific package, font, program, etc., the TEX Catalogue is the place to look. It is a huge collection of all TEX-related items. See http://www.ctan.org/help/Catalogue/.
TEX Web Resources
The web page http://tug.org/interest.html has many TEX-related links, in particular for numerous books, manuals, and articles on all aspects of the system.
support archives
The two principal support forums are the Usenet newsgroup news:comp.text.tex and the mailing list texhax@tug.org. Their archives have years of past questions and answers for your searching pleasure, via http://groups.google.com/group/comp.text.tex/topics and http://tug.org/mail-archives/texhax, respectively. And a general web search, for example on http://google.com, never hurts.
asking questions
If you cannot find an answer, you can post to comp.text.tex through Google or your newsreader, or to texhax@tug.org through email. But before you post, please read this FAQ entry, to maximize your chances of getting a useful answer: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=askquestion.
TEX Live support
If you want to report a bug or have suggestions or comments on the TEX Live distribution, installation, or documentation, the mailing list is tex-live@tug.org. However, if your question is about how to use a particular program included in TEX Live, please write to that program’s maintainer or mailing list. Often running a program with the --help option will provide a bug reporting address.

The other side of the coin is helping others who have questions. Both comp.text.tex and texhax are open to anyone, so feel free to join, start reading, and help out where you can.

2 Overview of TEX Live

This section describes the contents of TEX Live and the TEX Collection of which it is a part.

2.1 The TEX Collection: TEX Live, proTEXt, MacTEX

The TEX Collection DVD comprises the following:

TEX Live
A complete TEX system which can be run live or installed to disk.
MacTEX
for Mac OS X, this adds a native Mac OS X installer and other Mac applications to TEX Live. Its home page is http://www.tug.org/mactex/.
proTEXt
An enhancement of the MiKTEX distribution for Windows, ProTEXt adds a few extra tools to MiKTEX, and simplifies installation. It is entirely independent of TEX Live, and has its own installation instructions. The ProTEXt home page is http://tug.org/protext.
CTAN
A snapshot of the CTAN repository.
texmf-extra
A directory with assorted additional packages.

CTAN, protext, and texmf-extra do not necessarily follow the same copying conditions as TEX Live, so be careful when redistributing or modifying.

2.2 Top level TEX Live directories

Here is a brief listing and description of the top level directories in the TEX Live distribution. On the live DVD, the entire TEX Live hierarchy is in a subdirectory texlive, not at the top level of the disc.

bin

The TEX system programs, arranged by platform.

readme.html

Web pages with a quick introduction and useful links, in various languages.

source

The source to all included programs, including the main Web2C TEX and Metafont distributions.

support

Various auxiliary packages and programs. These are not installed automatically. This includes assorted editors and TEX shells.

texmf

See TEXMFMAIN below.

texmf-dist

See TEXMFDIST below.

texmf-doc

Tree for self-contained pure documentation, arranged by language.

tlpkg

Scripts, programs and data for managing the installation. It also contains private copies of Perl and Ghostscript for Windows, which are invisible outside TEX Live, and a new Windows PostScript viewer PSView.

In addition to the directories above, the installation scripts and README files (in various languages) are at the top level of the distribution.

The texmf-doc directory contains documentation which does not belong to any particular package or program. The documentation for the programs (manuals, man pages, Info files) is in texmf/doc. The documentation for TEX packages and formats is in texmf-dist/doc. You can use the texdoc or texdoctk programs to find any documentation wherever it is located. The comprehensive links in the top-level file doc.html may also be helpful.

This TEX Live documentation itself is in texmf-doc and is available in several languages:

2.3 Overview of the predefined texmf trees

This section lists all predefined variables specifying the texmf trees used by the system, and their intended purpose, and the default layout of a TEX Live system. The command texconfig conf shows you the values of these variables, so that you can easily find out how they map to directory names in your installation.

TEXMFMAIN

The tree which holds vital parts of the system such as helper scripts (e.g., web2c/mktexdir) and other support files and their documentation. Does not include TEX formats and packages.

TEXMFDIST

The tree which holds the main set of macro packages, fonts, etc., as originally distributed.

TEXMFLOCAL

The tree which administrators can use for system-wide installation of additional or updated macros, fonts, etc.

TEXMFHOME

The tree which users can use for their own individual installations of additional or updated macros, fonts, etc. The expansion of this variable dynamically adjusts for each user to their own individual directory.

TEXMFCONFIG

The tree used by the utilities texconfig, updmap, and fmtutil to store modified configuration data. Under TEXMFHOME by default.

TEXMFSYSCONFIG

The tree used by the utilities texconfig-sys, updmap-sys, and fmtutil-sys to store modified configuration data.

TEXMFVAR

The tree used by texconfig, updmap and fmtutil to store (cached) runtime data such as format files and generated map files. Under TEXMFHOME by default.

TEXMFSYSVAR

The tree used by texconfig-sys, updmap-sys and fmtutil-sys, and also by tlmgr, to store (cached) runtime data such as format files and generated map files.

The default layout is:

system-wide root
can span multiple TEX Live releases:
2007

A previous release.

...

2008

The current release.

bin

 

i386-linux

GNU/Linux binaries

...

universal-darwin

Mac OS X binaries

win32

Windows binaries

texmf

This is TEXMFMAIN.

texmf-dist

TEXMFDIST

texmf-doc

TEXMFDOC

texmf-var

TEXMFSYSVAR

texmf-config

TEXMFSYSCONFIG

texmf-local

TEXMFLOCAL, intended to be retained from release to release.

user’s home
($HOME or %USERPROFILE%)
.texlive2007

Privately generated and configuration data for a previous release.

.texlive2008

Privately generated and configuration data for the current release.

texmf-var

TEXMFVAR

texmf-config

TEXMFCONFIG

texmf

TEXMFHOME Personal macros. etc.

2.4 Extensions to TEX

TEX itself is frozen, apart from rare bug fixes. It is still present in TEX Live as the program tex, and will remain so in the foreseeable future. TEX Live contains several extended versions of TEX:

e-TEX
adds a set of new primitives (related to macro expansion, character scanning, classes of marks, additional debugging features, and more) and the TEX--XE T extensions for bidirectional typesetting. In default mode, e-TEX is 100% compatible with ordinary TEX. See texmf-dist/doc/etex/base/etex_man.pdf.
pdfTEX
builds on the e-TEX extensions, adding support for writing PDF output as well as DVI. This is the program invoked for most formats, e.g., etex, latex, pdflatex. See http://www.pdftex.org/. texmf-dist/doc/pdftex/manual/pdftex-a.pdf for the manual, and texmf-dist/doc/pdftex/manual/samplepdf/samplepdf.tex for example usage of some of its features.
LuaTEX
is the designated successor of pdfTEX, with which it is intended to be backward-compatible. It should also supersede Aleph, see below. The incorporated Lua interpreter (see http://www.lua.org/) enables elegant solutions for many thorny TEX problems. When called as texlua, it functions as a standalone Lua interpreter, and is already used as such within TEX Live. See http://www.luatex.org/ and texmf-dist/doc/luatex/luatexref-t.pdf.
XeTEX
adds support for Unicode input and OpenType- and system fonts, implemented using standard third-party libraries. See http://scripts.sil.org/xetex.
Omega (Omega)
is based on Unicode (16-bit characters), thus supports working with almost all the world’s scripts simultaneously. It also supports so-called ‘Omega Translation Processes’ (OTPs), for performing complex transformations on arbitrary input. See texmf-dist/doc/omega/base/doc-1.8.tex (not completely up-to-date).
Aleph
combines the Omega and e-TEX extensions. See texmf-dist/doc/aleph/base for some minimal documentation.

2.5 Other notable programs in TEX Live

Here are a few other commonly-used programs included in TEX Live:

bibtex

bibliography support.

makeindex

index support.

dvips

convert DVI to PostScript.

xdvi

DVI previewer for the X Window System.

dvilj

DVI drive for the HP LaserJet family.

dv2dt, dt2dv

convert DVI to/from plain text.

dviconcat, dviselect

cut and paste pages from DVI files.

dvipdfmx

convert DVI to PDF, an alternative approach to pdfTEX (mentioned above). See the ps4pdf and pdftricks packages for still more alternatives.

psselect, psnup,

PostScript utilities.

lacheck

LATEX syntax checker.

texexec, texmfstart

ConTEXt and PDF processor.

tex4ht

TEX to HTML (and XML and more) converter.

2.6 Fonts in TEX Live

TEX Live comes with many high-quality scalable fonts. See http://tug.org/fonts and texmf-doc/doc/english/free-math-font-survey.

3 Installation

3.1 Starting the installer

To start with, get the TEX Collection DVD or download the TEX Live net installer, and locate the installer script: install-tl for Unix, install-tl.bat for Windows.

Net installer:
Download from CTAN, under systems/texlive/tlnet; the url http://mirror.ctan.org/systems/texlive/tlnet will automatically redirect to a nearby, up-to-date, mirror. You can retrieve either install-tl.zip which can be used under Unix and Windows and install-unx.tar.gz which is considerably smaller, for Unix only. After unpacking, install-tl and install-tl.bat will be in the install-tl subdirectory.
TEX Collection DVD:
go to its texlive subdirectory. Under Windows, the installer should start automatically when you insert the DVD. You can get the DVD by becoming a member of a TEX user group (highly recommended, http://tug.org/usergroups.html), or purchasing it separately (http://tug.org/store), or burning your own from the ISO image (http://tug.org/texlive/acquire.html).

The following sections explain in more detail.

3.1.1 Unix


  ======================> TeX Live installation procedure <=====================
  
  =======> Note: Letters/digits in <angle brackets> indicate menu items <=======
  =======>       for commands or configurable options                   <=======
  
  
   Detected platform: Intel x86 with GNU/Linux
  
   <B> binary systems: 1 out of 16
  
   <S> Installation scheme (scheme-full)
  
   Customizing installation scheme:
     <C> standard collections
     <L> language collections
     83 collections out of 84, disk space required: 1666 MB
  
   <D> directories:
     TEXDIR (the main TeX directory):
       !! default location: /usr/local/texlive/2008
       !! is not writable, please select a different one!
     TEXMFLOCAL (directory for site-wide local files):
       /usr/local/texlive/texmf-local
     TEXMFSYSVAR (directory for variable and automatically generated data):
       /usr/local/texlive/2008/texmf-var
     TEXMFSYSCONFIG (directory for local config):
       /usr/local/texlive/2008/texmf-config
     TEXMFHOME (directory for user-specific files):
       ~/texmf
  
   <O> options:
     [ ] use letter size instead of A4 by default
     [X] create all format files
     [X] install macro/font doc tree
     [X] install macro/font source tree
     [ ] create symlinks in standard directories
  
   <V> Install for running from DVD
  
  Other actions:
   <I> start installation to HD
   <H> help
   <Q> quit
  
  Enter command:

Figure 1: Main text installer screen (GNU/Linux)



pict

Figure 2: Main GUI installer screen (Windows)


Below, > denotes the shell prompt; user input is bold. Starting in a terminal window on a Unix-compatible system, the simplest way:

> cd /path/to/installer
> perl install-tl
(Or you can invoke perl /path/to/installer/install-tl, or ./install-tl if it stayed executable, etc.; we won’t repeat all these variations.)

To install in GUI mode (you’ll need the Perl/TK module), use:

> perl install-tl -gui

For a complete listing of the various options:

> perl install-tl -help

Warning about Unix permissions: Your umask at the time of installation will be respected by the TEX Live installer. Therefore, if you want your installation to be usable by users other than you, make sure your setting is sufficiently permissive, for instance, umask 002. For more information about umask, consult your system documentation.

3.1.2 Mac OS X

As mentioned in section 2.1, a separate distribution is prepared for Mac OS X, named MacTEX (http://tug.org/mactex). We recommend using the native MacTEX installer instead of the TEX Live installer on Mac OS X, because the native installer can make a few Mac-specific adjustments, in particular to allow easily switching between the various TEX distributions for Mac OS X (MacTEX, gwTEX, Fink, MacPorts, …).

MacTEX is firmly based on TEX Live, and the main TEX trees are precisely the same. It does add a few extra folders with Mac-specific documentation and applications.

3.1.3 Windows

If you are using the net installer, or the DVD installer failed to start automatically, double-click install-tl.bat.

You can also start the installer from the command-prompt. Below, > denotes the prompt; user input is bold. If you are in the installer directory, run just:

> install-tl

Or you can invoke it with an absolute location, such as:

> D:\texlive\install-tl
for the TEX Collection DVD, supposing that D: is the optical drive.

To install in text mode, use:

> install-tl -no-gui

For a complete listing of the various options:

> install-tl -help

3.1.4 The text installer

Figure 1 displays the main text mode screen under Unix.

This is only a command-line installer; there is no cursor support at all. For instance, you cannot tab around checkboxes or input fields. You just type something (case-sensitive) at the prompt and press the Enter key, and then the entire terminal screen will be rewritten, with adjusted content.

The text installer interface is this primitive for a reason: it is designed to run on as many platforms as possible, even with a very barebones Perl (for Windows, a Perl subset is included).

3.1.5 The graphical installer

Figure 2 displays the graphical installer under Windows. Most differences in available options are due to this screenshot being from Windows, and the previous text screen being from GNU/Linux.

3.2 Running the installer

The installer is intended to be mostly self-explanatory. Still, a few quick notes about the various options and submenus:

3.2.1 Binary systems menu (Unix only)


  Available sets of binaries:
  ===============================================================================
  
     a [ ] alpha-linux      DEC Alpha with GNU/Linux
     b [ ] amd64-freebsd    x86_64 with FreeBSD
     c [ ] hppa-hpux        HP-UX
     d [ ] i386-freebsd     Intel x86 with FreeBSD
     e [X] i386-linux       Intel x86 with GNU/Linux
     f [ ] i386-openbsd     Intel x86 with OpenBSD
     g [ ] i386-solaris     Intel x86 with Sun Solaris
     h [ ] mips-irix        SGI IRIX
     i [ ] powerpc-aix      PowerPC with AIX
     j [ ] powerpc-linux    PowerPC with GNU/Linux
     k [ ] sparc-linux      Sparc with GNU/Linux
     l [ ] sparc-solaris    Sparc with Solaris
     m [ ] universal-darwin universal binaries for MacOSX/Darwin
     o [ ] win32            Windows
     p [ ] x86_64-linux     x86_64 with GNU/Linux

Figure 3: Binaries menu


Figure 3 displays the text mode binaries menu. By default, only the binaries for your current platform will be installed. From this menu, you can select installation of binaries for other architectures as well. This can be useful if you are sharing a TEX tree across a network of heterogenous machines, or for a dual-boot system.

3.2.2 Selecting what is going to be installed


  Select a scheme:
  ===============================================================================
  
   a [ ] TeX Live basic scheme
   b [ ] TeX Live scheme for ConTeXt
   c [X] TeX Live full scheme
   d [ ] GUST TeX Live scheme
   e [ ] GUTenberg TeX Live scheme
   f [ ] TeX Live medium scheme
   g [ ] TeX Live minimal scheme
   h [ ] TeX Live for Omega users
   i [ ] teTeX scheme
   j [ ] XML typesetting scheme

Figure 4: Scheme menu


Figure 4 displays the TEX Live scheme menu; from here, you choose a “scheme”, which is an overall set of package collections. The default full scheme installs everything available, but you can also choose the basic scheme for a small system, minimal for testing purposes, and medium or teTeX to get something in between. There are also various specialized and country-specific schemes.


pict

Figure 5: Collections menu (Linux)


You can refine your scheme selection with the ‘standard collections’ and ‘language collections’ menus (figure 5, shown in GUI mode for a change).

Collections are one level more detailed than schemes — in essence, a scheme consists of several collections, a collection consists of one or more packages, and a package (the lowest level grouping in TEX Live) contains the actual TEX macro files, font files, and so on.

If you want more control than the collection menus provide, you can use the tlmgr program after installation (see section 6); using that, you can control the installation at the package level.

3.2.3 Directories

The default layout is described in section 2.3, p. 8. The default location of TEXDIR is different between Windows (%PROGRAMFILES%\texlive\2008) and Unix (/usr/local/texlive/2008).

The main reason to change this default is if you lack write permission for the default location. You don’t have to be root or adminstrator to install TEX Live, but you do need write access to the target directory.

A logical alternate choice is a directory under your home directory, especially if you will be the sole user. Use ‘~’ to indicate this, as in ‘~/texlive/2008’.

We recommend including the year in the name, to enable keeping different releases of TEX Live side by side. (You may wish to make a version-independent name such as /usr/local/texlive-cur via a symbolic link, which you can then update after testing the new release.)

Changing TEXDIR in the installer will also change TEXMFLOCAL, TEXMFSYSVAR and TEXMFSYSCONFIG.

TEXMFHOME is the recommended location for personal macro files or packages. The default value is ~/texmf. In contrast to TEXDIR, here a ~ is preserved in the newly-written configuration files, since it usefully refers to the home directory of each individual running TEX. It expands to $HOME on Unix and %USERPROFILE% on Windows.

3.2.4 Options


  <P> use letter size instead of A4 by default: [ ]
  <F> create all format files:                  [X]
  <D> install font/macro doc tree:              [X]
  <S> install font/macro source tree:           [X]
  <L> create symlinks in standard directories:  [ ]
             binaries to:
             manpages to:
                 info to:

Figure 6: Options menu (Unix)


Figure 6 displays the text mode options menu. Three of the options here need mentioning:

use letter size instead of A4 by default:
The usual default paper size selection. Of course, individual documents can specify a specific paper size, if desired.
create all format files:
Although unnecessary format files take time to generate and disk space to store, it is still recommended to leave this option checked: if you don’t, then format files will be generated in people’s private TEXMFVAR tree as they are needed. In that location, they will not be updated automatically if (say) binaries or hyphenation patterns are updated in the installation, and thus could end up with incompatible format files.
create symlinks in standard directories
(Unix only): This option bypasses the need to change environment variables. Without this option, TEX Live directories have to be added to PATH, MANPATH and INFOPATH. You will need write permissions to the target directories. It is not advisable to overwrite a TEX system that came with your system with this option. It is intended primarily for creating the links in standard directories that are known to users, such as /usr/local/bin, which don’t already contain any TEX files.

Now when all these settings are to your liking, you can type ‘I’ to start the installation process. When it is done, skip to section 3.4 to read what else needs to be done, if anything.

3.2.5 Set up for running from DVD (text mode only)

Type ‘V’ to select this option. This changes the main menu into something like figure 7.


  ======================> TeX Live installation procedure <=====================
  
  =======> Note: Letters/digits in <angle brackets> indicate menu items <=======
  =======>       for commands or configurable options                   <=======
  
   <D> directories:
     TEXDIRW (Writable root):
       !! default location: /usr/local/texlive/2008
       !! is not writable, please select a different one!
     TEXMFLOCAL (directory for site-wide local files):
       /usr/local/texlive/texmf-local
     TEXMFSYSVAR (directory for variable and automatically generated data):
       /usr/local/texlive/2008/texmf-var
     TEXMFSYSCONFIG (directory for local config):
       /usr/local/texlive/2008/texmf-config
     TEXMFHOME (directory for user-specific files):
       ~/texmf
  
   <O> options:
     [ ] use letter size instead of A4 by default
     [X] create all format files
  
   <V> set up for installing to hard disk
  
  Other actions:
   <I> start installation for running from DVD
   <H> help