包 pgfkeys 错误:我不知道密钥“/tikz/patch/.pic”,我将忽略它

包 pgfkeys 错误:我不知道密钥“/tikz/patch/.pic”,我将忽略它

编译时出现以下错误:

! Package pgfkeys Error: I do not know the key '/tikz/patch/.pic' and I am going to ignore it. Perhaps you misspelled it.

我正在使用带有更新包的 tex live。我在 SE 上检查了类似的问题,但建议对我没有用。我有 pgf 版本 v3.00 和 tikz。这是我的最小示例:

\documentclass{article}
\usepackage{tikz}


\tikzset{patch/.pic = {
\draw[fill=green!30] (-1.8,3.5) to[out=10, in=190] (-1,5) to (-0.2,3.5) to [out=-140, in=45] (-1,2) to [out=145, in=-35] (-1.8,3.5) -- cycle;
\draw[fill=black!60] (-1,2) to [out=145, in=-35] (-1.8,3.5) -- (-1.8,3.3) -- (-1,1.5) -- cycle;
\draw[fill=black!30] (-0.2,3.5) to[out=-140, in=45] (-1,2) -- (-1,1.5) -- (-0.2, 3.3) -- cycle;},}

\begin{document}
\begin{tikzpicture}[y=.3cm, x=1.2cm,font=\sffamily]

\pic at (0,0) {patch};

\end{tikzpicture}
\end{document}

相关内容