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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
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