Multiplets of transition-metal ions in crystals