LaTeX formula effect not functional

Bug #168977 reported by Martinschmidts on 2007-10-19
14
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned

Bug Description

inkscape-svn 15898:

On Effects->Render->LaTeX Formula I get:

pstoedit: version 3.45 / DLL interface 108 (build Oct 17 2007 - release
build - g++ 4.2.2) : Copyright (C) 1993 - 2007 Wolfgang Glunz
Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/eqtexsvg.py", line 121, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 153, in affect
    self.effect()
  File "/usr/share/inkscape/extensions/eqtexsvg.py", line 116, in effect
    svg_open(self, svg_file)
  File "/usr/share/inkscape/extensions/eqtexsvg.py", line 46, in svg_open
    doc_width =
inkex.unittouu(self.document.documentElement.getAttribute('width'))
AttributeError: 'etree._ElementTree' object has no attribute
'documentElement'

Additionally, it appears to try to render in 'real-time', while I type.
This leads to an error message each time I type in a character, when the
formula is not complete. I would say this is completely broken ATM.

Martinschmidts (martinschmidts) wrote :

Originator: YES

Oh, BTW, this affects other extensions in the render menu, as well.

Changed in inkscape:
status: New → Confirmed
Tom Davidson (tjd-mit) wrote :

While the real-time updating is a dupe of bug 176608, the original complaint seems to be a separate issue, and has been reported elsewhere. Unfortunately the Latex effect is broken in SVN right now for a different reason ( bug 179770 ), so can't be confirmed.

Changed in inkscape:
importance: High → Unknown
status: Confirmed → New

Changed bug summary to reflect that the Latex-specific issue in the original report remains unresolved

Bryce Harrington (bryce) on 2008-01-13
Changed in inkscape:
importance: Unknown → Medium
status: New → Confirmed
Tom Davidson (tjd-mit) wrote :

Martin, Can you confirm that this still happens in a recent SVN? Aaron has made a number of bug fixes to extensions in the 'render' menu...

Changed in inkscape:
status: Confirmed → Incomplete
Johan Engelen (johanengelen) wrote :

For me, the LaTeX extension works. (svn 17565)

Johan Engelen (johanengelen) wrote :

For me, the LaTeX extension works. (svn 17565), windows XP.

Duck Tayp (ducktayp) wrote :

The problem appears to be that the parsed XML contains namespace information in the tags (e.g. '{http://www.w3.org/2000/svg}') See also bug #195052.

I've attached a patch that fixes the problem for me (on debian unstable). I haven't tested it on anything else. The patch also filters out the copyright line output by pstoedit, so that the latex effect will give a warning dialog only on actual errors (currently it does so every time it's run).

Tom Davidson (tjd-mit) wrote :

Thanks, Duck for the patch! I will give it a try soon.

FYI, pstoedit does have an (apparently undocumented) option to suppress the copyright message: the '-quiet' flag , so you don't have to munch that line manually in your patch...

Duck Tayp (ducktayp) wrote :

Welcome :)

I tried using "-quiet", however my version of pstoedit (the latest in debian unstable) doesn't support it. So adding -quiet will likely just make things worse for some users, while munching the line in python should work for everyone. The current patch is not very robust, though -- it would probably be better to check that the first line is actually the copyright line before discarding it...

Hmmm! I guess that's the problem with undocumented options... (for the
record I have pstoedit 3.45 on Fedora 8, but this worked under Fedora
6 as well, I think)

On Wed, Mar 12, 2008 at 10:39 AM, Duck Tayp <email address hidden> wrote:
> Welcome :)
>
> I tried using "-quiet", however my version of pstoedit (the latest in
> debian unstable) doesn't support it. So adding -quiet will likely just
> make things worse for some users, while munching the line in python
> should work for everyone. The current patch is not very robust, though
> -- it would probably be better to check that the first line is actually
> the copyright line before discarding it...
>
>
>
> --
> LaTeX formula effect not functional
> https://bugs.launchpad.net/bugs/168977
> You received this bug notification because you are a member of Inkscape
> Bug Team, which is subscribed to Inkscape.
>

Steffen Heyne (steffen-heyne) wrote :

I have the same BUG and I tried your patch against the latest eqtexsvg.py from the homepage

http://julvitard.free.fr/eqtexsvg

but I get this:

