I have a lot of files named by date, e.g., 20151118.tex
, 20151117.tex
, 20151116.tex
, etc. These in a directory separated by month and year (2015/11/20151118.tex
).
I would like to input these files without having to have to have the following in my main file:
.
.
\input{2015/11/20151117}
\input{2015/11/20151118}
Is there a way to do this with LaTeX. I would like a clean way to do this, if at all possible.
ls
andsed
:ls -R -1 */*/*.tex > filelist.dat
, thensed -i 's/^/\\input /' filelist.dat
. This lists all.tex
files with their paths and prints them to the filefilelist.dat
; thensed
adds\input
to each line. Simply take the list and include it in your main.tex
file. You could also "do" that in the actual.tex
file if you wanted, but I'm not sure I see the advantage....