Observational and theoretical spectra of supernovae