Commit 1d87b090 authored by Jaime Arias's avatar Jaime Arias
Browse files

add script to generate figures

parent 5d226d8c
#!/usr/bin/env bash
function tex-pdf {
pdflatex -halt-on-error -interaction=nonstopmode $1 > $1.txt
grep '^!.*' --color=always $1.txt
rm $1.txt
TEX_FILE=`find . -type f \( -iname "*.tex" ! -iname "base.tex" \)`;
for path in $TEX_FILE; do
folder=`dirname $path`;
filename=`basename $path .tex`;
echo 'Processing ' $path;
(cd $folder; tex-pdf "$filename.tex" && pdftoppm -png "$filename.pdf" "$filename" && if [[ $(ls $filename*.png | wc -l) -eq 1 ]]; then mv "$filename-1.png" "$filename.png"; fi);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment