Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to define a central graphics path for my thesis, however, the chapters are included with the \include command and by using \include with \graphicspath, pdflatex complains about it can not find the pictures, is not that possible to use \graphicspath and \include together, for which I do not see a sound reasoning behind.

I use in the preamble

\graphicspath{{/home/utab/thesis/phd_text/figures_all//}}

and use

\include{ch9} 

Then it can can not find the pictures on the above mentioned directories recursively.

share|improve this question
1  
@Umut: A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). –  lockstep Apr 16 '11 at 15:56
    
@lockstep, Thx for the hints –  Umut Tabak Apr 16 '11 at 15:57
1  
It should work with an absolute path. Try to remove the doubled / at the end. That's the only thing I see here. –  Martin Scharrer Apr 16 '11 at 16:07
    
Does not that extra / make that to search the directories recursively? –  Umut Tabak Apr 16 '11 at 16:15
    
@Umut what operating system are you using? –  Yiannis Lazarides Apr 16 '11 at 16:20

2 Answers 2

You can use relative path : give as a second argument to \graphicspath what would be the relative path seen from your chapter. In my own case, I have a thesis folder containing chapter folders and a Figures folder. I use :

\graphicspath{{Figures/}{../Figures/}}
share|improve this answer
2  
With relative folders that should also work just using \graphicspath{{Figures/} as long as every \includegraphics the works in that directory. At least for me the secont part you use isn't necessary. –  Ronny Feb 13 '13 at 13:54

The \graphicspath command does not influence the directories \include takes into consideration, because \graphicspath is from the graphics package, while \include is plain LaTeX.

Unfortunately, like stated on Bits of document from other directories, there is no trivial way to build, e.g., an \includepath command. Nevertheless, the site mentioned above links two packages as a possible solution: chapterfolder and import, and especially the \cfinput command from chapterfolder might help. There is also another blog post describing the use of chapterfolder.

share|improve this answer

Your Answer

 
discard

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.