1

I am trying to render an .svg image using the svg.sty package in latex. When I run the following code I get three errors. Posted below the code

\documentclass[a4paper,10pt,twoside,openright]{report}
\usepackage{svg}
\begin{document}
TEST
\begin{figure}[htbp]
    \centering
    \includesvg{bloch_entangling_gate}
    \caption{caption}
    \label{fig:label}
\end{figure}
\end{document}

Errors below :

E: /Users/Adriaan/Documents/Test/test.tex:6 File `./bloch_entangling_gate' not found. \includesvg{bloch_entangling_gate}
E: /Users/Adriaan/Documents/Test/test.tex:6 File `./bloch_entangling_gate' not found. \includesvg{bloch_entangling_gate}
E: /Users/Adriaan/Documents/Test/test.tex:6 File `bloch_entangling_gate.pdf_tex' not found. \includesvg{bloch_entangling_gate}

I am running latex trough the "latexing" package in sublime on Mac OSX 10.9.4. The svg image is placed in the same directory as the .tex file. Rendering works fine if I do not try to import the image.

When I build from there it executes the build command which is set to do the following.

[
    {
        "cmds":
        [
            "pdflatex",
            "bibtex",
            "pdflatex",
            "pdflatex"
        ],
        "name": "Default Build: latexmk",
        "primary": true

Whit added argument to the preferences

"build_arguments": [" --shell-escape"], 

This should ensure that pdflatex is working with shell escape enabled as required for the svg package. I do not know how to check if these are the actual commands that are being executed or how to run latex from the terminal.

I have also seen a similar question with the same error on a windows system. I assume I am not using luatex but I am not sure.

Hope someone can help me.

azetina
  • 28,884
  • Mh, for me it works with pdfLaTeX under Linux Mint 17. Could you try it without underscores at the filename? – dawu Aug 17 '14 at 16:08
  • 1
    Do you have inkscape installed? I get similar error messages if I `pretend' that I don't have it installed. – Anthony Aug 18 '14 at 00:47
  • 1
    I didn't check the code but looking quickly at the implementation detailed in the documentation, I doubt this will work 'out of the box' on OS X. That said, it should not be difficult to persuade it to work. It may be sufficient to specify the full path to the executable which will be inside the Inkscape .app. Or you might be able to get away with creating a symbolic link to the executable named just inkscape somewhere in your PATH. That is, you need to use the inkscape package option to specify the path to the executable or set up a symbolic link so the default spec. works. – cfr Aug 18 '14 at 02:33

0 Answers0