We present a theory of nuclear magnetic resonance shielding tensors for electronic states with arbitrary degeneracy. The shieldings are here expressed in terms of generalized Zeeman (g((k))) and hyperfine (A((k))) tensors, of all ranks k allowed by the size of degeneracy. Contrary to recent proposals [T. O. Pennanen and J. Vaara, Phys. Rev. Lett. 100, 133002 (2008)], our theory is valid in the strong spin-orbit coupling limit. Ab initio calculations for the fourfold degenerate Γ(8) ground state of lanthanide-doped fluorite crystals CaF(2):Ln (Ln=Pr(2+), Nd(3+), Sm(3+), and Dy(3+)) show that previously neglected contributions can account for more than 50% of the paramagnetic shift.