Enabling math markup

From Organic Design wiki
Revision as of 17:51, 3 July 2013 by Nad (talk | contribs) (See also)
Procedure.svg Enabling math markup
Organic Design procedure
Info.svg Use this procedure to add math rendering support which is not included in the install a new server procedure by default as it requires many additional program libraries (about 200MB worth)


As of MediaWiki version 1.18 the math rendering has been put into the Math extension. See MW:Manual:Math for more details. To download the latest version of the extensions, use:

<bash>git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Math.git</bash>

Note that as of MediaWiki 1.19, the extension repository has become out of sync with the codebase and a specific version needs to be used which you can download from [1].

Build the texvc binary

Enabling math markup requires latex, dvips, gs, and convert. OCaml 3.06 or later from caml.inria.fr is required to compile texvc. On Debian-based systems the requirements can be installed with the following packages:

apt-get install dvipng cjk-latex ocaml
  • Run make from within the MediaWiki's math directory to build the texvc binary on your system.
  • Make sure the directories tmp and math under 'images' exist and are writable.

Example

The following maths code

<math>
e^x = \sum_{n = 0}^{\infty} {x^n \over n!} = 1 + x + {x^2 \over 2!} + {x^3 \over 3!} + {x^4 \over 4!} + \cdots
</math>

Should give the following output

[math]e^x = \sum_{n = 0}^{\infty} {x^n \over n!} = 1 + x + {x^2 \over 2!} + {x^3 \over 3!} + {x^4 \over 4!} + \cdots[/math]

See also