Inkscape Community
Help Using Inkscape => Using Inkscape with Other Apps => Topic started by: Ladril on May 29, 2018, 09:36:20 AM
-
Hello Inkscape community.
I have been using Inkscape to make figures for my research for many years. I upgraded my laptop to the latest stable Ubuntu release (18.04), and now I am unable to render LaTeX formulas with the Render/Latex menu. I get the following error message:
"Unrecoverable error: undefined in DELAYBIND
PostScript/PDF Interpreter finished. Return status 65280 executed command : /usr/bin/gs -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS "/tmp/psinr0LGen"
The interpreter seems to have failed, cannot proceed !
Traceback (most recent call last):
File "eqtexsvg.py", line 160, in <module>
e.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 283, 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 "src/lxml/etree.pyx", line 3426, in lxml.etree.parse
File "src/lxml/parser.pxi", line 1839, in lxml.etree._parseDocument
File "src/lxml/parser.pxi", line 1865, in lxml.etree._parseDocumentFromURL
File "src/lxml/parser.pxi", line 1769, in lxml.etree._parseDocFromFile
File "src/lxml/parser.pxi", line 1162, in lxml.etree._BaseParser._parseDocFromFile
File "src/lxml/parser.pxi", line 600, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 710, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 639, in lxml.etree._raiseParseError
File "/tmp/inkscape-ggwtNw/eq.svg", line 1
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1"
I know this is due to pstoedit using a deprecated function of ghostscript. However, I am not a very skilled user of Linux, and I'm unable to downgrade ghostscript since the only packages available through apt-get are version 9.22 (I read 9.21 is the latest GS version without that doesn't show this bug).
Did anyone here encounter this problem, and can indicate me how to solve it? Thank you very much in advance!!
-
I haven't upgraded yet.
Can you give a link to some more info, please? I'd like to notify developers of the issue, but I need some info.
Most probably, you should be able to find a compatible .deb package of an older version in the corresponding repositories (e.g. for 17.10). It may break other applications in 18.04, though.
Maybe in this case, installing the snap package or the older flatpak version will be a way to keep on working (even though that has some other drawbacks).
-
Here's a post in Ask Ubuntu with somebody reporting the same problem:
https://askubuntu.com/questions/1034894/render-latex-is-not-working-in-inkscape-after-installing-to-18-04 (https://askubuntu.com/questions/1034894/render-latex-is-not-working-in-inkscape-after-installing-to-18-04)
Here, somebody with the same problem in MacOS:
http://inkscape.13.x6.nabble.com/LaTeX-rendering-fail-td4981668.html (http://inkscape.13.x6.nabble.com/LaTeX-rendering-fail-td4981668.html)
Here, another similar problem:
https://bugs.launchpad.net/inkscape/+bug/1734624 (https://bugs.launchpad.net/inkscape/+bug/1734624)
The only solution I could read about is downgrading ghostscript, which seems a very bad solution in my opinion...
-
Thank you, I've updated the bug report you linked with more info, and I hope that someone will answer soon. It seems, though, that currently, there's nothing Inkscape can do about it... :-/
-
Thank you very much!
-
Can you keep an eye on the report, too? I might forget to check if someone reacted. If there is no reaction within 1 or 2 weeks, please open a new report.
-
Sure thing!
-
The solutions proposed in https://askubuntu.com/questions/1034894/render-latex-is-not-working-in-inkscape-after-installing-to-18-04 do not work.
- Building pstoedit > 3.70 from source does not solve the problem because these builds do not include the svg backend and it seems not trivial to resolve this
- Even if you succeed to build pstoedit > 3.70 with svg backend the extension fails because pstoedit must be called with an additional paramter -rdb . This must be directly coded into the Python extension
- Downgrade to gs 9.18 fails as reported in the link above.
I propose the following solutions which update ghostscript to version 9.23:
Ubuntu/ Kubuntu/ Xubuntu 18.04
This version of ubuntu is a LTS release. I did not find any pre-built packages for ghostscript 9.23. Hence, you have to compile it yourself. In the following I will give instructions for the "average user" who likes using his system as a productive one and is not skilled in compiling procedure etc.
- Download the source code of ghostscript 9.23 from https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs923/ghostscript-9.23.tar.gz (https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs923/ghostscript-9.23.tar.gz).
Download it into e.g. /home/your-username/Downloads. - Open a terminal. All of the following commands have to be typed into this terminal.
- Change into the directory you downloaded ghostscript into: cd /home/your-username/Downloads
- Extract the tarball you downloaded by the following two commands:
- gunzip ghostscript-9.23.tar.gz
- tar xvf ghostscript-9.23.tar
- Change into the directory you just unpacked: cd ghostscript-9.23
- Install the basic tools required for building executables: sudo apt-get build-essential
- Type: ./configure --prefix=/usr
This ensures that the existing incompatible ghostscript version is overwritten when you install the new one. - Type: make
The build process starts and it may take some time until ghostscript is built - When the build process is finished type: sudo make install
- You are done and you should be able to render LaTeX formulas again
Note: If you encounter any problems with the new ghostscript version in other applications it is easy to switch back to the old one. Just enter the following command in a terminal:
sudo apt-get install ghostscript --reinstall
Windows
Just download ghostscript 9.23 from https://www.ghostscript.com/download/gsdnld.html (https://www.ghostscript.com/download/gsdnld.html) and install it. You are done.
I tested both variantes and it runs smoothly.
Alternative
If you do not like compiling your own gs version you may try TexText and install it together with pdf2svg : https://github.com/textext/textext (https://github.com/textext/textext)
-
Welcome to the forum! And thanks for the info, too!
Most of that is over my head, so I can't comment on the details. But hopefully the bug report will get some attention, too.