Rigorous theory of the diffraction of Gaussian beams by finite gratings: TE polarization.