# includesvg cannot include svg

I am trying a very simple example of trying to import a svg image, I am following the manual on http://mirrors.acm.jhu.edu/ctan/graphics/svg/doc/svg.pdf but this doesn't work at all:

\documentclass{article}
\usepackage{svg}
\begin{document}
\includesvg{p.svg}
\end{document}


but I get an error:

! LaTeX Error: Unknown graphics extension: .svg


which shouldn't happen. I don't want to have to keep converting between SVG and EPS (which I can import) because this complicates the image-making process and clutters my directories. I'm trying to use includesvg the same way I would use includegraphics, just like the manual said. The manual isn't giving working examples, and this error doesn't even show up on google searches.

How can I import an SVG image?

• Do you have tried to use \includesvg{p} only, i.e. without .svg extension? – user31729 Apr 5 '17 at 13:29
• @ChristianHupfer yes, this gives the error ! LaTeX Error: File ./p' not found – con Apr 5 '17 at 13:31
• The introduction of the manual mentions the fact that typesetting should be done with the --shell-espace flag and Inkscape must be accessible fromt he terminal (by setting the PATH variable on Windows for example). Are you sure these requirements are satisfied in your case? – epR8GaYuh Apr 5 '17 at 13:44
• @epR8GaYuh running pdflatex with --shell-escape and that inkscape is accessible from the terminal make no difference, the same error is produced – con Apr 5 '17 at 13:53

How to include an SVG file, with the minimal working example, with the file "p.svg":

\documentclass{article}
\usepackage{svg}
\begin{document}
\includesvg[width=\textwidth]{p}
\end{document}


but.... the package svg-extract (or inkscape) may or may not be installed on your system, which you can install on Ubuntu with

con@e:~/Scripts\$ sudo tlmgr install svg-extract

pdflatex --shell-escape svg_graphic.tex
`