I want to include snippets (with their images in a dir with the same name as the tex file) from a shared repository in the content
directory. I have defined a command for that:
\newcommand*{\includecontent}[1]{\graphicspath{{./content/#1/}}%
\input{./content/#1}}
My problem: This resets the graphicspath defined in the processed file. Is there
- either a way to add a path to graphicspath without disturbing the existing ones
- or (preferred) to save the current graphicspath before and restore it after the snippet was included
\begingroup\graphicspath{...} \input... \endgroup
jo just add begin/endgroup inside your macro definition