On 2006-October-23 , at 12:59 , Tavmjong Bah wrote:
On Sun, 2006-10-22 at 23:38 -0400, Marcus Brubaker wrote:
Jon Phillips wrote:
On Sun, 2006-10-22 at 13:34 -0700, Bryce Harrington wrote:
1495826 pstoedit and svg with latex render extension dniepper Fixes a compatibility issue with pstoedit; probably fine to include.
I added notes to this one. It appears to conflict with changes to layers after he committed.
Not sure whether this conflicts with the the layers changes, but it has a more sensible method for importing the SVG output of plotutils/pstoedit. Sorry it's not in the tracker, I haven't had a chance to submit it.
Cheers, Marcus
plot-svg is not available as an option in Fedora's pstoedit (it does seem to be available with Debian, at least it is listed on the Debian pstoedit man page). Since Inkscape already requires skencil for PS and EPS import, wouldn't it be better to use the chain pstoedit -> skencil -> svg? A patch is attached.
plot-svg is available in my Fedora install: plot-svg: .svg: svg via GNU libplot (/ usr/lib64/pstoedit/libp2edrvlplot.so) It is FC 5 with nothing special. Apparently GNU lipplot is in package plotutils. Do you have this package installed? I would be in favor or dropping skencil and using pstoedit only (for PS and EPS too) because pstoedit + plotutils is a smaller and easier to install dependency than pstoedit+skencil. I modifed PS and EPS extensions accordingly a while ago but didn't post the patch before because it was said that there should be a check for the availability of plot-svg in it. It is currently possible to check for the availability of an executable with current extension syntax. Could it be made to work with a library? The other solution would be to wrap the call to pstoedit in a shell script that check for the availability of plot-svg and returns an error at run time. But won't write anything in extensions-errors.log. Here is a suggestion for such a script, I just don't know how to return an error message from an extension...
#!/bin/sh # # Checks for the availability of plot-svg in pstoedit and converts ps to svg this way #
plotsvg=`pstoedit 2>/dev/null -help | grep plot-svg` rc=0
if [[ "$plotsvg" = "" ]] then # How to return an error message? #echo "Plot-svg format not available in pstoedit. Please install package plotutils" rc=1 else TMPDIR="${TMPDIR-/tmp}" TEMPFILENAME=`mktemp 2>/dev/null || echo "$TMPDIR/tmp-ps-$$.ps"` pstoedit -f plot-svg "$1" "${TEMPFILENAME}" > /dev/null 2>&1 cat < "${TEMPFILENAME}" || rc=1 rm -f "${TEMPFILENAME}" fi
exit $rc
and ps_input.inx should be modified accordingly: <inkscape-extension> <_name>Postscript Input</_name> <id>org.inkscape.input.ps</id> <dependency type="executable">pstoedit</dependency> <input> <extension>.ps</extension> <mimetype>image/x-postscript</mimetype> <_filetypename>Postscript (*.ps)</_filetypename> <_filetypetooltip>Postscript</_filetypetooltip> <output_extension>org.inkscape.output.ps</output_extension> </input> <script> <command reldir="path">ps2svg.sh</command> </script> </inkscape-extension>
what do people think?
JiHO --- http://jo.irisson.free.fr/