I'm trying to use the svg
package for inserting svg images in my latex file, as suggested in other questions. But now I ran into a problem:
For example I have a image figure1.svg
, if I write
\includesvg{figure1}
it will give an error says
ERROR: LaTeX Error: File `figure1.pdf_tex' not found.
But if I write
\includesvg{figure1.svg}
it will give another error says
ERROR: LaTeX Error: Unknown graphics extension: .svg.
How can I fix this problem? I'll prefer not having to convert all my svg
files to pdf_tex
files with some external program.
Update
My LaTeX environment is latest the TeXLive 2013 on Windows 7. A MWE code would be
\documentclass{article}
\usepackage{svg}
\begin{document}
\begin{figure}[htbp]
\centering
\includesvg{figure1.svg}
\caption{svg image}
\end{figure}
\end{document}
--shell-escape
option topdflatex
and installingImageMagick
. To me it seems as if the package is a bit buggy.\includesvg{..}
by\includegraphics{...}
without any extension and (1) import the latex document with Lyx to allow an automatic conversion withrsvg-convert
or (2) work directly with pdf files that still can be edited with Inkscape. For many files is less painfull the command line (inkscape -f file.svg -A file.pdf
).\includesvg{image}
or\includesvg{image.svg}
just wouldn't work. Had to do\includegraphics{image}
and then it magically started working.