liffiton / dokuwiki-plugin-mathjax

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

render content in <math> tags #9

Closed jakebiesinger closed 9 years ago

jakebiesinger commented 11 years ago

Hi!

I recently converted over a bunch of mediawiki sites which use the tag to render latex formulas. Is there a config setting to also register this tag?

Thanks!

liffiton commented 11 years ago

Well, you can configure MathJax to recognize math with any delimiters you like. Just setup the config string in the wiki configuration manager with the appropriate delimiters in inlineMath and/or displayMath. However, they won't be "protected" from rendering by the dokuwiki engine unless you edit the protecttex.php file as well with appropriate addEntryPattern and addExitPattern entries. Unfortunately, the plugin doesn't have a way to automatically register those.

gerardnico commented 11 years ago

Ok. Thanks for the tip. +1 for this one.

I have made the changes in this one: https://github.com/gerardnico/dokuwiki-plugin-mathjax/blob/master/syntax/protecttex.php

liffiton commented 9 years ago

It's a long time coming, but I just added a simple ability to specify custom tags to be "protected" from dokuwiki's rendering so they can be rendered by MathJax. It requires adding the delimiter to the MathJax configuration manually, so it's not fully automatic, but it is an easy setup and should work fine. The fix is in commit 7d96d4ae.