[Tex/LaTex] TeX Live unable to call inkscape (SVG Package)

graphicssvgtexlive

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.


! 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.


! 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.
<read *>

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

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

Best Answer

The order of the options in the command are significant. --shell-escape needs to be placed before the file name.