Math Support for Hexo

_ in Markdown conflicts with that in Latex, here is the solution to it:

Hexo uses Nunjucks to render posts (Swig was used in older version, which share a similar syntax). Content wrapped with {{ }} or {% %} will get parsed and may cause problems. You can wrap sensitive content with the raw tag plugin.

1
2
3
4
5
{% raw %}
$$
e^{i \theta_{t}} = \cos \theta_{t} + i \sin \theta_{t}
$$
{% endraw %}

Results

$$ e^{i \theta_{t}} = \cos \theta_{t} + i \sin \theta_{t} $$

Ref: https://hexo.io/docs/troubleshooting.html#Escape-Contents

0%