Made it easier to change the header and footer of generated TeX files; introduced new convention for _partial.tex files.