I am trying to use pdftex to lay out a document including images made in inkscape.
From inkscape I can output the images as pdfs with accompanying pdf_tex files and put these in a figure environment.
This works if the figures are in the main file. However, I have each chapter in a separate folder with all the images for that chapter. When I include images in a chapter I get the error : "Package pdftex.def Error: File 'peeling_flow_constant_width.pdf' not found."
Googling around (here: http://mirrors.ibiblio.org/CTAN/info/svg-inkscape/InkscapePDFLaTeX.pdf) suggests that if I had all my images in the same folder then I could use \graphicspath. This doesn't work for my case of having graphics in each of the separate chapter subfolders.
I think the problem comes from the fact that the .pdf_tex file automatically generated by inkscape includes the command: \put(0,0){\includegraphics[width=\unitlength]{base_peeling_flow_constant_width.pdf}}%
This command doesn't have any information about the path to the pdf file.
My minimal working example is
\documentclass[12pt,chapterprefix,openright,twoside,a4paper,numbers=noenddot,DIV11,BCOR1cm]{scrbook}
%\include{l_preamble}
\usepackage{graphicx} % to be able to use \includegraphics
\usepackage[rgb]{xcolor} % Needed by pdfcomment
\begin{document}
\begin{figure}[htb]
\input{base_peeling_flow_constant_width.pdf_tex}
\end{figure}
\include{chapter1/chapter1}
\end{document}
with the chapter 1 file
\section{test chapter1}
\begin{figure}[htb]
\input{chapter1/peeling_flow_constant_width.pdf_tex}
\end{figure}
include
in your preamble. Ever. Useinput
instead.include
before your document is startet (\begin{document}
). It clears the current page which is meaningless (and wrong) if it's not happening in your document. If you have seen that in other templates, don't use them, they probably do other things wrong, too.