$ patch -p0 eqtexsvg.py < inklatex.patch
patching file eqtexsvg.py
Hunk #1 succeeded at 28 (offset 3 lines).
Hunk #2 succeeded at 45 with fuzz 2 (offset 3 lines).
Hunk #3 FAILED at 58.
Hunk #4 FAILED at 119.
2 out of 4 hunks FAILED -- saving rejects to file eqtexsvg.py.rej

Duck Tayp (ducktayp) wrote :

The patch is against the version of eqtexsvg in the inkscape SVN repository:
https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk/share/extensions/eqtexsvg.py
(revision 17858)
I'm not sure what its relation is to the one you used.

Steffen Heyne (steffen-heyne) wrote :

thanks and sorry, I was completely wrong, with the current version "Inkscape 0.45.1+0.46pre1, built Feb 20 2008" within hardy alpha 6+ I don't get this bug, I had directly downloaded the extension and copied it without checking if the extension already exists, because I havn't found the menu point

But: it seems working now, but I do not get any graphical output, when I enter a formula, a window appears with:

pstoedit: version 3.45 / DLL interface 108 (build Feb 28 2008 - release build - g++ 4.2.3 (Ubuntu 4.2.3-2ubuntu1)) : Copyright (C) 1993 - 2007 Wolfgang Glunz

this seems to be correct, but there is no formula in the document !? any ideas?

Duck Tayp (ducktayp) wrote :

Is this with the patch? What you describe is exactly the problem the patch was supposed to solve.

Steffen Heyne (steffen-heyne) wrote :

Great, it works! I really thank you!

...I thought I had a different bug, because I didn't get a real error message, just the pstoedit message without anything more.

Leandro (leandromartinez98) wrote :

Is there any news on this? I'm using 0.46 on Ubuntu 9.04 (and in another
machine with 8.10) and latex rendering does not work on neither of those.
Actually I don't remember this working.

On 8.10 I get no error, just the warning about the standard output
of pstoedit, but no formula.

On 9.04 I get these errors:

Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/eqtexsvg.py", line 134, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 154, in affect
    self.effect()
  File "/usr/share/inkscape/extensions/eqtexsvg.py", line 130, in effect
    svg_open(self, svg_file)
  File "/usr/share/inkscape/extensions/eqtexsvg.py", line 69, in svg_open
    doc = inkex.etree.parse(filename)
  File "lxml.etree.pyx", line 2583, in lxml.etree.parse (src/lxml/lxml.etree.c:25057)
  File "parser.pxi", line 1465, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:63523)
  File "parser.pxi", line 1494, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:63767)
  File "parser.pxi", line 1394, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:62923)
  File "parser.pxi", line 968, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:60309)
  File "parser.pxi", line 542, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:56659)
  File "parser.pxi", line 628, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:57504)
  File "parser.pxi", line 566, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:56876)
IOError: Error reading file '/tmp/inkscape-LTxebV/eq.svg': failed to load external entity "/tmp/inkscape-LTxebV/eq.svg"

tags: added: extensions-plugins
removed: extensions

Leandro: That's due to pstoedit forgetting about svg format, see here for fix:
https://bugs.launchpad.net/ubuntu/+source/pstoedit/+bug/123499

JµL!eN (julienvitard-gmail) wrote :

Hello,

Here is the new eqtexsvg extension.

She doesn't work with dvips and pstoedit but anymore just with dvisvgm (version 0.8.3).

You can download dvisvgm here: http://dvisvgm.sourceforge.net/

She works with Inkscape 0.46 on Linux (version 7 Jul 2009) and Windows (1 Apr 2008) but I also tried the Windows 0.46+devel22040 from 10 Aug 2009. I do not know any Mac users, so please feel free to tell me if it works too on this platform.

For Windows users : be sure that dvisvgm directory is in the Path otherwise Inkscape will not find it.

I will also update the link to eqtexsvg on my website soon

JµL!eN

Leandro (leandromartinez98) wrote :

This is solved in Ubuntu Karmic, with Inkscape 0.47-rc3, but you need to install the "pstoedit"
package separately in order that the option "render latex formula" appears at all on the menu.

ScislaC (scislac) wrote :

Given the last comment by Leandro and the age of the report, closing as Invalid since the issue was long ago fixed upstream in pstoedit. If you feel this bug was closed in error, please feel free to reopen it.

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

Duplicates of this bug

Other bug subscribers