Fix latex errors about newlines