2019-08-16 21:27发布
我安照tikz手册里的代码总是失败... 不知道哪里有问题
1、确保你的 tex 系统里的宏包版本和手册的版本一致,如果是CTEX套装,赶紧换,那太老了。
2、看看你的手册中代码部分的上下文,是不是你的代码里少加载了宏包或tikz的库。
给你个例子:
\documentclass[tikz]{standalone} \usepackage{ctex,cncolours} \usetikzlibrary{shapes.callouts} \begin{document} \begin{tikzpicture}[scale=0.1] \draw[line width=.5mm] ( -3.413,-21.835)..controls ( -1.080,-24.775)and ( 0.469,-25.398).. ( 4.190,-25.796)..controls ( 10.404,-27.006)and ( 17.790,-25.662).. ( 20.960,-24.455)..controls ( 25.228,-23.372)and ( 27.327,-17.156).. ( 22.677,-16.444) ( -9.437,-4.311)..controls (-11.102, 0.581)and ( -8.064, 4.929).. ( -2.718,10.773)..controls ( -0.079,13.279)and ( 1.602,14.858).. ( 4.580,12.719); \draw[line width=.5mm](-11.012,-16.217)..controls(-18.289,-21.051)and( -9.578,-26.102)..( -1.369,-23.973); \draw[line width=.5mm]( 9.478, -0.212)..controls( 13.036, -6.810)and( 1.372, -9.794)..( -1.536,-13.423); \draw[line width=.5mm]( -2.493, 8.603)..controls( -0.074, 11.381)and( 1.692, 11.511)..( 5.713, 7.492); \filldraw[line width=.5mm, draw=black,fill=松花绿] ( -3.413,-21.835)..controls ( -4.364,-20.825)and ( -4.514,-16.474).. ( -1.536,-13.423)..controls ( -3.480,-12.243)and ( -7.091, -9.329).. ( -9.437, -4.311)..controls (-12.226, -6.926)and ( -8.162, -9.274).. ( -9.931,-12.572)..controls (-13.570,-19.829)and (-11.245,-21.012)..cycle; \filldraw[line width=.5mm, draw=black,fill=松花绿] ( 9.833, 11.181)..controls (15.929, 10.036)and (22.438, -5.474).. (22.898,-16.483)..controls (22.979,-20.643)and (20.912,-23.923).. ( 9.583,-23.984)..controls (-7.364,-22.488)and (-0.741,-16.650).. ( 7.795,-11.264)..controls (14.998, -6.071)and (17.027, 2.377).. ( 4.580, 12.719)..controls ( 6.623, 14.003)and ( 8.989, 13.303)..cycle; \shade[ball color=鹅黄!50](0,0)circle(10); \fill[color=black]( -7.040, 8.030)..controls ( -5.390, 10.161)and ( -3.901, 8.640).. ( -3.271, 6.922)..controls ( -4.492, 8.620)and ( -5.563, 8.890)..cycle; \fill[color=black]( 3.945, 6.698)..controls ( 4.713, 9.390)and ( 6.030, 9.815).. ( 7.514, 8.182)..controls ( 6.058, 8.903)and ( 4.969, 8.509)..cycle; \fill[color=象牙白] (-8.566,5.029)..controls (-6.053,6.465)and (-3.720,6.314).. (-1.124,4.910)..controls (-0.667,4.626)and (-0.879,4.024).. (-1.962,4.327)..controls (-4.361,5.073)and (-6.371,4.907).. (-8.299,4.178)..controls (-8.781,3.950)and (-9.093,4.709)..cycle; \fill[color=象牙白] ( 8.861,4.373)..controls ( 6.452,4.980)and ( 4.264,4.836).. ( 2.679,4.277)..controls ( 2.077,4.051)and ( 1.857,4.907).. ( 2.439,5.158)..controls ( 5.021,6.423)and ( 7.448,6.250).. ( 9.454,4.990)..controls ( 9.853,4.686)and ( 9.700,4.119)..cycle; \fill[color=桃红](-6,2.96)ellipse(2.7 and 0.85); \fill[color=桃红](6.15,2.96)ellipse(2.7 and 0.85); \fill[color=black](-7.63,4.96)circle(0.8); \fill[color=black](3.27,4.96)circle(0.8); \fill[color=棕黄] ( 8.273, -0.167)..controls ( 7.260,-10.168)and (-6.602, -9.920).. (-7.542, -0.443)..controls (-6.548, -8.336)and ( 6.161, -9.708)..cycle; \node at (-5,20)[left]{\fbox{\texttt{\textbackslash usetikzlibrary\{shapes.callouts\}}}}; \node[cloud callout, cloud puffs=20, aspect=2.5, cloud puff arc=120, shading=ball,text=white,inner sep=0pt]at (-5,30) {忘了点啥?}; \end{tikzpicture} \end{document}
最多设置5个标签!
1、确保你的 tex 系统里的宏包版本和手册的版本一致,如果是CTEX套装,赶紧换,那太老了。
2、看看你的手册中代码部分的上下文,是不是你的代码里少加载了宏包或tikz的库。
给你个例子:
一周热门 更多>