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.

My Latex project is organized like this:

In my root Latex folder there is a root latex file named main.tex. In the same folder there is a subfolder pictures which contains 2 files named test.tex and test.pdf.

Problem occurs when in first file main.tex i input second file test.tex using \input{./pictures/test.tex}.

But in second file test.tex there is a line which includes a third file test.pdf. This is done using \includegraphics{test.pdf} (I cant change this as it is an output from a third party software)

Because test.tex gets inputed in main.tex, test.tex cannot find test.pdf with a \includegraphics{test.pdf}. It could find it if i could modify this line into \includegraphics{./pictures/test.pdf}, but i can not do this.

What are my options if i can only modify main.tex?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

Add

\graphicspath{{pictures/}}

to your document preamble. This will add pictures/ to the search path for graphics if the image included is not found in the root folder. See Importing graphics from “somewhere else” on the UK TeX FAQ.

share|improve this answer
add comment

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.