Manual:Mathoid

Mathoid is an application which takes various forms of math input and converts it to MathML + SVG or PNG output.

Getting started
Mathoid is a web-service implemented using node.js, often referred to simply as node.

Mediawiki-vagrant
Install MediaWiki vagrant and run

NPM package (Debian Jessie)
If you want to run  you'll need to install the   package.

Trouble shooting with CentOS 6.

 * If you have  related error, install upgraded gcc.
 * use new gcc. (you can back to old gcc with .)
 * If you got error about, edit   in   like below.

Scientific Linux 7.2
Instructions based on SL 7.2 minimal install. Should be the same for Red Hat Enterprise Linux (RHEL), CentOS and clones. Important install latest Mathoid version, at time of writing 0.6.3 and corresponding node.js version, at time of writing 4.x LTS branch. Especially VM/Server needs direct internet connection during installation. Internet access via proxy did not work. Using node.js from repository did not work for Debian 8.5, Ubuntu 16.4, Ubuntu 14.4, Fedora 24 alpha and SL7 + EPEL.

First install prerequisites
Run the following as root. Disable SL7 fastbug repo (optional).

Install Node.js and Mathoid
Run the following as root. Get node.js repo from nodesource. Note one may want to first save and inspect the script before executing it as root.

Switch to user account

Test
To test run Mathoid as user with

Update firewall, setup security (e.g. SELINUX), setup to run as service, proxy server to access internet, etc... One should be able to install mocha through npm, if one wants.

LocalSettings.php
Config of LocalSettings.php in Mediawiki root directory.

Configuring
Check if the symlink config.yaml points either to config.prod.yaml or config.dev.yaml The settings should be self-explaining. Important is the port

Testing
After installation you can test your installation via

the expected output is:

you can use the option type=mml for mathml input.

Credits for


 * Gabriel Wicke
 * Frédéric Wang
 * Anton Grbin
 * Davide P. Cervone
 * Marko Obrovac

Troubleshooting

 * app.js is not found

in the config file change services->mathoid->module from app.js to mathoid/app.js

Development
Code review happens in Gerrit. See Gerrit/Getting started and ping the parsoid team in #mediawiki-parsoid.

The most recent development version is available from https://github.com/wikimedia/mathoid