set -e # exit if there are any errors NAME=$1 latex $NAME.tex # create a -.dvi file dvips -N -f $NAME.dvi > $NAME.ps # convert the -.dvi to postscript # you can now view the postscript file at the workstation # using "ghostview $NAME.ps" # or print the document, using "lpr $NAME.ps"