Follow these steps to add the support for Math to your JSPWiki site. In order to do this, you will need Admin rights; and have the Haddock Template activated.

See MathJax for more detailed documentation.
Note that we link directly to the MathJax distributed network service(// so you not need to install anything locally.

Step 1#

Create a javascript behavior file MathJax.js and put it in the <your-wiki-site>/scripts folder.

Behavior: MathJax
>   $$ x=−b±b2−4ac2a $$
Wiki.once(".load-mathjax", function(elements){

    window.MathJax = {
        tex2jax: {
            inlineMath:  [ ['$','$'], ['\\(','\\)'] ],
            displayMath: [ ['$$','$$'] ]
        asciimath2jax: {
            delimiters: [['`','`']]

        type: "text/javascript",
        src: "//,Safe"


Step 2#

Add following lines to the <your-wiki-site>/templates/haddock/commonheader.jsp file.

  <!-- existing line -->
  <script async src="<wiki:Link format='url' jsp='scripts/haddock.js'/>"></script>
  <!-- add this line -->
  <script src="<wiki:Link format='url' jsp='scripts/MathJax.js'/>" ></script>
And do the same in the <your-wiki-site>/templates/reader/ViewTemplate.jsp.

Step 3#

You are now ready to render Math formulae on your wiki-pages !
No need to restart your JSPWiki server.