lyx_mirror/lib/scripts/lyxpreview2xpm.sh
André Pönitz 2f8ca779af Herbert's changes to the converter script
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4504 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-01 08:07:21 +00:00

16 lines
391 B
Bash
Executable File

#!/bin/bash
# converts a single inset's TeX representation to an .xpm
dir=`dirname $2`
base=${dir}/`basename $2 .xpm`
cp $1 ${base}.tex
#(cd ${dir} ; latex ${base})
(cd ${dir} ; pdflatex --interaction batchmode ${base})
dvips -x 1750 -R -o ${base}.ps ${base}.dvi
convert -crop 0x0 ${base}.ps ${base}.xpm
rm ${base}.tex ${base}.aux ${base}.dvi ${base}.log ${base}.eps || true
exit 0