wordpress上安装MathJax

MathJax是什么?

MathJax是一个JavaScript,用于在博客或其他html页面上渲染Latex、MathML的工具,由服务器端提供,可以在网页上显示公式。

1,安装MathJax,需要在本地安装MathJax的Javascript,以及wordpress里面的MathJax插件

MathJax-LaTeX

This plugin enables MathJax (http://www.mathjax.org) functionality for WordPress. Version 1.0 is compatible with MathJax 1.1 and the CDN.

Download Version 1.0

  1. Unzip the downloaded .zip archive to the /wp-content/plugins/ directory
  2. Download the MathJax Javascript library (http://www.mathjax.org/download/)
  3. Place the Javascript library in the mathjax-latex directory (/wp-content/plugins/mathjax-latex/MathJax)
  4. Activate the plugin through the 'Plugins' menu in WordPress
  5. You can configure the plugin to load MathJax from a different URL to the default. See the options page.
  6. Alternatively you can use the MathJax Content Distribution Network (http://www.mathjax.org/docs/1.1/start.html#mathjax-cdn) to deliver the Javascript, just tick the relevant box on the options page.
2,设置MathJax

要支持公式的引用需要修改MathJax的设置,参考http://zhiqiang.org/blog/it/mathjax-make-mathematics-beautiful.html

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        TeX: {equationNumbers: {autoNumber: ["AMS"], useLabelIds: true}},
        "HTML-CSS": {linebreaks: {automatic: true}},
        SVG: {linebreaks: {automatic: true}}
    });
</script>

如何修改,参考http://www.mathjax.org/docs/2.0/platforms/index.html

3,wordpress中使用MathJax

显示效果,可以采用完全Latex的写法写下面的公式 1

\begin{equation}\label{eq1}r = r_F+ \beta (r_M - r_F) + \epsilon\end{equation}

得到:

r=rF+β(rMrF)+ϵ(1)


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值