I am trying to convert svg file to pdf_tex file in Texmaker using Inkscape, with this preamble and document:

\documentclass[10pt]{article}% Package for chemical equation typesetting
\usepackage{siunitx} % Provides the \SI{}{} and \si{} command for typesetting SI units
\usepackage{graphicx} % Required for the inclusion of images

\usepackage{amsmath} % Required for some math elements 

    \setsvg{inkscape=inkscape -z -D}




where 'image' is a image.svg file and make pdflatex run:

pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex

however this error occured:

'inkscape' is not recognized as an internal or external command, operable program or batch file.

I have added c:/Program Files/ Inkscape/inkscape.com in the PATH but this not working.

  • Why are we not allowed to see the first line of your document, starting with \documentclass (and maybe further lines up to \usepackage{svg})? – gernot Jan 24 '17 at 18:48
  • @gernot edited. I though it's quite redundant however – Sharah Jan 24 '17 at 18:56
  • Well, the first line is not redundant since without it, it will not compile in any case. The remaining lines that you have added now can (and should) be removed, if the remaining document still shows the problem. – gernot Jan 24 '17 at 18:57
  • what you've added to your path is wrong (as written in your question). You should have c:\program files\inkscape. The path is to a folder not a file, it's backslashes on windows, and you have a spurious space. – Chris H Apr 25 '17 at 8:39

I had this problem as well. I was able to fix it defining the path to inkscape.


\setsvg{inkscape={"C:/Program Files/Inkscape/inkscape.com"}}



| improve this answer | |
  • when you run the export command, do you have any problem where the output pdf goes into 3 different pages? – Sharah Jan 25 '17 at 12:50
  • @Sharah Could you be more explicit? I have only just solved this issue of getting the svg package to work at all. I did notice some strange export issues in my earlier attempts -- it's not currently clear to me if this was an issue with setting up the svg package, or the svg files themselves. If you are referring to the output svg image being very large, you may have to scale in LaTeX, or try to play with whatever program you used to generate the *.svg. – BiggChemT Jan 25 '17 at 18:19
  • I am having the same problem as in here: bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1417470 On both windows and Mac platform. I tried with 0.92 too but the bug is still there. – Sharah Jan 25 '17 at 19:46
  • @Sharah, My Inkscape version is: Inkscape 0.92.0 r15299. I am on windows 10. I had to add the setsvg path despite setting inkscape in my PATH. Can you provide an *.svg that gives you these errors? My *.svg files appear to be working - it is not clear to me where the problem could be hiding. – BiggChemT Jan 25 '17 at 20:11

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.