Skip to content

MathJax on MoinMoin wiki

Davide P. Cervone edited this page May 27, 2013 · 2 revisions

From https://groups.google.com/d/msg/mathjax-users/NY1nHiYbraw/WnoCE8UQCWUJ


I have followed advice on how to use MathJax CDN within MoinMoin (method 1 here) which seemed to work.

However, I now find that some fomulae do not render. For example

$$ \frac{P}{K} $$

is fine. So is

$$ \frac{P^2}{K} $$

but

$$\frac{P^2}{K^2} $$

fails.

I have also tried examples from http://www.mathjax.org/demos/tex-samples/ but these fail to render as well.

I have no idea what might be the problem. Any advice on how to proceed?

Thanks


I suspect that MoinMoin's wiki markup language is interpreting some of the mathematics as its own markup, and converting it to HTML before sending the page to the browser, and then MathJax won't recognize it as mathematics (since math can't contain HTML). For example, I suspect that the ^ symbols in the third example means something to MoinMoin, and it is replacing ^2}{K^ by something like <sup>2}{K</sup> or something like that. You may have to use special escape characters (like backslash) to prevent MoinMoin from interpreting the ^ as its own markup. Alternatively, you may be able to force "verbatim" mode in some way so that it leaves your characters unchanged within the mathematics. If there is a way to get MoinMoin to produce a <code> block, for example, that might work, but you might also need to change the MathJax configuration to allow MathJax to process the contents of code blocks. (You would have to remove code from the skipTags array in the tex2jax block of your configuration; see the tex2jax documentation for the default value of the skipTags array.)


Thanks, you are quite right.

In MoinMoin it now works if I enclose my formula with the markup

{{{#!html
\​[ formula \​]
}}}
Clone this wiki locally