Tell me more ×
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.

Short version: a subimport-ed file has correct relative path when using \includegraphics, but incorrect relative path when using \includepdf.

Long version:

File a.tex is located in my main a directory 'a_dir'. It incorporates a file b.tex (which is located in directory 'a_dir/b_dir/') using '\subimport{b_dir/b.tex}'. b.tex includes a number of images, that are located in the directory 'a_dir/b_dir/images/'.

b.tex uses both the commands \includegraphics and \includepdf (the latter from the pdfpages package). When a.tex is compiled, the \includegraphics command works fine, but the \includepdf command looks for the images in the (non-existent) directory 'a_dir/images' - it is looking for them relative to a.tex, not b.tex!

I can't simply change the path in b.tex as I also compile that file on its own. How can I get pdfpages to look in the path relative to the file it is located, not the main compiling file?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.