Extension:TrustedMath

TrustedMath is an extension that allows embedding LaTeX equations on wiki pages, similarly to the built-in math renderer, but without dependency on Ocaml and working almost out of the box on Windows.

Installation

 * Install LaTeX. Windows users may want to install LaTeX using the MiKTeX package
 * Download TrustedMath and unpack it into your extensions folder
 * Add the following line to the bottom of your LocalSettings.php: require_once( "$IP/extensions/TrustedMath/TrustedMath.php" );
 * Tell MediaWiki where the latex and dvipng renderers are located.
 * For Linux those are usually /usr/bin/latex and /usr/bin/dvipng
 * For Windows those are something like C:\Program Files\MiKTeX 2.8\miktex\bin\latex.exe and C:\Program Files\MiKTeX 2.8\miktex\bin\dvipng.exe
 * Set them in LocalSettings: $wgTrustedMathLatexPath = 'C:\Program Files\MiKTeX 2.8\miktex\bin\latex.exe'; $wgTrustedMathDviPngPath = 'C:\Program Files\MiKTeX 2.8\miktex\bin\dvipng.exe';
 * If you are using the safe mode, you need to give a group the editmath</tt> right. To do so for sysops, add to your LocalSettings: $wgGroupPermissions['sysop']['editmath'] = true;</tt>

Now test your installation. Create a page with the Riemann zeta function at Math:Riemann zeta: $$ \zeta(s) = \sum_{n=1}^\infty n^{-s} = \frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \cdots \;\;\;\;\;\;\;\sigma = R(s) > 1. \! $$

Embed it on another page using $lt;math name="Riemann zeta" /></tt>. It should now show:

$$ \zeta(s) = \sum_{n=1}^\infty n^{-s} = \frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \cdots \;\;\;\;\;\;\;\sigma = R(s) > 1. \! $$

IIS users
IIS and possibly other Windows users need to set the environment variable USERPROFILE to a path that the webserver can read/write to. Add to LocalSettings.php:
 * $wgTrustedMathEnvironment = array( 'USERPROFILE' => 'C:\writablepath' );</tt>