TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The structure of the document I'm writing is the following.

Top level -> Plots -> some images
                   -> 1 -> some images
                   -> 2 -> some images
                   -> 3 -> some images
                   -> 4 -> some images

Using the command:


Seems to work fine and allow me to add images from these two folders, however, when I try to add folders 2, 3 and 4 to the \graphicspath, I get an error for all figures saying that it cannot find the images.

Is there a way to fix this, or for the graphics package to look within all subfolders?

\documentclass[12pt, a4paper, notitlepage]{article}
\graphicspath{ {/Plots/}{/Plots/1/}{/Plots/2/}{/Plots/3/}{/Plots/4/} }

\date{April 2013}





share|improve this question
Welcome to TeX.SX. – Claudio Fiandrino Apr 3 '13 at 17:50
its not because you need the last }? A full (MWE) document would ease the debugging here. – zeroth Apr 3 '13 at 17:56
That was a typo in the original post, sorry. I've edited the OP with a MWE. This code does not find the image located in the /Plots/1/ folder. However, if I remove folders 2, 3 and 4, from the graphics path, it works fine. Thanks for your help. – Rob Apr 3 '13 at 18:10
@Rob: Don't load graphicx twice (the first is sufficient). What OS are you running? Mac? Windows? Unix? – Werner Apr 3 '13 at 18:28
Didn't notice I was doing that - thanks. Doesn't solve the issue. I'm using Mac OSX 10.8.3. – Rob Apr 3 '13 at 18:30
up vote 5 down vote accepted

There shouldn't be a problem.

I'm using:


and it works just fine. You can also get down and into another directory as you can see in my example.

You access the filesystem-root and not the subfolders (as you access / and not ./). This is most likely your fault.


\graphicspath{ {Plots/}{Plots/1/}{Plots/2/}{Plots/3/}{Plots/4/} }

rather than

\graphicspath{ {/Plots/}{/Plots/1/}{/Plots/2/}{/Plots/3/}{/Plots/4/} }

On Linux/Unix systems you won't need the ./ at the beginning. Not sure about it on a Mac-system.

share|improve this answer
Your suggestion of removing the leading ./ worked. Not sure why I didn't think to try that - must be time to stop for the evening! Thanks again. – Rob Apr 3 '13 at 20:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.