Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.33 KB

File metadata and controls

36 lines (27 loc) · 1.33 KB

MathJax

在GitHub上渲染数学公式

崔博想在GitHub显示公式,只看GFM(Github Flavored Markdown)规范,貌似不支持处理公式,于是觉得直接引用MathJax就可以在GitHub上渲染出效果来了,结果是不行的。

不过发现CodeCogs里有工具可以用来专门做这件事情;

参考文档

MathJax web page

  • /var/www/html/index.html
    <html>
      <head>
        <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
        </script>
      </head>
      <body>
        When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are <br />
        $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
      </body>
    </html>
  • images/MathJax.png

GitHub