4

I need to include some SVG graphics in my latex file. The SVG files have been created with a Python program, they don't come from Inkscape (I know that there are a lot of questions answered about the connection Inkscape - SVG file - Latex, but this is not my case).

What I tried to do is, in summary:

\usepackage{svg}

\begin{figure}
\includesvg{image}
\end{figure}

and I also tried to set the -synctex=1 -interaction=nonstopmode --shell-escape %.tex in the Configure Texmaker section. This did not work out, producing

! LaTex Error: File './image' not found.

How to solve it?

  • 4
    Welcome. The reason why people always mention inkscape for these question is that the svg package uses inkscape to convert your svg file to your desired output which is then inserted in your document. Inkscape is required to insert svg files into your latex document. So my question is "do you have inkscape installed?" – ArTourter Aug 29 '15 at 12:41
  • 1
    How many files do you have? Do the conversion with your tool of choice, don't try to make LaTeX do it by calling other tools in the backround. The time to make that work will take longer then manually converting a few images. On the other hand, if you have dozens of images for automated reports every day ... – Johannes_B Aug 29 '15 at 12:51
  • 1
    An SVG file is a little bit far from being a graph. In some sense it is the only readable file format and it is too high-level for LaTeX. Since your files are generated by Python, you should let Python do the most jobs, including converting between formats. Just think about that even in the worst case, calling Inkscape through Python is better than through pdftex. – Symbol 1 Aug 30 '15 at 12:17

1 Answers1

-1

You need compile with pdflatex --shell-escape main.tex => http://comp-phys.net/2014/03/22/including-vector-graphics-in-latex-using-includesvg/