代码如下:
\documentclass[12pt,a4paper,fleqn]{ctexart} \usepackage[most]{tcolorbox} \tcbset{pikachu/.style={enhanced,colback=white,colframe=black,boxrule=0.6mm,enlarge top by=7.0mm,enlarge bottom by=2.0mm,top=50pt,sharp corners=south,arc=14mm, overlay={ \begin{scope}[shift={([xshift=9.0mm,yshift=-13mm]frame.north west)},rotate=30] % 左目 \path[draw=black,fill=black,line width=0.5mm] (0,0) arc (0:360:2mm); \path[fill=white] (-.05,.08) arc (0:360:1mm); % 右目 \path[draw=black,fill=black,line width=0.5mm] (1.2,0) arc (0:360:2mm); \path[fill=white] (1.1-.05,.08) arc (0:360:1mm); % ハナ \path[draw=black,fill=black] (0.4,-.15) circle [x radius=0.06,y radius=0.03] (0:360); % クチ \path[draw=black,line width=0.4mm,xshift=0.5mm,yshift=-3.5mm] (0,-.02) .. controls (.1,-.1) and (.15,-.14) .. (.35,0) % 左 .. controls (-.15+.7,-.14) and (-.1+.7,-.1) .. (0+.7,-.02); % 右 % ほっぺ \path[draw=black,fill=white,line width=0.4mm] (1.6,-0.4) arc (10:290:2mm); \end{scope}} , underlay={ \begin{scope}[shift={([xshift=0mm,yshift=0mm]frame.north west)}] % 耳とフレームが重なるところを白塗り(右) \path[draw=white,line width=0.7mm] (1.51,-0.03)--(2.55,-0.03); % 耳とフレームが重なるところを白塗り(左) \path[draw=white,line width=2.0mm] (0.1,-0.84)--(0.1,-2); \end{scope}} , % 右耳 underlay={ \begin{scope}[shift={([xshift=0mm,yshift=0mm]frame.north west)}] % 耳のメイン \path[draw=black,fill=white,line width=0.6mm,rounded corners=1.0pt] (1.5,-0.03) .. controls (2.5,0.3) and (3.5,-0.5) .. (3.7,-0.6) .. controls (2.7,-0.5) and (2.5,-0.5) .. (2.2,-0.4); % 耳の黒い部分の境界 \clip (1.5,-0.03) .. controls (2.5,0.3) and (3.5,-0.5) .. (3.7,-0.6) .. controls (2.7,-0.5) and (2.5,-0.5) .. (2.2,-0.4); \fill[black] (2.4,-0.5) to [out=10,in=210] (3.4,-0.3) -- (4,-0.7) -- cycle; \end{scope}} , % 左耳 underlay={ \begin{scope}[shift={([xshift=9.06mm,yshift=4.93mm]frame.north west)},rotate=60] % 耳のメイン xscale=-1 で反転 \path[xscale=-1,draw=black,fill=white,line width=0.6mm,rounded corners=1.0pt] (1.5,-0.03) .. controls (2.5,0.3) and (3.5,-0.5) .. (3.7,-0.6) .. controls (2.7,-0.5) and (2.5,-0.5) .. (2.2,-0.4); % 耳の黒い部分の境界 \clip[xscale=-1] (1.5,-0.03) .. controls (2.5,0.3) and (3.5,-0.5) .. (3.7,-0.6) .. controls (2.7,-0.5) and (2.5,-0.5) .. (2.2,-0.4); \fill[xscale=-1,black] (2.4,-0.5) to [out=10,in=210] (3.4,-0.3) -- (4,-0.7) -- cycle; \end{scope}} , % しっぽ underlay={ \begin{scope} [xscale=1.1,yscale=0.4,shift={([xshift=-5mm,yshift=-19mm]frame.north east)},rotate=38] % [xscale=1,yscale=1,shift={([xshift=-8mm,yshift=-50mm]frame.north east)},rotate=0] % グリッド % \draw [help lines] (-6,0) grid (6,6); \path[draw=black,fill=white,line width=0.6mm,rounded corners=1.0pt] (0,0) -- (0.3,0) -- (0.7,1.2) -- (-0.5,1.4) -- (-0.1,2.7) -- (-1.8,3) to [out=80,in=245] (-1,5.4) -- (-3.9,6) to [out=245,in=90] (-4.6,2.2) -- (-2,2) -- (-2.2,1.1) -- (0.2,0.7) -- cycle; % 上とおなじの clip \clip (0,0) -- (0.3,0) -- (0.7,1.2) -- (-0.5,1.4) -- (-0.1,2.7) -- (-2,3) to [out=80,in=245] (-1.2,5.4) -- (-4.1,6) to [out=245,in=90] (-4.8,2.2) -- (-2.2,2) -- (-2.5,1.1) -- (0.2,0.7) -- cycle; \fill (-0.8,0.7) -- (-0.2,0.9) -- (-0.5,1.1) -- (-0.2,1.1) -- (-0.4,1.2) -- (-0.1,1.25) -- (-0.4,1.45) -- (1,1.5) -- (1,0) -- (-0.5,0) -- cycle; \end{scope}} , % 背中の模様 underlay={ \begin{scope}[shift={(frame.north west)},rounded corners=10pt] \path[fill=black,xshift=36mm,yshift=0mm] (0,0) -- (0.3,-0.8) -- (0.35,0); \path[fill=black,xshift=42mm,yshift=0mm] (0,0) -- (0.3,-0.8) -- (0.35,0); \end{scope}} }} \begin{document} \begin{tcolorbox}[pikachu] \textbf{问题}\quad 在平面直角坐标系中.等腰Rt$\triangle$OAB的斜边OA在x轴上.P为线段OB上-动点(不与O,B重合).过P点向x轴作垂线.垂足为C.以PC为边在PC的右侧作正方形PCDM。 \end{tcolorbox} \end{document}
发表评论 取消回复