Ba3LnInS6 (Ln = Pr, Sm, Gd, Yb) and Ba2LnGaS5 (Ln = Pr, Nd): syntheses, structures, and magnetic and optical properties.