#!/usr/bin/perl $fname = shift @ARGV; open(fi,"<$fname"); @text = ; close fi; # First, the header of the latex print(" \\documentclass{article} \\usepackage{graphicx} \\usepackage{fullpage} \\begin{document} "); while (@text) { $imfile = shift @text; chop($imfile); print(" \\section{$imfile} \\begin{figure}[!hbp] \\centerline{\\includegraphics[width=9cm, height=9cm]{ims/$imfile"."_gd.png}} \\end{figure} \\begin{figure}[!hbp] \\centerline{\\includegraphics[width=12cm, height=9cm]{$imfile"."mfm.png}} \\end{figure} \\newpage \n"); } # And now the tail print(" \\end{document} \n");