Clean up tex file