Notifications
Clear all

Rendering mathjax as soon as someone comments.

5 Posts
3 Users
0 Reactions
2,221 Views
(@cnpatel)
Active Member
Joined: 7 years ago
Posts: 18
Topic starter  

When I comment mathematics equations, they are not rendered as soon as I comment..

Capture11

I have to reload the page to render it.

Capture12

   
Quote
 Tom
(@tomson)
Famed Member Admin
Joined: 10 years ago
Posts: 4217
 

Please let me know which plugin you use for mathematics equations? Is this plugin compatible with comment system?


   
ReplyQuote
(@cnpatel)
Active Member
Joined: 7 years ago
Posts: 18
Topic starter  

I'm using this script from Mathjax Docs, no plugins.

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {
inlineMath: [['[math]','[/math]'],['$latex','$'], ['\\(','\\)']],
displayMath: [ ['$$','$$'], ['\[','\]'] ],
processEscapes: true, // \$ to write regular dollar sign.
processRefs: true, // process \ref{...} outside of math mode.
ignoreClass: "latex-ignore",
skipTags: ["pre","code"],
},
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

 


   
ReplyQuote
(@cnpatel)
Active Member
Joined: 7 years ago
Posts: 18
Topic starter  

No plugin let me surpass the <code> tag. They even render the math formulas between <code> tag. So, I have to use script with line

skipTags: ["pre","code"],

to display formulas in my post as example.

Capture13

However, plugins work well in rendering math as soon as someone comments.

Any help?


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6223
 

Hi cnpatel,

I'm really sorry, but this cannot be configured by wpDiscuz side. You should find a way to make the lib (that you are loading) working runtime. Now it doesn't work runtime, therefore it renders after refreshing. 

 


   
ReplyQuote
Share:
Scroll to top