A neutron diffraction study of hydrogen bonding in isostructural potassium and ammonium lanthanoidates