Resonant photoelectron spectra of Gd compounds