As mentioned in my last question i have problems with \input command and relative paths which getting wrong. I also tried the import-package but don't get this to work.
Till now I just have two shared preambles at different locations so each file can find it, but it is not so great when having to edit two files.
Is there may a function in tex that I give it a root folder and just let tex search inside this folder for a specific file (tikz_packages.tex for example) and so don't have to argue with the problem with the relative paths.
Or another option may be give him two paths. When he can't find the first path he should just use the second path, then the third path till he find it.
If I get it correct there is some command like this which first look in the first path, then the seconde and so on but only for graphics:
\graphicspath{{figures/}{../figures/}{C:/Users/me/Documents/project/figures/}}
Is something like this possible in latex? Since my folder is not so big the searching should not take much time.
Many thanks.
\IfFileExists{<relative path 1>}{\input{<relative path 1>}}{\input{<relative path 2>}}, if there are two relative paths where your file could be. If there are more possibilities, you can probably nest these if ... then statements. – Max Aug 18 '18 at 14:49