|
- \documentclass[a4paper]{book}
- % 使用到的包
- \usepackage{amsmath,bm,yhmath,amssymb,etoolbox,esvect,stmaryrd,cite,enumitem,extarrows,mathtools,ifthen}
- % 颜色
- \usepackage[dvipsnames, svgnames]{xcolor}
- %使用索引
- \usepackage{makeidx}
- % 图片支持
- \usepackage[inline]{asymptote}
- \usepackage{tikz}
- \usepackage{tkz-euclide}
- %定理环境
- \usepackage[amsmath, thmmarks]{ntheorem}
- {
- \theoremstyle{nonumberplain}
- \theoremheaderfont{\indent\bfseries}
- \theorembodyfont{\normalfont}
- \theoremsymbol{\ensuremath{\Box}}
- \newtheorem{proof}{证明}
- \newtheorem{practice}{作法}
- }
- \theoremheaderfont{\indent\bfseries}
- \theorembodyfont{\normalfont}
- %环境结束符号
- \theoremsymbol{\ensuremath{\multimap}}
- \newcommand\itemautorefname{条目}
- \newtheorem{example}{例}[section]
- \newcommand\exampleautorefname{例}
- \usepackage[slantfont,boldfont]{xeCJK}
- \begin{asydef}
- settings.prc = true;
- settings.embed = true;
- import three;
- import math;
- import geometry;
- import graph3;
- import texcolors;
- \end{asydef}
- \begin{document}
- 测试一下
- \begin{center}
- \begin{asy}
- size(100);
- currentprojection = orthographic(0.6,-1,0.8);
- real b = 2,h = 6;
- triple f(pair t) {
- real u = t.x;
- real v = t.y;
- real r = 2-cos(u);
- real x = b*cos(u)*(1-sin(u))+r*cos(v)*(2*exp(-((u/2-pi)^2))-1);
- real y = r*sin(v);
- real z = h*sin(u)+0.5*r*sin(u)*cos(v)*exp(-((u-3*pi/2)^2));
- return (x,y,z);
- }
- surface s=surface(f,(0,0),(2pi,2pi),15,15,Spline);
- draw(s,lightyellow, meshpen=black+thick());
- \end{asy}
- \end{center}
- \end{document}
Copy the Code
完整代码(my.tex)如上,编译方法:1. xelatex my,2. asy -mask *.asy,3. xelatex my
在运行第3步时,就提示了Command \itemautorefname already defined.
但如果不运行第2步,只是连续两次xelatex my,这样就没问题。
这个要怎么解决? |
|