Hello,

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. 

It is taken from the plplot package with minor modification.

Have fun.

Max
============================= Cut From Here ===============
#!/bin/sh

# Generate an Encapsulated Postscript file (eps) from the
# PLplot pstex driver generated files. 

if test $# = "0"; then
        echo -e "\n\
        Usage: pstex2eps <filename>\n\
        \n\
        Where <filename> is the name of the input file without the subfix.\n\
        There must exist two files, the postscript file without text,\n\
        <filename.pstex>, and the latex file with the text,
<filename.pstex_t>.\n\
        The output file will be named <filename.eps>.\n\
        \n\
        The Computer Modern Type 1 fonts will be included in the output\n\
        eps file. \n"
        exit 1
fi

if test ! -e $1.pstex -o ! -e $1.pstex_t; then
        echo "$1 or $1.pstex_t don't exist. Exiting."
        exit 1
fi

ifile=$1
ofile=`mktemp pstex2eps.XXXXXX`

cat > ${ofile}.tex <<EOF
\documentclass{article}
\usepackage{aecompl}
\usepackage{color}
\usepackage{graphicx}
\begin{document}
\pagestyle{empty}
\rotatebox{0}{\scalebox{1.0}{\input{${ifile}.pstex_t}}}
\end{document}
EOF

latex ${ofile} > /dev/null \
&& dvips -E -Pcmz -o ${ifile}.eps $ofile 2> /dev/null

rm ${ofile}*

============================== End ==================

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

Reply via email to