-
可以使用以下两种
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
<script type="text/javascript" src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML'></script>
更多细节可以查看MathJax在web平台使用
-
不知为何不能实时预览,但是可以F6在浏览器预览,确实正确显示了。
-
在github下载MathJax,可以离线使用MathJax,但是用绝对路径引用js时加载失败。在控制台查看,会出现如下:
指向“d:\software\MathJax\MathJax.js?config=TeX-MML-AM_CHTML-full”的 <script> 加载失败
这时需要加上协议名file
<script type="text/javascript" src="file:\\\D:\software\MathJax\MathJax.js?config=TeX-MML-AM_CHTML-full"></script>
-
使用MathJax行内公式是\\(\\),而不是$$,可以修改过来,如下
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ extensions: ["tex2jax.js"], jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { fonts: ["TeX"] } }); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
-
csdn支持latex公式,例子:
When $( a \ne 0 )$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are: $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ $$ \begin{aligned} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{aligned} $$
When
(
a
≠
0
)
( a \ne 0 )
(a̸=0), there are two solutions to
(
a
x
2
+
b
x
+
c
=
0
)
(ax^2 + bx + c = 0)
(ax2+bx+c=0) and they are:
x
=
−
b
±
b
2
−
4
a
c
2
a
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
x=2a−b±b2−4ac
x ˙ = σ ( y − x ) y ˙ = ρ x − y − x z z ˙ = − β z + x y \begin{aligned} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{aligned} x˙y˙z˙=σ(y−x)=ρx−y−xz=−βz+xy