CS5034: Using LaTeX on csgrad

Note: This document assumes some knowledge of Unix and X Windows. If there is information that you do not understand, contact cstruble@vt.edu for help.

Initial Setup

Before you can use LaTeX on csgrad, you need to add the directory /usr/local/tex3.1415/bin to your PATH environment variable. Consult the documention for the shell you use for directions on how to do this.

Basic Steps

After you setup your PATH environment variable, these are the basic steps:
  1. Edit your LaTeX document source with your favorite editor. Save it as name.tex, replacing name with the name of your document.
  2. Run the command:
    prompt% latex name.tex

    This will produce a bunch of files in the current directory called name.*. The most important one of these is name.dvi, the DVI file.

Viewing your document

Usually after you run LaTeX on your source file, you want to see it to make sure everything went ok. For this you use the command xdvi. To run it on the DVI file you just produced in the previous steps, use the command:
prompt% xdvi name.dvi
When you are using an X terminal, you will need to set your DISPLAY environment variable to point to the X terminal you are using or use the -display option with xdvi. Consult X Windows documentation for more information.

Printing your document

When you are satisfied that your document looks ok by using xdvi you need to convert the DVI file to Postscript or some other printer output language. This requires a DVI translation program, such as dvips to go from a DVI file to Postscript. Most translation programs work similarly. To use dvips for example, just use the command:
prompt% dvips name.dvi
You can then use lpr to print the output file (usually name.type where type is an extension for the type of the output format, for example dvips creates name.ps). Read the manual page on lpr for more information. Most of the translation programs provide manual pages and/or usage information as well. The usage information is typically seen by typing the name of the translation program (e.g. dvips) with no parameters.

Postscript files can be viewed using the command:

prompt% ghostview name.ps
This should look the same as the output from xdvi.

That's all there is to the mechanics of using LaTeX on csgrad. Some editors such as emacs include LaTeX editing modes. These can be very useful to help integrate some of the steps listed above. Look into the documentation of your favorite editor for availability and details.


CS5034 class account (cs5034@ei.cs.vt.edu)
Tue Aug 22 15:35:59 EDT 1995