Closed wzpan closed 8 years ago
with the help of this article I'm now able to write MathJax syntax now. Close this issue.
@wzpan could you please paste the steps for handle it.
markdown-it-mathjax
plugin for markdown it.$ npm install markdown-it-mathjax --save
<% if (page.math) { %>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50) },
tex2jax: { inlineMath: [ ["$", "$"], ["\\(","\\)"] ], processEscapes: true, ignoreClass: "tex2jax_ignore|dno",skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']},
TeX: { noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } }, Macros: { href: "{}" } },
messageStyle: "none"
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<% } %>
Hello,
I'm looking for a light-weight but powerful npm markdown plugin and happend to see this one.
After giving it a try it looks the best for me. But the only problem I come across is that I'm not able to embeded MathJax just like what I did using hexo-renderer-marked or hexo-renderer-pandoc .
It seems that this is a missing feature of markdown-it . Have you ever tried to use MathJax with hexo-renderer-markdown-it ?