github-mathjax icon indicating copy to clipboard operation
github-mathjax copied to clipboard

Many formulas are not rendered

Open scruel opened this issue 8 years ago • 2 comments

$$J(\theta_0, \theta_1) = \dfrac {1}{2m} \displaystyle \sum {i=1}^m \left ( \hat{y}{i}- y_{i} \right)^2 = \dfrac {1}{2m} \displaystyle \sum {i=1}^m \left (h\theta (x_{i}) - y_{i} \right)^2$$

This formula could not be rendered in the following link, and there are much more formulas could not be rendered like this, although it can be rendered in this issue post. https://github.com/scruel/ML-AndrewNg-Notes/blob/master/notes/week1.md#22-%E6%8D%9F%E5%A4%B1%E5%87%BD%E6%95%B0cost-function

snipaste20180107_200058

$ h_\theta(x) \geqslant 0.5 $ shows error "Undefined control sequence \geqslant"

scruel avatar Jan 07 '18 11:01 scruel

\geqslant is defined by MathJax extension AMSsymbol [1], and it can be loaded by [2]

TeX: {
  extensions: ["AMSmath.js", "AMSsymbols.js"]
}

However, github-mathjax does not load any MathJax TeX extensions. Hence \geqslant is undefined. https://github.com/orsharir/github-mathjax/blob/d73c97dd2643d53e6b0bde3a721eb13913b64524/mathjax_config.js#L11

[1] http://docs.mathjax.org/en/latest/tex.html#g [2] MathJax doc - How to load extension AMSsymbol

muzimuzhi avatar Mar 11 '19 08:03 muzimuzhi

@muzimuzhi Thanks! This works for me.

xwang233 avatar Oct 24 '19 23:10 xwang233