TeX at OUCL

(This is an HTML conversion of the document /usr/local/lib/tex6.1/doc/help/tex-at-oucl.dvi by Ian Collier. That document may be viewed with the xdvi, but note that with the old version the blackboard bold fonts will not come out correctly. The rest of the document will be fine).

Contents

The all-new TeX

This section introduces the new hierarchy of TeX files which was installed at the beginning of May 1995, and describes how to set your system up so that you can use them.

What's new?

Everything installed in May 1995 was new. The latest versions of all the standard tools, including TeX, LaTeX 2e, dvips and xdvi, were installed. LaTeX 2e was updated again in June 1996.

For obscure reasons, this new collection of files will be referred to as tex6.1 and lives in a directory called /usr/local/lib/tex6.1. Since this document will contain many references to that directory it will be convenient to represent it by `tex6.1'. The previous installation of TeX will be referred to as tex3.14 and was installed in a similarly named directory.

The directory structure of tex6.1 is somewhat different from that of the previous installations, but we hope that it is more organised and easier to use in the long run.

How do I get it?

The first thing to do is set your PATH environment variable. This should appear in a line in your .login file (or possibly your .cshrc file) of the following form.
setenv PATH /usr/local/bin/X11R5:/usr/local/bin:/usr/bin:.
Insert the directory tex6.1/bin/sun4 (that is, expanding the abbreviation defined above, /usr/local/lib/tex6.1/bin/sun4) into the list of directories. You must put it somewhere before the directory /usr/local/bin. The tex3.14 directory might already appear in this list of directories. If so then you must delete it after inserting the tex6.1 directory (or simply change it into the tex6.1 directory).

Setting the PATH allows the system to recognise the new programs, but in order to avoid problems when using them you must pay special attention to your other TeX-related environment variables (however, if you do not have any of those then you can go ahead and use the new TeX).

When you set your PATH, it is also advisable for you to change your MANPATH so that you will be able to find out about the new commands using the man command. The procedure is similar to that for the PATH variable, except that the directory you should insert is called tex6.1/man. You may find that the MANPATH is not set anywhere in your .login or .cshrc, in which case you should add it to your .login. A good starting path is the following.

tex6.1/man:/usr/local/man:/usr/man

Environment variables

The following environment variables are used by the programs of tex6.1. Most of them need not be set because the default values are usually quite reasonable. You will probably want to set your TEXINPUTS though. Some of these variables might be different from what you are used to.

TEXINPUTS Where to find TeX input files
MFINPUTS Where to find Metafont input files
TFMFONTS Where to find `tfm' files
PKFONTS Where to find `pk' font files
VFFONTS Where to find virtual font files
TEXFONTS Where to find any kind of font files

The TFMFONTS, PKFONTS and VFFONTS environment variables override TEXFONTS whenever they are set; the latter is used as a default for all kinds of font when the more specific variable is not set. There are other environment variables, but you probably do not need to know about them unless you want to do something fairly special; a full list may be found in the document kpathsea.dvi in the directory tex6.1/doc/kpathsea. If you have any other environment variable (such as TEXPKS, for example) then you might want to change it to one of the above.

Each of the above environment variables specifies a search path in a similar way to that in which PATH specifies the search path for programs. There are two differences, however.

  1. You can tell the system to look in the `usual' place by adding an extra colon to the path. For example,
    /users/bloggs/tex::tex6.1/doc//
    means that /users/bloggs/tex will be searched first, then the usual place, and finally tex6.1/doc//. You can put the extra colon at the beginning or end of the path instead if you want. A list of what `usual place' means for various types of file is kept in the file texmf.cnf in directory tex6.1/web2c. In fact TeX and its friends actually read that file in order to decide what the usual place is.
  2. Because the files of tex6.1 are stored in a tree structure with lots of branches -- for example, with the LaTeX macros for the `foo' package being kept in a subdirectory called latex2e/foo -- the new programs implement subdirectory searching. To use subdirectory searching in a particular directory, you add two slashes to the end of the directory name. For example, since the default TEXINPUTS contains the string tex6.1/tex//, this means that all the files in tex6.1/tex/latex2e/foo will be found as well as those in tex6.1/tex/plain/phu.

    It is also possible to place two slashes in the middle of a directory name instead of -- or as well as -- at the end, but the file system has been set up in a way such that this is not usually necessary.

You should make sure that the tex3.14 directories do not appear in any of your environment variables unless you know that you will need them.

Related software

LaTeX 2e

The new TeX installation contains the new version of LaTeX -- namely, LaTeX 2e. This is somewhat different from the old version (LaTeX 2.09), although it will compile most existing documents unless they do something unusual (style files, however, are another matter). Documentation on how to make the most of LaTeX 2e is available in the directory tex6.1/doc/latex2e/base as follows:

usrguide.dvi LaTeX 2e for authors
clsguide.dvi LaTeX 2e for class and package writers
fntguide.dvi LaTeX 2e font selection.

LaTeX versions

There are in fact three versions of LaTeX currently installed. They are called latex209, latex2e-1994-12-01 and latex2e-1996-06-01. The last of these is also called just `latex' and is the new version that you will be using if you skip this section of the document. However, if you have a document that will not compile under the latest LaTeX version then you can use one of the other versions as described here. The latex209 version will be the most useful one.

