用html标签直接引入Mahtjax公式

直接引入<head><body>标签即可,注意math区块需要替换成2个$

<head>
  <link rel="stylesheet" type="text/css" href="./test.css" />

  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
  </script>

  <script type="text/javascript"
    src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
  </script>
</head>

<body>
  <p>
    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}.$$
  </p>
</body>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。