Forgot password?
 Create new account
View 181|Reply 8

\label 已定义多个!

[Copy link]

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2024-2-11 00:02:20 |Read mode
当编辑帶 \label 的方程时,MathJax会抛出错误:“\label 已定义多个!”
Screenshot 2024-02-10 160101.png

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-2-11 00:03:40
官網Demo 却不會出錯。因為有MathJax.texReset()
Screenshot 2024-02-10 160508.png

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-2-11 00:06:44
MathJax.texReset(); to force MathJax to reset the page to the state it was before MathJax processed it (i.e., remove its typeset math), reset the TeX automatic line numbering and labels, and then re-typeset the contents of the page from scratch. docs.mathjax.org/en/latest/web/typeset.html

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-2-11 00:44:59
(label 1 is multiply defined 中multiply的讀音為 /-plē/ 而不是 /plī/,見Multiply typed

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-2-11 00:51:33
或者在MathJax config中加入
tex: { ignoreDuplicateLabels: true, Screenshot 2024-02-10 165054.png
見BaseMethods.ts第1540行

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2024-2-11 01:15:04
意思是在要草稿本的那个 function doPreview() 里面加一句 MathJax.texReset(); 吗?

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-2-11 01:30:19
kuing 发表于 2024-2-10 17:15
意思是在要草稿本的那个 function doPreview() 里面加一句 MathJax.texReset(); 吗?
是的!或者也可以在全局config中加入 tex: { ignoreDuplicateLabels: true
這兩種方法我都嘗試過了。

Comment

好了,你可以数学区试一下  Posted at 2024-2-11 01:38
@kuing 好了👌  Posted at 2024-2-11 01:44

手机版Mobile version|Leisure Math Forum

2025-4-20 22:16 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list