<p>I think this is a bug.</p>

<p>One work-around (which applies only to code not broken across lines) is to include an end-of-line comment containing an additional dollar sign: they cancel each other in pairs.</p>

<p>E.g., </p>



<pre><code>pca &lt;- prcomp(matrix(rnorm(10*10), ncol=10))
pca$x                                   # This dollar sign works around the mathjax bug: $
pca$rotation
</code></pre>
