It seems like \\
doesn't work correctly here, and I need \newline
instead:
$$ \vec{\nabla} \times \vec{A}(\,\vec{r}) = \begin{cases} B_0\hat{z} && \text{if $\vec{r} \in$ some cylinder} \ \vec{0} && \text{ otherwise} \end{cases} $$
Davide Cervone has generously created an improved parser for us that makes the separation of Markdown and MathJax much more reliable. So far, it's only running client-side, i.e. it's used in the preview, but not in the final rendered version.
A side effect of your bug report is that you've proven that the new parser is indeed better – it handles your case, while the old one doesn't.
Either way, we've now ported the parser to also work during the final rendering of the post on the server. This will be enabled in the next build of the site (probably within the next 24 hours; likely less), after which the behaviors should be identical again.
\begin{equation}E=mc^2\end{equation}
produces \begin{equation}E=mc^2\end{equation} even though there are not dollars in this comment anywhere.
$\endgroup$
Apr 13, 2012 at 13:08
\text{if } \vec{r} \text{ lies in some cylinder}
instead of\text{if $\vec{r}$ lies in some cylinder}
. Note that adding spaces at the beginning and end of the\text
environment (whenever appropriate) also results in the correct spacing. $\endgroup$