4Syntax plugin for Dokuwiki that parses ASCIIMathML code into MathML output.
6This is an implementation of Peter Jipsen's ASCIIMathML.js, but in pure PHP, i.e. the translation is done serverside, and no JavaScript is necessary. Only the symbolic math part (the original part) is included, not the SVG module.
8To try it out:
9  * Install the plugin, i.e. create a folder called "masciimath" in the Dokuwiki plugin folder, and put the plugin files here.
10  * Create a wikipage with the following ASCIIMathML code in it: `x_(1,2)=(-b+-sqrt(b^2-4a c))/(2a)`
11  * View your wiki using Firefox (the only browser with a complete MathML implementation).
13Known bugs/variations from the reference implementation (Jipsen's):
14  * Does not recognize double dollars form, only backticks, i.e. does not recognize $$a=b+c$$, only `a=b+c`
15  * Does not recognize the form `text{mintekst}` for mtext-tags, only `"mintekst"`
16  * Does not recognize LaTeX-style syntax, i.e. \Alpha for Alpha
17  * Uses only (: and :) for angular brackets. Jipsen's documentation is ambigious, sometimes using (: and :), sometimes << and >>
18  * The latter are used for "much greater than" and "much less than" here.
19  * Recognizes the forms `int_0^1` and `int^1_0` as equivalent. Jipsen's only recognizes the former. This applies no matter the base.
20  * Recognizes all standard Greek letters (i.e. Alpha and gamma), uppercase and lowercase, whereas Jipsen's only recognizes a subset
21  * Defaults to displaystyle=false (inline style). However, displaystyle=true can be trigged by including a single whitespace as the first character, such as: ` int_0^x x`
22  * One pair of parantheses is removed when the expression can be parsed uniquely without it as usual, but here this only applies to ( and ), not the other kind of brackets.
24Dokuwiki plugin homepage: https://www.dokuwiki.org/plugin:masciimath
25GitHub repository: https://github.com/M0rtenB/dokuwiki-masciimath
27Jipsen's original implementation ASCIIMathML.js: http://www1.chapman.edu/~jipsen/mathml/asciimath.html
29Morten B. Nielsen, mortenb@gmail.com