  The theoretical calculation of the interaction of electromagnetic radiation
with matter remains a challenging problem for contemporary $ab$ $initio$
electronic structure methods, in particular for x-ray spectroscopies. This is
not only due to the strong interaction between the core-hole and the
photo-excited electron, but also due to the elusive multiplet effects that
arise from the Coulomb interaction among the valence electrons. In this work we
report a method based on density-functional theory in conjunction with
multiplet ligand-field theory to investigate various core-level spectroscopies,
in particular x-ray absorption spectroscopy (XAS) and x-ray magnetic circular
dichroism (XMCD). The developed computational scheme is applied to the
$L_{2,3}$ XAS edges of magnetite (Fe$_3$O$_4$) as well as cobalt ferrite
(CoFe$_2$O$_4$) and nickel ferrite (NiFe$_2$O$_4$) and the corresponding XMCD
spectra. The results are in overall good agreement with experimental
observations, both regarding the XAS $L_2$/$L_3$ branching ratio, the peak
positions as well as the relative intensities. The agreement between theory and
experiment is equally good for XAS and the XMCD spectra, for all studied
systems. The results are analyzed in terms of $e_g$ and $t_{2g}$ orbitals
contributions and the importance of optimizing the Slater parameters. The
analysis also highlights the strong effect of the $2p$-$3d$ interaction in
x-ray spectroscopy.
