AI Assistant
Notifications
Clear all

Rendering mathjax as soon as someone comments.

5 Posts
3 Users
0 Reactions
3,065 Views
(@cnpatel)
Active Member
Joined: 8 years ago
Posts: 18
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#2596]

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: 11 years ago
Posts: 4248
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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



   
ReplyQuote
(@cnpatel)
Active Member
Joined: 8 years ago
Posts: 18
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 8 years ago
Posts: 18
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 8 years ago
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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