LaTeX gen working without error; still produces crappy PDF