Score:1

Inkscape crashes when using pdflatex

ma flag

I started using Inkscape half a year ago and I was totally fine with it. A few days ago I wanted to add some inline LaTex (with pdflatex) to the project I was editing and when I click on apply the whole program crashes. I tried to go back to Inkscape 1.0.2 to see whether I can use that for editing but it still crashes.

I downloaded the 1.0.2 version from the official website as an AppImage. This is the error I get:

Traceback (most recent call last):
  File "pdflatex.py", line 83, in <module>
    PdfLatex().run()
  File "/tmp/.mount_Inksca1ekPkB/usr/share/inkscape/extensions/inkex/base.py", line 140, in run
    self.save_raw(self.effect())
  File "/tmp/.mount_Inksca1ekPkB/usr/share/inkscape/extensions/inkex/extensions.py", line 159, in effect
    for child in fragment:
  File "pdflatex.py", line 56, in generate
    with open(svg_file, 'r') as fhl:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/inktmp59sokxrc/output.svg'

This happens whenever I type "\". I can happily write "asd" and it works, but this is not how I want to use it. As I am quite new to Ubuntu I have a hard time understanding what the problem is and what is the solution to this.

Score:1
zw flag

For more reproducible results I would recommend to use deb-based Inkscape. You need to install the following packages:

sudo apt-get install texlive pstoedit inkscape

Then use its preinstalled LaTeX extension (Inkscape, ExtensionsRenderLaTeX).

Note: if you want to get latest version of Inkscape 1.1 - then install packages from official PPA as follows

sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt-get update
sudo apt-get install inkscape

and use its built-in functionality via ExtensionsRenderMathematicsLaTeX (pdflatex).

zltn.guba avatar
ma flag
I reinstalled Inkscape based on your comment and now it works. Thanks! I think that I did not have all the dependencies installed previously and that caused the bug.
us flag
Same bug is present in Inkscape 1.2 PPA (Ubuntu 20.04). Shall I ask a new question and let you know here? @N0rbert
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.