OK, I got it to work. It took me a while to figure out the right directory settings and permissions. Please make sure to have this configurable in LocalSettings.php and passed to texvc from OutputPage.php.
Is it possible to generate transparent PNGs? That would look a lot nicer.
One major problem is that it doesn't match <math></math> pairs with linebreaks within them. I don't know why, I thought all the preg_ functions would treat the string as a single line.
Otherwise, good work. Let us know when you think it's ready.
Regards,
Erik