#!/bin/sh if [ "$#" != "1" ] ; then echo "usage: tex2ps FILENAME." echo " FILENAME without extension 'tex'" echo " current directory = working directory" exit 1 fi rm $1ps cp $1tex $1tex.org gr2tex $1tex latex $1tex latex $1tex tex2gr $1tex dvips $1dvi -o $1ps ghostview $1ps & rm $1aux rm $1dvi rm $1log rm $1toc