3

If I do pdflatex *.tex in a directory, only one tex file is compiled. Which syntax should I use that all *.tex files in the directory are compiled?

7

try

for file in *.tex; do pdflatex "$file"; done
6

pdflatex apparently only takes one argument. I can think of using find -exec

find -name '*.tex' -maxdepth 1 -exec pdflatex {} \;

But there may be better alternatives.

1

Less typing, if no spaces in files:

 echo *.tex|xargs -n1 pdflatex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.