I am working on a collection of books that uses content from other files. I want to have each reference in a file to avoid redundant content and to make it easier to review and correct the content.
Let me explain, I have created a file for each reference number, for example:
CEC/n/0001.tex
CEC/n/0002.tex
CEC/n/0003.tex
CEC/n/0004.tex
CEC/n/0005.tex
CEC/n/0006.tex
CEC/n/0007.tex
....
CEC/n/9999.tex
Suppose in a part of one of my books I need to include the numbers 1 to 5, the number 22 and the number 17. I am currently doing the following, which works:
\input{../../CEC/n/0001}
\input{../../CEC/n/0002}
\input{../../CEC/n/0003}
\input{../../CEC/n/0004}
\input{../../CEC/n/0005}
\input{../../CEC/n/0022}
\input{../../CEC/n/0017}
Is there a way to simplify it?
My idea is to be able to receive an array of numbers [1,2,3,4,5,22,17] or [1 to 5 AND 22 AND 17] and use it to include each of those files by their names? I need to include many reference combinations like above in different parts of my volumes and I want to simplify this task.
I'm sorry I can't create a minimal, verifiable example due to file inclusion.
