How can I add MathJax support? I would like to be able to render math formulas on my forum.

Here's what I've done so far:

I created a block in block_head region with this content:

<script type='text/x-mathjax-config'>
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$', '$'], ['\$$','\$$']]}
});
</script>
<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' type='text/javascript'>
</script>


So now the formulas render when I open a post:

But not when I look at all the posts I created in the profile

And, more importantly, not during the preview

Is there a way to force-render mathjax?

How can I add MathJax support? I would like to be able to render math formulas on my forum. Here&#039;s what I&#039;ve done so far: I created a block in block_head region with this content:  &amp;lt;script type=&#039;text/x-mathjax-config&#039;&amp;gt; MathJax.Hub.Config({ tex2jax: {inlineMath: [[&#039;$&#039;, &#039;$&#039;], [&#039;\$$&#039;,&#039;\$$&#039;]]} }); &amp;lt;/script&amp;gt; &amp;lt;script src=&#039;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&#039; type=&#039;text/javascript&#039;&amp;gt; &amp;lt;/script&amp;gt;  So now the formulas render when I open a post: http://habrastorage.org/files/575/09c/1cb/57509c1cbee9460caaa976d3d7803b36.png But not when I look at all the posts I created in the profile http://habrastorage.org/files/c11/c98/7c5/c11c987c5db84d899a5396ffaa1b2b32.png And, more importantly, not during the preview http://habrastorage.org/files/6a1/c3a/d8b/6a1c3ad8b09540f5981f8855118c5d9e.png Is there a way to force-render mathjax?

0

Hi,

You will have to extend the parser of the preview in the editor to add mathjax support.

It is better to create a plugin for this purpose.

Hi, You will have to extend the parser of the preview in the editor to add mathjax support. It is better to create a plugin for this purpose. We can help you with it.

0

Thanks for you answer. I'm new to the plugin system of codoforum, could you give a hint where to start looking?

Hi Adesh, Thanks for you answer. I&#039;m new to the plugin system of codoforum, could you give a hint where to start looking?

0

Hi,

You should wait for the next release before creating your plugin since we are adding some new hooks that may be helpful

Hi, You should wait for the next release before creating your plugin since we are adding some new hooks that may be helpful

0

It is scheduled to be released coming sunday on 8th March

It is scheduled to be released coming sunday on 8th March

0
99
views
5
replies
2
followers
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing