markdownPad2顯示數學公式,使用MathJax
阿新 • • 發佈:2019-01-04
2.但是按照參考部落格卻無法顯示數學公式。
3.原因查明是
<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>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS-MML_CHTML"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=TeX-AMS-MML_CHTML"></script>
4.不知為何不能實時預覽,但是可以F6在瀏覽器預覽,確實正確顯示了。
5.在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>
6.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 , there are two solutions to and they are: