I have a data base of questions (simply individual .tex-files) and include some of them in a main file with the help of simple \input commands, in order to create an exercise. Some of those question files contain an itemize environment with several \item corresponding to different sub-questions. My goal would be to select some of those items (similarly as already explained here), but directly from the main file.
The structure of the main file basically looks like
\begin{document}
\begin{list}
\input question_file_1
\input question_file_2
\input question_file_3
\end{list}
\end{document}
And a question file can be given by
\citem{Title of the question}%\citem is just a redefinition of an \item}
Some text at the beginning
\begin{itemize}
\item first sub-question
\item second sub-question
\item third sub-question
\end{itemize}
Sometimes some text in the end
So now, I would like to be able to write (in the main file) something like, for instance:
\begin{document}
\begin{list}
\input{path of file 1}{1,3} %would display the first question, but only the sub-questions 1 and 3
\input{path of file 2} %would display the whole second question
\end{list}
\end{document}
I wonder if there is a way to overload my \input command (or define a similar one), so that it would do the job.