GeneralScript to Create Latex Document from Folder of Images

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
cakemonsterkite
Posts: 1
Joined: Tue Sep 23, 2008 6:31 am

Script to Create Latex Document from Folder of Images

Post by cakemonsterkite »

Hello,

I am a mediocre programmer and beginner to latex.

I would like to take a folder of png or jpeg images and put them into a latex document in a templated way such that they are all aligned and templated in a standard format, with the goal of eventually creating a PDF. I would like to do this with several folders of images repeatedly to display and distribute data, so a script would be helpful.

Can you suggest any resources for this task or does anyone have such a script? I am running ubuntu linux 64 bit.

Thank You,

Matt

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
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

Script to Create Latex Document from Folder of Images

Post by T3. »

I don't know of any specific packages for that purpose. As a bare bones solution you could write a macro that will be used as a template for a single image:

Code: Select all

\newcommand\imagetempl[1]{
% some formating code here
\includegraphics{#1}
% some formating code there}
Use a script to generate a file from the directory listing in the format:

Code: Select all

\imagetempl{imagefile1}
\imagetempl{imagefile2}
...
\imagetempl{imagefileN}
Finally \input this file into your document.

The scripting part will most likely require only a few lines of code, but unfortunately I don't know Linux well enough to help out you with this.

Cheers,

Tomek
Post Reply