I tried using Jekyll with kramdown to build a website of my own. Also, I want to include mathjax to render the mathematical formulae. However, the kramdown markdown seems to have conflict with mathjax. I can't render formulae correctly, if I didn't quote the formular.
I added those codes to my template file:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
});
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>
Now it's working but I have to add the quotes around the formulae and kramdown translate them as this style
. You can see on my webpage. Is any better solution other than this method? I find it annoying to add an extra quotation mark around my $\LaTeX$ code. I found that this solution is what I want to have. It has the same syntax as I typed in TeX, but I don't understand the code..