问题
I've configured Mathjax on my Github pages site and it can render some equations properly but not others.
It can render properly the following equations:
\\[ \frac{1}{n^{2}} \\]
\\[ J(\theta) = \frac{1}{2m}[\sum_{i=1}^m(h_\theta (x^{(i)}) - y^{(i)})^2 + \lambda\sum_{j=1}^n\theta^2_j] \\]
But it can't render equations like below:
\\[ F'(\theta_*)=\lim\limits_{\theta\to\theta_*}\frac{F(\theta)-F(\theta_*)}{\theta-\theta_*} \\]
Can someone please see where the problem might be?
回答1:
You should try to post or link to some HTML output but usually this is due to markdown converting the underscores into <em>
tags which in turn makes MathJax skip an equation (cf. the MathJax docs).
Kramdown (used on GitHub-pages) has special support for $$ to delimit both inline and block equations, which will prevent this kind of interaction, cf. the kramdown docs)
来源:https://stackoverflow.com/questions/43463849/mathjax-not-rendering-some-equations-properly-on-github-pages