Crystal-chemical aspects of phase transitions in barium titanate