Graphics, Figures & TablesPrint all Images of a Directory

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
newbiebcn
Posts: 1
Joined: Wed Sep 04, 2013 5:01 pm

Print all Images of a Directory

Post by newbiebcn »

Hi all,

Sorry if the question seems basic, but I have little (and less) experience in LaTeX and I've been struggling to find a simple solution to my problem, and I failed. I want to use PDFLaTeX to print some tables and images into a PDF file.

For each project that want to use it for, I have a directory with JPG files, say "figure_2345.jpg", "figure_8564.jpg" etc. but the number of files vary and there can be many, so I'd rather automate it.

How can I tell \includegraphics to print all the files found with a ".jpg" extension within that directory? Is there a simple way to do this? Something like \includegraphics{*.jpg} (which obviously doesn't work)

Thanks a lot!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Print all Images of a Directory

Post by cgnieder »

Hi newbiebcn,

Welcome to the LaTeX community!

I think the question How to iterate through the name of files in a folder over on TeX.sx might be of interest for you.

Regards
site moderator & package author
Post Reply