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.
svg
work normally on your system? Did you ever try it without\import
orsvgpath
? Consider egreg's commentsvg
package 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@path
tosvgpath
by hand.\Ginput@path
tosvgpath
? Can you give an example? I've tried, but failed.