#!/bin/bash echo "tex2pdf called with $1.tex">~/.tex2pdf.log echo "#####################################################">>~/.tex2pdf.log echo "################## pdflatex, run #1 #################">>~/.tex2pdf.log echo "#####################################################">>~/.tex2pdf.log pdflatex -interaction=nonstopmode $1.tex>>~/.tex2pdf.log echo "bibtex:">>~/.tex2pdf.log bibtex $1.aux>>~/.tex2pdf.log echo "#####################################################">>~/.tex2pdf.log echo "################## pdflatex, run #2 #################">>~/.tex2pdf.log echo "#####################################################">>~/.tex2pdf.log pdflatex -interaction=nonstopmode $1.tex>>~/.tex2pdf.log echo "#####################################################">>~/.tex2pdf.log echo "################## pdflatex, run #3 #################">>~/.tex2pdf.log echo "#####################################################">>~/.tex2pdf.log pdflatex -interaction=nonstopmode $1.tex>>~/.tex2pdf.log echo "#####################################################">>~/.tex2pdf.log echo "Launching evince with $1.pdf.">>~/.tex2pdf.log evince $1.pdf & echo "#####################################################">>~/.tex2pdf.log echo "Removing aux,bbl,blg,dvi,lof,log,lot,nav,out,snm,toc.">>~/.tex2pdf.log echo "Current directory: $(pwd) and children of depth 1.">>~/.log/tex2pdf.log rm -f $1.{aux,bbl,blg,dvi,lof,log,lot,nav,out,snm,toc} rm -f */*.{aux,bbl,blg,dvi,lof,log,lot,nav,out,snm,toc}