Guide to Printing at UCLA Math

UNIX environment


Users are encouraged to use the preview facility "xdvi" (or ghostview if your document contains postscript figures) before printing the final output of TeX documents, as paper and ink are expensive.

oPrinting Text Files

"lpr" is the main printing program for printing text files (or so-called ASCII files) such as email messages. It works on all standard Unix systems. The only thing you need to learn to use this program is how to direct your output to the desired printers. You can specify the printer name by using "-Pprintername" option; for example

   lpr -Paclps filename

will send output to aclps.

o Enscript

For printing large text files, you can conserve paper (and get a much prettier output) with the following procedure:

   enscript -2 -P printername filename

o Printing TeX documents

DVI files are the output of the TeX family of typesetting programs. To print one on any laser printer, use

dvips -Pprintername document

(assuming you ran off "document.tex") If you don't specify the printername, then it will be printed on aclps unless the PRINTER environment variable is set to some other printer (see "Setting up your PRINTER environment variable" below).

*   Printing only part of a TeX document

If you need to see only part of the document, then, for example, to select pages 5 through 10 in your dvi file called "paper.dvi", type

  dvips -Pprintername -p 5 -l 10 paper.dvi

oControlling Your Print Jobs

You can use "lpq -Pprintername" to check the status of a specified printer. You can use "lprm -Pprintername -" to remove your jobs from a specified printer queue if they are not printed yet.

oDuplex printing

aclps and gclps can print on both sides of the paper. This is called 'duplexing'. If you type "lp -d aclps -o duplex filename.ps" then your output will be printed on both sides of the paper. If you are using "dvips" to print a tex document, do "dvips -Pacl2ps filename.dvi" for 2-sided output. When you print this way, your paper quota is charged at 0.7 * (number of pages in the document).

oPaper Quota

All graduate students and department guests are assigned a fixed amount of paper quota each quarter for printing on laserprinters. You can use the command "paper" to find out your paper usage and allocation.

oSetting up your PRINTER environment variable

If you have a personal printer in your office, or if you always use one printer and don't want to be bothered with specifying a printer destination every time you print, you can set up an environment variable in your .cshrc with

setenv PRINTER printername

and all your printouts will go to that printer unless otherwise specified with the "-Pprintername" option. It sets up the "default" printer for you instead of the system "default" printer.

Not all packages support this feature, though, and you might have to still specify the printer name from within the package you use. Programs such as dvips and enscript do recognize this environment variable.

oPrinting from within application programs

Various mathematical packages such as matlab, mathematica, maple etc. have different ways of printing graphic output on a laserprinter. Please consult the relevant handouts carefully before you print from within the package, or else ask a consultant.

If you don't specify the destination of your graphic output, it will in most cases be routed to the aclps printer in MS6187, which is our default PostScript printer.

oPrinting troff output

It is suggested that users avoid troff in preference to TeX; however, some programs, specifically vgrind, produce troff output. To print it, use ptroff like this (example for Fortran):

vgrind -f -lf program.f | ptroff -Pprintername

Related Material:

Quick Reference Guide: Printing on the Mathnet [print.ps] [print.pdf]


Last Update: 9/25/98