TeX and LaTeX


Where to Find TeX and LaTeX
TeX and LaTeX: Instructions
If You Still Need Help


TeX is a computerized text-formatting system for mathematical, scientific, and technical document preparation. Based on TeX, LaTeX simplifies document production by reducing the number of necessary text formatting commands. Both programs allow you to generate fully structured papers, reports, and manuals and store them in on-line files. This document explains how to run TeX and LaTeX, preview on a Sun Ray, and how to get printed copies of your formatted documents. It assumes that you already know how to create files with the appropriate TeX and LaTeX commands.


Where to find TeX and LaTeX

  • Where can I use TeX and LaTeX on campus?

    TeX and LaTeX are available on Strauss.

    For availability of TeX and LaTeX at computing sites, please see the Web pages at


  • How can I obtain TeX and LaTeX for my personal computer?

    Please see the software distribution pages at TeX Users Group: Windows (proTeXt), Mac (MacTeX) and Unix (TeX Live).


TeX and LaTeX instructions

  • Setting up your UDelnet account on Strauss

    This documentation assumes that your UDelnet account's configuration ("dot") files match, or are based upon, the User Services recommended configuration files: .cshrc, .login, .localalias, and .localenv. These files are found in the /opt/proto directory. Typing the UNIX command


    will cause your current configuration files to be renamed (for backup purposes) and replaced with the standard configuration files. The system will display the names of the renamed and replacement files.

    Using your favorite editor, add the following line to your ~/.localenv file:

    setenv NEWPATH ${NEWPATH}:/opt/tex/bin:/opt/texutils/bin

    You will need to log out and log back in to have the new path activated.

  • Producing a document with TeX or LaTeX is a three-step process:

    1. Create an input file that contains the text to be formatted and the necessary TeX or LaTeX commands.
    2. Run TeX or LaTeX on your input file to create an output file containing the formatted text.
    3. Preview the formatted output file on a Sun Ray or print the formatted output file on a PostScript laser printer.

    Any file you intend to format with TeX or LaTeX must have the extension .tex. For example, if you are using TeX to produce your thesis, you might call your main file main.tex.

  • Running TeX and LaTeX

    To run TeX on your TeX input file, type

    tex filename

    To run LaTeX on your LaTeX input file, type

    latex filename

    After you have run the input file through TeX or LaTeX, an output file will be created with the extension .dvi. This is the file that you will preview or send to the printer. If errors occur when you run TeX or LaTeX, a .log file will be created. You should use this file to locate the errors in order to correct them.

  • Previewing TeX or LaTeX output on a Sun Ray

    Before you send your .dvi file to the printer, you will probably want to preview it on a terminal screen. The xdvi program displays a .dvi file on any Sun Ray (see Sun Ray Terminals at UD for more information). Your file will appear on the screen as it will look when it is printed—with margins, page borders, page numbering, and so on.

    To have your .dvi file display on your Sun Ray, use the following command:

    xdvi filename

    where filename is the filename.dvi file.

  • Printing TeX or LaTeX output

    In order to print a formatted document, you need to use the command dvips with your .dvi file. Use the command as follows:

    dvips filename options

    To have your file printed duplex, on undrilled paper at a printer in Smith Hall, type

    dvips filename

    If you want to print simplex or to a different printer, use

    dvips filename -o

    This will create a file called filename.ps. To print simplex at a printer in Smith Hall, use

    qpr -q smips -S filename.ps

    You can pick up your printed output at the counter in Room 004 Smith Hall.


More help

The following manuals should be purchased depending on which program you want to use:

  • The TEXbook by Donald Knuth, Addison-Wesley Publishing Company, 1986.
  • LATEX:A Document Preparation System by Leslie Lamport, Addison-Wesley Publishing Company, 1986.