Added flip and latex handlers