# LaTeX \graphicspath recursive search

I've read that LaTeX image directories can be searched recursively with the `\graphicspath` command by including a double slash at the end - i.e. `\graphicspath{{../my_images//}}`.

However, the recursive part of this doesn't seem to be happening. I've tried several different iterations, including `/` vs `\`, absolute paths, and `pdftex` vs `latex`. Any ideas what is wrong? Google has turned up nothing but confirmation that this should work. I'm on Windows 7 using Miktex 2.9. I've not had the opportunity to try this on another platform.

-

## migrated from stackoverflow.comAug 11 '11 at 6:44

This question came from our site for professional and enthusiast programmers.

Where did you read that? Recursive path search through `\graphicspath` is impossible. – AlexG Aug 11 '11 at 7:12
@Alexander: While it is impossible to list directory contents in pure TeX, it should be possible with `\write18` or LuaTeX. – Andrey Vihrov Aug 11 '11 at 7:14
Actually, this (recursive search) seems to be a good idea for a LaTeX package. Is there one yet? – Andrey Vihrov Aug 11 '11 at 7:18
I've not seen it work but is stated in the LaTeX wiki section on `\includegraphics`: "The last command searches the files recursively because of the double slash "//"." – mas Aug 11 '11 at 9:57
It is also stated in an accepted answer on this site in relation to MikTeX. – mas Aug 11 '11 at 10:27

(a) For many platforms, ending the specified path to `\graphicspath` with a double-slash does not invoke recursion through directories below that.
(b) For some users, ending the path to `\graphicspath` with a double slash does invoke recursion. All the cases I have seen documented and where the platform was mentioned were MikTeX users, e.g. see an accepted answer on this site. At the time of writing the LaTeX Wiki also mentions this behaviour.