I have exported an Image from Inkscape to PDF/TEX. When trying to add it using


I get an error

"Package pdftex.def Error: File `myfile.pdf` not found: ...

The documentation suggests that I should use \graphicspath{{images/}} so I have added that to my preamble but it still doesn't work. What's my mistake?

Edit: I also tried the alternative from the documentation to add \usepackage{import} to the preamble and add the image with \import{images}{myfile.pdf_tex} but it didn't work either. It results in

File `myfile.pdf_tex` not found...
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – albert
    Commented Oct 11, 2018 at 13:39
  • Is myfile.pdf_tex and myfile.pdf in the same folder? images/? The n you can use \graphicspath, but you are using it wrong, the correct syntax is \graphicspath{{./images/}}, note a set of braces around each folder added this way.
    – daleif
    Commented Oct 11, 2018 at 13:45

2 Answers 2


You need






should work, or instead you can set TEXINPUTS to ./images: in the enviornment before calling pdftex then


should work as tex and graphics files are found on the TEXINPUTS path.

  • Sorry, that was a copy error. I did have the extra braces and it still doesn't work.
    – Elias
    Commented Oct 11, 2018 at 13:49
  • 2
    @Elias we can only answer the questions as posted, please edit the question to show a small complete example that can be run to reproduce the error. Commented Oct 11, 2018 at 13:52

It turned out that I needed to put the \graphicspath right above the line that included the image instead of in the preamble. So this worked:

  • That should not be necessary unless you're also messing with the graphics path in the preamble. Did you add it before or after loading graphicx?
    – daleif
    Commented Oct 12, 2018 at 11:09
  • @daleif I don't explicitly load graphicx at all it seems to be included in the .cls with \RequirePackage
    – Elias
    Commented Oct 12, 2018 at 11:14
  • Then you really ought to tell us more about this document. There is a reason why we always ask for a full but minimal example. A side reason is to get an idea of either badly prepared templates (there are a lot) or other setups that do things in ways that are undesirable for all users.
    – daleif
    Commented Oct 12, 2018 at 12:14
  • @daleif It's publicly available here: github.com/wannesm/adsphd
    – Elias
    Commented Oct 12, 2018 at 12:46
  • well, it is definitely doing stuff that it should not. Are you using \includechapter, it is explicitly resetting the graphicspath, nullifying what ever was there to begin with. I guess they are trying to force a specific directory structure with this class. See why this sort of information is important. Also it does not support xelatex or lualatex, as it is explicitly passing pdftex or dvips to graphicx.
    – daleif
    Commented Oct 12, 2018 at 12:56

You must log in to answer this question.

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