Crystal structures and stability of NaLnF4 (Ln = La, Ce, Pr, Nd, Sm and Gd) studied with synchrotron single-crystal and powder diffraction.