  We present a theoretical study of temporal, spectral, and spatial reshaping
of intense, ultrafast x-ray pulses propagating through a resonant medium. Our
calculations are based on the solution of a 3D time-dependent
Schr\"odinger-Maxwell equation, with the incident x-ray photon energy on
resonance with the core-level 1s-3p transition in neon. We study the evolution
of the combined incident and medium-generated field, including the effects of
stimulated emission, absorption, ionization and Auger decay, as a function of
the input pulse energy and duration. We find that stimulated Raman scattering
between core-excited states $1s^{-1}3p$ and $2p^{-1}3p$ occurs at high x-ray
intensity, and that the emission around this frequency is strongly enhanced
when also including the similar $1s^{-1}-2p^{-1}$ response of the ion. We also
explore the dependence of x-ray self-induced transparency (SIT) and
self-focusing on the pulse intensity and duration, and we find that the
stimulated Raman scattering plays an important role in both effects. Finally,
we discuss how these nonlinear effects may potentially be exploited as control
parameters for pulse properties of x-ray free-electron laser sources.
