Add command to generate jpg file from tex
Fix calculations for prob1.1