Math

From Freephile Wiki

Prior to v 1.18, Math was supported in core of MediaWiki via the <math> tag. Now, it's been extracted into the Extension:Math extension.

Furthermore, if you want to run a production wiki that uses math formulas, it is recommended that you setup your own mw:Mathoid nodejs service which in turn relies on a mw:RESTBase service.

Notes about setting it up / History / Status

  1. https://phabricator.wikimedia.org/T136812
  2. https://phabricator.wikimedia.org/T154394
  3. https://www.mediawiki.org/wiki/Extension:Math/advancedSettings
  4. https://www.mediawiki.org/wiki/Manual:Math

SimpleMathJax

In QualityBox, we use Extension:SimpleMathJax which does rendering client-side instead of the more complicated server-side Math extension.[1] Both extensions use MathJax, and the server-side option would be more suitable in high volume environments.

Compare:

math_rendering.png

SimpleMathJax provides MediaWiki with MathJax


Other Example Renderings

na-mic

Example from https://www.na-mic.org/wiki/Projects:GroupwiseRegistration

For the nonrigid deformation model, we define a combined transformation consisting of a global and a local component

where is a twelve parameter affine transform and is a deformation model based on B-splines.

The free form deformation can be written as the 3-D tensor product of 1-D cubic B-splines.


where is 'th cubic B-spline basis function. is the distance to from the control point as shown in Figure 2.

The deformation of a given point can be found using only the control points in the neighborhood of the given point. Therefore, optimization of the objective function can be implemented efficiently.

slicer.org

example from https://www.slicer.org/wiki/Coordinate_systems

However different medical applications use different definitions of this 3D basis. Most common are the following bases:

  • LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit

  • RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer

Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.

References

  1. This SO thread summarizes some of the history of the Math and SimpleMathJax extensions https://stackoverflow.com/questions/29387372/how-to-embed-maths-in-mediawiki