I'm trying to throw different projects into one document that are in different folders. These folders include images and texfiles. I know that I can always include files with \input{} or \include{} like this:
\input{<path1>/texfile1}
\input{<path2>/texfile2}
but this runs into problems as soon as texfile1 for example includes a graph that is stored in a subfolder of <path1>. In effect, I want to do something like changing the working directory of a statistical program like this:
% change directory to <path1>
input several files that again include images etc just as if I were compiling a latex document inside <path1>
% now change directory to <path2>
and input all the files from there as if I were in that folder
I've tried playing with TEXINPUTS= as suggested here but couldn't get it to work. A workaround I have in mind is including the path inside every \input{} and changing \graphicspath{} in between the two projects but it seems that there must be a less hack-y solution, no?