[Tex/LaTex] Trouble converting svg file to pdf_svg using svg package


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.

Best Answer

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"}}