LaTeX extension not working in Fedora 22 (pstoedit 3.70)

Bug #1465163 reported by Tom de Geus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

The LaTeX extension (Extensions > Render > LaTeX...) results in an error (and no image is rendered). Please note that the "pstoedit" package is installed on this system.

I get the following error:

Traceback (most recent call last):
  File "eqtexsvg.py", line 160, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 268, in affect
    self.effect()
  File "eqtexsvg.py", line 154, in effect
    svg_open(self, svg_file)
  File "eqtexsvg.py", line 81, in svg_open
    doc = inkex.etree.parse(filename)
  File "lxml.etree.pyx", line 3239, in lxml.etree.parse (src/lxml/lxml.etree.c:70141)
  File "parser.pxi", line 1749, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:102252)
  File "parser.pxi", line 1775, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:102516)
  File "parser.pxi", line 1679, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:101551)
  File "parser.pxi", line 1110, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:97003)
  File "parser.pxi", line 582, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:91461)
  File "parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:92647)
  File "parser.pxi", line 620, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:91908)
IOError: Error reading file '/tmp/inkscape-mr6NJf/eq.svg': failed to load external entity "/tmp/inkscape-mr6NJf/eq.svg"

Inspection of the folder confirms that "eq.svg" does not exist.

=====
* inkscape: version 0.91 (0.91-4.fc22)
* pstoedit: version 3.70 / DLL interface 108 (built: Jan 5 2015 - release build - g++ 4.9.2 20141217 (Red Hat 4.9.2-3) - 64-bit)

Revision history for this message
su_v (suv-lp) wrote :

Please add information about Inkscape version to the bug description (see Inkscape menu 'Help > About Inkscape'), thank you.

Which version of pstoedit is installed? Does it support SVG output?

To check supported formats of pstoedit, use:
$ pstoedit -help
To check whether plot-svg is among them:
$ pstoedit -help | grep plot-svg

Changed in inkscape:
status: New → Incomplete
tags: added: extensions-plugins
removed: pstoedit
Revision history for this message
su_v (suv-lp) wrote :

Note that latest pstoedit 3.70 lacks most of the supported output formats out-of-the-box, as observed on other distros and platforms, see for example
* https://bugzilla.redhat.com/show_bug.cgi?id=1183335
* https://trac.macports.org/ticket/47354

Revision history for this message
Tom de Geus (t-degeus) wrote :

This was exactly the problem: pstoedit did not include many of the output formats. The following fixed the problem for me:

    $ sudo ln -s /usr/lib64/pstoedit /usr/lib/pstoedit

For sake of completeness, I have the following installed (on Fedora 22)

* inkscape: version 0.91 (0.91-4.fc22)
* pstoedit: version 3.70 / DLL interface 108 (built: Jan 5 2015 - release build - g++ 4.9.2 20141217 (Red Hat 4.9.2-3) - 64-bit)

I do think it would be good to include a check and provide a meaningful error message, to alert users to install pstoedit and/or fix this bug.

su_v (suv-lp)
description: updated
Revision history for this message
su_v (suv-lp) wrote :

Setting bug status to 'Triaged' for now - the problem with latest pstoedit 3.70 might hit users on other distros too.

To be investigated: how could (or even: should) the user be warned about a partially broken installation of pstoedit?

1) The current extension system checks for the presence of required (runtime) dependencies (e.g. pstoedit in $PATH) - it does not provide means to actually test whether the dependent helper tool is correctly installed. I somewhat doubt these checks could (or should) be expanded (it would require to work cross-platform).

2) Changing which messages (default: stderr of spawned processes) are returned via eqtexsvg.py to Inkscape probably should be coordinated with other related reports:
* Bug #1402731 “LaTeX formula extension improvements”
(proposes to silence error messages from pstoedit completely; comment 6)
and
* Bug #1408535 “latex render works but gives error message”
* Bug #1210287 “LaTeX renderer shows an error message (but does re...”
Bug #1210287 seems to be obsolete with pstoedit 3.70 though (AFAICT there's no more unwanted console output when outlining text in PostScript files).

3) Possibly eqtexsvg.py could run its own check whether the format 'plot-svg' is supported by pstoedit found in $PATH and warn the user in case SVG support is missing (instead of failing later on).

Changed in inkscape:
status: Incomplete → Triaged
Revision history for this message
su_v (suv-lp) wrote :

Upstream bug report for pstoedit:
http://sourceforge.net/p/pstoedit/bugs/19/

Revision history for this message
Jonathan Underwood (jonathan-underwood) wrote :

Ouch, it looks like the svg functionality for pstoedit is now shareware and not free software:

http://www.pstoedit.net/

Perhaps eqtexsvg.py could move to using ps2svg instead of pstoedit.

Revision history for this message
Jonathan Underwood (jonathan-underwood) wrote :

Actually, eqtexsvg.py is using the plot-svg plugin, as provided by plotutils, as opposed to the svg pluging, so perhaps it's okay (once that patch is applied).

Fedora BZ entry: https://bugzilla.redhat.com/show_bug.cgi?id=1247187

Revision history for this message
su_v (suv-lp) wrote :

pstoedit's ''plot-svg'' module is not shareware AFAIK (it requires GNU plotutils as dependency). The discussion about pstoedit's shareware status though is off-topic for this specific report (there are other existing older report which track this and/or proposed alternatives to pstoedit).

su_v (suv-lp)
summary: - LaTeX extension not working in Fedora 22
+ LaTeX extension not working in Fedora 22 (pstoedit 3.70)
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

The pdflatex extension no loger uses pstoedit, closing.

Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.