This documentation is very old and is no longer maintained.

Information Systems Department

TeX is a computer language designed for typesetting, in particular, for typesetting mathematical documents. TeX is public domain software: it is freely available for download, installation and use on all computers. TeX is installed and in use on Cosmos, the UMIST general-purpose Unix machine.

Document History

  1. First draught: 2001 June 20, Simon Hood.


If it goes wrong, tough luck!


We wrote it and we'll make you pay.


What is TeX ?

TeX is a (macro expansion) computer language designed for use in typesetting, in particular, for typesetting maths and other technical material. Of course it does non-techie stuff beautifully too. And, perhaps surprisingly, you don't need to know a thing about computer programming to use it.

(For a little history see and background try the TeX Users Group site and follow the links to What is TeX ? and A bit of history.)

Why use TeX ?

Because it generates beautiful, superior, publication-quality text; because it offers fine control over every character on the page; because it includes the most powerful features for typesetting mathematics available anywhere (see the sample documents referenced below).

The Name of the Game

The name TeX , that is,

comes from the same Greek root as "technology": TeX is pronounced as the Greek "tau epsilon chi" (cf. the scottish loch, the spanish rioja and scouse Birkenhead).

A Few Words of Warning

Having begun on the TeX /LaTeX path your life will never be the same again: word-processors will seem crude tools which lack power, subtlety and finesse. Enjoy!

Support for TeX from ISD at UMIST

There is currently only limited support for TeX by ISD at UMIST: it is installed and available for use on Cosmos, but is not installed on any public PC cluster. We will offer advice on problems encountered in using TeX , but time spent on such problems will be scheduled at a low priority. We offer:

That's it, except that we do run a course: Introduction to LaTeX .

Sample Documents

So what does a TeX document look like? Some samples of the output from TeX :

A Brief Tutorial: Creating and Printing Your First TeX Document

When learning how to use a piece of software, the learning curve is steepest when you produce the first document. An appendix runs through each step in the creation, compilation and printing of a TeX document: it's very different from a:

  1. Using your favourite text editor (GNU-emacs!) create a file, called <myfile>.tex --- the source code must reside in this file.
  2. Compile the source (from you file) to produce a .dvi file (dvi stands for device-independent).
  3. Convert the .dvi file to a format suitable for printing --- often postscript.
Thse steps become second nature --- and offer extra flexibility and power.

Recommended Books

There are lots of books available which describe the use of TeX , though you won't find them in your average bookshop. A university library or bookshop are good places to look. Try those listed in this document for starters.

Free and Public Domain Introductory Texts and Tutorials

If you want to get an idea of what TeX can do for you, and how to do it, without investing in a book, try one of the introductory texts and tutorials available on The Web.

There is some documentation available available from the Mathematics Department.

Flavours of TeX : Plain TeX , LaTeX and AMS(La)TeX

TeX comes in more than one flavour, including Plain TeX , LaTeX and AMS(La)TeX ; most people use LaTeX .

(Plain) TeX

Plain TeX is TeX at is most basic from the users' point of view. It consists of about 600 control sequences (macros) which are defined in Appendix B of The TeX Book --- the original book, by Donald Knuth. These sequences/macros are usually present when TeX begins to process a source file (in addition to the 300 or so primitives, which are always present).

Most people use additional sets of easy-to-use macros in the form of templates/style-sheets. The most common of these is LaTeX .


I quote (from the Not So Short Introduction to LaTeX 2e): LaTeX is a macro package which enables authors to typeset and print their work at the highest typographical quality, using a predefined, professional layout. LaTeX uses the TeX formatter as its typesetting engine.

More simply put, LaTeX consists of sets of predefined macros in the form of templates which make using TeX much easier. Templates (style files in LaTeX parlance) exist for articles, books, overheads...and everything else you can think of. They are all there on CTAN.

The users' manual comes with distributions of LaTeX . Alternatively access ISD's local copy.


Formally: AMS(La)TeX is a set of loosely related files that are distributed by the American Mathematical Society...miscellaneous enhancements to (La)TeX for superior information structure of mathematical documents...

