# TeX Live unable to call inkscape (SVG Package)

I am working with a fresh install (from source) of TeX Live on Ubuntu Server 13.10. I would like to use the svg package to allow SVG files to be directly included. In the background, the svg package calls inkscape to generate pdf_tex files at runtime.

inkscape was installed using the package manager (after Tex Live was installed), and is in the PATH. inkscape can be called from the shell, without any issues. On Windows (MikTeX), simply having inkscape in the path is sufficient.

However, it appears that pdflatex is unable to call inkscape. I am calling inkscape with pdflatex -synctex=1 -interaction=nonstopmode "document".tex --shell-escape

MWE:

\documentclass{article}
\usepackage{svg}
\begin{document}
I am a document
\includesvg{Figure}
\end{document}


(With Figure.svg in the same folder)

Output:

runsystem(inkscape -z -C -f./Figure.svg -A./Figure.pdf --export-latex)...disabl
ed (restricted).

! LaTeX Error: File ./Figure' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.6     \includesvg{Figure}

I could not locate the file with any of these extensions:
.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2,.eps
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.6     \includesvg{Figure}

I could not locate the file with any of these extensions:
.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2,.eps
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! LaTeX Error: File Figure.pdf_tex' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: pdf_tex)

Enter file name:
! Emergency stop.

l.6     \includesvg{Figure}
^^M
*** (cannot \read from terminal in nonstop modes)


The runsystem()...disabled (restricted). error is what troubles me.

• The log shows that shell escape is not enabled: what happens if you put --shell-escape before the file name? (Usually the file name has to come after options.) – Joseph Wright Jul 9 '14 at 21:17
• Joseph, Thank you very much. I can't believe I made such an oversight. That is what I get for copying the command TeXstudio uses in Windows. – DBordello Jul 9 '14 at 21:26

The order of the options in the command are significant. Placing --shell escape` before the file name solves the issue.