I have a latex file which includes multiple figures. These figures are kept in different directories whose path is given in the latex file using the graphicx package:
I am able to compile this file without any problems from the command prompt using pdflatex file.tex.
Now I have defined a key mapping in my vimrc file:
map <F10> :!pdflatex % <CR>
so that I can compile the file from the vim itself. But in this case, pdflatex is unable to find the figure files.
Can someone please help me understand why pdflatex is able to run without any problem from the command line but runs into problems when run using a key mapping.