Reformat LaTeX documents suitable for version control