I would like to \input
all tex-files in a certain directory starting with "prefix", in alphabetical order.
Something like \input{prefix*tex}
would be nice, but it doesn't work.
Is there some workaround?
input
I would like to \input
all tex-files in a certain directory starting with "prefix", in alphabetical order.
Something like \input{prefix*tex}
would be nice, but it doesn't work.
Is there some workaround?
Best Answer
I would use your operating system, so for exanple
will make a file
list-prefix.tex
with one\input{..}
per line, for each file matchingprefix*.tex
.will input all the files if
main.tex
has\input{list-prefix}
at some point.If you only need to input (and never add headings etc, and want to avoid making a temporary file, you can use
but then you have to process your
main.tex
withpdflatex --shell-escape
or equivalent.I've used unix shell commands here but the same works on windows if you substitute the appropriate commands (or use bash on windows, which is what I do personally)