LaTeX in Jekyll

Posted by Lu's Blog on June 27, 2021

LaTeX in Jekyll

How to do

add the line below in _layouts/post.html

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

Example

\(\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}\)

\[v=\sqrt{\left ( \frac{dx}{dt} \right )^{2}+\left ( \frac{dy}{dt} \right )^{2}+ \left ( \frac{dz}{dt} \right )^{2}}\]