I've hacked the phpwiki code to add a new namespace [[math: ]] so you can write formulas like [[math:a^2+b^2=c^2]] or [[math:\sum_{n=0}^{\infty}\frac{1}{n}=\infty]].
The code will make TeX create an image (PNG) of the formula. Those images will be cached, they will be created only once and will be shared between articles. ( [[math:E=m c^2]] might be used on many pages ).
That's almost exactly what I had in mind; only I think it would be better for the back end to have to have a spearate process communicating with the Wiki code over IPC--the "TeX server"-- which will take formulas and return images, out of a cache if they've been rendered already, calling TeX to render them if needed. The cache will be indexed by a hash function on a canonicalized text of the expression.
The wiki end of this won't be hard. The other server is the real work. I'm afraid I can't take on that project right now, but if that server gets built, I'll be happy to call it.
wikipedia-l@lists.wikimedia.org