0

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.

2
  • 1
    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
    Commented Jul 9, 2014 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
    Commented Jul 9, 2014 at 21:26

1 Answer 1

3

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .