Consider a gas cloud under LTE with temperatur T and thickness D, that produces both line and continuum emission. Find the emission spectrum for small and for large optical depth.
Now assume a star with T*>>T sits behind the gas cloud. Again, estimate the spectrum for both optically thick and thin conditions.