# These four programs are used by the script.
# Adjust their names to suit your setup.
-LATEX=latex
+test -n "$LATEX" || LATEX=latex
DVIPS=dvips
GS=gs
PNMCROP=pnmcrop
exit 1
fi
+# We use latex, dvips and gs, so check that they're all there.
+FIND_IT ${LATEX}
+FIND_IT ${DVIPS}
+FIND_IT ${GS}
+
# Extract the params from the argument list.
DIR=`dirname $1`
BASE=`basename $1 .tex`
Expected either \"ppm\" or \"png\"."
fi
-# We use latex, dvips and gs, so check that they're all there.
-FIND_IT ${LATEX}
-FIND_IT ${DVIPS}
-FIND_IT ${GS}
-
# Initialise some variables.
TEXFILE=${BASE}.tex
LOGFILE=${BASE}.log