I am trying include an Inkscape generated pdf image, with text to be interpreted by LaTeX, into a LaTeX document.
When I keep the image files in the same folder as the tex file it works, but I would like to have my images in a subfolder img.
I've seen multiple instructions on how to accomplish this, but the mostly accepted way to do this seems to be to use the svg package by \includepackage{svg}, tel LaTeX where to look for files/images using \svgpath{{img/}} and insert the image into the document using \input{example.pdf_tex}.
MWE:
\documentclass{standalone}
\usepackage{svg}
\svgpath{{img/}}
\begin{document}
\input{example.pdf_tex}
\end{document}
This is also the way as described in the documentation of the svg package
However, when I do so, latex is not able to find the file and I get the error
! LaTeX Error: File `example.pdf_tex' not found.
Now, there are alternative ways to accomplish what I want to do. For instance to include \graphicspath{{img/}} or to use the import package with the command \import{<path to file>}{<filename>.pdf_tex}. I've also tried these commands using an absolute path.
Would anyone have an idea what is wrong?
\svgpath...part and use\input{img/example.pdf_tex}? – Rasmus Feb 08 '20 at 21:01\graphicspath{{img/}}to the preamble. Strange, but it now works. – Alwin Feb 08 '20 at 22:28