MathJax not rendering some equations properly on Github pages

陌路散爱 提交于 2019-11-28 06:02:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!