More usefully: AMS(La)TeX adds to the macros available to help with typesetting mathematics, for example:

Several academic journals offer AMSLaTeX style sheets to help with (speed up) the publication process.

For more details see the section devoted to AMS(La)TeX .

The Edit-Compile-Preview-Print Cycle

Production of a document using TeX is similar to editting/writing, compiling and running a computer programme.


The first step is to write (a first draught of) your document using your favourite text editor, for example Emacs. Save this as, for example, my_file.tex.


The second step is to compile the source code. Usually one generates a .dvi file --- but see Output Formats, below. To do this (from the command line):
  tex my_file.tex
  latex my_file.tex
A file called my_file.dvi will be generated, provided you have made no syntax errors (unlikely!). This contains a device-independent representation of your document.


When you create a new input (source) file for TeX you will probably make mistakes. Everybody does and it's nothing to be worried about. If you make an error such as mispelling a macro name, then during compilation TeX will spot it and print an error message. Unfortunately the messages are not as friendly as they might be --- rather like any other language compiler.

A good introduction to dealing with error messages is given in Essential LaTeX (see Introductory Texts and Tutorials).

Previewing TeX Output

You do not have to print your document to see what it looks like; you can preview it, on screen. There are several options available: the viewer you use depends upon the format you want to (pre)view --- DVI, PDF or postscript (see Output Formats, below).

Printing: dvips

It is not usually possible to print a DVI or PDF file, as produced by tex or pdftex, directly. The file must be converted to a format printers understand. Conversion of DVI is most commonly done with dvips, which converts DVI to postscript and other formats.

dvips has a lot of features and is by far the most commonly used utility for producing hardcopy --- it deserves a section of its own, so we give it one. The dvips home-page offers more information.

Output formats: DVI, HyperTeX, TeXInfo and PDF

When the tex (or latex) programme processes (compiles) your input/source file it produces DVI output. DVI stands for device independent. A .dvi file can be used to create output on a range of devices. Here are the conversion/output utilities available on my Linux machine:
    dvi2fax  dvihp    dvilj2p  dvilj4l  dvipdf   dvired   dvitype  
    dvicopy  dvilj    dvilj4   dvilj6   dvips    dvitomp 
For example, dvihp converts a .dvi file to Hewlett-Packard PCL for sending to a PCL printer; dvips converts to postscript and dvipdf converts to PDF, Adobe's Portable Document Format.

Alternatively pdftex will compile a TeX source file directly to PDF. Omitting one stage (i.e., going directly to PDF without first producing DVI) is quicker, and produces higher quality output. There are significant other advantages too. See the section on PDFTeX .


HyperTeX is an extension to TeX : Web-style hypertext links are added. One can view HyperTeX documents and follow the links, by using adapted DVI-viewers. In addition HyperPS --- an extension ofpostscript --- supports hyper-links.

The HyperTeX "home document" may be found at CTAN and gives lots more information on all of this.

TeX Info

I quote:

TeX info is a documentation system that uses a single source file to produce both online information and printed output. This means that instead of writing two different documents, one for the online help or other online information and the other for a typeset manual or other printed work, you need write only one document. When the work is revised, you need revise only one document. You can read the online information, known as an "Info file", with an Info documentation-reading program...

...which is reminiscent of an hypertext viewer. So TeXInfo can do some of the stuff that SGML can, except its based on a macro-expansion language (TeX !), rather than an HTML-like language.

The TeX Info home page leads to the manual in several formats.


The main purpose of the PDFTeX project was to create an extension of TeX that can create PDF directly from TeX source files and improve/enhance the result of TeX typesetting with the help of PDF. Enhancements include all the usual things you'd expect to find in a PDF document such as hyperlinks and searching. To achieve this several new primitives have been introduced.

To find out more get the manual.


TeX is a typesetting engine; most people use it as described above, through a combination of their favourite text editor, the tex, or latex command, with dvips. If you like TeX 's power, but would prefer something a little more WYSIWYG-like, then fear not as options are available for you.

