liffiton / dokuwiki-plugin-mathjax

MathJax plugin for DokuWiki
https://www.dokuwiki.org/plugin:mathjax
12 stars 11 forks source link

any chance to get ASCIImath syntax working? #25

Closed candardo closed 8 years ago

candardo commented 8 years ago

I'd like to migrate all the math in my wikis from ASCIImath (asciimathml plugin) to mathjax in order to get a better compatibility across browsers. Since MathJax can handle asciimath syntax that should be possible without converting all my formulas, but I can't get it to work.

What I've done:

What I expected: math parsed with asciimath syntax (same result as with the asciimathml plugin) What I got (see attached image): no math at all or wrong parsiong (math as tex syntax)

Is there some way to use asciimath syntax with the mathjax plugin?

Thanks!

asciimath

liffiton commented 8 years ago

The default configuration of the plugin does not load the AsciiMath input extension. You should be able to enable it using a different configuration file.

Try changing the the plugin»mathjax»url configuration option to use TeX-MML-AM_CHTML in place of its default TeX-AMS_HTML. The complete URL would then be //cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML.

You may need or want to change some AsciiMath-specific settings as well.

Let me know if that works. If so, I'll add some notes to the plugin documentation page to help others with the same issue.

candardo commented 8 years ago

It works! Great, now I can use both TeX and AsciiMath syntax and migration is just a matter of replacing $$ delimiters with backticks.

One thing I noted: formulas are bigger in size when rendered with mathjax (not a problem for me).

liffiton commented 8 years ago

Great. I'll update the documentation.