0

I have some main document and want to insert another .tex file which contains a tikz-picture (standalone documentclass). In my project I have a folder for some shared preambles like commands of usepackages etc. Compiling just my document with the tikzpicture works correct as the path shows the correct "way":

%%File with the picture: standalone_cube.tex%%
\input{../../../_shared_preambles/tikz_packages.tex}
begin
<<code for picture>>
end

But when using \input from the main-file to include this picture:

\input{_images/tikz/standalone/standalone_cube.tex}

I think latex just replace the "insert" with the text standing in my standalone_cube.tex. But when this get an 1:1 copy the path I use inside this is getting wrong I guess and so my document wont compile.

Is there any kind of solution that latex track the movement to the file I want to insert and so the relative path still work? I guess I could just place all files in one folder so do't have to go up- or downwards in folders, but then the structure gets messy.

Many thanks in advance.

SRel
  • 1,313

0 Answers0