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?
Best Answer
How to include an SVG file, with the minimal working example, with the file "p.svg":
but.... the package svg-extract (or inkscape) may or may not be installed on your system, which you can install on Ubuntu with
ignore the last line, it works without this.
The latex script can be compiled to PDF with this: