fix makefile to run latex the right number of times