improved support for latex + tmp files