MarkdownPad 使用 MathJax


一直想要在MarkdownPad中支持數學公式,終於找到了一個方法:

在MarkdownPad中,點擊"Tools > Options > Advanced > HTML Head Editor",這個是自定義頭文件。添加下列內容:

<script type="text/javascript" src="http://cdn.mathjax.org/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.wordpress.com/2013/08/27/mathjax-with-markdownpad-2/

P.S.如果這個鏈接沒法打開,可以用Google翻譯,會有緩存效果,嗯


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM