General ⇒ Regarding \graphicspath
Regarding \graphicspath
I am using Miktex on windows xp with Texnic Centere for editing my tex files. At present I am writing my thesis that includes loads of figures in all of the chapters. I want to save images in different folders corresponding to chapter. Further I want to save images in different folders within each chapter folder. This is to make life easier for me, so that I can locate figure easily later on if I have to edit one of the figure among 100's.
Now the problem comes, when I put all of the figures in different folders as I mentioned above.
I use \graphicspath command to give absolute path of all of the folders.
But I get error saying that file could not be found.
I am specifying path as mentioned below
line 1---\graphicspath{{F://latex-files/figures/ch5/ld}}
line 2---\graphicspath{{F:/latex-files/figures/ch5/}}
Is there any way to include location with all subdirectories.
When I include path the way it is mentioned above, it gives me error saying that file (in directory ld) is missing.
If I interchange 'line 1' with 'line 2' Miktex gives me error saying that file (in directory ch5) is missing.
Can anyone sort out this issue.
Thanks
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Regarding \graphicspath
Just to close the post. I found out the reason for that behavior.
I need to add all absolute paths in my preamble using
\graphicspath{{path1}{path2}{path3}{path4}}
For windows users, please make sure there are no empty spaces in the path.
Thanks
Re: Regarding \graphicspath
\graphicspath{{pictures//}}
Note the double slash at the end of the directory name.
any directory tree under "pictures/" is searched in
\includegraphics[width=0.48\columnwidth]{picture.png}
command. Yupeee! Z
p.s. learned here: http://myitcv.org.uk/latex/tips_and_tricks.html where they use it for TEXINPUTS
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Regarding \graphicspath
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Regarding \graphicspath
Regs, Zroutik
localghost wrote:This command should be used with caution (see l2tabu).