MediaWiki Extension SimpleMathJax
转到文件
Jmnote abe7f68964
Update extension.json
2020-10-19 21:07:30 +09:00
resources add macros to support mediawiki-texvc 2020-10-19 21:04:36 +09:00
.gitmodules . 2020-10-19 03:45:43 +09:00
README.md Update README.md 2020-10-19 05:12:05 +09:00
SimpleMathJax.php wfLoadExtension 2017-06-12 02:11:02 +09:00
SimpleMathJax_body.php wgSmjDisplayAlign 2020-10-19 05:10:34 +09:00
extension.json Update extension.json 2020-10-19 21:07:30 +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 in extensions directory
  • Using CDN is recommended. Because it's much faster than using local resources in most cases. ("the benefits of using a CDN")
$ 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
$wgSmjUseCdn true use CDN or local scripts
$wgSmjUseChem true enable chem tag
$wgSmjEnableMenu true MathJax.options.enableMenu
$wgSmjDisplayMath [] MathJax.tex.displayMath
$wgSmjExtraInlineMath [] MathJax.tex.inlineMath
$wgSmjScale 1 MathJax.chtml.scale
$wgSmjDisplayAlign center MathJax.chtml.displayAlign

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

wfLoadExtension( 'SimpleMathJax' );
$wgSmjScale = 1.5;

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

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

If you want to enable some extra inlineMath symbol pairs, set $wgSmjExtraInlineMath.

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

If you want to disable MathJax context menu, set $wgSmjShowMathMenu.

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