MediaWiki math rendering support

To enable the MediaWiki math rendering engine, perform the following steps:

Install the mediawiki-math package and a couple of other dependancies

apt-get update
apt-get install mediawiki-math texlive-latex-extra dvipng

Create the math image and temp directories and change ownership to the web server user

mkdir -p /var/lib/mediawiki/images/{math,tmp}
chown www-data:www-data /var/lib/mediawiki/images/{math,tmp}

Add the following to /etc/mediawiki/LocalSettings.php or /etc/mediawiki/extensions.php

# Math engine
$wgUseTeX = true;
$wgUploadPath = "/images";
$wgUploadDirectory = "images";
$wgMathPath = "{$wgUploadPath}/math";
$wgMathDirectory = "{$wgUploadDirectory}/math";
$wgTmpDirectory = "{$wgUploadDirectory}/tmp";

Enable the extension and update MW DB

mwenext Math.php
php /usr/share/mediawiki/maintenance/update.php 

Go create your math formulas...

Note: if you added the above to /etc/mediawiki/extensions.php you might have to clear mediawiki page cache.

More resources:

Comments

Jeremy Davis's picture

And confirmed working on TKL v13.0 Mediawiki appliance! :)
Jeremy Davis's picture

Probably better to speak with someone in the MediaWiki community as they should be able to give you a clear contextual answer. I would think that there is at least some plugin that would support that, even if it's not native.