# Riemann-Roch theorem for singular curves

It might be a naive question, but I just realized I had not thought about this before. If $C$ is a smooth curve, for any line bundle $D$ we have the Riemann-Roch formula: $$\chi(D)=\deg D+1-g(C).$$ Does this nicely extend also to singular curves as $\chi(D)=\deg D+1-p_a(C)$ ?

(if yes, is it an easy consequence of the smooth case?)

• One source is in the exercises to Hartshorne IV.1. Mar 3 '14 at 19:01
• @Andrew: You could turn this into an answer by adding the content of the exercise. Mar 3 '14 at 22:16