“如何启用扩展”的版本间差异

来自Shiyin's note
跳到导航 跳到搜索
(以“*以启用Math扩展为例,主要参考 [http://www.mediawiki.org/wiki/Extension:Math] #下载Math的扩展到[http://www.mediawiki.org/wiki/Special:ExtensionDist...”为内容创建页面)
 
无编辑摘要
第1行: 第1行:
*以启用Math扩展为例,主要参考 [http://www.mediawiki.org/wiki/Extension:Math]
*以启用Math扩展为例,主要参考 [http://www.mediawiki.org/wiki/Extension:Math]


#下载Math的扩展到[http://www.mediawiki.org/wiki/Special:ExtensionDistributor/Math] extension目录下
;下载Math的扩展到[http://www.mediawiki.org/wiki/Special:ExtensionDistributor/Math] extension目录下
*更改Localsettings.php,增加一行
;更改Localsettings.php,增加一行

require_once "$IP/extensions/Math/Math.php";
require_once "$IP/extensions/Math/Math.php";
#更新wiki程序,在mantiance目录下执行,或者执行http://example.org/w/mw-config/
;更新wiki程序,在mantiance目录下执行,或者执行http://example.org/w/mw-config/
$ php update.php
$ php update.php
#选择一个math的生成方法,以MathJax为例
;选择一个math的生成方法,以MathJax为例
在localsettings.php里增加
<!--T:18-->
;Settings (Math 1.1 // MW 1.19 - 1.22)
</translate>


mediawiki[版本:Special:version](1.19 - 1.22)
<syntaxhighlight lang="php" enclose="div" style="overflow:auto;">
$wgUseMathJax = true; // enabeling MathJax as rendering option
$wgUseMathJax = true; // enabeling MathJax as rendering option
$wgDefaultUserOptions['math'] = MW_MATH_MATHJAX; // setting MathJax as default rendering option (optional)
$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'
* 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
* 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:
* replace the below url with something like:
* $wgMathJaxUrl = '/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
* $wgMathJaxUrl = '/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
*/
*/
mediawiki[版本:Special:version](1.23+)
$wgMathJaxUrl = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML';
</syntaxhighlight>
<translate>
<!--T:19-->
;Settings (Math 1.2 // MW 1.23+)
;Settings (Math 1.2 // MW 1.23+)
$wgUseMathJax = true; // enabeling MathJax as rendering option
</translate>
$wgDefaultUserOptions['mathJax'] = true; // setting MathJax as default rendering option (optional)

$wgMathDisableTexFilter = true; // or compile "texvccheck"
<syntaxhighlight lang="php" enclose="div" style="overflow:auto;">
$wgUseMathJax = true; // enabeling MathJax as rendering option
$wgDefaultUserOptions['mathJax'] = true; // setting MathJax as default rendering option (optional)
$wgMathDisableTexFilter = true; // or compile "texvccheck"
</syntaxhighlight>
<translate>
<!--T:20-->
See also [[<tvar|ext-MathJaxMenu>Special:MyLanguage/Extension:Math/MathJaxMenu</>|How to modify the MathJax contextual menu.]]

2014年10月11日 (六) 04:51的版本

  • 以启用Math扩展为例,主要参考 [1]
下载Math的扩展到[2] extension目录下
更改Localsettings.php,增加一行
require_once "$IP/extensions/Math/Math.php";
更新wiki程序,在mantiance目录下执行,或者执行http
//example.org/w/mw-config/
$ php update.php
选择一个math的生成方法,以MathJax为例
在localsettings.php里增加

mediawiki[版本:Special:version](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[版本:Special:version](1.23+)

Settings (Math 1.2 // MW 1.23+)
$wgUseMathJax = true; // enabeling MathJax as rendering option
$wgDefaultUserOptions['mathJax'] = true; // setting MathJax as default rendering option (optional)
$wgMathDisableTexFilter = true; // or compile "texvccheck"