想要把MathJax加入到網頁中,只要在<head>裡面加入一行
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML' async></script>
然後在html裡面直接貼上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}.$$
會顯示為
When a≠0, there are two solutions to ax2+bx+c=0 and they are x=−b±√b2−4ac2a.
沒有留言:
張貼留言