Theory of the magnetic properties of the ilmenites MTiO3