I want to write a tex file which can be used in serveral higher order documents, but there are problems with the relative paths of the figures.
Example:
In folder sub1 is the file base1.tex which uses a figure from folder pics1 via a relative path ../pics1/figure.pdf. I want to use the file base1.tex via input in 'main1.tex' in folder documents (two layers higher than sub1) and in a second file 'details.tex' in folder sub1. For more details the folder structure:
documents
-part1
--sub1
--sub2
--pics1
--pics2
The problem is, that the relative path in base1.tex is only correct in one document. Is there a way to add the input path (input{./part1/sub1/base1.tex}) to the relative path (\includegraphics{../pics1/figure.pdf}) in the base1.tex file?