Can someone explain to me why LaTex is ignoring some of my dollar signs in <a href="http://mathoverflow.net/questions/63519/coefficients-in-cohomology/63539#63539">this answer</a>?
The problem was cropping up in several places; I managed to solve most of with small edits, though I have no idea why those edits worked. One remains unresolved.
I am not sure this will resolve your issue, but it might. For certain, and I believe in particular if sub and/or superscripts are used, tex-commands it is needed to place them into back-ticks like this `$ a_b^2 $` (at the start and the end the same ` and not ' ).
The rough reason is, and I do not know the precise one, that two programs try to process the source and one needs to prevent one of them with the ticks to 'destroy' the tex.