#!/bin/bash for i in $* ; do i=`basename $i .tex` latex $i dvips -t a5 -pp2 $i -o /tmp/hfstlumpi.ps; # Usage: pstogif [-h(elp)] [-out ] # [-depth ] # [-flip ] [-density ] .ps # pstogif -out ./"$i"_2.gif /tmp/hfstlumpi.ps; echo quit|gs -dNOPAUSE -sDEVICE=pngmono -sOutputFile=./"$i"_2.png -sPAPERSIZE=a5 /tmp/hfstlumpi.ps; dvips -t a5 -pp3 $i -o /tmp/hfstlumpi.ps; echo quit|gs -dNOPAUSE -sDEVICE=pngmono -sOutputFile=./"$i"_3.png -sPAPERSIZE=a5 /tmp/hfstlumpi.ps; done