[SOLVED] Math Equation Not Rendered Despite _config.yml is Properly Set

I have set use_math = true in my _config.yml, but I still can’t render math equation in my blog-post.

The strange thing is it can be rendered as I view it in my VS code IDE (as shown below):
link

However, when I pushed the markdown script to the blog website, the math equation failed to be rendered (as shown below):
link

Any fellow know how to fix this?

I finally solved the issue. It causes by the fact that the subscript notation (i.e. “_”)is not properly protected, as a result, the subscript notation is mistakenly converted to “<em>” when rendering into html.
Add a “\” in front of every subscript notation (as a means of protection) could solve the problem.
e.g.

# subscript is not protected
to calculate $p(X_t = 100)$, we do X, Y and Z.

# subscript is protected
to calculate $p(X\_t = 100)$, we do X, Y and Z.
1 Like