It is really easy to add TeX in HTML. I use MathJax.
- Define the string that indicate the TeX block. Add this in the
<head>
. This is not needed in Jekyll, since the kramdown Markdown parser handles it.<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [ ['$','$'], ['\\(','\\)'] ]} }); </script>
- Add in
<head>
the.js
that converts these blocks. I add this in_includes/themes/bootstrap-3/default.html
in my Jekyll Bootstrap installation (with Bootstrap 3 theme used).<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"> </script>
- Add your TeX block in your
.html
or.md
.$$a_1$$ \\(a_2\\)
Will show as \(a_1\) \(a_2\).