The TeX input files corresponding to each LaTeX version are located in tex6.1/latex/version, subdivided into inputs and docs. There may also be other directories - for instance an ins directory containing files that were used for installation. Note, however, that the latex209 inputs directory is actually a symbolic link to the tex3.14 directory tree. One of these versions (currently latex2e-1996-06-01) will also be visible in the normal place in the tex6.1 directory tree, which is why you do not need this section of the document if you do not want to use different LaTeX versions.

Each version of LaTeX has a program named after it. For example, typing latex209 xyz will use LaTeX 2.09 to typeset file xyz.tex. Before running LaTeX the program makes some cursory checks on your TEXINPUTS environment variable. Since the new LaTeX macro files may not work under older LaTeXs (especially 2.09) the program tries to ensure that the inputs directory for your chosen version of LaTeX appears before the tex6.1 macros directory in this variable. This should mean that you get the same results under this program as you did under the old LaTeX. However, the program will not change your TEXINPUTS if it mentions the LaTeX version by name, and in any case it will not (and can not) make any lasting changes to your environment.

The latex209 program is supported only inasmuch as tex3.14 is; it uses the tex3.14 directory tree for its input files, and will go away if and when that directory is deleted (which will not be for quite some time). Any new LaTeX packages that are installed will probably only be configured for LaTeX 2e.

Macro packages

Most of the standard packages mentioned in `LaTeX 2e for authors' under `Related software' have been installed, as well as a number of other packages for LaTeX 2e and plain TeX. At present there are relatively few of the other packages that were installed in tex3.14; these need to be evaluated for compatibility with LaTeX 2e before being installed. A list of the currently installed files is available in the file tex6.1/doc/general/files.

Any requests for further macro packages or suggestions as to which packages from tex3.14 should be investigated first are welcome and should be mailed to me at imc@comlab.

DVI-ware

This section describes how to view and print the DVI files that TeX outputs.

Viewing DVI files

The decision has been made to support xdvi as the only previewer (unless there is a particularly strong objection). The new version of xdvi can display PostScript specials to a certain extent and has greyscale antialiasing which should make the display easier to read (on a colour workstation). Using xdvi is fairly straightforward and it has a full man page.

Printing DVI files

There are two ways to print a DVI file. One is to use lpr with the -d option, for example:
lpr -d -Pmh test.dvi
which will print file test.dvi on printer mh. The other is with the program dvips (which converts the DVI file into PostScript). There is copious documentation on the various options of dvips in the directory tex6.1/doc/dvips. A simple command to print out foo.dvi on printer lj2 is:
dvips -Plj2 foo.dvi
which will send the file straight to the printer. If you have an environment variable PRINTER set to the string lj2 then you need not write -Plj2 in the above command; the file will automatically go to that printer.

If you wish to send output to a file instead of to a printer, then specify the -o flag of dvips. If you place the -o at the end of the command line, then the name of the output file will be that of the input file but with .ps instead of .dvi. Otherwise the name of the output file should be supplied after -o, as in the following command.

dvips -o output.ps foo.dvi
The destination of the output file is always displayed on the terminal.

The new dvips is configured to understand most of the printers in the computing laboratory (that is, all the ones that I know about and that support PostScript) so that the PostScript file will be created at the correct resolution. If you specify both a printer and an output file then the output will be configured for that printer but will be written to the output file instead of being printed; this is most useful when the intended printer has a different resolution from the default (600dpi). If the environment variable PRINTER is set, then that determines the resolution used when the -P flag is not specified.

