localsettings.php,如何启用扩展

以启用Math扩展为例,主要参考 [1]

(1)下载Math的扩展到[2] extension目录下

(2)更改Localsettings.php,增加一行

require_once "$IP/extensions/Math/Math.php";

(3)更新wiki程序,在mantiance目录下执行,或者执行http://example.org/w/mw-config/

$ php update.php

(4)Special:version查看Math扩展是否启用

(5)选择一个math的生成方法,以MathJax为例, 在localsettings.php里增加

mediawiki版本(1.19 - 1.22)

$wgUseMathJax = true; // enabeling MathJax as rendering option

$wgDefaultUserOptions['math'] = MW_MATH_MATHJAX; // setting MathJax as default rendering option (optional)

* The default parser for MathJax is 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML'

* If you don't want to or can't use the default and your run your own locally

* replace the below url with something like:

* $wgMathJaxUrl = '/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML';

mediawiki版本(1.23+)

$wgUseMathJax = true; // enabeling MathJax as rendering option

$wgDefaultUserOptions['mathJax'] = true; // setting MathJax as default rendering option (optional)

$wgMathDisableTexFilter = true; // or compile "texvccheck"

(6)测试

E=mc^2

[math]E=mc^2[/math]

注:很多数学网站现在都用的是MathJox

[math]\alpha, \beta , \gamma, \delta,\epsilon , \zeta , \eta , \theta ,\iota, \kappa, \lambda

, \mu, \nu, \xi, \pi,\rho, \sigma, \tau, \upsilon,\phi,\chi,\psi,\omega [/math]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值