找回密码
 快速注册
搜索
查看: 37|回复: 1

发生Option clash for package hyperref错误

[复制链接]

413

主题

1558

回帖

1万

积分

积分
11498

显示全部楼层

abababa 发表于 2023-7-8 19:34 |阅读模式
如题。代码如下:
  1. \documentclass[a4paper]{book}
  2. \usepackage{amsmath,bm,yhmath,amssymb,etoolbox,esvect,stmaryrd,mathtools,ifthen}
  3. \usepackage[dvipsnames, svgnames]{xcolor}
  4. \usepackage{pgf,tikz}
  5. \usepackage[inline]{asymptote}
  6. \usepackage{tkz-euclide}
  7. \usepackage[amsmath, thmmarks]{ntheorem}
  8. {
  9.         \theoremstyle{nonumberplain}
  10.         \theoremheaderfont{\indent\bfseries}
  11.         \theorembodyfont{\normalfont}
  12.         \theoremsymbol{\ensuremath{\Box}}
  13.         \newtheorem{proof}{证明}
  14. }
  15. \newtheorem{theorem}{定理}[section]
  16. \usepackage[colorlinks,linkcolor=red,anchorcolor=blue,citecolor=blue]{hyperref}
  17. \begin{document}
  18. \frontmatter
  19. \tableofcontents
  20. \mainmatter
  21. \begin{asydef}
  22. settings.prc = true;
  23. settings.embed = true;
  24. import three;
  25. import math;
  26. import geometry;
  27. import graph3;
  28. import texcolors;
  29. \end{asydef}
  30. \begin{theorem}
  31. $\Gamma, F_1,F_2$
  32. \end{theorem}
  33. \begin{asy}
  34. size(8cm,0);
  35. point FF1 = (-1,0), FF2 = (1,0), X = (0,1);
  36. ellipse el = ellipse(FF1, FF2, X);
  37. draw(el);
  38. \end{asy}
  39. \begin{proof}
  40. \end{proof}
  41. \end{document}
复制代码


编译时,先xelatex my,再asy *.asy,最后再xelatex my。出错发生在第二次xelatex my时。如果删除hyperref的那些参数,就能编译通过,但我还想要那些链接的颜色,请教这个要怎么弄?

413

主题

1558

回帖

1万

积分

积分
11498

显示全部楼层

 楼主| abababa 发表于 2023-7-9 15:19
这个解决了,但我不明白原理。和这帖是一样的,把画图那些包调到最后就行了,主要就是\usepackage[inline]{asymptote}这个包,把它放到最后一个引入的包就没问题了。

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 12:14

Powered by Discuz!

× 快速回复 返回顶部 返回列表