1#!/bin/sh 2# 3# This filter is called by psf to convert "other" formats to PostScript. 4# psf handles text and PostScript native. "Other" formats, e.g. DVI, C/A/T, 5# need to be converted before the page reverser and the printer can use 6# them. 7# 8# $0 begins with the filter name, e.g. df, tf. Each format is a separate 9# tag in the case. 10# 11 12DVIPSPATH=/usr/local/tex/bin 13DVIPS=/usr/local/tex/bin/dvips 14DVIPSARGS="-f -q" 15 16TROFF2PS=/usr/local/psroff/troff2/troff2ps 17TROFF2PSARGS="-Z -O-.10" 18 19PATH=/usr/bin:$DVIPSPATH; export PATH 20 21case $1 in 22 23# 24# Use "dvips" by Radical Eye Software to convert TeX DVI files to PostScript. 25# Note that you *must* have METAFONT, etc, in your path. 26# 27df*) 28 if [ -x "$DVIPS" ]; then 29 TEMPFILE=`mktemp -t psfilter.XXXXXX` || exit 1 30 cat > $TEMPFILE 31 $DVIPS $DVIPSARGS < $TEMPFILE 32 rm -f $TEMPFILE 33 else 34 echo "$0: filter dvips uninstalled" 1>&2 35 exit 2 36 fi 37 ;; 38 39# 40# troff2ps is from psroff by Chris Lewis. 41# 42tf*) 43 if [ -x "$TROFF2PS" ]; then 44 exec $TROFF2PS $TROFF2PSARGS 45 else 46 echo "$0: filter troff2ps uninstalled" 1>&2 47 exit 2 48 fi 49 ;; 50 51*) 52 echo "$0: filter $1 unavailable" 1>&2 53 exit 2 54 ;; 55esac 56 57exit 0 58