Add pml control
Add tex generating project to Makefile
fix nan output bugs:initial me and e