MathJax on MoinMoin, not quite working

318 views
Skip to first unread message

Blair

unread,
Jun 6, 2012, 11:17:29 PM6/6/12
to MathJax Users
I have followed advice on how to use MathJax CDN within MoinMoin
(method 1 here: http://blog.tahnok.me/post/15783791165/moinmoin-mathjax)
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

Davide P. Cervone

unread,
Jun 7, 2012, 7:11:24 AM6/7/12
to mathja...@googlegroups.com
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 http://www.mathjax.org/docs/2.0/options/tex2jax.html for the
default value of the skipTags array.)

Davide

Blair Hall

unread,
Jun 7, 2012, 3:23:27 PM6/7/12
to mathja...@googlegroups.com
Thanks, you are quite right.

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

{{{#!html
\[ formula \]
}}}

On Thu, Jun 7, 2012 at 11:11 PM, Davide P. Cervone <dp...@union.edu> wrote:
> 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

Davide P. Cervone

unread,
Jun 7, 2012, 4:14:30 PM6/7/12
to mathja...@googlegroups.com
OK, thanks for the info. Sorry it is so verbose, but at least you can
get it to work.

Davide
Reply all
Reply to author
Forward
0 new messages