Typesetting

Several text formatters are available on the department's machines.

TeX and its relatives -

The formatters TeX, and LaTeX are available on the department computers. For information on using TeX , consult The TeXbook by Donald E. Knuth. The currently supported version is the TeX Live package. TeX Live is a pre-packaged version of TeX, including a number of packages and style files.

To process a TeX document for printing, first type tex filename.tex. For a LaTeX document, use the command latex filename.tex. This will produce the file filename.dvi. To send the dvi file to the printer, type lpr -d -Pprinter filename.dvi.

TeX: tex filename.tex ----> filename.dvi
LaTeX: latex filename.tex

Would be TeXsperts might want to browse:

DVI to Postscript conversion

If you desire to produce a final PostScript version of your dvi file, you can convert it yourself by running a dvi-to-PostScript program. The TeX Live package includes a program named dvips that handles this conversion process. To run this program, type:

	dvips filename.dvi

This will produce a filename.ps file. You can then print the file, or view it with the ghostview program.

A note about dvips / dvipdf in TeX Live 2008: CS Staff is aware of a new behavior of dvips that started with the upgrade to TeX Live 2008. Specifically, dvips now always selects a paper size if one is not specified in the DVI file. This can lead to problems, especially for users of the "beamer" document class (a package used for making presentation slide decks in TeX). The obvious symptom of the problem is that beamer slide decks, when run through dvips or dvipdf (because dvipdf is a script which calls dvips) will end up formatted in one corner of a letter-size page.

The workaround for this issue is to add a "-t unknown" argument to the dvips command line. If you are trying to use dvipdf, you can look in the dvipdf script and manually run the command at the bottom of the script, adding a "-t unknown" to the dvips portion of the command. Thus, your command may look something like this:

   dvips -q -t unknown -f example.dvi | \
        gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
        -sOutputFile=example.pdf -c .setpdfwrite -

Tags: