2

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?

Andrew Swann
  • 95,762
  • Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. A tip: If you indent lines by 4 spaces or [enclose words in backticks ```](http://meta.tex.stackexchange.com/q/863), they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). – Andrew Swann Apr 04 '13 at 08:30
  • Have a look at http://tex.stackexchange.com/q/52486/15925 . If that helps, let us know and we will close this question as a duplicate. – Andrew Swann Apr 04 '13 at 08:32
  • Thats the same problem, therefore this question can be closed as duplicate. – Johannes Apr 04 '13 at 08:56
  • Make sure to consider upvoting the question and the answer there if they helped you. – Dominikus K. Apr 04 '13 at 09:17

0 Answers0