Math
A formula on a Wikven site is written once, while the site is being built, and what the reader gets is the writing. Math is the extension for it, and unlike a chart it wants nothing beside MediaWiki. It is in the image already, and naming it is the whole of the setup.
This page writes one:
What the reader gets is MathML sitting in the HTML, which a current browser draws by itself. There is no picture to fetch and no script to run, and the formula stays text: a reader can select it, and a screen reader can say it.
What a site declares
extensions:
- Math
That is all of it. Math is bundled with MediaWiki, so there is no repository to name and no commit to pin.
How it renders
Math has several rendering modes, and Wikven takes the ones that render here:
native- MathML, written by PHP. The default, and what the formula above is.
mathjax- The same MathML, drawn by the MathJax library in the browser. It costs every page of the site that library.
source- The LaTeX, left as it was written.
Math's other two modes, mathml and latexml, fetch each formula from a server rather than writing it here. Wikven does not offer them. Naming one, or an address for one, stops the build and says which line did it.
Writing a formula
<math>E = mc^2</math>
<math display="block">\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}</math>
Inline by default. display="block" puts the formula on a line of its own and centres it, which is what the one at the top of this page does. What a formula may contain is the LaTeX subset Math accepts, and one it cannot read stops the build rather than publishing an error message where the formula should be.