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

[数学公式]一次性禁止全部的自动编号

Open Weijun-Lin opened this issue 4 years ago • 12 comments

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 这种一个个禁止也太难受了

Weijun-Lin avatar May 24 '20 02:05 Weijun-Lin

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

welcome[bot] avatar May 24 '20 02:05 welcome[bot]

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

sli1989 avatar May 24 '20 08:05 sli1989

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

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

Weijun-Lin avatar May 24 '20 08:05 Weijun-Lin

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

sli1989 avatar May 24 '20 08:05 sli1989

+1

hrwhisper avatar Oct 30 '20 15:10 hrwhisper

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

hrwhisper avatar Oct 30 '20 16:10 hrwhisper

@hrwhisper

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

有用有用,谢谢啦

Weijun-Lin avatar Dec 03 '20 03:12 Weijun-Lin

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

tex: {
    tags: 'ams'
}

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

Weijun-Lin avatar Dec 03 '20 03:12 Weijun-Lin

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

stevenjoezhang avatar Dec 03 '20 04:12 stevenjoezhang

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

@stevenjoezhang Tkans! it's useful.😀

Weijun-Lin avatar Dec 03 '20 06:12 Weijun-Lin

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

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

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

Early0v0 avatar Dec 06 '20 02:12 Early0v0

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

tex: {
    tags: 'ams'
}

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

为什么我是没有编号,我已经在_config.yml文件将tags的值改为了ams

maihm6 avatar Mar 03 '23 17:03 maihm6