Using TeX and LaTeX on Bama
TeX (rhymes with blech) and LaTeX are text formatting programs that have been known to mathematicians and other technical types for many years. They are called text-formatting programs because they process plain text files that contain special commands into fully formatted output. The formatted output file can then be sent to a printer or viewed on the screen. While this technique may seem like a step backwards in the days of WYSIWYG word processors, it does have some advantages. For instance, the design of a document can be changed simply by changing the interpretation of the special commands. The original text file need not be touched.
The real power of TeX and LaTeX is the accuracy and breadth of their mathematical typesetting abilities. This is not surprising, since the TeX language was written by a mathematician, Donald Knuth. LateX has been adopted as a publishing standard by the American Mathematical Society (AMS) and the American Astronomical Society (AAS) and by a number of journal publishers. This means that submissions of articles to these publishers can be formatted as LaTeX documents.
The details of using these programs are available in a variety of Books. In this Tipsheet we will give more information on what is available on Bama, concentrating more on LaTeX. This is a macro package written using TeX, so that all TeX commands will work in files designed for processing with LaTeX. Since LaTeX has been adopted by a number of technical publishers, specialized macros exist for many applications. We even have a LaTeX macro designed for University of Alabama dissertation-formatted output. There will be more on that shortly.
Processing Steps
The are three steps to producing printed output from a LaTeX file. First the text file is processed into a "device-independent file". Assuming the text file with the embedded commands is called filename.tex (the actual filename is up to you, although the suffix should be ".tex") you would type:
latex filename
The resulting output is filename.dvi. This file must be processed for the appropriate printer. The most common output format is PostScript. On our system we run "dvips", so the command would be:
dvips filename
The output from "dvips" is filename.ps. This file can be routed to any PostScript printer (such as afccu2) with the regular Unix print command. X-windows users can preview the output for errors with "xdvi", thus saving a lot of paper. Notice that the filename suffix is not used with the latex, dvips, and xdvi commands, but is assumed to be ".tex", ".dvi", and ".dvi", respectively. On the other hand, when printing the file you must input the full name, including the ".ps" suffix.
Latex files start with a command "\documentstyle" which specifies the overall formatting. This is followed by the list of special options enclosed in "[ ]" and the general style enclosed in "{ }". So a typical command might look like:
\documentstyle[12pt]{article}
Fonts
Occasionally, a document will be formatted with type sizes that have no corresponding font in the TeX font directory. Our installation of TeX is configured to create the new fonts and install them in the proper system directory. This will happen at the time "dvips" is run. If you process a document for the first time that requires new font sizes you will see the fonts being created. Subsequent processing will occur much quicker because the fonts will then be in place.
Special LaTeX Macros
In addition to the AMS and AAS LaTeX macros, we have a macro to help format University of Alabama dissertations; the "Big Al" macro. The correct documentstyle line is:
\documentstyle[12pt,big_al]{report}
There is a great deal more to using the dissertation macro. You will find a sample latex file and a usage manual under http://bama.ua.edu/~unixinfo/pickup/latex_thesis_docs
We also have a macro called "foiltex". Foils are large-font text pages suitable for overhead transparencies.
We have macros for including images (both photos and drawings) into your document. The only requirement is that the images be formatted as Encapsulated PostScript or PostScript. There are several macro packages that assist in including figures. The simplest of these is "epsf." To include an image you would insert the line:
\epsffile{filename.ps}
To use this with the dissertation LaTeX macro, the documentstyle line would become:
\documentstyle[12pt,big_al,epsf]{report}
There are many other macros included with our installation of TeX which haven't even been documented yet. Watch http://bama.ua.edu/~unixinfo for further developments. If you have special requirements regarding macros or the use of TeX please contact the Help Desk (help.desk@ua.edu).
© 1999, The University of Alabama. The information included here is for the University of Alabama central computing facility as it was configured on the document date. It may or may not apply to other Unix systems.

