Extension:PhpMathPublisher alternative

PhpMathPublisher is an alternative which needs only PHP with the GD library and some fonts. No need for LaTeX or CGI, the latter is needed for the Mimetex alternative. (Also the graphical output looks better.)

PhpMathPublisher can be found at.

How to install PhpMathPublisher as an extension
MediaWiki and PhpMathPublisher need to be installed of course. (This has been tested with MediaWiki 1.15.1 and PhpMathPublisher 0.3.) Save the text below, which is an adaption of the Mimetex extension, in a file called phpmathpublisher.php

Update the img-path and fonts-path in the mathpublisher.php file (absolute paths/full paths):

Create the following directories in your wiki directory: (1) extensions/phpmathpublisher , (2) extensions/phpmathpublisher/fonts and (3) extensions/phpmathpublisher/img

Put the phpmathpublisher.php and the mathpublisher.php in directory (1), put the fonts in directory (2) and make sure that directory (3) is writable (chmod).

Add the line:

to the end of your LocalSettings.php file in your MediaWiki root directory.

Now you can output PhpMathPublisher syntax with ... tags. To put those tags into your Edit Toolbar, edit Editpage.php in your /includes/ directory. (You should make a backup of this file first just in case.)

Search for the following lines: array(	'image'	=>'button_math.png',	'open'	=>	"\\",	'close'	=>	"",	'sample'=>	wfMsg('math_sample'),	'tip'	=>	wfMsg('math_tip'),	'key'	=>	'C' And replace them with: array(	'image'	=>'button_math.png', 'open'	=>	"\\", 'close'	=>	"\\", 'sample'=>	wfMsg('math_sample'), 'tip'	=>	wfMsg('math_tip'), 'key'	=>	'C'

Since this is an adaption of the Mimetex extension the code is also licensed under the GNU General Public License.

This solution does not appear to work on version 1.13.x of MediaWiki.