On Wed, Oct 16, 2002 at 11:46:27AM -0700, Max Bian wrote: > If you have to use the powerful pstex/pstex_t combined figures in LyX > as I do, you may find the following script helpful. Basically it > converts the two-part figure into one single eps. It saves me lots of > headache because I don't have to deal with two files. Scaling and > rotating also become easier since I can do it via the insert graphics > dialog.
I use the following script to convert .fig to .eps directly: #!/bin/sh # usage: fig2tex foo.fig foo.tex #!/bin/sh # usage: fig2eps foo.fig foo.eps TMPDIR=/tmp BASE=fig2epstmp_$$ PSNAME=fig2epstmp_content_$$.ps echo " \\documentclass{article} \\usepackage{epsfig} \\usepackage{color} \\pagestyle{empty} \\begin{filecontents}{$PSNAME} `fig2dev -L pstex $1` \\end{filecontents} \\begin{document} \\begin{center} `fig2dev -L pstex_t -p $PSNAME $1` \\end{center} \\end{document} " > $TMPDIR/$BASE.tex ( cd $TMPDIR ; latex $BASE.tex ; # sometimes empty pages at the beginning are produced. Just use the last # one. dvips -f $BASE.dvi | psselect _1 > $BASE.tmpeps rm -f $BASE.tex $BASE.log $BASE.dvi $BASE.aux $PSNAME ) #mv $TMPDIR/$BASE.tmpeps $2 eps2eps -- $TMPDIR/$BASE.tmpeps $2 rm $TMPDIR/$BASE.tmpeps Actually, I thought this was already part of LyX but this seemingly never got included. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)