jerryc127 / hexo-theme-butterfly

🦋 A Hexo Theme: Butterfly
https://butterfly.js.org
Apache License 2.0
6.79k stars 1.24k forks source link

[Bug]: MathJax 不能正确显示使用 AMS 扩展的数学公式 #1513

Closed LittleNewton closed 1 day ago

LittleNewton commented 3 weeks ago

使用的 Butterfly 版本? | What version of Butterfly are you use?

v4.10

是否修改过主题文件? || Has the theme files been modified?

不是 (No)

使用的瀏覽器? || What browse are you using?

Chrome

使用的系統? || What operating system are you using?

macOS

依賴插件 | Package dependencies Information

hexo-site@0.0.0 /app
+-- @renbaoshuo/markdown-it-katex@2.0.2
+-- hexo-admin@2.3.0
+-- hexo-generator-archive@2.0.0
+-- hexo-generator-category@2.0.0
+-- hexo-generator-feed@3.0.0
+-- hexo-generator-i18n@0.0.10
+-- hexo-generator-index@3.0.0
+-- hexo-generator-search@2.4.3
+-- hexo-generator-tag@2.0.0
+-- hexo-math@5.0.0
+-- hexo-renderer-ejs@2.0.0
+-- hexo-renderer-kramed@0.1.4
+-- hexo-renderer-markdown-it@7.1.1
+-- hexo-renderer-pug@3.0.0
+-- hexo-renderer-stylus@3.0.1
+-- hexo-server@3.0.0
+-- hexo-theme-landscape@1.0.0
+-- hexo-wordcount@6.0.1
+-- hexo@7.2.0
`-- katex@0.16.10

問題描述 | Describe the bug

image

如图所示:\mathbb 是 MathJax AMS 扩展语法,但是只要启用了这个语法,hexo butterfly 就不能正确渲染。去掉修饰之后,即可显示简陋版公式。

希望可以添加对 MathJax 扩展语法的支持。可参考 NeXT 主题的一些配置,不知道对开发者是否有帮助。

# Math Formulas Render Support
math:
  # Default (false) 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 true, it will load mathjax / katex script EVERY PAGE.
  every_page: false

  mathjax:
    enable: true
    # Available values: none | ams | all
    tags: none

  katex:
    enable: false
    # See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
    copy_tex: false

出現問題網站 | Website

https://littlenewton.cn/2020/05/math-three-coins-problem/#1-%E8%A7%A3%E9%A2%98%E6%80%9D%E8%B7%AF

jerryc127 commented 3 weeks ago

image 這不是正常麽

LittleNewton commented 3 weeks ago
image

显示不出来啊。

jerryc127 commented 3 weeks ago

你装插件了么

LittleNewton commented 3 weeks ago

你装插件了么

什么插件呢?

jerryc127 commented 3 weeks ago

hexo-renderer-markdown-it@7.1.1 這個卸載了

LittleNewton commented 3 weeks ago

是的,换成Kramed貌似就好了。但是kramed已经七八年没更新了。 @jerryc127 维护者有考虑过升级数学公式模块吗?

jerryc127 commented 2 weeks ago

是的,换成Kramed貌似就好了。但是kramed已经七八年没更新了。 @jerryc127 维护者有考虑过升级数学公式模块吗?

你可以用 katex 啊, katex 會比 mathjax 好點