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

\usepackage{graphicx} % to be able to use \includegraphics
\usepackage[rgb]{xcolor} % Needed by pdfcomment





with the chapter 1 file

\section{test chapter1}

  • Previously, I had generated eps_tex files from inkscape, but using eps2pdf does not work on these eps graphics. Any tips on how to do this route would also be helpful, but I should probably post this separately.
    – Chogg
    Commented Jul 24, 2013 at 18:53
  • 2
    I've fixed this now. It seems that \graphicspath can take several directories so I can list all my sub folders there. It would still be nice to avoid writing out the chapter folders individually, but I can cope with that for now. Presumably there is a way to automatically generate a list of subfolders, but I don't know it yet.
    – Chogg
    Commented Jul 24, 2013 at 19:14
  • Don't use include in your preamble. Ever. Use input instead.
    – Juri Robl
    Commented Jul 24, 2013 at 19:30
  • @JuriRobl I was including my whole preamble. That is OK, right - as long as I don't use an include within my preamble? That is what I've seen in templates.
    – Chogg
    Commented Jul 25, 2013 at 16:54
  • No, never use 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.
    – Juri Robl
    Commented Jul 25, 2013 at 17:14

1 Answer 1


Page 2 of CTAN/info/svg-inkscape/InkscapePDFLaTeX.pdf suggests the alternative use of the import package. Assuming all three files (.PDF, .PDF_TEX, and .SVG) are in the same folder as chapter1.tex, then all you need is





\chapter{test chapter}

  • Thanks. I've got that working. Is there a reason to use import rather than \input with \graphicspath?
    – Chogg
    Commented Jul 24, 2013 at 19:46
  • @Chogg \graphicspath would be useful if all image files were kept in the same subdirectory, but you stated you want to keep different image files in multiple subdirectories.
    – nnunes
    Commented Jul 25, 2013 at 5:56
  • multiple subdirectories can be used with \graphicspath. I guess it is inconvenient to have to remember to add each new folder with images in it. It seems like the input method is better.
    – Chogg
    Commented Jul 25, 2013 at 16:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .