MathJax在blog上的应用
MathJax在blog上的应用

Directory


之前就很羡慕别人用Mathjax写公式,好看又方便。

今天研究了一下Mathjax官方提供的文档,如果只是自己简单的使用就很简单

To use MathJax from our server, you need to do two things:

  • Link to MathJax in the web pages that are to include mathematics.
  • Put mathematics into your web pages so that MathJax can display it.

在layouts中的head.html的header中添加

<script type="text/javascript" async
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>

使用时就用latex格式的公式,前后记得$,比如 $$\hat{y} = h_\theta(x) = \theta_0 + \theta_1 x$$

$\hat{y} = h_\theta(x) = \theta_0 + \theta_1 x​$​

上一篇   Andrew Ng 的 机器学习课程

下一篇   来悉尼一个月了