hexo-theme-indigo icon indicating copy to clipboard operation
hexo-theme-indigo copied to clipboard

MathJax公式渲染问题

Open zhanghuimeng opened this issue 6 years ago • 5 comments

行内和行间公式都无法渲染,源文件中已经在行间公式周围加上{% raw %} ... {% endraw %}标签了,网页似乎也加载了MathJax。

我只在post的front-matter中开启了mathjax: true,不过在主题的_config.yml中打开mathjax效果也相同。

示例链接

zhanghuimeng avatar Feb 13 '19 08:02 zhanghuimeng

我觉得可能是renderer的问题,把hexo-renderer-markdown-it换回hexo-renderer-marked后,发现可以开启数字TOC了(原来不行),但是公式仍然无法渲染。

zhanghuimeng avatar Feb 20 '19 11:02 zhanghuimeng

我使用pandoc进行渲染

plmsmile avatar Mar 07 '19 15:03 plmsmile

谢谢您的意见,我有空会尝试一下的。看起来pandoc比其他renderer要稍微麻烦一些。我最近已经换成了其他主题,并尝试把renderer换成了hexo-renderer-markdown-it-plus,使用katex渲染数学公式,但是公式仍然有一些错位……

zhanghuimeng avatar Mar 09 '19 13:03 zhanghuimeng

我写了一个pandoc的简易使用教程:pandoc配置数学公式。可以作为一个参考。

plmsmile avatar Mar 09 '19 15:03 plmsmile

转化为图片是最稳定的方法,试试markdown-it-latex2img

MakerGYT avatar Jul 27 '20 01:07 MakerGYT