![]() Registered Member ![]()
|
Hello there,
Can someone help me fix this issue? How am I supposed to get KILE to find this file? Does it have to be saved in the same folder as the .tex document I am working from? |
![]() Registered Member ![]()
|
You should set a graphics path in the preamble of the document. Assuming your have a subdirectory "pics" in the directory holding your current .tex file, you place the following lines in the preamble of the document:
(I'm assuming you are using LaTeX.) Note the double curley braces. It should also work with absolute paths (although I haven't tested that). |
![]() Registered Member ![]()
|
I'm afraid that doing that has now given me 66 errors. Beneath my use packages (of which graphicx is included), I have
"\graphicspath{C:\Users\James_2\My Documents\Chemistry\Dissertation}" The image is called fig4co2flux.png. In the figure where I want the image to appear, I have \begin{figure} \includegraphics{fig4co2flux} \caption{global outgassing, absorption and net flux of the world’s oceans in gigatons of carbon per year (Gt-C y$^{-1}$)m, as presented by Tsai and Liu.} \end{figure} As soon as I remove the "includegraphics" part, I get 0 errors. I cannot see where I am going wrong. |
![]() Registered Member ![]()
|
The path should be relative. It is enough to use
|
![]() Registered Member ![]()
|
I think there are two things wrong with your \graphicspath command:
1. You should use double curley braces! 2. I don't think TeX understands Windows' non-standard path separators - use proper slashes like in URL's. Also, as noted before, relative paths are much easier. Only use absolute paths if you have to. |
![]() Registered Member ![]()
|
Thanks for the input. I'm in the lab at the moment and don't have access to KILE/my dissertation .tex, but I shall attempt your suggestions when I get home and let you know how they have turned out.
|
![]() Registered Member ![]()
|
Alas, this does not work either. I've tried the \graphicspath with {{ }} and typing \includegraphics{chlorophyll} and I've also tried it without grpahicspath and just putting in \includegraphics{chemistry/dissertation/chlorophyll} for example. Neither work. Someone in my lab showed me the latter today as well. I'm just not sure what is going wrong.
|
![]() Registered Member ![]()
|
1. If you are using figures in your main tex file directory, do not use any \graphicspath (comment it or remove it). 2. If you are using \graphicspath, do not use path parts in figures names. |
![]() Registered Member ![]()
|
Testcase:
Add some dummy file "test.png" into subdirectory of your tests directory and try to compile. |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell