#!/bin/sh name=`basename $1 .mp` figname=$name.$2 echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\begin{document}\\pagestyle{empty}\\epsfig{file=$figname}\\end{document} > $figname.latex latex $figname.latex dvips -Pcmz -Pamz -E -o $figname.eps $figname.dvi # epstopdf -d --nogs $figname.eps > $name.eps # Modification of an original by J.M.C.Esteves