I never thought about LaTeX but it is actually a good idea. Here is a quick 
hack with perl.

Just run the script with the jpg or png files on the commandline. Like this:

script.pl /path/to/pictures/*.jpg > album.tex && pdflatex album.tex

The output is album.pdf.

Matthias

--------------------------
#!/usr/bin/perl

# title on first page
my $title="test album";

# pictures per line
my $thumbs_per_line=4;
my $w = 1/$thumbs_per_line-0.01;

my $preamble="\\documentclass[a4paper,10pt]{article}
\\usepackage{graphicx}
\\pagestyle{empty}
\\parindent0pt
\\usepackage{geometry}
\\geometry{a4paper,left=5mm,right=5mm, top=5mm, bottom=5mm} 
\\begin{document}
{\\Large\\bfseries $title}\n
\\bigskip\\bigskip
";

#################
sub thumbnail {
        my $i = shift;
        my $f     = shift;
        my $label = $f ;

        # remove path from filename
        $label    =~ s#.*/##;
        print "\\begin{minipage}[b]{$w\\textwidth}
\\includegraphics[width=\\textwidth]{$f}\\newline
\\centering{$i: \\verb|$label|}
\\end{minipage}\\quad";
}
###############
# Start
print $preamble;

$i=1;
foreach (@ARGV) {
        thumbnail($i, $_);
        if( $i % $thumbs_per_line == 0 ) { print "\n\\bigskip\n" };
        $i++;
}
# end output
print "\n\\end{document}\n";



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Darktable-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/darktable-users

Reply via email to