This document describes the main features of the TEX Live software distribution — TEX and friends for GNU/Linux and other Unix flavors, Mac OS X, and (32-bit) Windows systems. (Warning: it is not especially useful for older Mac or MS-DOS systems.)
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. It is part of the even larger TEX Collection (briefly described below in section 2, p. 6). Both are cooperative efforts by the TEX user groups.
For newer versions of the packages included here, please check 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. 65).
You can use TEX Live in three principal ways:
All of these are described in detail in the OS-specific installation sections following, but here is a quick start:
The TEX community is both active and friendly, and virtually all 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:
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. Welcome to TEX!
This section describes the structure and contents of TEX Live and the TEX Collection of which it is a part.
Space limitations of CD-ROM format have forced us to divide TEX Collection into several distributions, as follows.
CTAN, protext, MacTEX, and texmf-extra do not follow the same copying conditions as TEX Live, so be careful when redistributing or modifying.
ProTEXt is provided as both the top level of the live DVD and on its own CD (for those who cannot use the DVD).
You can tell which type of distribution you’re in by looking for a 00type.TL file at the top of the TEX Live directory. This file also contains the TEX Live release date.
Naturally, each user group chooses what to distribute, at its own discretion. (TUG is sending all three discs above to all of its members.)
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 texlive2005, not at the top level of the disc.
bin | The TEX system programs, arranged by platform. |
source | The source of all programs, including the main Web2C TEX and Metafont distributions. These are stored in a bzip2-compressed tar archive. |
support | Assorted auxiliary packages and programs. These are not installed automatically. This includes assorted editors and TEX shells. |
texmf | Tree for the programs, along with their support files and documentation. Does not include TEX formats and packages. (TEXMFMAIN in the next section.) |
texmf-dist | The main tree of formats and packages. (TEXMFDIST in the next section.) |
texmf-doc | Tree for self-contained pure documentation, arranged by language. |
texmf-var | Tree for files automatically generated and stored. (TEXMFSYSVAR in the next section.) |
xemtex | Tree for supporting programs used only in Windows. These programs generally come pre-installed on Unix systems, or are at least easy to compile. |
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 only documentation, but it does not contain all the documentation. The documentation for the programs (manuals, man pages, Info files) is in texmf/doc, since the programs are in texmf. Similarly, 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’s located. The comprehensive links in the top-level file doc.html may also be helpful.
This section lists all predefined variables specifying texmf trees used by the system, and their intended purpose. 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.
For more discussion of texconfig and related utilities, please see section 4.1, p. 26.
TEX Live contains several extended versions of TEX:
Here are a few other commonly-used programs included in TEX Live:
As introduced in section 1.1 (p. 4), TEX Live has three principal uses:
The following sections describes the Unix-specific procedures for each of these.
Warning: The TEX Collection CDs and DVD are in ISO 9660 (High Sierra) format, with Rock Ridge (and Joliet, for Windows) extensions. Therefore, in order to take full advantage of the TEX Collection under Unix, your system needs to be able to use the Rock Ridge extensions. Please consult the documentation for your mount command to see how to do this. If you have several different machines on a local network, you may be able to mount the discs on one which does support Rock Ridge, and use this with the others. Modern systems should be able to use the discs without problems. If troubles, let us know. The discussion below assumes you have been able to mount the CDs with full Rock Ridge compatibility.
|
It is possible to use the TEX system directly from the live DVD, without installing the distribution to disk. (Thus the name TEX ‘Live’, in fact.) It is not possible to run TEX directly from the other CDs (see section 2.1, p. 6). To start, you mount the CD or DVD, with Rock Ridge extensions enabled. The exact command to do this varies from system to system; the following works under Linux, except the name of the device (/dev/cdrom, here) may vary. (All our examples will use > as the shell prompt; user input is underlined.)
Change the current directory to the mount point:
Under Mac OS X, the directory is typically under /Volumes, and the media will be mounted automatically. Run the installation script install-tl.sh:
After various greeting messages and a list of the main menu options, the installation will ask you to enter a command. Do this by typing the desired character and hitting return; don’t type the angle brackets shown. Either uppercase or lowercase is ok; we’ll use lowercase in our examples.
For running live, our first command will be d and then the subcommand 1 to set directories. Even in this case, we must choose a directory on the local disk to place files that the TEX system itself generates, such as fonts and formats, and also to provide a place for updated configuration files, if need be.
We’ll use /opt/texlive2005 in this example. It’s good to include the year in the name, as these generated files are not compatible from release to release. (If the default value of /usr/local/texlive/2005 works for you, then you can skip this step.)
Back at the main menu, our second and last command is r, to set up for running live off the media without installing to disk:
And we are back at the system prompt, as shown.
Next, it is necessary to alter two environment variables: PATH, to an architecture-dependent value (so that we can run the programs), and TEXMFSYSVAR, to the value specified above. See table 1 for a list of the architecture names for the different systems.
After the main installation has completed, and environment variables have been set, the last step is to run texconfig or texconfig-sys to customize your installation to your needs. This is explained in section 4.1, p. 26.
|
The syntax for setting the environment variables, and the initialization file to put them in, depends on the shell you use. If you use a Bourne-compatible shell (sh, bash, ksh, et al.), put the following into your $HOME/.profile file:
For C shell-compatible shells (csh, tcsh), put the following into your $HOME/.cshrc file:
Then log out, log back in, and test your installation (see section 4.2, p. 27).
If in doubt, please ask any local system gurus to help you with problems; for example, the way to mount the TEX Live media, which directory or directories to use, and precise details of the changes to your personal initialization files can and do vary from site to site.
It is possible, indeed typical, to install the TEX Live distribution to hard disk. This can be done from either the live or inst distributions. (See section 2.1, p. 6, for an explanation of the different distributions.)
To start, you mount the CD or DVD, with Rock Ridge extensions enabled. The exact command to do this varies from system to system; the following works under Linux, except the name of the device (/dev/cdrom, here) may vary. (All our examples will use > as the shell prompt; user input is underlined.)
Change the current directory to the mount point:
Under Mac OS X, the directory is typically under /Volumes, and the media will be mounted automatically. Run the installation script install-tl.sh:
After various greeting messages and a list of the main menu options, the installation will ask you to enter a command. Do this by typing the desired character and hitting return; don’t type the angle brackets shown. Either uppercase or lowercase is ok; we’ll use lowercase in our examples.
Table 2 briefly lists the options in the main menu. The order in which you select the options makes little difference, except that i must be last. It’s reasonable to go through them in the order presented here.
|
Here are further details on each option.
p – Current platform. Since the installation script automatically guesses which platform you’re running on, it is usually unnecessary to use this option. It’s there in case you need to override the automatic detection.
b – Binary architectures. 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 (or omit installing the current platform). This can be useful if you are sharing a TEX tree across a network of heterogenous machines. For a list of the supported architectures, see table 1, p. 16.
s – Base installation scheme. From this menu, you can choose an overall set of package collections, called a “scheme”. The default full scheme installs everything available, but you can also choose the basic scheme for a minimal system, or medium to get something in between. There are also specific sets for Omega and XML.
c – Individual collections. From this menu, you can override the scheme’s set of collections to install. Collections are one level more detailed than schemes — collections consist of one or more packages, where packages (the lowest level grouping in TEX Live) contain the actual TEX macro files, font families, and so on. In this menu, selection letters are case-sensitive.
l – Language collections. This menu has the same basic purpose as c, to override the collection set in the chosen scheme. In this case, the collections are specifically for different languages. Selection letters are case-sensitive here too. Here is a list of the language collections in TEX Live:
(some) African scripts | Arabic | Armenian | Chinese Japanese Korean |
Croatian | Cyrillic | Czech/Slovak | Danish |
Dutch | Finnish | French | German |
Greek | Hebrew | Hungarian | Indic |
Italian | Latin | Manju | Mongolian |
Norwegian | Polish | Portuguese | Spanish |
Swedish | Tibetan | UK English | Vietnamese |
Language collections typically include fonts, macros, hyphenation patterns, and other support files. (For instance, frenchle.sty is installed if you select the French collection.) In addition, installing a language collection will alter the language.dat configuration file controlling which hyphenation patterns are loaded.
d – Installation directories. Three directories can be changed here:
Under Mac OS X, the usual frontends look for TEX in /usr/local/teTeX, so you may wish to install TEX Live there.
o – Other options. From this menu, you can select the following general options:
It is not advisable to overwrite a TEX system that came with your system with this option. It’s 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.
i – Perform installation. When you’re satisfied with your configuration options, enter i to actually do the installation from the media to your chosen locations.
After the installation completes, your next step is to include the architecture-specific subdirectory of TEXDIR/bin in your PATH, so the newly-installed programs can be found. The architecture names are listed in table 1, p. 16, or you can simply list the directory TEXDIR/bin.
The syntax for doing this, and the initialization file to use, depends on your shell. If you use a Bourne-compatible shell (sh, bash, ksh, et al.), put the following into your $HOME/.profile file:
For C shell-compatible shells (csh, tcsh), put the following into your $HOME/.cshrc file:
After the main installation has completed, and environment variables have been set, the last step is to run texconfig or texconfig-sys to customize your installation to your needs. This is explained in section 4.1, p. 26.
Here is a minimal annotated example which accepts the default directories and installs binaries for the current system only. Thus, only one command is needed, i for install. The > is the shell prompt as usual.
If in doubt, please ask any local system gurus to help you with problems; for example, the way to mount the TEX Live media, which directory or directories to use, and precise details of the changes to your personal initialization files can and do vary from site to site.
You can add individual packages or collections from the current distribution to an existing non-TEX Live setup, or an earlier TEX Live installation.
To start, you mount the CD or DVD, with Rock Ridge extensions enabled. The exact command to do this varies from system to system; the following works under Linux, except the name of the device (/dev/cdrom, here) may vary. (All our examples will use > as the shell prompt; user input is underlined.)
Change the current directory to the mount point:
Under Mac OS X, the directory is typically under /Volumes, and the media will be mounted automatically.
Run the installation script install-pkg.sh (not install-tl.sh, which is intended for complete installations only):
The first set of options controls what gets read:
What actually happens is controlled by the following options. If neither of these are specified, the default action is to install the selected files. The main destination tree is found by expanding $TEXMFMAIN with kpsewhich. You can override it by setting either the environment variable TEXMFMAIN or TEXMF.
Additional options:
Here are some usage examples:
If in doubt, please ask any local system gurus to help you with problems; for example, the way to mount the TEX Live media, which directory or directories to use, and precise details of the changes to your personal initialization files can and do vary from site to site.
After the main installation is done, for any operating system, the remaining steps are to configure the system for your local needs, and perform some basic tests.
Another sort of post-installation is to acquire packages, fonts, or programs that were not included in TEX Live. The basic idea is to install such additions in the TEXMFLOCAL tree (if you installed to disk), or TEXMFSYSVAR (if you are running live). See the “Installation directories” option on p. 21.
Unfortunately, the details can and do vary widely, and so we do not attempt to address them here. Here are some external links to descriptions:
At any time after installation, you can and should use the program texconfig to configure the system to fit your local needs. It is installed in the architecture-specific subdirectory TEXDIR/bin/arch along with everything else.
If you run it without arguments, it will enter full-screen mode and allow you to view and change options interactively.
You can also run it with various command-line options. Here are some of the most common (TEX Live is configured for the A4 paper size by default):
Of course, texconfig can only support changing a few of the many options and configuration parameters in a TEX system. The main configuration file for the base Web2C programs is named texmf.cnf. You can find its location by running ‘kpsewhich texmf.cnf’; it contains many comments explaining the default settings and useful alternatives.
As of 2005, texconfig alters files in a user-specific directory, namely $HOME/.texlive2005. If you install TEX just for yourself, that is unlikely to make a difference. But if you install TEX on a multi-user system, you will want to change the configuration for the whole system. In this case, run texconfig-sys instead of texconfig.
Likewise, the updmap and fmtutil scripts were changed, to work under $HOME/.texlive2005. To alter system directories, use updmap-sys and fmtutil-sys.
In particular, for multi-user systems, you will probably want to pregenerate the standard formats with fmtutil-sys –missing. Otherwise, each user will end up with their own formats.
Also, if you have a personally-modified copy of fmtutil.cnf or updmap.cfg, instead of using the ones generated by installation, they must be installed in the tree referenced by the variable TEXMFSYSCONFIG.
The variables specifying the directories altered by these commands are listed in section 2.3, p. 7. You can see the actual directories by running texconfig conf, and you can change them by editing texmf.cnf.
After installing TEX Live as best you can, you naturally want to test it out, so you can start creating beautiful documents and/or fonts.
This section gives some basic procedures for testing that the new system is functional. We give Unix commands; under Mac OS X and Windows, you’re more likely to run the tests through a graphical interface, but the principles are the same.
You can process these in the same way as we did with sample2e.tex.
If you are new to TEX, or otherwise need help with actually constructing TEX or LATEX documents, please visit http://tug.org/begin.html for some introductory resources.
The recommended way to install TEX on Mac OS X is from the MacTEX distribution, new in 2005. This is provided on the live DVD in the top-level mactex/ directory. It contains its own (native) installer for a full TEX distribution, based on a combination of teTEX and TEX Live, along with many additional applications and documentation. The project web page is http://tug.org/mactex.
If you prefer, installation of TEX under Mac OS X can also be done directly from TEX Live, using the install* scripts, as follows.
In order to run the installation scripts under Mac OS X, you need to have the bash shell installed. If you are running Mac OS X 10.2 or later, you have bash, and can proceed. If you’re running an earlier Mac OS X version, however, the default shell is zsh, which won’t work; you’ll need to get bash from the Internet, or more likely upgrade your system.
Once you have bash, the Unix installation documentation in the previous section can be followed. See section 3 on p. 10; Mac OS X-specific notes are included there where needed.
In this release of TEX Live, happily, the distribution once again has a native Windows installer, named tlpmgui.exe. (See section 2.1, p. 6, for an explanation of the different distributions.)
tlpmgui has essentially the same options as the Unix installer, only done through a GUI interface: selecting schemes, individual collections, installation directories, and so on. Section 3.2 on p. 17 describes the basic elements. It also allows some post-installation activities such as adding/removing packages, updating the filename database and building formats. Moreover, tlpmgui can setup the system for running programs directly from the DVD.
For those who like to look underneath the hood, tlpmgui uses as its “engine” a command-line Windows program named tlpm.
The Windows TEX system included in TEX Live is based on new binaries borrowed from the XEmTEX project, formerly known as fpTEX (see http://www.metz.supelec.fr/~popineau/xemtex-1.html). It also includes some older (but still working) tools, notably a dvi previewer, Windvi, which is similar in usage to the established Unix xdvi. The documentation can be found in texmf/doc/html/windvi/windvi.html.
TEX Live can be installed on systems running Windows 98, ME, NT, 2K or XP. Older versions of Windows (3.1x) and MS-DOS are not supported.
Warning: Win9.x users must ensure they have enough environment space before undertaking installation. The tlpmgui.exe program won’t change the environment size for them. A few environment variables will be created and it is possible you run out of environment space. Add SHELL=<path>COMMAND.COM /E:4096 /P in the config.sys file in order to increase your environment size.
After inserting the TEX Live CD into the CD drive, autostart should activate tlpmgui. If it does not, click Start→Run, then type <drive letter>:\setup-win32\tplmgui.exe (or <drive letter>:\texlive\setup-win32\tplmgui.exe if you are installing from the TeX Collection DVD), where <drive letter> is the drive letter with the TeX Live CD (or TeX Collection DVD), and then click OK.
The installation window titled TeX Live installation and maintenance utility should open. It contains the following sections: Main customization, Install, Select a scheme, Select systems, Directories and Options.
In the Directories section the installation drive (directory) next to the CD/DVD button should be displayed (e.g., F:/ or F:/texlive/ for the DVD), but if it is not, then click the CD/DVD button and select the CD/DVD drive, with the TEX Live CD (or TeX Collection DVD).
The directory in which you wish to install the software can be set by clicking the TLroot button. This directory will be set as TLroot environment variable for later usage. The TEXMFTEMP and TEXMFCNF environment variables as displayed next to the TEXMFTEMP and TEXMFCNF buttons will be adjusted automatically and set during installation, but they can also be adjusted manually now to suit special needs.
In the Select a scheme section the desired TEX Live installation scheme should be chosen by clicking the radio button labelled with the installation scheme name (e.g., scheme-gust). Each scheme is accompanied by an Info button which, when clicked, displays a short description of the relevant scheme.
A scheme is a large set of files targeted at some kind of usage. There are generic schemes for basic, medium and full installations. The remaining ones are either targeted at certain LUGs (i.e., what GUST or GUTenberg propose for their members) or application targeted (e.g., for XML and TEX cooperation). A preselected scheme can be refined. This is done in the Main customization section by choosing additional collections from Standard collections or Language collections. For example, by clicking the Select button labelled Standard collections, additional collections like Metapost, Omega or documentation in different languages can be selected.
Note: The Ghostscript, Perl and Wintools collections are selected by default and should be installed unless they are already installed and you really know what you are doing. This is because they are required by many important tools. The PERL5LIB and GS_LIB environment variables will be set too.
Next, clicking the Select button labelled Language Collections in the Main customization section opens the Language collections window in which the installation language can be chosen by ticking the box next to the language.
Next, click the Install button in the Install section to start the installation proper process.
The TEX Live system needs some post-processing steps (format files generation, ls-R databases generation, environment variables, etc.). All these operations are done there, some of them can be lengthy. So please wait until you see a statement about the successfully finished installation.
The shortcut for tlpmgui will be added to the Start→Programs→TeXLive2005 menu.
If it is needed (Win9x/WinME), you will be asked to reboot your computer.
To be complete, a TEX Live installation needs support packages that are not commonly found on a Windows machine. Many scripts are written using the Perl language. Some important tools require the Ghostscript PostScript interpreter to render or to convert files. A graphic file toolbox is also needed in some cases. Last but not least, a TEX-oriented editor makes it easy to type in your TEX files.
All these tools are quite easy to find for Windows, but in order to try to make your life even easier, we have put such a set of tools on TEX Live:
These packages are borrowed from the XEmTEX distribution (the successor of fpTEX).
Perl and Ghostscript are installed by default; you may explicitly deselect them during installation if you already have them.
If you don’t want to install this bundle, then you are on your own to install the required tools to complete your TEX Live system. Here is a list of places to get those tools:
You might want to install other tools that are not free1 and therefore not included on TEX Live, such as GSView, the Ghostscript companion to more conveniently view PS/PDF files. GSView is available from http://www.cs.wisc.edu/~ghost/gsview/ or any CTAN site.
If you have TeX Live installed, you can use tlpmgui again for modyfying and maintaining your installation.
As the tlpmgui shortcut is available in the Start→Programs→TeXLive2005 menu, start it from here. The maintenance window titled TeX Live installation and maintenance utility shows. It contains several tabs: Add Packages, Remove packages, Manage installation, Remove installation.
Click the tab labelled Add packages or Remove packages to enter the relevant functionality and then:
When adding packages, the list of installed packages is compared to the list of packages available from your CD/DVD. Only packages not already installed are displayed. It is up to you to select which packages you want to install.
When removing individual packages, only a list of installed packages will be displayed.
Please note that for both Add packages and Remove packages the collections are listed first.
The functions available in the tab labelled Manage the installation are helpful in performing actions needed when you want to add support for a language which was not selected during the installation, or add/regenerate a format which was not selected during the installation or was modified after the installation.
The following actions can be performed:
Note: you can close the Edit... window with the Cancel or Done button; the latter will start rebuilding the format files (or the fontmap files if you have edited updmap.cfg), followed by a ls-R database files refresh.
For more information about the configuration see section 7.8, p. 36.
The tab labelled Remove the TeX Live installation opens a window which contains functionality not worth describing and we do not know who would need it and what it is for...:-)
Anyway, if you have the texmf-local directory for your local additions, the removal procedure will not wipe it out or delete things in it. The setup-win32 directory containing tlpmgui and related files will not be deleted. You will have to do some manual cleanup to actually remove them.
First, whatever changes you make, do not forget to rebuild the ls-R database files. Otherwise, your new files will not be found. You can do this either via the tlpmgui run and selection of the appropriate action from the Manage the installation tab, or manually running the mktexlsr command.
If you want to add files that are not provided by the TEX Live distribution, it is recommended to put them in the $TEXMFLOCAL directory. This way, you will be safe against upgrades of the TEX Live software.
The directory pointed to by $TEXMFLOCAL is initially empty. If, for example, you want to add the
support file for the Maple symbolic computation program, you will have to put the style files
in:
c:\TeXLive2005\texmf-local\tex\latex\maple\
and the documentation files in:
c:\TeXLive2005\texmf-local\doc\latex\maple\
The tlpm.exe program which is used as engine by tlpmgui has a number of other useful options. You can get the list by running:
More information and examples of use can be found in tlpm.readme.
Kpathsea knows about UNC names, so you can use them to get your TEXMF tree from the network. But there is better than this. All the support files and configuration files, everything except the files in the bin/win32 are shareable with a teTEX or Unix TEX Live installation. That means you can use Samba either to mount from an NT server to a Unix workstation or the converse. Several strategies are possible:
The Windows version of Web2C has some specific features that should be pointed out.
The kpsecheck command will also report the status of shared memory: in use or not used. That might be useful to know because if the status reported is ‘in use’, that means one or several processes are working, and the effect of any mktexlsr command will be delayed until the next time where no Kpathsea linked process will be running.
Last, this same command will report about the location it thinks Ghostscript can be found. Under Win32, for many programs, it is easier to use the Ghostscript dll, and find it by using the Ghostscript registry key than to change the PATH, which has a limited length anyway.
The configuration file for dvips can be found in
C:\TeXLive2005\texmf-var\dvips\config\config.ps
You may open it with any editor and change some parameters:
The current TEX Live distribution implements the procedure of making always up-to-date fontmaps files for Dvips and Pdftex. This is done by the updmap program during installation, as well as during any font package addition. If you add new packages by hand, edit the file updmap.cfg in $TEXMFVAR/web2c.
If you use the program pdflatex to write PDF format directly, and you are using US letter-size paper, edit the file C:\TeXLive2005\texmf-var\tex\generic\config\pdftexconfig.tex and change ‘\pdfpagewidth’ and ‘\pdfpageheight’. These entries should read:
GSView is now distributed under the Aladdin License, and therefore is no longer included in TEX Live.
If you may want to change the page size to US letter size. If so, open GSView from the Start menu, and select Media→Letter.
Also, there are menu settings that are supposed to give you the most readable screen image. On Media→Display Settings, set both Text Alpha and Graphics Alpha to 4 bits.
Note that the installation process has set all .ps and .eps files to automatically open with GSView.
For printing instructions, see section 7.10 below.
The tlpmgui.exe program takes care of associating the files with the .dvi extension with Windvi, but it doesn’t make an icon on the desktop, so please do it yourself.
Open windvi by clicking an icon or from the command line.
You can set it for US letter-size paper by going to View→Options→Papertype and selecting US (8.5" x 11") (and then OK. Exit windvi.
You can change other parameters from there as well, such as the ability to execute system commands specified by the document (disabled by default for security reasons). Also, the first time you view any .dvi file, you may find the magnification too large. Zoom out until you get an appropriate size.
All configuration settings for windvi are stored in a file named windvi.cnf file. You can find it by running this command at the prompt:
Should you have problems with windvi, please remove the configuration file and test your problem against a vanilla configuration.
For generic verification procedures, see section 4.2 (p. 27). This section describes Windows-specific tests.
Open the file sample2e.tex in your editor (Xemacs, WinShell), found in C:\TeXLive2005\texmf-dist\tex\latex\base. The LATEX source should appear on the screen. Process it by clicking on the Command→LaTeX menu (XEmacs) or LATEX icon on the toolbar (WinShell), then view it by clicking on the Command→View DVI menu (XEmacs) or Preview (Windvi) icon (WinShell).
At first, when you preview files with Windvi, it will create fonts because screen fonts were not installed. After a while, you will have created most of the fonts you use, and you will rarely see the font-creation window.
Hint for the future: If a LATEX run stops because LATEX cannot find a file, you can press Ctrl-z to quit.
It is possible to print from Windvi. In this case, printing will be done using the Windows unified printer driver. By definition, it is compatible with all printers. However, there is some drawback: it can generate some huge spool files, and some (older) versions of Windows just don’t like them. The advantage is that you can use features like embedding BMP or WMF images. You also need to make sure that the printer parameters are correctly set (subsection 7.8.4), else you will get scaled printing (printing at 600dpi on a 300dpi printer will give you only one quadrant of your page).
Printing is faster and more reliable if you run dvips to make a .ps file and then print from GSView. In GSview, select File→Print.... A Print window will appear.
If you are using a PostScript printer, be sure to select PostScript Printer. This is done in the Print Method box at the bottom left of the Print window. You can then select any of the printers that you have previously installed. If you fail to check the box for PostScript Printer, printing will not work.
If you will be using your own non-PostScript printer, select Ghostscript device in the Print Method box, then click on the button to the right labelled djet500 and select your printer type from the list that pops up. (In the older version of GSView, make sure PostScript Printer is not selected, then select your printer type from the Device list.)
What we call Win32 is not an operating system by itself. It is a large set of functions (around 12,000 in the header files of the Microsoft SDK) that you can use to write programs for different operating systems of the Windows family.
Windows comes in different flavors:
Win9x are able to run 32 bits programs and 16 bits programs concurrently. But the operating system by itself is not entirely written in 32 bits mode, and does not support memory protection: 16bits applications can overwrite parts of the operating system memory! Some parts of the system like the GDI (Graphical Device Interface) manage limited resources like bitmaps, fonts, pens and so on for the set of all programs that run concurrently. All the bitmaps headers available at the same time can’t amount for more than 64kB. This explains the performance tool and the fact that you can put your system on his knees by making intensive use of graphic objects for example.
NT, 2K and XP do not suffer from these limitations, and neither from other Win9x limitations. They are true multitasking environments, with protected memory. They are much more responsive than Win9x because of better memory management, better file system and so on.
You may wonder, “Why would I need to use a command line prompt when I have Windows?”
Good question. The problem is of very general nature. Not all operations can be done easily using only a GUI. Command line gives you programming power — assuming a clever command interpreter.
But the problem here is more fundamental: TEX is a batch tool. Not an interactive one. TEX needs to compute the best layout for each page, resolve cross-references and so on. This can be done only by a global processing of the document. It is not (yet) a task that can be done interactively.
This means that you should use TEX from a command line. In fact the situation is not so bad. There is an advantage to write command line tools for complex processing: they are better debugged, because they are independent of any GUI problems, and GUI tools can be designed to interface to the command line tools. This is the case for TEX, where you will mostly interact with it through a GUI text editor.
However, you may need to use the command line prompt in a number of situations. One is when you are having difficulties and want to debug your setup.
These locations may change across different Windows versions.
The Win32 API understands both / and \ characters as PATH separators. But the command interpreters do not! So whenever a path name is used programmatically, you can use both separators, and even mix them up in the same path name. But on the command line, you must type \ as path separator. The reason is compatibility: the command processor used ‘/’ to introduce arguments to commands.
All this to say: do not be surprised to read path names written using the Unix convention; fpTEX is a port of Web2C, and aims to be compatible across platforms. For this reason, all the configuration files that need to specify path names use the Unix convention.
The worst feature of Win9x with regard to TEX is probably the so-called FAT file system. TEX uses very many small files, with size around 1–3kB. The FAT file system is old, and predates by decades the multi-gigabytes hard disks we have today. As a result, it cannot manage efficiently the tens of thousands of TEX files found in TEX Live. The FAT file system allocates a minimum of 32kB for any file on a huge partition. It means that TEX will use much more disk space than it actually needs.
The other, more modern, file systems available, FAT32 and NTFS, do not have this drawback. They manage clusters of 4kB only. (You can lower the limit to 512 bytes on NTFS.)
There are pairs of variables and values which behave much like global variables inside your programs. The set of those variables is called the environment. Each program is initialized with a copy of the environment when it is run. It can request and change the value of any variable. The changes happen in the copy of the environment, and is not at all propagated to the other running programs.
Your PATH is a special environment variable used to search for programs you want to run. There is a different procedure to change it for Win9x, WinME and NT/2K/XP:
If there is already a PATH setting for your user account, left click on PATH. In the field Variable appears PATH while the field Value shows the current setting of PATH as a list of directories separated by ;. Add the directory where the executables are located (e.g. c:\TeXLive2005\bin\win32). If there isn’t a PATH variable for your user account, simply click in the field Variable and type in PATH, click in the field Value and type in the directory with the executables. Important: Click on the Apply button before clicking Ok, otherwise the changes to PATH won’t apply to your system. Be careful when changing the environment settings.
The best way to be sure that a variable has been properly set is to open a console and type:
which should return the corresponding value.
If you have a look at the Web2C documentation, you will read that all the various TEX derived programs use the same base engine. For example, tex.exe and latex.exe are exact copies of the same program, but each one will use a different format file, based on its calling name.
Under Unix, this feature is implemented through symbolic links. It saves up a bit of disk space, because some engines are used with many different format files.
The Win32 API does not know about file links. So to save up almost the same amount of memory, all the TEX base engines have been put in DLLs (Dynamic Linked Library). This means that you will have the following layout:
In fact, a generic tool called irun.exe is provided to build the equivalent of Unix hard links for executable files only under Win32.
You can also set the debug level:
If you want to redirect stderr to stdout, which is not possible Windows, then do:
This way you can capture both stdout and stderr in the same file.
kpsewhich␣-expand-path␣$SELFAUTOPARENT | c:/TeX |
kpsewhich␣-expand-path␣$TEXMF | c:/TeX/texmf.... |
kpsewhich␣-expand-path␣$TEXMFCNF | .;c:/TeX/texmf-var/web2c; |
kpsewhich␣-expand-var␣$TEXINPUTS | .;c:/TeX/texmf/tex// |
kpsewhich cmr10.tfm | c:/TeX/texmf/fonts/tfm/public/cm/cmr10.tfm |
kpsewhich latex.fmt | c:/TeX/texmf/web2c/latex.fmt |
Here are several questions to investigate:
The TEX Live software consists of hundreds of programs and tens of thousands of files, all from varying sources. So it is quite difficult to predict all possible causes for problems. Nevertheless, we will do our best to help you. (See section 1.2, p. 5.)
Web2C is an integrated collection of TEX-related programs: TEX itself, Metafont, MetaPost, BibTeX, etc. It is the heart of TEX Live.
A bit of history: The original implementation was by Tomas Rokicki who, in 1987, developed a first TEX-to-C system based on change files under Unix, which were primarily the original work of Howard Trickey and Pavel Curtis. Tim Morgan became the maintainer of the system, and during this period the name changed to Web-to-C. In 1990, Karl Berry took over the work, assisted by dozens of additional contributors, and in 1997 he handed the baton to Olaf Weber.
The Web2C system runs on Unix, 32-bit Windows systems, Mac OS X, and other operating systems. It uses Knuth’s original sources for TEX and other basic programs written in web and translates them into C source code. The core TEX programs are:
The precise functions and syntax of these programs are described in the documentation of the individual packages and of Web2C itself. However, knowing a few principles governing the whole family of programs will help you take advantage of your Web2C installation.
All programs honor these standard GNU options:
For locating files the Web2C programs use the path searching library Kpathsea. This library uses a combination of environment variables and a configuration files to optimize searching the (huge) collection of TEX files. Web2C can look at more than one directory tree simultaneously, which is useful in maintaining TEX’s standard distribution and local extensions in two distinct trees. To speed up file searches the root of each tree has a file ls-R, containing an entry showing the name and relative pathname for all files under that root.
Let us first describe the generic path searching mechanism of the Kpathsea library.
We call a search path a colon- or semicolon-separated list of path elements, which are basically directory names. A search path can come from (a combination of) many sources. To look up a file ‘my-file’ along a path ‘.:/dir’, Kpathsea checks each element of the path in turn: first ./my-file, then /dir/my-file, returning the first match (or possibly all matches).
In order to adapt optimally to all operating systems’ conventions, on non-Unix systems Kpathsea can use filename separators different from colon (‘:’) and slash (‘/’).
To check a particular path element p, Kpathsea first checks if a prebuilt database (see “Filename database” on page 55) applies to p, i.e., if the database is in a directory that is a prefix of p. If so, the path specification is matched against the contents of the database.
If the database does not exist, or does not apply to this path element, or contains no matches, the filesystem is searched (if this was not forbidden by a specification starting with ‘!!’ and if the file being searched for must exist). Kpathsea constructs the list of directories that correspond to this path element, and then checks in each for the file being sought.
The “file must exist” condition comes into play with ‘.vf’ files and input files read by TEX’s \openin command. Such files may not exist (e.g., cmr10.vf), and so it would be wrong to search the disk for them. Therefore, if you fail to update ls-R when you install a new ‘.vf’ file, it will never be found. Each path element is checked in turn: first the database, then the disk. If a match is found, the search stops and the result is returned.
Although the simplest and most common path element is a directory name, Kpathsea supports additional features in search paths: layered default values, environment variable names, config file values, users’ home directories, and recursive subdirectory searching. Thus, we say that Kpathsea expands a path element, meaning it transforms all the specifications into basic directory name or names. This is described in the following sections in the same order as it takes place.
Note that if the filename being searched for is absolute or explicitly relative, i.e., starts with ‘/’ or ‘./’ or ‘../’, Kpathsea simply checks if that file exists.
A search path can come from many sources. In the order in which Kpathsea uses them:
You can see each of these values for a given search path by using the debugging options (see “Debugging actions” on page 59).
Kpathsea reads runtime configuration files named texmf.cnf for search path and other definitions. The search path used to look for these files is named TEXMFCNF (by default such a file lives in the texmf/web2c subdirectory). All texmf.cnf files in the search path will be read and definitions in earlier files override those in later files. Thus, with a search path of .:$TEXMF, values from ./texmf.cnf override those from $TEXMF/texmf.cnf.
A configuration file fragment illustrating most of these points is shown below:
Kpathsea recognizes certain special characters and constructions in search paths, similar to those available in Unix shells. As a general example, the complex path, ~$USER/{foo,bar}//baz, expands to all subdirectories under directories foo and bar in $USER’s home directory that contain a directory or file baz. These expansions are explained in the sections below.
If the highest-priority search path (see “Path sources” on page 50) contains an extra colon (i.e., leading, trailing, or doubled), Kpathsea inserts at that point the next-highest-priority search path that is defined. If that inserted path has an extra colon, the same happens with the next highest. For example, given an environment variable setting
Since it would be useless to insert the default value in more than one place, Kpathsea changes only one extra ‘:’ and leaves any others in place. It checks first for a leading ‘:’, then a trailing ‘:’, then a doubled ‘:’.
A useful feature is brace expansion, which means that, for instance, v{a,b}w expands to vaw:vbw. Nesting is allowed. This is used to implement multiple TEX hierarchies, by assigning a brace list to $TEXMF. For example, in texmf.cnf, the following definition (appproximately; there are actually even more trees) is made:
Using this you can then write something like
which means that, after looking in the current directory, the $TEXMFHOME/tex, $TEXMFLOCAL/tex, $TEXMFVAR/tex and $TEXMFMAIN/tex trees only) will be searched (the last two use using ls-R data base files). It is a convenient way for running two parallel TEX structures, one “frozen” (on a CD, for instance) and the other being continuously updated with new versions as they become available. By using the $TEXMF variable in all definitions, one is sure to always search the up-to-date tree first.
Two or more consecutive slashes in a path element following a directory d is replaced by all subdirectories of d: first those subdirectories directly under d, then the subsubdirectories under those, and so on. At each level, the order in which the directories are searched is unspecified.
If you specify any filename components after the ‘//’, only subdirectories with matching components are included. For example, ‘/a//b’ expands into directories /a/1/b, /a/2/b, /a/1/1/b, and so on, but not /a/b/c or /a/1.
Multiple ‘//’ constructs in a path are possible, but ‘//’ at the beginning of a path is ignored.
The following list summarizes the special characters in Kpathsea configuration files.
Kpathsea goes to some lengths to minimize disk accesses for searches. Nevertheless, at installations with enough directories, searching each possible directory for a given file can take an excessively long time (this is especially true if many hundreds of font directories have to be traversed.) Therefore, Kpathsea can use an externally-built plain text “database” file named ls-R that maps files to directories, thus avoiding the need to exhaustively search the disk.
A second database file aliases allows you to give additional names to the files listed in ls-R. This can be helpful to confirm to DOS 8.3 filename conventions in source files.
As explained above, the name of the main filename database must be ls-R. You can put one at the root of each TEX hierarchy in your installation that you wish to be searched ($TEXMF by default); most sites have only one hierarchy. Kpathsea looks for ls-R files along the TEXMFDBS path.
The recommended way to create and maintain ‘ls-R’ is to run the mktexlsr script included with the distribution. It is invoked by the various ‘mktex’... scripts. In principle, this script just runs the command
If a file is not found in the database, by default Kpathsea goes ahead and searches the disk. If a particular path element begins with ‘!!’, however, only the database will be searched for that element, never the disk.
The kpsewhich program exercises path searching independent of any particular application. This can be useful as a sort of find program to locate files in TEX hierarchies (this is used heavily in the distributed ‘mktex’... scripts).
Kpathsea looks up each non-option argument on the command line as a filename, and returns the first file found. There is no option to return all the files with a particular name (you can run the Unix ‘find’ utility for that).
The more important options are described next.
Let us now have a look at Kpathsea in action. Here’s a straightforward search:
That last is a BibTeX bibliography database for TUGBoat articles.
For these fonts (a phonetic alphabet from the University of Washington) we had to generate ‘.pk’ files, and since the default Metafont mode on our installation is ljfour with a base resolution of 600dpi (dots per inch), this instantiation is returned.
Next we turn our attention to dvips’s header and configuration files. We first look at one of the commonly used files, the general prolog tex.pro for TEX support, before turning our attention to the generic configuration file (config.ps) and the PostScript font map psfonts.map — as of 2004, map and encoding files have their own search paths and new location in texmf trees. As the ‘.ps’ suffix is ambiguous we have to specify explicitly which type we are considering (dvips config) for the file config.ps.
We now take a closer look at the URW Times PostScript support files. The prefix for these in the standard font naming scheme is ‘utm’. The first file we look at is the configuration file, which contains the name of the map file:
It should be evident from these examples how you can easily locate the whereabouts of a given file. This is especially important if you suspect that the wrong version of a file is picked up somehow, since kpsewhich will show you the first file encountered.
Sometimes it is necessary to investigate how a program resolves file references. To make this practical, Kpathsea offers various levels of debugging output:
A value of -1 will set all the above options; in practice, this is usually the most convenient.
Similarly, with the dvips program, by setting a combination of debug switches, one can follow in detail where files are being picked up from. Alternatively, when a file is not found, the debug trace shows in which directories the program looks for the given file, so that one can get an indication what the problem is.
Generally speaking, as most programs call the Kpathsea library internally, one can select a debug option by using the KPATHSEA_DEBUG environment variable, and setting it to (a combination of) values as described in the above list.
(Note for Windows users: it is not easy to redirect all messages to a file in this system. For diagnostic purposes you can temporarily SET KPATHSEA_DEBUG_OUTPUT=err.log).
Let us consider, as an example, a small LATEX source file, hello-world.tex, which contains the following input.
This little file only uses the font cmr10, so let us look at how dvips prepares the PostScript file (we want to use the Type 1 version of the Computer Modern fonts, hence the option -Pcms).
debug:start search(file=texmf.cnf, must_exist=1, find_all=1,
path=.:/usr/local/bin/texlive:/usr/local/bin: /usr/local/bin/texmf/web2c:/usr/local: /usr/local/texmf/web2c:/.:/./teTeX/TeX/texmf/web2c:). kdebug:start search(file=ls-R, must_exist=1, find_all=1, path=~/tex:/usr/local/texmf). kdebug:search(ls-R) =>/usr/local/texmf/ls-R kdebug:start search(file=aliases, must_exist=1, find_all=1, path=~/tex:/usr/local/texmf). kdebug:search(aliases) => /usr/local/texmf/aliases kdebug:start search(file=config.ps, must_exist=0, find_all=0, path=.:~/tex:!!/usr/local/texmf/dvips//). kdebug:search(config.ps) => /usr/local/texmf/dvips/config/config.ps kdebug:start search(file=/root/.dvipsrc, must_exist=0, find_all=0, path=.:~/tex:!!/usr/local/texmf/dvips//). search(file=/home/goossens/.dvipsrc, must_exist=1, find_all=0, path=.:~/tex/dvips//:!!/usr/local/texmf/dvips//). kdebug:search($HOME/.dvipsrc) => kdebug:start search(file=config.cms, must_exist=0, find_all=0, path=.:~/tex/dvips//:!!/usr/local/texmf/dvips//). kdebug:search(config.cms) =>/usr/local/texmf/dvips/cms/config.cms
kdebug:start search(file=texc.pro, must\_exist=0, find\_all=0,
path=.:~/tex/dvips//:!!/usr/local/texmf/dvips//: ~/tex/fonts/type1//:!!/usr/local/texmf/fonts/type1//). kdebug:search(texc.pro) => /usr/local/texmf/dvips/base/texc.pro
kdebug:start search(file=cmr10.tfm, must\_exist=1, find\_all=0,
path=.:~/tex/fonts/tfm//:!!/usr/local/texmf/fonts/tfm//: /var/tex/fonts/tfm//). kdebug:search(cmr10.tfm) => /usr/local/texmf/fonts/tfm/public/cm/cmr10.tfm kdebug:start search(file=texps.pro, must\_exist=0, find\_all=0, ... <texps.pro> kdebug:start search(file=cmr10.pfb, must\_exist=0, find\_all=0, path=.:~/tex/dvips//:!!/usr/local/texmf/dvips//: ~/tex/fonts/type1//:!!/usr/local/texmf/fonts/type1//). kdebug:search(cmr10.pfb) => /usr/local/texmf/fonts/type1/public/cm/cmr10.pfb <cmr10.pfb>[1]
|
dvips starts by locating its working files. First, texmf.cnf is found, which gives the definitions of the search paths for the other files, then the file database ls-R (to optimize file searching) and the file aliases, which makes it possible to declare several names (e.g., a short DOS-like 8.3 and a more natural longer version) for the same file. Then dvips goes on to find the generic configuration file config.ps before looking for the customization file .dvipsrc (which, in this case is not found). Finally, dvips locates the config file for the Computer Modern PostScript fonts config.cms (this was initiated with the -Pcms option on the dvips command). This file contains the list of the map files which define the relation between the TEX, PostScript and file system names of the fonts.
At this point dvips identifies itself to the user:
After having found the file in question, dvips outputs date and time, and informs us that it will generate the file hello-world.ps, then that it needs the font file cmr10, and that the latter is declared as “resident” (no bitmaps needed):
Another useful feature of Web2C is its possibility to control a number of memory parameters (in particular, array sizes) via the runtime file texmf.cnf read by Kpathsea. The memory settings can be found in Part 3 of that file in the TEX Live distribution. The more important are:
Of course, this facility is no substitute for truly dynamic arrays and memory allocation, but since these are extremely difficult to implement in the present TEX source, these runtime parameters provide a practical compromise allowing some flexibility.
TEX Live is a joint effort by virtually all of the TEX user groups. This edition of TEX Live was overseen by Sebastian Rahtz and Karl Berry. The other principal contributors are listed below.
Builders of the binaries: Tigran Aivazian (x86_64-linux), Manfred Lotz (i386-freebsd), Fabrice Popineau (win32), Norbert Preining (alpha-linux), Vladimir Volovich (powerpc-aix, sparc-linux, sparc-solaris), Staszek Wawrykiewicz (i386-linux), Olaf Weber (mips-irix), Gerben Wierda (i386-darwin, powerpc-darwin).
Documentation and translation updates: Karl Berry (English), Daniel Flipo & Fabrice Popineau (French), Günter Partosch & Hartmut Henkel (German), Petr Sojka & Jan Busa (Czech/Slovak), Boris Veytsman (Russian), Staszek Wawrykiewicz (Polish).
Of course the most important acknowledgement must go to Donald Knuth, first for inventing TEX, and then for giving it to the world.
Discussion began in late 1993 when the Dutch TEX Users Group was starting work on its 4AllTEX CD for MS-DOS users, and it was hoped at that time to issue a single, rational, CD for all systems. This was too ambitious a target for the time, but it did spawn not only the very successful 4AllTEX CD, but also the TUG Technical Council working group on a TEX Directory Structure (http://tug.org/tds), which specified how to create consistent and manageable collections of TEX support files. A complete draft of the TDS was published in the December 1995 issue of TUGboat, and it was clear from an early stage that one desirable product would be a model structure on CD. The distribution you now have is a very direct result of the working group’s deliberations. It was also clear that the success of the 4AllTEX CD showed that Unix users would benefit from a similarly easy system, and this is the other main strand of TEX Live.
We first undertook to make a new Unix-based TDS CD in the autumn of 1995, and quickly identified Thomas Esser’s teTEX as the ideal setup, as it already had multi-platform support and was built with portability across file systems in mind. Thomas agreed to help, and work began seriously at the start of 1996. The first edition was released in May 1996. At the start of 1997, Karl Berry completed a major new release of Web2c, which included nearly all the features which Thomas Esser had added in teTEX, and we decided to base the 2nd edition of the CD on the standard Web2C, with the addition of teTEX’s texconfig script. The 3rd edition of the CD was based on a major revision of Web2C, 7.2, by Olaf Weber; at the same time, a new revision of teTEX was being made, and TEX Live included almost all of its features. The 4th edition followed the same pattern, using a new version of teTEX, and a new release of Web2C (7.3). The system now included a complete Windows setup.
For the 5th edition (March 2000) many parts of the CD were revised and checked, updating hundreds of packages. Package details were stored in XML files. But the major change for TEX Live 5 was that all non-free software was removed. Everything in TEX Live is now intended to be compatible with the Debian Free Software Guidelines (http://www.debian.org/intro/free); we have done our best to check the license conditions of all packages, but we would very much appreciate hearing of any mistakes.
The 6th edition (July 2001) had much more material updated. The major change was a new install concept: the user could select a more exact set of needed collections. Language-related collections were completely reorganized, so selecting any of them installs not only macros, fonts, etc., but also prepares an appropriate language.dat.
The 7th edition of 2002 had the notable addition of Mac OS X support, and the usual myriad of updates to all sorts of packages and programs. An important goal was integration of the source back with teTEX, to correct the drift apart in versions 5 and 6.
In 2003, with the continuing flood of updates and additions, we found that TEX Live had grown so large it could no longer be contained on a single CD, so we split it into three different distributions (see section 2.1, p. 6). In addition:
2004 saw many changes:
.map files are now searched for in subdirectories of fonts/map only (in each texmf tree), along the TEXFONTMAPS path. Similarly, .enc files are now searched for in subdirectories of fonts/enc only, along the ENCFONTS path. updmap will attempt to warn about problematic files.
For methods of handling this and other information, please see http://tug.org/texlive/mapenc.html.
It also means it’s more important than ever to use the ifpdf package (works with both plain and LATEX) or equivalent code, because simply testing whether \pdfoutput or some other primitive is defined is not a reliable way to determine if PDF output is being generated. We made this backward compatible as best we could this year, but next year, \pdfoutput may be defined even when DVI is being written.
See the Web2C manual for more: texmf/doc/web2c.
2005 saw the usual huge number of updates to packages and programs. The infrastructure stayed relatively stable from 2004, but inevitably there were some changes there as well:
TEX Live is not perfect! (And never will be.) We intend to continue to release new versions yearly, and would like to provide more help material, more utilities, more installation programs, and (of course) an ever-improved and checked tree of macros and fonts. This work is all done by hard-pressed volunteers in their limited spare time, and a great deal remains to be done. If you can help, don’t hesitate to put your name forward!
Please send corrections, suggestions, and offers of help to:
Sebastian Rahtz / 7 Stratfield Road / Oxford OX2 7BG / UK
tex-live@tug.org
http://tug.org/texlive
Happy TEXing!
1Not free, that is, in the sense of freedom to modify and redistribute, following free software guidelines. This does not mean you can’t acquire them for no money.