UMass Amherst
Department of Mathematics and Statistics
Directory  Courses  Undergraduate  Graduate  Research  Seminars  Calendar  Contacts  Resources  Donate  
RCF  Math/Stat Res Ctr  OWL Login  SPIRE  Links  US Math Depts  For Dept Members  

RCF Printer Usage

Introduction

This article is to familiarize the RCF users with the operation of the printers. There is an HP Laserjet 4si MX printer in room 1537 (named main), an HP Laserjet IIsi in room 1626A (named dept), an HP Laserjet 4m in room 1422 (named post) and an HP Laserjet 5m in 1235A (named draft). Rooms 1537 and 1235A are locked at all times and keys are available from Chris Richotte (room 1521E).

Main is accessed using the lpr -Pmain command at the command line (use lpr -Ppost command at the command line to access post, etc.). They should be used for printing dvi, post-script or ascii files.


Programs and Utilities

There are several programs and utilities related to the use of the laser printers. This includes:

print -
script for processing jobs to the postscript printer.

lpr -
sends files to specified printer (default is lp).

lpstat -
reports on the status of the printer queue.

dvips -
translates .dvi files for printing on main or post.

For users with accounts on workstations, there is ara programs which can reduce printer usage by previewing before printing:

xdvi -
previews .dvi files in the X window system.
ghostview -
previews .ps files in the X window system.
pageview -
previews .ps files in the X window system.

Printing to lp

To print a copy of filename on the printer, type:

% lpr -Pprintername filename

The main or post printer can also be used in a pipe, for example:

% ls -aFC $HOME/kieffer tex2html_wrap_inline221 lpr -Pprintername

will pipe the directory listing directly to the main or post printer.

The manual pages list the options for lpr though not all of these are available with our printers. One useful option is the -h option, which suppresses the printing of the header page.


Printing

print is a shell script which serves as a simple filter for handling inputs to the main and post printers. It works much like the lpr command does. The command

% print printername filename

will print out a copy of the file filename to printername. The command

% print printername_duplex filename

will print out a copy of the file filename to printername printing on both sides of the page. Typing in

% print filename

will prompt you with

% send to which printer ? (enter h for help)

Selecting the help option by typing in an it h will give you a list of option for printing. If the file is already in postscript form, it can be printed by typing:

% print -Pprintername filename.ps (or % lpr -Pprintername filename.ps)

The print script uses the filename suffix to determine the type of file being printed. The conventions are as follows:

.ps or .PS -
Assumes the file is already in postscript form. It sends the file directly to the printer using lpr -Pprintername.

.dvi -
The file is run through dvips and the postscript output is sent to the printer.

All other files
are assumed to be text files. They are converted to postscript using lptops and sent to the postscript printer.


Checking the Queue

The program lpq prints the status of the print queue for the specified printer. The command is of the form:

% lpstat (to check lp status)
% lpstat -Ppost (to check post status)
% lpstat -Pmain (to check main status)

If the choice of printer is not important, learn to check the queues and send the job to the least busy printer. If you are translating a .dvi file check the queues before translating then use the translator dvips).


DVI translators

The output files from TeX programs such as LaTeX are .dvi files. The dvips program converts .dvi files to .ps files for printing on the post printer.

Printing out only certain pages from a TeX or LaTeX file is easy. The following examples will illustrate how to do this using the two DVI translators we have (assuming you already have a .dvi file).

  1. :

    Use the -p # option to tell dvips what page to start on, then use the -n # option to tell it how many pages to process. To print out only pages 3-6 of some LaTeX document, you want to start on page 3 and print the next 4 pages. Thus, type

    % dvips -p 3 -n 4 grant

    This tells dvips to create a file grant.ps consisting of pages 3,4,5, and 6. If you don't specify the -p or the -n, they will be set to the default values of 1 and 100,000 (respectively). Thus, the command

    % dvips -p 3 thesis

    will create a file, thesis.ps, consisting of pages 3 through lastpage (provided your thesis is less than 100,000 pages) while

    % dvips -n 5 proposal

    will create a file, proposal.ps, consisting of the first 5 pages.

Text to Postscript

The program lptops converts text files to postscript files. This program operates as a filter; it reads from standard input and writes to standard output. For example, to translate the text file filename to postscript and save it in filename.ps. Then type the following:

% lptops [ options ] ;SPMlt;filename ;SPMgt;filename.ps

Previewing TeX and LaTeX Using xdvi

The xdvi program is used to preview DVI files produced by TeX or LaTeX. After creating the DVI file on shark10, preview the file thesis.dvi by typing the following commands from one of the workstation (gin, tonic, saltpond, zera, zima) :

% xdvi thesis &

When the xdvi window appears, position it and click the left mouse button. Use the commands outlined in the following chart to move about in your document (n is an integer).

Summary of xdvi Commands
CommandUse

left mouse buttonsmall magnifying window
middle mouse buttonmedium magnifying window
right mouse buttonlarge magnifying window
pscroll back 1 page
nscroll ahead 1 page
#<Return>scroll ahead # pages
-#<Return>scroll back # pages
#ggo to page #
qexit xdvi

The shrink factor is an integer 1, 2, 3 or 4, which determines the size of the type in xdvi. The default shrink factor is s4. This produces a rather small type size which can be tiring to the eyes. For example, typing 3s (without a carriage return) will increase the type size accordingly.


Return to front