Holovincent's Personal Website

Add Latex Support with MathJax in Jekyll

2016-07-26
Web

Kramdown comes with optional support for LaTeX to PNG rendering via MathJax within math blocks. MathJax requires you to include JavaScript or CSS to render the LaTeX, e.g.

<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>

In order to add latex support, add above JavaScript into the post.html in _layouts folder.

This is a in line equation generate with

$$y = ax$$

This is a block equation:

generate with:

$$
\begin{equation}
y = ax
\end{equation}
$$

Comments