欢迎访问个人网络日志🌹🌹知行空间🌹🌹
文章目录
1.设置hexo支持Latex公式
网页上对Latex的支持需要借助能够解析Latex语法的插件引擎,将Latex语法转成HTML元素,常用的
Latex公式引擎有Katex,mathjax引擎等,如优快云使用的就是Katex。
- 渲染引擎改成
pandoc
npm uninstall hexo-rendered-marked
npm install hexo-rendered-pandoc
- 安装mathjax插件
npm install hexo-filter-mathjax
- 修改站点
_config.yaml文件,注意不是themes中的_config.yaml
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 pages rendered by MathJax
every_page: fa

本文介绍了如何在Hexo博客中配置支持Latex公式,包括使用pandoc渲染引擎、安装mathjax插件,并提供了一个实例展示了公式渲染效果。同时提到了设置步骤和参考资料链接。
最低0.47元/天 解锁文章
763





