This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
fig2eps
- From: "Volker M. Koch" <koch at ee dot ethz dot ch>
- To: "'Thomas Chadwick'" <j_tetazoo at hotmail dot com>
- Cc: <cygwin-xfree at cygwin dot com>
- Date: Thu, 15 Aug 2002 17:44:17 +0200
- Subject: fig2eps
- Reply-to: cygwin-xfree at cygwin dot com
Hi Thomas,
I have adapted a little script which does the fig2eps procedure. Maybe
you like it, too. It works fine.
Thanks for your help,
Volker
#!/bin/tcsh -f
######### copy .fig
cp $1 temp20020815.fig
######### create .pstex and .pstex_t files
fig2dev -L pstex -p 1 temp20020815.fig >temp20020815.pstex
fig2dev -L pstex_t -p temp20020815.pstex temp20020815.fig
>temp20020815.pstex_t
######### create LaTeX2e source and compile it
echo "\\documentclass{article}" >>temp20020815.tex
echo "\\usepackage{epsfig,amsmath,amssymb}" >>temp20020815.tex
foreach i ($argv[2-])
echo "\\usepackage{"$i"}" >>temp20020815.tex
end
echo "\\usepackage[colorlinks,hyperindex]{hyperref}"
>>temp20020815.tex
echo "\\usepackage{geometry}" >>temp20020815.tex
echo "\\geometry{nohead,nofoot,left=0pt,right=0pt,top=0pt,bottom=0pt}"
>>temp20020815.tex
echo "\\pagestyle{empty}" >>temp20020815.tex
echo "\\begin{document}" >>temp20020815.tex
echo "\\input{%" >>temp20020815.tex
echo temp20020815.pstex_t% >>temp20020815.tex
echo "}" >>temp20020815.tex
echo "\\end{document}" >>temp20020815.tex
latex -interaction=batchmode temp20020815.tex
######### create a postscript file
dvips -E temp20020815.dvi -o $1.eps
######### clean /tmp
/bin/rm -f temp20020815*
exit 0