The SimpleMathJax extension enables MathJax, a JavaScript library, for typesetting TeX formula in MediaWiki inside math environments. This extension will load resources from cdn.jsdelivr.net
on all wiki pages that have math or chem tags.
SimpleMathJax
in your extensions/
folder.wfLoadExtension( 'SimpleMathJax' );
Or you can git clone.
$ git clone --depth 1 https://github.com/jmnote/SimpleMathJax.git
If you want to use local MathJax scripts (and not a CDN), then you can use git clone recursive. In most cases, CDN is much faster than your server. However, a CDN may not be available if you have a hardened PHP installation due to disabled_functions
restrictions.
$ git clone --depth 1 --recursive --shallow-submodules https://github.com/jmnote/SimpleMathJax.git
SimpleMathJax is meant to be used as an alternative to the Math extension. If the Math extension is installed it may take precedence and cause SimpleMathJax to not work. The SimpleMathJax extension is the only thing you need to start rendering equations.
The following variables can be defined in your "LocalSettings.php" file after calling wfLoadExtension( 'SimpleMathJax' );
. Note that for a simple site adding $wgSmjScale = 1.1;
might be all you need to make it Just Work™.
true
Using CDN or Local resource 0.7.0+ $wgSmjUseChem true
enable <chem>
tags
true
Make MathJax context menu available
[]
can add some additional inlineMath symbols pairs 0.8.1+ $wgSmjScale 1
The default font size for SimpleMathJax 0.7.4 $wgSmjShowMathMenu false (removed)
If you want to change font size, set $wgSmjScale
like below.
wfLoadExtension( 'SimpleMathJax' ); $wgSmjScale = 1.5;
If you want to enable some additional inlineMath symbol pairs, set $wgSmjExtraInlineMath
like below.
wfLoadExtension( 'SimpleMathJax' ); $wgSmjExtraInlineMath = [ [ "$", "$" ], [ "\\(", "\\)" ] ];
If you want to use local module, set $wgSmjUseCdn
like below.
wfLoadExtension( 'SimpleMathJax' ); $wgSmjUseCdn = false;
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4