Mathematical formula
If you want to display math formulas in the article, you can use the plugin hexo-filter-mathjax.
Configuration process:
Install the plugin hexo-filter-mathjax in the root directory of the Hexo project.
$ cd hexo-site $ npm install hexo-filter-mathjax
Add the following configuration at the bottom of the Hexo configuration file
_config.yml
.mathjax: tags: none # or 'ams' or 'all' single_dollars: true # enable single dollar signs as in-line math delimiters cjk_width: 0.9 # relative CJK char width normal_width: 0.6 # relative normal (monospace) width append_css: true # add CSS to every page every_page: false # if true, every page will be rendered by mathjax regardless the `mathjax` setting in Front-matter of each article
Add the
mathjax: true
attribute to the article page. At this point, you can write formulas on this page.Example:
--- title: MathJax Test date: 2020-09-12 16:02:07 tags: MathJax categories: MathJax mathjax: true --- $$ i\hbar\frac{\partial}{\partial t}\psi=-\frac{\hbar^2}{2m}\nabla^2\psi+V\psi $$
Effect picture:
Last updated