Forgot password?
 Create new account
View 135|Reply 1

equationautorefname已经被定义要怎么解决?

[Copy link]

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

abababa Posted at 2023-3-14 18:25:07 |Read mode
Last edited by abababa at 2023-3-14 21:35:00my.tex的代码如下,省略了正文部分。
  1. \documentclass[12pt]{article}
  2. \usepackage{amsmath,bm,yhmath,amssymb,etoolbox,esvect,stmaryrd,cite,enumitem,extarrows,mathtools,ifthen}
  3. \usepackage{pgf,tikz}
  4. \usepackage[inline]{asymptote}
  5. \usepackage{tkz-euclide}
  6. \usepackage[amsmath, thmmarks]{ntheorem}
  7. {
  8.         \theoremstyle{nonumberplain}
  9.         \theoremheaderfont{\indent\bfseries}
  10.         \theorembodyfont{\normalfont}
  11.         \theoremsymbol{\ensuremath{\Box}}
  12.         \newtheorem{proof}{证明}
  13. }
  14. \newcommand\equationautorefname{公式}
  15. \begin{document}
  16. \end{document}
Copy the Code


代码如上,之前没加入asymptote包时没问题,加入这个包以后,先用xelatex my编译,然后用asy *.asy做出那些图,最后再用xelatex my编译。第一次编译时没出问题,第二次xelatex my时,就出现equationautorefname已经被定义的错误了,这个要怎么解决?

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2023-3-14 21:34:22
这个用renewcommand也不行,因为第一次编译时还没有定义,所以不能重定义。
最后的方法是调换引入包的顺序:
  1. \documentclass[12pt]{article}
  2. \usepackage{amsmath,bm,yhmath,amssymb,etoolbox,esvect,stmaryrd,cite,enumitem,extarrows,mathtools,ifthen}
  3. \usepackage[amsmath, thmmarks]{ntheorem}
  4. {
  5.         \theoremstyle{nonumberplain}
  6.         \theoremheaderfont{\indent\bfseries}
  7.         \theorembodyfont{\normalfont}
  8.         \theoremsymbol{\ensuremath{\Box}}
  9.         \newtheorem{proof}{证明}
  10. }
  11. \newcommand\equationautorefname{公式}
  12. \usepackage{pgf,tikz}
  13. \usepackage[inline]{asymptote}
  14. \usepackage{tkz-euclide}
  15. \begin{document}
  16. \end{document}
Copy the Code


把画图的那些全都调到最后面,这样能编译通过,暂时不知道会不会有其它问题。

手机版Mobile version|Leisure Math Forum

2025-4-20 22:14 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list