all: \
propositions-2018.pdf \

propositions-2018.pdf: master.pdf
	cp $< $@

%.pdf: %.tex ../preamble/preamble.tex
	latex_count=5 ; \
	jobname=$(basename $@) ;\
	pdflatex -jobname="$$jobname" $< ;\
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $$jobname.log && [ $$latex_count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex $<;  latex_count=`expr $$latex_count - 1`; done

clean:
	rm -fr  *.aux *.bbl *.dvi *.log *.nav *.out *.snm *.toc *~
	rm -fr master.pdf