Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug?] 公式渲染 formula rendering #144

Closed
sjfhsjfh opened this issue Oct 12, 2023 · 3 comments
Closed

[bug?] 公式渲染 formula rendering #144

sjfhsjfh opened this issue Oct 12, 2023 · 3 comments

Comments

@sjfhsjfh
Copy link
Contributor

$(A)_m + {B}_{V}$

$(A)m + {B}{V}$

不渲染 (可以看到 GitHub 也不渲染), 不知什么原因, 测试如下

$A_{m} + B_{V}$

$A_{m} + B_V$

$(A)_{m} + B_V$

$(A)_m + {B}_{V}$

$(A)_{m} + B_{V}$

$A_{m} + B_{V}$

$A_{m} + B_V$

$(A)_{m} + B_V$

$(A)m + {B}{V}$

$(A){m} + B{V}$

可以看到后两个不渲染, 经测试触发条件似乎是

\)_.*_\{.*\} (我就用正则表达式写了)

且圆括号可替换为其他括号 (包括\right版本的括号), 其余部分暂不明确, 应该不是 hexo-theme-arknights bug, 但我也不确定是 mathjax, hexo, 还是什么别的东西的 bug, 因为对依赖结构不熟悉所以先提在这里了

根据 GitHub 也不渲染这个事实来看似乎应该是 mathjax 的问题, 但是在其 issues 页面没有找到相关信息 :(

但是这至少不是一个 Expected Behavior 吧, 至少 $\LaTeX$ 里看起来蛮正常的

若不合适请关闭此 issue 😢

@sjfhsjfh
Copy link
Contributor Author

奇怪的是在 mathjax 提供的在线渲染 中似乎是能正确渲染的

图片

@sjfhsjfh
Copy link
Contributor Author

再补充一点: landscape 主题同样会有这个问题

我在使用的设置为

_config.arknights.yml 下的内容

# Math
math:
  enable: true
  engine: mathjax

_config.yml 下的内容

# Math
math:
  engine: mathjax
  # mathjax: 

# Mathjax
mathjax:
  tags: none # 或 'ams' 或 'all'
  single_dollars: true # 启用单个美元符号作为内联(行内)数学公式定界符
  double_dollars: true # 启用双美元符号作为显示(块级)数学公式定界符
  cjk_width: 0.9 # 相对 CJK 字符宽度
  normal_width: 0.6 # 相对正常(等宽)宽度
  append_css: true # 将 CSS 添加到每个页面
  every_page: true # 如果为 true,那么无论每篇文章的前题中的 `mathjax` 设置如何,每页都将由 mathjax 呈现

@ToUNVRSe
Copy link
Contributor

对于公式渲染有需要可使用 hexo-renderer-pandoc,目前已经完全支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants