#This command compiles the document and will stop at any point do to error.
#This version just does a light compile, in the sense that asymptote figures
# are not compiled.  Otherwise all other auxilliary files are removed.
#Put the document name here.
DOCUMENT_BASENAME="calculus_I"
#First remove any old tex-generated files as these can get messed up.  See
#the cleanl.sh script for what gets deleted.
./cleanl.sh
#Now run pdflatex (three times).
if pdflatex $DOCUMENT_BASENAME.tex ; then
    if pdflatex $DOCUMENT_BASENAME.tex ; then
	pdflatex $DOCUMENT_BASENAME.tex
    fi
fi