Extension:ASCIIMath4Wiki

This extension adds a  tag that outputs math expressions written in ASCIIMath as MathML.

For mathematical expressions, it is a lighter alternative to LaTeX, which has higher demands in terms of storage space, package installations, et cetera. This extension doesn't create image files, nor require any 3rd party server-side packages, but rely on client's browser support for MathML. ASCIIMath's syntax is also easier and more human-legible than LaTeX's.

Syntax
Math expressions can be written in ASCIIMath syntax, contained by the custom  tag: ASCIIMath_expressions

Browser compatibility
MathML is a World Wide Web Consortium standard, but not all browsers support it properly.
 * Firefox supports MathML, but requires a separate font to show it properly; see the font's installation guide.
 * Internet Explorer doesn't support MathML at all; Internet Explorer users can view MathML with the Math Player plugin.

Installation
The extension requires MediaWiki 1.6+ and the ASCIIMathPHP 1.1+ PHP extension, and the skin files must be modified to include the MathML DTD. Also, avoid using this extension with TeX; If you're using TeX, try to use that for math instead.


 * 1) Download the extension (includes ASCIIMath4Wiki and ASCIIMathPHP).
 * 2) Unpack the files to /extensions/ in the root of your MediaWiki installation. The package should include ASCIIMath4Wiki.php, ASCIIMathPHP.cfg.php, and ASCIIMathPHP.class.php.
 * 3) Add the following line to LocalSettings.php (near the bottom): include("extensions/ASCIIMath4Wiki.php");
 * 4) Change the DTD in the skins to include MathML (see below).

Changing DTD
To allow MathML in a XHTML page, you must specify in the header about MathML. That mean you will have to change the wiki's page rendering to all skins. Below is an example of how to change MonoBook: Caution: All wiki output is compatible with XHTML, but watch out for unclean HTML in other extensions. Keep in mind that any tag error in output will generate an XHTML parsing error; XHTML is very unforgiving.

Open /skins/MonoBook.php in your wiki and find these lines; make sure to make the equivalent change in each skin's main file. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>">

Change the above to this: '; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [ <!ENTITY mathml "http://www.w3.org/1998/Math/MathML"> ]> text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>">

Note you should change it in all allowed skins, not only monobook.