MediaWiki Extension SimpleMathJax
转到文件
Jmnote 6a81a07212
0.7.0
2017-12-28 22:42:27 +09:00
modules 0.7.0 2017-12-28 22:07:42 +09:00
.gitmodules submodule 2017-12-28 22:20:14 +09:00
README.md 0.7.0 2017-12-28 22:42:27 +09:00
SimpleMathJax.php wfLoadExtension 2017-06-12 02:11:02 +09:00
SimpleMathJax_body.php 0.7.0 2017-12-28 22:07:42 +09:00
extension.json 0.7.0 2017-12-28 22:07:42 +09:00

README.md

The SimpleMathJax extension enables MathJax, a Javascript library, for typesetting TeX formula in MediaWiki inside math environments.

https://www.mediawiki.org/wiki/Extension:SimpleMathJax

Installation

  • git clone recursive in extensions directory
$ git clone --recursive https://github.com/jmnote/SimpleMathJax.git
  • If you want to use not CDN but local mathjax scripts, you can use git clone recursive. ( MathJax is pretty heavy. )
$ git clone --recursive https://github.com/jmnote/SimpleMathJax.git
  • LocalSetting.php
wfLoadExtension( 'SimpleMathJax' );

Optional Settings

Setting name Default value Description
$wgSmjSize 110 font size
$wgSmjUseCDN true use CDN or local scripts
$wgSmjUseChem true enable chem tag
$wgSmjInlineMath [] add some additional inlineMath symbols pairs

If you want to change font size, set $wgSmjSize.

wfLoadExtension( 'SimpleMathJax' );
$wgSmjSize = 150;

If you want to use local module, set $wgSmjUseCDN.

wfLoadExtension( 'SimpleMathJax' );
$wgSmjUseCDN = false;

If you want to enable some additional inlineMath symbol pairs, set $wgSmjInlineMath.

wfLoadExtension( 'SimpleMathJax' );
$wgSmjInlineMath = [["$","$"],["\\(","\\)"]];