一直想要在MarkdownPad中支持数学公式,终于找到了一个方法: 在MarkdownPad中,点击"Tools > Options > Advanced > HTML Head Editor",这个是自定义头文件。添加下列内容: <script type="text/javascript" src="http://cdn./mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> 这样在网页预览(F6),你写的公式就可以显示啦。 当然你也可以下载MathJax到本地,添加本地连接到上面的位置,原理都一样。 示例文件: 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} $$ 效果: 来自:http://ondulado./2013/08/27/mathjax-with-markdownpad-2/ P.S.如果这个链接没法打开,可以用Google翻译,会有缓存效果,嗯 |
|