Thursday, June 14, 2007

eps2latex

quick and dirty bash script to create a latex document from a bunch of eps files.

#!/bin/bash

echo "\documentclass{article}"
echo "\usepackage{graphicx}"
echo "\begin{document}"

for file in $1/*.eps
do
echo "\begin{center}"
echo "\begin{minipage}{\textwidth}"
echo "\includegraphics{$file}"
echo "\end{minipage}"
echo "\end{center}"
echo "{\footnotesize $file}"
done

echo "\end{document}"

No comments: