MediaWiki Extension SimpleMathJax
转到文件
jmnote 8b02deeb0b bug fix ("tfrac", "sometimes not appear") 2018-04-01 12:37:28 +00:00
modules bug fix ("tfrac", "sometimes not appear") 2018-04-01 12:37:28 +00:00
.gitmodules submodule 2017-12-28 22:20:14 +09:00
README.md Update README.md 2017-12-29 00:17:08 +09:00
SimpleMathJax.php wfLoadExtension 2017-06-12 02:11:02 +09:00
SimpleMathJax_body.php "not rendering sometimes" bug fix 2018-03-26 23:31:04 +09:00
extension.json bug fix ("tfrac", "sometimes not appear") 2018-04-01 12:37:28 +00: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 in extensions directory
  • Using CDN is recommended. Because it's much faster than using local resources in most cases. MathJax is pretty heavy.
$ git clone https://github.com/jmnote/SimpleMathJax.git
  • (Optional) If you want to use not CDN but local mathjax scripts, you can use git clone recursive.
$ 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 = [["$","$"],["\\(","\\)"]];