我安照tikz手册里的代码总是失败... 不知道哪里有问题

2 回答2

0
<p>代码在哪里?发来看看!</p>

作者追问:2019-08-17 10:54

\begin{tikzpicture}[remember picture, note/.style={rectangle callout, fill=#1}]

 \node [note=blue!50, callout pointer={(0,1)}] at (1,0) {123};

\end{tikzpicture}


报错是:

! Package pgfkeys Error: I do not know the key '/tikz/rectangle callout' and I

am going to ignore it. Perhaps you misspelled it.


0
<p></p><p>1、确保你的 tex 系统里的宏包版本和手册的版本一致,如果是CTEX套装,赶紧换,那太老了。</p><p>2、看看你的手册中代码部分的上下文,是不是你的代码里少加载了宏包或tikz的库。</p><p><br/></p><p>给你个例子:</p><pre class="brush:plain;toolbar:false">\documentclass[tikz]{standalone} \usepackage{ctex,cncolours} \usetikzlibrary{shapes.callouts} \begin{document} \begin{tikzpicture}[scale=0.1] \draw[line&nbsp;width=.5mm] (&nbsp;-3.413,-21.835)..controls (&nbsp;-1.080,-24.775)and (&nbsp;&nbsp;0.469,-25.398).. (&nbsp;&nbsp;4.190,-25.796)..controls (&nbsp;10.404,-27.006)and (&nbsp;17.790,-25.662).. (&nbsp;20.960,-24.455)..controls (&nbsp;25.228,-23.372)and (&nbsp;27.327,-17.156).. (&nbsp;22.677,-16.444) (&nbsp;-9.437,-4.311)..controls (-11.102,&nbsp;0.581)and (&nbsp;-8.064,&nbsp;4.929).. (&nbsp;-2.718,10.773)..controls (&nbsp;-0.079,13.279)and (&nbsp;&nbsp;1.602,14.858).. (&nbsp;&nbsp;4.580,12.719); \draw[line&nbsp;width=.5mm](-11.012,-16.217)..controls(-18.289,-21.051)and(&nbsp;-9.578,-26.102)..(&nbsp;-1.369,-23.973); \draw[line&nbsp;width=.5mm](&nbsp;&nbsp;9.478,&nbsp;-0.212)..controls(&nbsp;13.036,&nbsp;-6.810)and(&nbsp;&nbsp;1.372,&nbsp;-9.794)..(&nbsp;-1.536,-13.423); \draw[line&nbsp;width=.5mm](&nbsp;-2.493,&nbsp;&nbsp;8.603)..controls(&nbsp;-0.074,&nbsp;11.381)and(&nbsp;&nbsp;1.692,&nbsp;11.511)..(&nbsp;&nbsp;5.713,&nbsp;&nbsp;7.492); \filldraw[line&nbsp;width=.5mm,&nbsp;draw=black,fill=松花绿] (&nbsp;-3.413,-21.835)..controls (&nbsp;-4.364,-20.825)and&nbsp; (&nbsp;-4.514,-16.474).. (&nbsp;-1.536,-13.423)..controls (&nbsp;-3.480,-12.243)and (&nbsp;-7.091,&nbsp;-9.329).. (&nbsp;-9.437,&nbsp;-4.311)..controls (-12.226,&nbsp;-6.926)and (&nbsp;-8.162,&nbsp;-9.274).. (&nbsp;-9.931,-12.572)..controls (-13.570,-19.829)and (-11.245,-21.012)..cycle; \filldraw[line&nbsp;width=.5mm,&nbsp;draw=black,fill=松花绿] (&nbsp;9.833,&nbsp;11.181)..controls&nbsp; (15.929,&nbsp;10.036)and (22.438,&nbsp;-5.474)..&nbsp; (22.898,-16.483)..controls&nbsp; (22.979,-20.643)and&nbsp; (20.912,-23.923)..&nbsp; (&nbsp;9.583,-23.984)..controls&nbsp; (-7.364,-22.488)and&nbsp; (-0.741,-16.650)..&nbsp; (&nbsp;7.795,-11.264)..controls&nbsp; (14.998,&nbsp;-6.071)and (17.027,&nbsp;&nbsp;2.377)..&nbsp; (&nbsp;4.580,&nbsp;12.719)..controls&nbsp; (&nbsp;6.623,&nbsp;14.003)and&nbsp; (&nbsp;8.989,&nbsp;13.303)..cycle; \shade[ball&nbsp;color=鹅黄!50](0,0)circle(10); \fill[color=black](&nbsp;-7.040,&nbsp;&nbsp;8.030)..controls (&nbsp;-5.390,&nbsp;10.161)and (&nbsp;-3.901,&nbsp;&nbsp;8.640).. (&nbsp;-3.271,&nbsp;&nbsp;6.922)..controls (&nbsp;-4.492,&nbsp;&nbsp;8.620)and (&nbsp;-5.563,&nbsp;&nbsp;8.890)..cycle; \fill[color=black](&nbsp;&nbsp;3.945,&nbsp;&nbsp;6.698)..controls (&nbsp;&nbsp;4.713,&nbsp;&nbsp;9.390)and (&nbsp;&nbsp;6.030,&nbsp;&nbsp;9.815).. (&nbsp;&nbsp;7.514,&nbsp;&nbsp;8.182)..controls (&nbsp;&nbsp;6.058,&nbsp;&nbsp;8.903)and (&nbsp;&nbsp;4.969,&nbsp;&nbsp;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=象牙白] (&nbsp;8.861,4.373)..controls (&nbsp;6.452,4.980)and&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;4.264,4.836)..&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;2.679,4.277)..controls (&nbsp;2.077,4.051)and&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;1.857,4.907)..&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;2.439,5.158)..controls (&nbsp;5.021,6.423)and&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;7.448,6.250)..&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;9.454,4.990)..controls (&nbsp;9.853,4.686)and&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;9.700,4.119)..cycle; \fill[color=桃红](-6,2.96)ellipse(2.7&nbsp;and&nbsp;0.85); \fill[color=桃红](6.15,2.96)ellipse(2.7&nbsp;and&nbsp;0.85); \fill[color=black](-7.63,4.96)circle(0.8); \fill[color=black](3.27,4.96)circle(0.8); \fill[color=棕黄] (&nbsp;8.273,&nbsp;-0.167)..controls (&nbsp;7.260,-10.168)and (-6.602,&nbsp;-9.920).. (-7.542,&nbsp;-0.443)..controls (-6.548,&nbsp;-8.336)and (&nbsp;6.161,&nbsp;-9.708)..cycle; \node&nbsp;at&nbsp;(-5,20)[left]{\fbox{\texttt{\textbackslash&nbsp;usetikzlibrary\{shapes.callouts\}}}}; \node[cloud&nbsp;callout,&nbsp;cloud&nbsp;puffs=20,&nbsp;aspect=2.5,&nbsp;cloud&nbsp;puff&nbsp;arc=120, shading=ball,text=white,inner&nbsp;sep=0pt]at&nbsp;(-5,30)&nbsp;{忘了点啥?}; \end{tikzpicture} \end{document}</pre><p style="text-align:center"><img src="/data/ueditor/php/upload/image/20190816/1565970605104155.jpg" title="1565970605104155.jpg" alt="enu.jpg" width="605" height="396"/></p><p><br/></p>

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。