Fonts, Fonts, Fonts...

Traditionally one uses bitmap fonts within TeX ; alternatively one can use postscript fonts, and even TrueType fonts, both of which are vector fonts. (The output from PDFTeX currently looks much better with postscript fonts.)

TeX, DVI-viewers and dvips all use a programme called METAFONT to build fonts from .mf files.

All this and more are introduced in the section devoted to fonts, but beware, books have been written on the subject --- fonts are addictive!

Graphics in TeX

Creating Graphics in TeX

There are lots of packages which make it easy to create graphics within TeX . Some introduce new libraries of macros, some make use of METAFONT and others rely on the use of postscript.

More details can be found in the section devoted to Creating Graphics in TeX .

Importing Graphics Generated from Other Applications

LaTeX can import virtually any graphics format; the import of Encapsulated Postscript is easiest. Keith Reckdahl has written an exhaustive document on the subject, called Using Imported Graphics in LaTeX 2e. It can be found at the Graphics Section of the LaTeX Navigator; alternatively, access ISD's local copy.


BibTeX is a utility add-on for LaTeX which helps in the compilation of a bibliography. Using BibTeX , you can: cite references in the text of a paper and have them automatically and correctly cross-referenced; include references in your paper; you can obtain them from one or more bibliographic databases.

More details can be found in the section devoted to BibTeX .

Ancilliary Programmes


makeindex is a programme for generating indexes from LaTeX documents. The documentation can be found at CTAN; alternatively, access ISD's local copy.

TeX Resources on the Web

As you might expect there's lots of stuff out on the Web for TeX users. Some of the more significant are:

Putting/Viewing TeX on the Web

How can one view documents generated from TeX source directly, preferably without loss of document quality and including the mathematics, rather than simply putting a link to a DVI file on a web-page so that it can be downloaded and viewed later.

There are several strategies for this. At least one plugin has been developed for Netscape which enables one to view DVI files directly; the plugin supports HyperTeX . Alternatives include using PDF created by use of PDFTeX , or converting the TeX input/source to HTML.

Each of these is explored in the section devoted to putting TeX on the Web.

Installation: Distributions

If you are both courageous or an all-knowing TeX guru then you'll put tegether your own TeX installation from the available bits (TeX , LaTeX , AMS(La)TeX , PDFTeX , METAFONT, dvips, BibTeX , makeindex...). The rest of us will use one of the ready-made distributions which have (most of) the bits already put together and (partly) configured.

I can recommend teTeX which is available for most flavours of Unix and MiKTeX for MS Windows.


MiKTeX is recommended as a MS Windows distribution of TeX /LaTeX --- it is easy to install, and of course, free.


teTeX can be found at CTAN for various flavours of Unix and for Linux. Documentation within an installation is found within /usr/share/texmf/doc/index.html which points to /usr/share/texmf/doc/newhelpindex.html.

The online documentation for teTeX is available on Cosmos:

LaTeX 2.09 vs 2e

 --  latex2e for
    latex209 users...

 -- For most documents, you can convert to LaTeX2e native mode by simply 
    changing the command




    where class is the document class, e.g book, article, or report, and 
    cl_op1, cl_op2, ... are options for the document class, e.g. 12pt or 
    twoside, and pkg1, pkg2, ... are LaTeX packages, or style files 
    independent of the class, e.g. mapleenv or array.

    You may have problems with your document in native mode if a package 
    you want to use is incompatible.  In such a case, you can either go 
    back to compatibility mode or check to see if there is a new version
    of the package.

 -- ${\mathcal P}$ vs $\mathcal{P}$<DOTS>

 -- rawfonts.......


We plan to create a FAQ to help with support of TeX at UMIST. Please send any contributions via The Helpdesk.

About this document:

Produced from the SGML: /home/isd/public_html/_tex/_reml_grp/tex.reml
On: 27/11/2007 at 12:41:41
Options: reml2 -i noindex -l long -o html -p single