Hexo-theme-next: [数学公式]一次性禁止全部的自动编号

Created on 24 May 2020  ·  11Comments  ·  Source: theme-next/hexo-theme-next

Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist

  • [x] I am using the latest version of NexT.
  • [x] I have read the relevant documents of Hexo and NexT.
  • [x] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me.

Expected behavior

当前禁止自动编号是使用 \nonumber 禁止一行公式
但遇到多个禁止自动标号,或者不想使用自动编号则特别麻烦
希望可以通过Front matter 禁止自动编号

Actual behavior

  • Links to demo site with this feature: N/A
  • Links to repository or source code of the blog: N/A

Steps to reproduce the behavior

  1. N/A
  2. N/A
  3. N/A

Other Information

image
这种一个个禁止也太难受了

Backlog Question

Most helpful comment

All 11 comments

Thanks for opening this issue, maintainers will get back to you as soon as possible!

这与主题没有关系呀?你写公式的时候不带tex编号不就好了。

这与主题没有关系呀?你写公式的时候不带tex编号不就好了。

但是我使用了align的对齐,它就自动编号了
@sli1989

找渲染器对应的写法,应该可以实现的。主题估计不会管这个。

+1

我在mathjax cdn中改为 下面的网址后就不会自动编号了
//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML

@hrwhisper

我在mathjax cdn中改为 下面的网址后就不会自动编号了
//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML

有用有用,谢谢啦

@hrwhisper @sli1989
你这个方法是使用低版本的 mathjax 但在有些时候需要高版本的
我看了下 mathjax 是在 3.* 中加入的自动编号
官方文档参考 Automatic Equation Numbering
里面提到了如何开启和关闭,默认是关闭的,开启需要在 tex 加入

tex: {
    tags: 'ams'
}

所以关闭只需要把 tags: 'ams' 注释即可
next 对应的文件为:next\layout\_third-party\math\mathjax.njk
亲测 OK 👍

New option mathjax.tags added: https://github.com/next-theme/hexo-theme-next/commit/ff3b9571c0779c0ba583ee650c6fa647e3f6fef8

@stevenjoezhang
Tkans! it's useful.😀

这与主题没有关系呀?你写公式的时候不带tex编号不就好了。

但是我使用了align的对齐,它就自动编号了
@sli1989

试试使用 aligned 对齐,用法和 align 一样但没有编号

Was this page helpful?
0 / 5 - 0 ratings