I want to automate the process of inputting tex files from subfolders. Previously I managed to automate the inclusion of images from "images" subfolder within the subfolder of each subfile. I would like to do the same for tex files. Please have a look at: Is it possible to use includegraphics with relative path with subfolder, inside subfiles?
Now I want to add a modifier, so that
%subfolder1/subfile1.tex
\input{fig1.tex}
would add subfolder1/fig1.tex
in the file, while
%subfolder2/subfile1.tex
\input{fig1.tex}
would add subfolder2/fig1.tex
to my file.
\subinput{}
to use in an analogous way?\edef\CurrentFileDir{\currfiledir}
and\renewcommand{\myimagedir}{\CurrentFileDir images/}
.\input{\myimagedir fig_matlab_sinemodulation}
seems to work. Is there any easier way to do it?\subinput{fig_matlab_sinemodulation}
- a wrapper around\input{}
, in other words.\graphicspath{}
is not considered good practice, by the way. That said, bad practice works well for me since I use it all the time.