Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
679 views
in Technique[技术] by (71.8m points)

latex - MathJax not rendering some equations properly on Github pages

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(heta) = frac{1}{2m}[sum_{i=1}^m(h_heta (x^{(i)}) - y^{(i)})^2 + lambdasum_{j=1}^nheta^2_j] \]

But it can't render equations like below:

\[ F'(heta_*)=limlimits_{hetaoheta_*}frac{F(heta)-F(heta_*)}{heta-heta_*} \]

Can someone please see where the problem might be?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...