# TeXnicCenter and svg

I'm wondering why I can't use the package svg with teXnicCenter. I've seen that one must use shell escape to make it functions. I've also downloaded the latest version of inkscape and of ImageMagick. So I've written that in my build profile :

--shell-escape -synctex=-1 -max-print-line=120 -interaction=nonstopmode "%wm"


I've put the shell first beacause I've seen that sometimes it would work better.

Here is my minimal code :

\documentclass{article}
\usepackage{svg}
\usepackage{amsmath}

\title{Inkscape package on Overleaf }
\begin{document}
\begin{figure}[htbp]
\centering
\includesvg[inkscapelatex=false,width=\linewidth]{test}
\caption{svg image}
\end{figure}

\end{document}


And I've checked my log file. Here are the parts concerned by escape :

Package svg Info: Calling Inkscape on input line 9. runsystem(inkscape -z -D --file="test.svg" --export-pdf="test_svg-raw.pdf" )...executed.

Package svg Warning: The export with Inkscape failed for file
(svg)                test.svg'
(svg)                Troubleshooting: Please check in the log file how
(svg)                the invocation of Inkscape took place and try to
(svg)                execute it yourself in the terminal on input line 9.

! Package svg Error: File test_svg-raw.pdf' is missing.

See the svg package documentation for explanation.
Type  H <return>  for immediate help.
...

l.9 ...inkscapelatex=false,width=\linewidth]{test}

Did you run the export with Inkscape? There's no file
./svg-inkscape/test_svg-raw.pdf'
although test.svg' was found.

[1


So, I don't really understand what is faulty here. Thanks if you can direct me in the right direction to make it work.

• it is likely that inkscape is not an active command e.g. from a cmd line enter inkscape --version if you get the response 'inkscape' is not recognized as an internal or external command, operable program or batch file. then it did not install itself on your path so you need to do it manually. If you are not sure which folder it is in and on windows the cmd is> where /r \ inkscape If you do get the version shown any where from your system then the --shell-escape did not work for a similar answer see tex.stackexchange.com/a/474119/170109
– user170109
Apr 1, 2019 at 19:09
• If I understand, the problem is that he can't find it. The fix should be to add the path to the folder of inskcape in the "variable environnement". I've added the path to the folder inkscape on my "user variables" and on my "system variables" under the variable "Path". To check if it would function, I've tried on the cmd "inskcape -version". I've alose added on miktex the path, by going to preferences>edit>typesetting. He still can't find it. I'm a bit confused now. Apr 2, 2019 at 5:05

1) enable shell escape, you have done that, otherwise you would be reporting a log error of Package svg Warning: You didn't enable 'shell escape' (or 'write18'), ! Package svg Error: File test_svg-raw.pdf is missing.
2) have a valid svg file in a directory you can write a subdirectory to, you don't appear to have that problem otherwise if missing you would see ! Package svg Error: File 'test.svg' is missing. However if the file was found and produced an invalid result or the subdirectory ./svg-inkscape could not be written in the folder with both tex and svg then the message in that case could be the one you see. Lets presume your test.svg file is valid and you can add a folder below the main tex folder (ensuring that main folder has no spaces or accent's etc.)