Extension:Math/additionalAnnotationTypes

How to Add Additional Annotation Types to MathJax Menu
Encode your annotation by adding /**  * Callback function that is called after a formula was rendered * @param MathRenderer $Renderer * @param string|null $Result reference to the rendering result * @param int $pid * @param int $eid * @return bool */ function wfOnMathFormulaRendered( MathRenderer $Renderer, &$Result = null, $pid = 0, $eid = 0 ) { $Result = preg_replace ("# #", "" . $Renderer->getUserInputTex . " \n ", $Result ); return true; }          /* yourAnnotation is the tag that you use to help MathJax find the annotation */                                                                             $wgHooks['MathFormulaRendered'] = array ('wfOnMathFormulaRendered');
 * If your annotation type is already in the MathML, you can skip this step.

to your local settings. Doing this will allow MathJax to find your annotation.
 * Now go to the common.js file.
 * Use the mw.loader.using function to specify when you want the code to execute.


 * Redefine the semanticsAnnotations variable, adding your annotation type and tag. If necesary, you can add multiple tags. For reference, look at this example []
 * Now your annotation type should be under Show Math As->Annotation (example in picture)MathJax Menu Annotation Addition.png