Viewing PostScript files

The command ghostview may be used to view a file that was produced by dvips (or indeed any other PostScript file). This program uses ghostscript to render the PostScript and displays it on your X terminal.

A new version of ghostscript has been installed in /usr/local/gnu/bin. Although this version is not necessary for using ghostview, it is an advantage to use it since the previous version could not properly render type 1 fonts. In order to use it, place the directory /usr/local/gnu/bin somewhere before /usr/local/bin/X11R5 in your PATH (the new xdvi -- which uses ghostscript to render PostScript specials or fonts -- will always use the new version even if you do not change your PATH).

Font creation

The new xdvi and dvips can generate bitmap fonts automatically if they do not already exist. A message such as
Running MakeTeXPK cmitt10 300 300 1
indicates that this is taking place. There will be a fairly short delay whilst the font is made. A minimal font base was installed initially, so this may occur relatively frequently to begin with; however, fonts exist for all the standard documentation which has been installed.

Frequently asked questions

Here are the answers to a few of the questions that I have seen asked recently. The contents of this section are by definition dictated by the users, so if you have any suggestions please
mail me.

I keep getting an error on font msxm10.

The fonts msxm, msym and oxsy are several years out of date and have not been installed. Their places have been taken by new fonts msam, msbm and oxsz respectively. Any references to the old fonts should be changed to the new fonts as soon as possible. New versions of fuzz.sty and the amsfonts package have been installed which are compatible with the new LaTeX 2e.

If for some reason you are unable to make the change (for instance because you have been sent a DVI file by someone else), then setting

TEXTFMS=:/usr/local/lib/tex3.14/fonts-tfm
TEXPKS=:/usr/local/lib/tex3.14/pk-300:/usr/local/lib/tex3.14/pk-600
should help, until such time as the old fonts are removed.

How do I get the symbol `the real numbers', etc.?

There are two packages for LaTeX 2e which give these symbols (they also work in LaTeX 2.09 compatibility mode). They are: For more information see the documentation in tex6.1/doc/latex2e/bbold.

How do I print two pages of the DVI file on each sheet of paper, for example to make an A5 booklet?

Special effects like this may be obtained via the psutil package. One of the programs supplied with this package is psnup, which takes one PostScript file and outputs another in such a way that each page of output contains n pages from the input file, reduced in size.

You can get dvips to use this program automatically by appending the string x2 to the printer name. For example, the command

dvips -Pcp1x2 foo.dvi
prints the foo.dvi file on printer cp1 with two logical pages on each sheet of paper.

If you want to use dvips to create such a file without printing it, then use the special printer x2. The output file will be called dvips.out.ps (by a `special' printer I mean that you pretend to dvips that it is a printer, whereas in reality the printer does not exist and the output will always end up in the file dvips.out.ps).

If you use the -o flag to produce an output file, dvips will not run your file through psnup, so you will have to do that manually. However, dvips will create the file at an appropriate resolution to be passed through psnup. An alternative way of creating a file at this resolution is to use the special printer small. There is also a special printer called smallcx which should be used if the printer you eventually wish to use has a resolution of 300, rather than 600, dots per inch. When you have created a file ready to be passed through psnup, the usual command to use is:

psnup -2 inputfile > outputfile
(note that psnup only works on PostScript files).

A file printed in this manner on one side of the paper can be made neatly into an A5 booklet by folding the sheets individually in half and stapling them together down the side opposite the creases. However, when printing is done on both sides of the paper a more sophisticated technique is needed because the pages need to be reordered. There are two equivalent ways in which to do this; there is the command dvibook which reorders the pages of a DVI file, and there is psbook which reorders the pages of a PostScript file. Taking the latter approach, a simple way to create an A5 booklet is as follows. Create a PostScript file at the correct resolution (but without using psnup) as described above. Then reorder the pages of this file by typing the command

psbook inputfile outputfile
before running psnup as shown above. The file is now ready to print. Unfortunately, the Computing Laboratory does not have any double-sided printers, so you will have to use a photocopier to copy the printed output and make the booklet. After it has been printed, the booklet can be made by folding the sheets in half together and stapling (or sewing) down the middle.