Numerous examples (see this one for instance) describe the the use of:
\makeatletter
\def\input@path{%
{<path1>}%
{<path2>}%
}%
\makeatother
as way to broaden the compiler's search universe when externalized content is called via \input{} and the argument to \input{} lacks an explicit relative or absolute path.
In a project which involves moderate nesting (e.g. 3 or 4 levels), it's seeming as though it would be beneficial to be able to add (and possibly remove) paths from this path list.
Is this possible?
\input@pathby saving the value to\input@oldpathand then using it to define\input@path. In the former case, you need to use expl3 functions rather than\input, but it is straightforward to create a wrapper e.g.\xinputfor document-level use. I use this a lot. It broke recently, but Joseph Wright had it fixed in less than no time. – cfr Oct 19 '19 at 17:18\input@path(and I implemented it:-) it is much more efficient to set the input path in the environment,TEXINPUTS=path1//:path2//: pdflatex myfilewill search all directories below path1, then all directories below path2 then all the standard places – David Carlisle Oct 19 '19 at 21:41\defor\renewcommandat any point in the document. so if each chapter wants its own path, just define it at the start of each chapter. – David Carlisle Oct 19 '19 at 22:03