Jia PD

Northwestern Polytechnical University

0%

LaTex公式显示

    Hexo的Latex显示处理,我用的是next 6.13.4。主要是网上的教程大多是换一个渲染引擎,其实完全没有必要。Next还是很强大的。

  1. 首先是主题下面的设置文件(${\small ~\themes\next\_config.yml}$) math部分设置如下。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Math Formulas Render Support
# Server-side plugin: https://github.com/next-theme/hexo-filter-mathjax
math:
# Default (true) will load mathjax / katex script on demand.
# That is it only render those page which has `mathjax: true` in Front-matter.
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
per_page: true

# hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
mathjax:
enable: true

# hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) required for full Katex support.
katex:
enable: false
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
copy_tex: false
  1. 在需要latex公式处理的md文章中添加 ${\small mathjax: true}$

  2. 结果如图

    1. Latex公式支持
------------- Ending,Thanks for your reading!-------------