Re: [Inkscape-devel] Problem with the Latex Formula module
Sorry, my first message was meant to be addresed to the list.
Could you try with the latest svn version of the extension script and give us feedback?
http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/share/ext...
It is better, I have now a window message :) :
dvips: ! DVI file can't be opened.
[…]
Yes, it's better!
Now I guess you got this message because the formula input you gave to the extension was either not valid LateX, or it became invalid because of a shell expansion which occured when the script was called by the extensions manager (this is a bug).
Can you try with a simple "( \cos(x) )" LaTeX input?
To know how your imput will be expanded you can use the following shell command: $ echo -E "$$\cos(x)$$" 8012\cos(x)8012
For example '$$' is expanded to the pid of the processus. As a workarround, try not to use '$' or '$$' but '(' and '[' instead to enter math mode.
Stéphane.
PS: I'll also try to improve error reports when the given input is not valid LaTeX.
Now I guess you got this message because the formula input you gave to the extension was either not valid LateX, or it became invalid because of a shell expansion which occured when the script was called by the extensions manager (this is a bug).
Actually I've tested it with the default input (so without $$).
Can you try with a simple "( \cos(x) )" LaTeX input?
Here the result :
pstoedit: version 3.44 / DLL interface 108 (build Jun 21 2006 - release build - g++ 4.1.2 20060613 (prerelease) (Ubuntu 4.1.1-2ubuntu3)) : Copyright (C) 1993 - 2006 Wolfgang Glunz Traceback (most recent call last): File "/home/menut/.local/share/inkscape/extensions/eqtexsvg.py", line 109, in ? e.affect() File "/home/menut/.local/share/inkscape/extensions/inkex.py", line 137, in affect self.effect() File "/home/menut/.local/share/inkscape/extensions/eqtexsvg.py", line 95, in effect svg_open(self, svg_file) File "/home/menut/.local/share/inkscape/extensions/eqtexsvg.py", line 46, in svg_open doc_width = float(self.document.documentElement.getAttribute('width')) ValueError: invalid literal for float(): 210mm
Jean-Luc
ValueError: invalid literal for float(): 210mm
Various extensions have used a routine for converting these units to user units. I've just moved it to a central location in svn: inkex.py.
user_units = inkex.unittouu(string)
Aaron Spike
Various extensions have used a routine for converting these units to user units. I've just moved it to a central location in svn: inkex.py.
user_units = inkex.unittouu(string)
All right,
What should I do ?
Use the lastest inkex.py and updated eqtexsvg.py.
Also, if you have some spare time, I'd like some testing of a new version on as many platforms as possible. This version includes better temporary files management, and improved invalid LaTeX input errors, see:
http://sourceforge.net/tracker/index.php?func=detail&aid=1495693&gro...
Thanks, Stéphane
Use the lastest inkex.py and updated eqtexsvg.py.
Thanks, it almost work. I have this error message (autopackage inkscape200611241751, inkex.py Revision 13431, eqtexsvg.py Revision 13446, eqtexsvg.inx Revision 13439 ):
pstoedit: version 3.44 / DLL interface 108 (build Jun 21 2006 - release build - g++ 4.1.2 20060613 (prerelease) (Ubuntu 4.1.1-2ubuntu3)) : Copyright (C) 1993 - 2006 Wolfgang Glunz Traceback (most recent call last): File "/home/menut/.local/share/inkscape/extensions/eqtexsvg.py", line 120, in ? e.affect() File "/home/menut/.local/share/inkscape/extensions/inkex.py", line 157, in affect self.effect() File "/home/menut/.local/share/inkscape/extensions/eqtexsvg.py", line 115, in effect svg_open(self, svg_file) File "/home/menut/.local/share/inkscape/extensions/eqtexsvg.py", line 69, in svg_open doc = xml.dom.minidom.parse(filename) File "/usr/lib/python2.4/site-packages/_xmlplus/dom/minidom.py", line 1915, in parse return expatbuilder.parse(file) File "/usr/lib/python2.4/site-packages/_xmlplus/dom/expatbuilder.py", line 924, in parse fp = open(file, 'rb') IOError: [Errno 2] No such file or directory: '/tmp/inkscape-fX_GpE/eq.svg'
however, this file /tmp/inkscape-fX_GpE/eq.svg exist and I can open it with inkscape (file->open), so I can now make nice picture with equations.
Just to notice, along with the equation there is also a white rectangle in the file.
Also, if you have some spare time, I'd like some testing of a new version on as many platforms as possible. This version includes better temporary files management, and improved invalid LaTeX input errors, see:
I tried several one-line equations and that's ok for the moment. I'm using an ubuntu edgy (i386) on a dell D610.
Thanks again,
J.L.
Hello,
I solved the problem by adding time.sleep(0.5) before svg_open(self, svg_file) in the eqtexsvg.py.
(With the latest inkscape package, inkex.py, eqtexsvg.py and eqtexsvg.inx)
participants (3)
-
Aaron Spike
-
Jean-Luc Menut
-
Stéphane Gimenez