Macbook에서 Texmaker를 사용하고 있는데 코드에 문제가 있습니다. 코드를 실행하면 항상 다음 메시지가 표시됩니다.
"정의되지 않은 제어 시퀀스 \pic".
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usepackage{xcolor,pict2e}% to allow any radius
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikzset{pics/myarc/.style args={inner #1 and outer #2 with fill #3}{
code={
\draw[very thick, #1] (1,0) arc (0:90:1cm);
\draw[very thick] (0,1) -- (0,2.2);
\draw[very thick, #2] (0,2.2) arc (90:0:2.2cm);
\draw[very thick] (2.2,0) -- (1,0);
\fill[#3] (1,0) arc (0:90:1cm) -- (0,2.2) arc (90:0:2.2cm) -- cycle;
}
}}
\begin{document}
\begin{tikzpicture}
\draw[very thick,<->] (-6,0) -- (6,0)node[anchor=north west] {$x$};
\pic [draw,very thick, rotate=-45] {myarc={inner blue!90 and outer blue with fill green!}};\end{tikzpicture}\end{document}