Fix Template

kramdown latex

Posted by Airtnp on May 13, 2016

Fix Latex

Learn from Mathjax, kramdown and Octopress

Just add below code to head.html

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      jax: ["input/TeX", "output/HTML-CSS"],
      tex2jax: {
        inlineMath: [ ['$', '$']],
        displayMath: [ ['$$', '$$']],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
      //,
      //displayAlign: "left",
      //displayIndent: "2em"
    });
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>

Here I delete (...) and [...] as latex entry

BTW: $X_1, X_2, X_3$ can cause bugs

Use $$X_1, X_2, X_3$$ for kramdown to fix or $X\_1, X\_2, X\_3$ to replace