I recently installed Lyx in a fresh install of Xubuntu 18.04 and am experiencing some problems with included graphics. It seems that the path to the file is not being properly passed to Inkscape when creating the PDF file. Let me illustrate with an example.

I have a Lyx file located at "/home/me/Dropbox/FCEN/Astrofisica/Mis cosas/Formulas/". This file includes an SVG graphic that is called "1.svg" and is located in the same place. So in Lyx I have

enter image description here

This works perfectly in my personal computer (also with Xubuntu 18.04 and the same version of Lyx), when I hit export PDF it proceeds straightforward. However, in this new fresh Xubuntu installation I get the following message when I hit export PDF:

enter image description here

As can be seen Lyx believes that the path to the file is 7_home_me_Dropbox_FCEN_Astrofisica_Mis_cosas_Formulas_1.svg whereas it should be /home/me/Dropbox/FCEN/Astrofisica/Mis cosas/Formulas/1.svg

After this message is shown for each graphic that has been included, the PDF is exported but in place of the graphics there is a blank square with this inscription "7_home_me_Dropbox_FCEN_Astrofisica_Mis_cosas_Formulas_1.svg"


The guilty seems not to be Lyx but Inkscape or Ubuntu. I have checked that if I export the SVG image to PDF and then include it into Lyx, everything works ok. Also, if I try to open the SVG file with "right click → open with Inkscape" something strange happens too:

enter image description here

There is an issue with blank spaces in this case. I don't know if this problem has to do with Inkscape (I have the last version), with Ubuntu, or both.

  • Just to help debug, if you convert your svg file to a pdf file, do things work correctly? – scottkosty Oct 12 '18 at 20:21
  • Yes, in that case it works all right. Maybe it is a problem with Inkscape. I will check that and comment again. – user171780 Oct 12 '18 at 20:28
  • To check that, just try another svg file that you can open and see that is ok. – koleygr Oct 12 '18 at 20:45
  • I have the same problem. I mean, if I delete the blank space in "New Folder" in this image then "right clik→open with Inkscape" works ok but I get the same strange pahts with the '/' replaced by '_'. – user171780 Oct 12 '18 at 20:52
  • You could try using rsvg-convert, instead of inkscape to do the conversion of svg files. Read Help > Customization about converters. – scottkosty Oct 12 '18 at 21:16

Almost accidentally I found the solution. I let it here for future reference:

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.