I have the following directory structure:
main.tex
chapter/
chapter1.tex
img/
image.svg
This is the content of main.tex:
\documentclass{report}
\usepackage{svg}
\begin{document}
\import{chapter/}{chapter1}
\end{document}
This is chapter/chapter1.tex:
\begin{figure}
\centering
\includesvg[width=0.7\textwidth, svgpath = img/]{image}
\caption{Caption}
\end{figure}
How to use import package to keep relative path references in subfiles and at the same time use svg files?
If I use the svg in a main file and not in a subfile, it's generated correctly.
svgwork normally on your system? Did you ever try it without\importorsvgpath? Consider egreg's comment – Symbol 1 Mar 01 '15 at 06:53svgpackage does know the correct path and did try it. You can prove/disprove it by testing any other extensions (.png/.jpg/etc). Turns out this package reports poor error messages so I cannot tell where things go wrong. A stupid fix may be adding the current directory in\Ginput@pathtosvgpathby hand. – Symbol 1 Mar 02 '15 at 07:06\Ginput@pathtosvgpath? Can you give an example? I've tried, but failed. – bryant1410 Mar 02 '15 at 09:01