MediaWiki is the wiki software that Wikipedia uses.
However, we are not able to write mathematical formulation in editor directly after finishing installation process.
Even we type the syntax corectly, we will get an error message :
“Missing texvc executable; please see math/README to configure”
Why ?
First of all, we should understand how math markup in MediaWiki works [1]. The math markup takes LaTeX math expression and converts the expression into images using texvc.
Then, the next step is to install texvc. The source comes with MediaWiki, but we still need to compile it ourselves. As texvc is partly written in OCaml, we should first download and compile it on our server. Once we have the texvc binary, we remove it in the /math subfolder.
Other partys should exists on our server are the following: LaTeX, dvips, ImageMagick or Ghostscript.
The official explanation of doing that could be found here.
Well… compiling texvc could be very complicated or simply not working. There are some alternative ways to go around. Here are some of them.
- use LatexRender [2] -
Install LaTeX, ImageMagick and GhostScript in local computer and replace file Math.php in /includes folder with this one.
- use a shared host [3] -
Just find a LaTeX engine outside. If we have CGI support on our host, install mimeTeX. Otherwise, use a public mimeTeX, such as in http://www.forkosh.dreamhost.com/mimetex.cgi.
Link this mimetex.cgi in /includes/Math.php file.
- use Mimetex alternative [4] -
In same cases, shared hosting servers have no LaTeX, ImageMagick, or GhostScript. The method provides mimetex.php as extension and we should put it into /extensions folder. Don’t forget to mention it in LocalSettings.php file.
In addition, we need to replace <math> tag with <tex> one in /includes/EditPage.php.
Notes:
- Please don’t forget to enable TeX in LocalSetting.php file.
- The last two methods are used currently in my MediaWiki.
- In case of hosting on SiteGround, here is the way they use to enable Math support in MediaWiki.
- How to write a formula could be read, such as, in [5] and be practiced per online here.
