Line shape calculation for nuclear scattering from gaseous targets