This document explains the use of TeX and LaTeX on the Departmental sun machines. It is not intended to teach users how to format documents. See the section below on User Guides for more information. Please take the time to read through the entire document - it's not very long.
NOTE that TeX and LaTeX are not the departmental standard documentation systems (use mkdoc or soffice/ooffice), and the IT staff can only provide minimal help with TeX or LaTeX.
LaTeX is made available to you by the command tetexsetup. This
command may be typed at the command line before each session or, if you
prefer, it may be put in your startup files so you don't have to keep typing
it. To do this, first find the appropriate file.
~/.cshrc
~/.bashrc
tetexsetup
just below the comment saying "Put your own additions below this line". Save the file. You will then get access to LaTeX each time you login.
The tetexsetup command gives you access to the most recently
installed LaTeX software which is based on the teTeX distribution. We still
have an older installation (the one used in the former EE department) which
can be accessed by using the command texsetup. This might
disappear at some point in the future.
Some users will want to include one of their own directories
in TEXINPUTS. If this is the case then it should be added to the
environment variable after the tetexsetup command using a line such as
setenv TEXINPUTS "/home/fred/tex:$TEXINPUTS"
for tcsh users or
export TEXINPUTS="/home/fred/tex:$TEXINPUTS"
for bash users. If you don't know whether you use tcsh or bash, type
echo $SHELL
To run LaTeX on a file simply type
latex filename.tex
Similarly, TeX may be run on a file by typing
tex filename.tex
Running any of these commands will produce, assuming no fatal errors, a device independent (dvi) file with the extension ".dvi". This file may be previewed, or converted to PostScript. To preview a file, use the command
xdvi filename.dvi
on a workstation. This will start up a new window displaying the formatted document. The document may be converted into PostScript for printing, or previewing using ghostview, with dvips. To print the file, simply type
dvips filename.dvi | lpr -Pps5
or
dvips -Pps5 filename.dvi
using the name of your favourite PostScript printer in place of ps5. The PostScript file may also be saved by redirecting the output to a file instead of piping to a printer, i.e.
dvips filename.dvi > filename.ps
[ Note that if a particular font size is not available, dvips may take longer than normal to convert a file as it will attempt to create the font at that size. Once created, the font will be available for further invocations of dvips, and no delay will be experienced. ]
If you wish to produce 2-up or 4-up documents on ps5 or ps6, then it is suggested that you use the command
dvips -Pps5x2 filename.dvi
or
dvips -Pps5x4 filename.dvi
as this will improve the quality of the resulting output.
The SEE IT support group don't know much about TeX/LaTeX so support is pretty minimal. We can help if there are problems with the software or you need a package installed but if you need help with using LaTeX you would be better off asking another user or consulting a user guide.
The definitive guide to document writing using LaTeX can be found in
"LaTeX - A Document Preparation System" written by Leslie Lamport and
published by Addison Wesley. Other books on the use of LaTeX are also
available; I can recommend "A Guide To LaTeX" by Kopka and Daly, also
published by Addison Wesley. TeX users are directed to "The TeX Book"
by Donald Knuth. A simple guide to the use of LaTeX can be found in
/home/tetex/texmf/tex/latex/base/small2e.tex.
A second file, in the same directory, called sample2e.tex
gives more examples on usage. Copies of these files may be formatted by
simply typing
latex small2e.tex
and
latex sample2e.tex
There is also a set of Web documentation for the old EE installation to be found at http://www.ee.ed.ac.uk/~ltex/