summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-08-08 03:01:03 +0000
committerNorbert Preining <norbert@preining.info>2021-08-08 03:01:03 +0000
commited204b296810be74994f70f76b7f5b849f6e9ecb (patch)
treef39bb9d2abbf54d1fa1a585d245a0942c77e2f05 /graphics
parent5991e0faa2ab9a1b9bdb72d6399cff4444b02f35 (diff)
CTAN sync 202108080301
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/tikzlings/README.md2
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-addons.sty47
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty279
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bats.sty260
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bears.sty290
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bees.sty300
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty263
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-cats.sty488
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty547
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty409
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-doc.pdfbin629974 -> 686153 bytes
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-doc.tex1439
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty286
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty321
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty338
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-list.sty4
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty438
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-mice.sty319
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-moles.sty298
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-owls.sty303
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty293
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty286
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty322
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty323
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty332
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty457
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty318
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty315
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings.sty2
29 files changed, 4959 insertions, 4320 deletions
diff --git a/graphics/pgf/contrib/tikzlings/README.md b/graphics/pgf/contrib/tikzlings/README.md
index f0b4928420..05ad647df4 100644
--- a/graphics/pgf/contrib/tikzlings/README.md
+++ b/graphics/pgf/contrib/tikzlings/README.md
@@ -1,7 +1,7 @@
# TikZlings
A collection of animals and other beings from the tikz world
-Current version: 2021/04/16 version v0.6
+Current version: 2021/08/06 version v0.8
This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty b/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
index 4cc5eecbf3..67199fdd99 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
@@ -12,7 +12,7 @@
% See http://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-addons}[2021/04/16 version v0.6 Draw additional items for the tikzlings]
+\ProvidesPackage{tikzlings-addons}[2021/08/06 version v0.8 Draw additional items for the tikzlings]
\RequirePackage{tikz}
\usetikzlibrary{patterns} % for the wizard hat
@@ -107,6 +107,8 @@
\newif\ifthing@crozier
\newif\ifthing@shovel
\newif\ifthing@pickaxe
+\newif\ifthing@strawbroom
+\newif\ifthing@broom
\newif\ifthing@umbrella
\newif\ifthing@umbrellaclosed
\newif\ifthing@handbag
@@ -312,13 +314,25 @@
shovel/.default = gray,
pickaxe/.code = \thing@pickaxetrue
\def\thing@pickaxe{#1},
- pickaxe/.default = gray,
+ pickaxe/.default = gray,
+ strawbroom/.code = \thing@strawbroomtrue
+ \def\thing@strawbroom{#1},
+ strawbroom/.default = brown!50!white,
+ strawbroomstick/.code = \def\thing@strawbroomstick{#1},
+ strawbroomstick = brown,
+ strawbroomribbon/.code = \def\thing@strawbroomribbon{#1},
+ strawbroomribbon = red!50!black,
+ broom/.code = \thing@broomtrue
+ \def\thing@broom{#1},
+ broom/.default = brown,
+ broomstick/.code = \def\thing@broomstick{#1},
+ broomstick = gray!50!black,
umbrella/.code = \thing@umbrellatrue
\def\thing@umbrella{#1},
- umbrella/.default = cyan,
+ umbrella/.default = cyan,
umbrellaclosed/.code = \thing@umbrellaclosedtrue
\def\thing@umbrellaclosed{#1},
- umbrellaclosed/.default = cyan,
+ umbrellaclosed/.default = cyan,
umbrella closed/.forward to = /thing/umbrellaclosed,
handbag/.code = \thing@handbagtrue
\def\thing@handbag{#1},
@@ -384,10 +398,8 @@
\ifthing@harlequin
\begin{scope}[xshift=-26]
\path (0.19,1.85) rectangle (1.85,2.67);
- \begin{pgfinterruptboundingbox}
- \fill[\thing@harlequin] (0.6006,1.9719) .. controls (0.7432,1.8954) and (0.9320,1.8698) .. (0.9320,1.8698) -- (1.0404,2.3839) .. controls (0.9223,2.8873) and (0.1755,2.5634) .. (0.3019,2.2958) .. controls (0.5807,2.5024) and (0.7251,2.3376) .. (0.6006,1.9719) -- cycle;
- \fill[\thing@niuqelrah] (1.2853,1.8902) .. controls (1.1177,1.8507) and (0.9278,1.8703) .. (0.9278,1.8703) -- (1.0404,2.3839) .. controls (1.3637,2.8347) and (1.9373,2.3532) .. (1.7049,2.1284) .. controls (1.5267,2.3895) and (1.3204,2.2666) .. (1.2853,1.8902) -- cycle;
- \end{pgfinterruptboundingbox}
+ \fill[\thing@harlequin,overlay] (0.6006,1.9719) .. controls (0.7432,1.8954) and (0.9320,1.8698) .. (0.9320,1.8698) -- (1.0404,2.3839) .. controls (0.9223,2.8873) and (0.1755,2.5634) .. (0.3019,2.2958) .. controls (0.5807,2.5024) and (0.7251,2.3376) .. (0.6006,1.9719) -- cycle;
+ \fill[\thing@niuqelrah,overlay] (1.2853,1.8902) .. controls (1.1177,1.8507) and (0.9278,1.8703) .. (0.9278,1.8703) -- (1.0404,2.3839) .. controls (1.3637,2.8347) and (1.9373,2.3532) .. (1.7049,2.1284) .. controls (1.5267,2.3895) and (1.3204,2.2666) .. (1.2853,1.8902) -- cycle;
\fill[\thing@harlequin] (1.7,2.07) circle[radius=0.1];
\fill[\thing@niuqelrah] (0.3,2.23) circle[radius=0.1];
\end{scope}
@@ -831,6 +843,25 @@
\fill[\thing@pickaxe] (-0.77, 0.57) .. controls (-0.14, 0.25) and (-0.02, 0.21) .. (0.60, 0.02) .. controls (-0.12, 0.03) and (-0.22, 0.10) .. (-0.77, 0.57) -- cycle;
\fi
%
+% strawbroom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifthing@strawbroom
+ \begin{scope}[xshift=-24]
+ \fill[\thing@strawbroomstick] (0.9160,0.5478) -- (1.2792,1.6574) .. controls (1.3063,1.6961) and (1.3956,1.6649) .. (1.3688,1.6176) -- (0.9508,0.5179) .. controls (0.9360,0.5142) and (0.9202,0.5331) .. (0.9160,0.5478) -- cycle;
+ \fill[\thing@strawbroom] (0.5528,0.2890) .. controls (0.6449,0.3598) and (0.7460,0.5693) .. (0.8911,0.6871) .. controls (0.9481,0.7215) and (1.0395,0.6925) .. (1.0553,0.6224) .. controls (1.1219,0.4385) and (0.9965,0.2147) .. (1.0056,0.1000) .. controls (0.8926,0.0241) and (0.5950,0.2078) .. (0.5528,0.2890) -- cycle;
+ \draw[\thing@strawbroomribbon,line width=\scalingfactor*0.4pt] (0.7916,0.5876) .. controls (0.7916,0.5876) and (0.8210,0.5404) .. (0.8451,0.5304) .. controls (0.8708,0.5197) and (0.9021,0.5419) .. (0.9284,0.5329) .. controls (0.9544,0.5240) and (0.9663,0.4903) .. (0.9919,0.4806) .. controls (1.0148,0.4720) and (1.0653,0.4781) .. (1.0653,0.4781);
+ \draw[\thing@strawbroomribbon,line width=\scalingfactor*0.4pt] (0.7565,0.5493) .. controls (0.7565,0.5493) and (0.7897,0.4961) .. (0.8169,0.4848) .. controls (0.8458,0.4727) and (0.8812,0.4978) .. (0.9109,0.4876) .. controls (0.9401,0.4776) and (0.9535,0.4396) .. (0.9824,0.4287) .. controls (1.0083,0.4189) and (1.0652,0.4259) .. (1.0652,0.4259);
+ \end{scope}
+\fi
+%
+% broom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifthing@broom
+ \begin{scope}[rotate=-10,xshift=-23,yshift=-4]
+ \draw[\thing@broomstick,line width=\scalingfactor*1.8pt] (0.9, 1.8) -- ++(0,-1.4);
+ \draw[\thing@broomstick,line width=\scalingfactor*1.8pt] (0.6, 0.42) -- ++(0.6,0);
+ \fill[\thing@broom] (0.6, 0.40) -- ++(-0.05,-0.1) -- ++(0.7,0) -- ++(-0.05, 0.1) -- cycle;
+ \end{scope}
+\fi
+%
% umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@umbrella
\path (-0.8, 0.4) rectangle (1.2200000000000002, 2.7);
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty b/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty
index b14a2d76d1..721502f6cd 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/anteater.tex
+ % !TeX root = ./examples/anteater.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-anteaters}[2021/04/16 version v0.6 Drawing anteaters in TikZ]
+\ProvidesPackage{tikzlings-anteaters}[2021/08/06 version v0.8 Drawing anteaters in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -63,117 +63,168 @@
}
\def\anteater@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.75,0.1) rectangle (1.12,2.26);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from
+ % https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifanteater@threeD
+ \def\anteater@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifanteater@contour
+ \def\anteater@part@draw[##1]{\draw[##1,\anteater@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\anteater@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname anteaterhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifanteater@back
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (1.0893, 1.5779) .. controls (0.3433, 1.6612) and (0.4863, 0.6062) .. (-0.0243, 0.348) .. controls (1.0671, 0.068) and (0.8133, 1.1808) .. (1.0893, 1.5779) -- cycle;
+ \fi% back
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!45!white!95!orange] (-0.55,1) ellipse[x radius=0.42, y radius=0.13, rotate=70] (0.55,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body] (0.52, 0.8) .. controls (0.52, 0.23) and (0.3, 0.17) .. (0, 0.17) .. controls (-0.3, 0.17) and (-0.52, 0.23) .. (-0.52, 0.8) .. controls (-0.52, 1.35) and (-0.3, 1.8) .. (0, 1.8) .. controls (0.3, 1.8) and (0.52, 1.35) .. (0.52, 0.8) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname anteaterhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ \ifanteater@back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!45!white!95!orange] (-0,1.47) ellipse [x radius=0.36, y radius=0.28];
+ %
+ % Collar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray]
+ (-0,1.47) ellipse [x radius=0.35, y radius=0.23];
+ \anteater@part@draw[\anteater@body] (-0,1.73) ellipse [x radius=0.36, y radius=0.33];
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.5551, 2.2281) .. controls (0.4961, 2.2273) and (0.4390, 2.2093) .. (0.3831, 2.1919) .. controls (0.3282, 2.173) and (0.2725, 2.1539) .. (0.2231, 2.1228) .. controls (0.1875, 2.0984) and (0.1524, 2.0637) .. (0.1470, 2.0187) .. controls (0.1446, 2.0028) and (0.1518, 1.9881) .. (0.1584, 1.9744) .. controls (0.1706, 1.9343) and (0.2090, 1.9063) .. (0.25, 1.9017) .. controls (0.3079, 1.8943) and (0.3684, 1.9134) .. (0.4132, 1.9504) .. controls (0.4657, 1.9988) and (0.5111, 2.0545) .. (0.5513, 2.1133) .. controls (0.5692, 2.1404) and (0.5854, 2.1692) .. (0.5945, 2.2004) .. controls (0.5989, 2.2232) and (0.5717, 2.2282) .. (0.5551, 2.2281) -- cycle;
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.5551, 2.2281) .. controls (-0.4961, 2.2273) and (-0.4390, 2.2093) .. (-0.3831, 2.1919) .. controls (-0.3282, 2.173) and (-0.2725, 2.1539) .. (-0.2231, 2.1228) .. controls (-0.1875, 2.0984) and (-0.1524, 2.0637) .. (-0.1470, 2.0187) .. controls (-0.1446, 2.0028) and (-0.1518, 1.9881) .. (-0.1584, 1.9744) .. controls (-0.1706, 1.9343) and (-0.2090, 1.9063) .. (-0.25, 1.9017) .. controls (-0.3079, 1.8943) and (-0.3684, 1.9134) .. (-0.4132, 1.9504) .. controls (-0.4657, 1.9988) and (-0.5111, 2.0545) .. (-0.5513, 2.1133) .. controls (-0.5692, 2.1404) and (-0.5854, 2.1692) .. (-0.5945, 2.2004) .. controls (-0.5989, 2.2232) and (-0.5717, 2.2282) .. (-0.5551, 2.2281) -- cycle;
+ %
+ \else% back
+ %
+ % Collar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!45!white!95!orange] (0.33, 1.55) -- (-0.33, 1.55) .. controls (-0.5, 1.05) and (-0.1, 0.95) .. (0, 0.60) .. controls (0.1, 0.95) and (0.5, 1.05) .. (0.33, 1.55) -- cycle;
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.33, 1.55) -- (-0.33, 1.55) .. controls (-0.45, 1.1) and (-0.1, 1) .. (0, 0.70) .. controls (0.1, 1) and (0.45, 1.1) .. (0.33, 1.55) -- cycle;
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.3531, 1.9773) .. controls (0.4315, 2.0197) and (0.6217, 2.172) .. (0.5917, 2.2157) .. controls (0.5615, 2.2594) and (0.3224, 2.178) .. (0.2441, 2.1354) .. controls (0.1659, 2.093) and (0.1269, 2.023) .. (0.1569, 1.9793) .. controls (0.1870, 1.9356) and (0.2748, 1.9347) .. (0.3531, 1.9773) -- cycle;
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.3531, 1.9773) .. controls (-0.4315, 2.0197) and (-0.6217, 2.172) .. (-0.5917, 2.2157) .. controls (-0.5615, 2.2594) and (-0.3224, 2.178) .. (-0.2441, 2.1354) .. controls (-0.1659, 2.093) and (-0.1269, 2.023) .. (-0.1569, 1.9793) .. controls (-0.1870, 1.9356) and (-0.2748, 1.9347) .. (-0.3531, 1.9773) -- cycle;
+ \anteater@part@draw[\anteater@body!45!white!95!orange] (0.4086, 1.9465) .. controls (0.4679, 1.9952) and (0.6205, 2.1813) .. (0.5862, 2.2146) .. controls (0.5517, 2.2477) and (0.3434, 2.1152) .. (0.2841, 2.0665) .. controls (0.2249, 2.0177) and (0.2048, 1.9515) .. (0.2391, 1.9184) .. controls (0.2736, 1.8853) and (0.3494, 1.8979) .. (0.40861, 1.9465) -- cycle
+ (-0.4086, 1.9465) .. controls (-0.4679, 1.9952) and (-0.6205, 2.1813) .. (-0.5862, 2.2146) .. controls (-0.5517, 2.2477) and (-0.3434, 2.1152) .. (-0.2841, 2.0665) .. controls (-0.2249, 2.0177) and (-0.2048, 1.9515) .. (-0.2391, 1.9184) .. controls (-0.2736, 1.8853) and (-0.3494, 1.8979) .. (-0.40861, 1.9465) -- cycle;
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body]
+ (0.33, 1.71) .. controls (0.16, 1.52) and (0.1, 1.5) .. (0.08, 1.05) .. controls (0.07, 1) and (-0.07, 1) .. (-0.08, 1.05) .. controls (-0.1, 1.5) and (-0.16, 1.52) .. (-0.33, 1.7) .. controls (-0.45, 1.85) and (-0.22, 2.05) .. (0, 2.05) .. controls (0.22, 2.05) and (0.45, 1.85) .. (0.33, 1.7) -- cycle;
+ %
+ % Cheeks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!45!white!95!orange] (0.3508, 1.739) .. controls (0.3508, 1.739) and (0.2861, 1.8489) .. (0.1571, 1.7664) .. controls (0.0279, 1.684) and (0.0627, 1.0524) .. (0.0627, 1.0524) .. controls (0.0627, 1.0524) and (0.131, 1.3772) .. (0.2314, 1.44) .. controls (0.3599, 1.5206) and (0.3508, 1.739) .. (0.3508, 1.739) -- cycle
+ (-0.3508, 1.739) .. controls (-0.3508, 1.739) and (-0.2861, 1.8489) .. (-0.1571, 1.7664) .. controls (-0.0279, 1.684) and (-0.0627, 1.0524) .. (-0.0627, 1.0524) .. controls (-0.0627, 1.0524) and (-0.131, 1.3772) .. (-0.2314, 1.44) .. controls (-0.3599, 1.5206) and (-0.3508, 1.739) .. (-0.3508, 1.739) -- cycle;
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0, 1.08) ellipse[x radius=0.08, y radius=0.05];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \anteater@part@draw[\anteater@eye] (0.23, 1.7) circle[radius=0.05];
+ \anteater@part@draw[\anteater@eye] (-0.23, 1.7) circle[radius=0.05];
+ \fi% back
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifanteater@back
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (1.0893, 1.5779) .. controls (0.3433, 1.6612) and (0.4863, 0.6062) .. (-0.0243, 0.348) .. controls (1.0671, 0.068) and (0.8133, 1.1808) .. (1.0893, 1.5779) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname anteaterhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.75,0.1) rectangle (1.12,2.26);
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Anteater]{Peter, the anteater}
%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+%\subsection{Package name}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-anteaters}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%\subsection{Basic Usage}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifanteater@threeD
- \def\anteater@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifanteater@contour
- \def\anteater@part@draw[##1]{\draw[##1,\anteater@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\anteater@part@draw[##1]{\fill[##1]}
- \fi
-\fi
+%\begin{tcblisting}{}
+%\anteater
+%\end{tcblisting}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{Options}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname anteaterhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+%The basic anteater can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\anteater[body=blue]
+%\end{tcblisting}
%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifanteater@back
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (1.0893, 1.5779) .. controls (0.3433, 1.6612) and (0.4863, 0.6062) .. (-0.0243, 0.348) .. controls (1.0671, 0.068) and (0.8133, 1.1808) .. (1.0893, 1.5779) -- cycle;
-\fi
+%In addition to the colour of the body, the colour of the eyes can be adjusted:
+%\begin{tcblisting}{}
+%\anteater[eye=red]
+%\end{tcblisting}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\anteater@part@draw[\anteater@body!45!white!95!orange] (-0.55,1) ellipse[x radius=0.42, y radius=0.13, rotate=70] (0.55,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
+%To view the anteater from behind:
+%\begin{tcblisting}{}
+%\anteater[back]
+%\end{tcblisting}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\anteater@part@draw[\anteater@body] (0.52, 0.8) .. controls (0.52, 0.23) and (0.3, 0.17) .. (0, 0.17) .. controls (-0.3, 0.17) and (-0.52, 0.23) .. (-0.52, 0.8) .. controls (-0.52, 1.35) and (-0.3, 1.8) .. (0, 1.8) .. controls (0.3, 1.8) and (0.52, 1.35) .. (0.52, 0.8) -- cycle;
+%The key \lstinline|3D| will make the anteater 3-dimensional:
+%\begin{tcblisting}{}
+%\anteater[3D]
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname anteaterhookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-\ifanteater@back
- %
- % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!45!white!95!orange] (-0,1.47) ellipse [x radius=0.36, y radius=0.28];
- %
- % Collar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray]
- (-0,1.47) ellipse [x radius=0.35, y radius=0.23];
- \anteater@part@draw[\anteater@body] (-0,1.73) ellipse [x radius=0.36, y radius=0.33];
- % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.5551, 2.2281) .. controls (0.4961, 2.2273) and (0.4390, 2.2093) .. (0.3831, 2.1919) .. controls (0.3282, 2.173) and (0.2725, 2.1539) .. (0.2231, 2.1228) .. controls (0.1875, 2.0984) and (0.1524, 2.0637) .. (0.1470, 2.0187) .. controls (0.1446, 2.0028) and (0.1518, 1.9881) .. (0.1584, 1.9744) .. controls (0.1706, 1.9343) and (0.2090, 1.9063) .. (0.25, 1.9017) .. controls (0.3079, 1.8943) and (0.3684, 1.9134) .. (0.4132, 1.9504) .. controls (0.4657, 1.9988) and (0.5111, 2.0545) .. (0.5513, 2.1133) .. controls (0.5692, 2.1404) and (0.5854, 2.1692) .. (0.5945, 2.2004) .. controls (0.5989, 2.2232) and (0.5717, 2.2282) .. (0.5551, 2.2281) -- cycle;
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.5551, 2.2281) .. controls (-0.4961, 2.2273) and (-0.4390, 2.2093) .. (-0.3831, 2.1919) .. controls (-0.3282, 2.173) and (-0.2725, 2.1539) .. (-0.2231, 2.1228) .. controls (-0.1875, 2.0984) and (-0.1524, 2.0637) .. (-0.1470, 2.0187) .. controls (-0.1446, 2.0028) and (-0.1518, 1.9881) .. (-0.1584, 1.9744) .. controls (-0.1706, 1.9343) and (-0.2090, 1.9063) .. (-0.25, 1.9017) .. controls (-0.3079, 1.8943) and (-0.3684, 1.9134) .. (-0.4132, 1.9504) .. controls (-0.4657, 1.9988) and (-0.5111, 2.0545) .. (-0.5513, 2.1133) .. controls (-0.5692, 2.1404) and (-0.5854, 2.1692) .. (-0.5945, 2.2004) .. controls (-0.5989, 2.2232) and (-0.5717, 2.2282) .. (-0.5551, 2.2281) -- cycle;
-%
-\else
- % Collar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!45!white!95!orange] (0.33, 1.55) -- (-0.33, 1.55) .. controls (-0.5, 1.05) and (-0.1, 0.95) .. (0, 0.60) .. controls (0.1, 0.95) and (0.5, 1.05) .. (0.33, 1.55) -- cycle;
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.33, 1.55) -- (-0.33, 1.55) .. controls (-0.45, 1.1) and (-0.1, 1) .. (0, 0.70) .. controls (0.1, 1) and (0.45, 1.1) .. (0.33, 1.55) -- cycle;
- % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.3531, 1.9773) .. controls (0.4315, 2.0197) and (0.6217, 2.172) .. (0.5917, 2.2157) .. controls (0.5615, 2.2594) and (0.3224, 2.178) .. (0.2441, 2.1354) .. controls (0.1659, 2.093) and (0.1269, 2.023) .. (0.1569, 1.9793) .. controls (0.1870, 1.9356) and (0.2748, 1.9347) .. (0.3531, 1.9773) -- cycle;
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.3531, 1.9773) .. controls (-0.4315, 2.0197) and (-0.6217, 2.172) .. (-0.5917, 2.2157) .. controls (-0.5615, 2.2594) and (-0.3224, 2.178) .. (-0.2441, 2.1354) .. controls (-0.1659, 2.093) and (-0.1269, 2.023) .. (-0.1569, 1.9793) .. controls (-0.1870, 1.9356) and (-0.2748, 1.9347) .. (-0.3531, 1.9773) -- cycle;
- \anteater@part@draw[\anteater@body!45!white!95!orange] (0.4086, 1.9465) .. controls (0.4679, 1.9952) and (0.6205, 2.1813) .. (0.5862, 2.2146) .. controls (0.5517, 2.2477) and (0.3434, 2.1152) .. (0.2841, 2.0665) .. controls (0.2249, 2.0177) and (0.2048, 1.9515) .. (0.2391, 1.9184) .. controls (0.2736, 1.8853) and (0.3494, 1.8979) .. (0.40861, 1.9465) -- cycle
- (-0.4086, 1.9465) .. controls (-0.4679, 1.9952) and (-0.6205, 2.1813) .. (-0.5862, 2.2146) .. controls (-0.5517, 2.2477) and (-0.3434, 2.1152) .. (-0.2841, 2.0665) .. controls (-0.2249, 2.0177) and (-0.2048, 1.9515) .. (-0.2391, 1.9184) .. controls (-0.2736, 1.8853) and (-0.3494, 1.8979) .. (-0.40861, 1.9465) -- cycle;
- %
- % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body]
- (0.33, 1.71) .. controls (0.16, 1.52) and (0.1, 1.5) .. (0.08, 1.05) .. controls (0.07, 1) and (-0.07, 1) .. (-0.08, 1.05) .. controls (-0.1, 1.5) and (-0.16, 1.52) .. (-0.33, 1.7) .. controls (-0.45, 1.85) and (-0.22, 2.05) .. (0, 2.05) .. controls (0.22, 2.05) and (0.45, 1.85) .. (0.33, 1.7) -- cycle;
- %
- % Cheeks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!45!white!95!orange] (0.3508, 1.739) .. controls (0.3508, 1.739) and (0.2861, 1.8489) .. (0.1571, 1.7664) .. controls (0.0279, 1.684) and (0.0627, 1.0524) .. (0.0627, 1.0524) .. controls (0.0627, 1.0524) and (0.131, 1.3772) .. (0.2314, 1.44) .. controls (0.3599, 1.5206) and (0.3508, 1.739) .. (0.3508, 1.739) -- cycle
- (-0.3508, 1.739) .. controls (-0.3508, 1.739) and (-0.2861, 1.8489) .. (-0.1571, 1.7664) .. controls (-0.0279, 1.684) and (-0.0627, 1.0524) .. (-0.0627, 1.0524) .. controls (-0.0627, 1.0524) and (-0.131, 1.3772) .. (-0.2314, 1.44) .. controls (-0.3599, 1.5206) and (-0.3508, 1.739) .. (-0.3508, 1.739) -- cycle;
- %
- % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0, 1.08) ellipse[x radius=0.08, y radius=0.05];
- %
- % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@eye] (0.23, 1.7) circle[radius=0.05];
- \anteater@part@draw[\anteater@eye] (-0.23, 1.7) circle[radius=0.05];
-\fi
-%
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifanteater@back
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (1.0893, 1.5779) .. controls (0.3433, 1.6612) and (0.4863, 0.6062) .. (-0.0243, 0.348) .. controls (1.0671, 0.068) and (0.8133, 1.1808) .. (1.0893, 1.5779) -- cycle;
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname anteaterhookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
-
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\anteater[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bats.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bats.sty
new file mode 100644
index 0000000000..9e8daeb75d
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bats.sty
@@ -0,0 +1,260 @@
+ % !TeX root = ./examples/bat.tex
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{tikzlings-bats}[2021/08/06 version v0.8 Drawing bats in TikZ]
+
+\RequirePackage{tikz}
+\RequirePackage{tikzlings-addons}
+
+\newcommand*{\bat}[1][]{%
+ \begin{scope}%
+ \tikzset{/bat/.cd,#1}%
+ \bat@draw%
+ \end{scope}%
+ \thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bathookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
+}
+
+\newif\ifbat@threeD
+\newif\ifbat@back
+\newif\ifbat@contour
+\newif\ifbat@teeth
+
+\tikzset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Pass unknown keys on to tikz
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ /bat/.search also={/tikz,/pgf,/thing},
+ /bat/.cd,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % body
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ body/.code = \def\bat@body{#1},
+ body = black!75!white,
+ ears/.code = \def\bat@ears{#1},
+ ears = \bat@body,
+ eye/.code = \def\bat@eye{#1},
+ eye = white,
+ pupil/.code = \def\bat@pupil{#1},
+ pupil = black,
+ mouth/.code = \def\bat@mouth{#1},
+ mouth = black,
+ feet/.code = \def\bat@feet{#1},
+ feet = orange,
+ wings/.code = \def\bat@wings{#1},
+ wings = 1,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % options
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ teeth/.code = \bat@teethtrue
+ \def\bat@teeth{#1},
+ teeth/.default = white,
+ 3D/.code = \bat@threeDtrue,
+ back/.code = \bat@backtrue,
+ contour/.code = \bat@contourtrue
+ \def\bat@contour{#1}
+ \def\bat@antennas{#1}
+ \def\bat@mouth{#1},
+ contour/.default = black,
+ outline/.forward to = /bat/contour,
+}
+
+\def\bat@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.44,0.0) rectangle (0.44, 2.2);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbat@threeD
+ \def\bat@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifbat@contour
+ \def\bat@part@draw[##1]{\draw[##1,\bat@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\bat@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname batshookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bat@part@draw[\bat@body] (-0.4147-\bat@wings*1.8711, 0.6377) .. controls (-0.4147-\bat@wings*2.0410, 1.1512) and (-0.4147-\bat@wings*1.1342, 1.5336) .. (-0.4147-\bat@wings*0.5687, 1.6054) .. controls (-0.4147-\bat@wings*0.3860, 1.4742) and (-0.4147-\bat@wings*0.0711, 1.3009) .. (-0.35, 1.2365) -- (-0.35, 0.5586) .. controls (-0.4147-\bat@wings*0.0890, 0.6892) and (-0.4147-\bat@wings*0.2882, 0.7333) .. (-0.4147-\bat@wings*0.4758, 0.6377) .. controls (-0.4147-\bat@wings*0.6753, 0.841) and (-0.4147-\bat@wings*0.9758, 0.8349) .. (-0.4147-\bat@wings*1.1476, 0.6377) .. controls (-0.4147-\bat@wings*1.2902, 0.8407) and (-0.4147-\bat@wings*1.72, 0.8553) .. (-0.4147-\bat@wings*1.8711, 0.6377) -- cycle;
+ \bat@part@draw[\bat@body] (0.4147+\bat@wings*1.8711, 0.6377) .. controls (0.4147+\bat@wings*2.0410, 1.1512) and (0.4147+\bat@wings*1.1342, 1.5336) .. (0.4147+\bat@wings*0.5687, 1.6054) .. controls (0.4147+\bat@wings*0.3860, 1.4742) and (0.4147+\bat@wings*0.0711, 1.3009) .. (0.35, 1.2365) -- (0.35, 0.5586) .. controls (0.4147+\bat@wings*0.0890, 0.6892) and (0.4147+\bat@wings*0.2882, 0.7333) .. (0.4147+\bat@wings*0.4758, 0.6377) .. controls (0.4147+\bat@wings*0.6753, 0.841) and (0.4147+\bat@wings*0.9758, 0.8349) .. (0.4147+\bat@wings*1.1476, 0.6377) .. controls (0.4147+\bat@wings*1.2902, 0.8407) and (0.4147+\bat@wings*1.72, 0.8553) .. (0.4147+\bat@wings*1.8711, 0.6377) -- cycle;
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bat@part@draw[\bat@ears] (-0.3498, 1.7392) .. controls (-0.3498, 1.7392) and (-0.4724, 1.9226) .. (-0.3896, 2.177) .. controls (-0.2561, 2.2679) and (-0.0953, 1.9447) .. (0.0234, 1.9394) -- cycle;
+ \bat@part@draw[\bat@ears] (0.3498, 1.7392) .. controls (0.3498, 1.7392) and (0.4724, 1.9226) .. (0.3896, 2.177) .. controls (0.2561, 2.2679) and (0.0953, 1.9447) .. (-0.0234, 1.9394) -- cycle;
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbat@back
+ \bat@part@draw[\bat@feet] (0.175,0.1) ellipse[x radius=0.03, y radius=0.1];
+ \bat@part@draw[\bat@feet] (0.225,0.11) ellipse[x radius=0.03, y radius=0.1, rotate=20];
+ \bat@part@draw[\bat@feet] (0.275,0.13) ellipse[x radius=0.03, y radius=0.1, rotate=40];
+ \bat@part@draw[\bat@feet] (-0.175,0.1) ellipse[x radius=0.03, y radius=0.1];
+ \bat@part@draw[\bat@feet] (-0.225,0.11) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
+ \bat@part@draw[\bat@feet] (-0.275,0.13) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bat@part@draw[\bat@body] (0,0.8) ellipse [y radius=0.7, x radius=0.45];
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bat@part@draw[\bat@body] (0,1.55) circle [radius=0.43];
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname batshookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifbat@back
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bat@part@draw[\bat@feet] (0.175,0.1) ellipse[x radius=0.03, y radius=0.1];
+ \bat@part@draw[\bat@feet] (0.225,0.11) ellipse[x radius=0.03, y radius=0.1, rotate=20];
+ \bat@part@draw[\bat@feet] (0.275,0.13) ellipse[x radius=0.03, y radius=0.1, rotate=40];
+ \bat@part@draw[\bat@feet] (-0.175,0.1) ellipse[x radius=0.03, y radius=0.1];
+ \bat@part@draw[\bat@feet] (-0.225,0.11) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
+ \bat@part@draw[\bat@feet] (-0.275,0.13) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bat@part@draw[\bat@eye] (-0.18,1.66) ellipse[x radius=0.1, y radius=0.15, rotate=10];
+ \bat@part@draw[\bat@pupil] (-0.15,1.645) ellipse[x radius=0.0357, y radius=0.0714, rotate=3];
+ \bat@part@draw[\bat@eye] (0.18,1.66) ellipse[x radius=0.1, y radius=0.15, rotate=-10];
+ \bat@part@draw[\bat@pupil] (0.15,1.645) ellipse[x radius=0.0357, y radius=0.0714, rotate=-3];
+ %
+ % Teeth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbat@teeth
+ \bat@part@draw[\bat@teeth] (-0.1,1.36) -- (-0.12,1.3) -- (-0.14,1.38) -- cycle;
+ \bat@part@draw[\bat@teeth] (0.1,1.36) -- (0.12,1.3) -- (0.14,1.38) -- cycle;
+ \fi
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\bat@mouth,line width=\scalingfactor*0.4pt] (0.18, 1.42) arc [start angle=-40, end angle=-140, radius=0.23];
+ %
+ %
+ \fi% back
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname batshookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Documentation
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Bat]{Natalie, the bat}
+%
+%\emph{Named after a dear friend from my undergrad studies}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-bats}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\bat
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic bat can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\bat[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\bat[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bat[pupil=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bat[mouth=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bat[ears=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bat[feet=red]
+%\end{tcblisting}
+%
+%The spread of the wings can be adjusted by passing values between 0 and 1 to the \lstinline|wings| option:
+%\begin{tcblisting}{}
+%\bat[wings=0.5]
+%\end{tcblisting}
+%
+%To turn the bat into a vampire bat, the \lstinline|teeth| option can be used:
+%\begin{tcblisting}{}
+%\bat[teeth=white]
+%\end{tcblisting}
+%
+%To view the bat from behind:
+%\begin{tcblisting}{}
+%\bat[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the bat 3-dimensional:
+%\begin{tcblisting}{}
+%\bat[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\bat[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
index b0b7b8de69..29ac05ff93 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/bear.tex
+ % !TeX root = ./examples/bear.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-bears}[2021/04/16 version v0.6 Draw teddy bears in TikZ]
+\ProvidesPackage{tikzlings-bears}[2021/08/06 version v0.8 Draw teddy bears in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -49,6 +49,8 @@
body = brown,
eye/.code = \def\bear@eye{#1},
eye = \bear@body!30!black,
+ mouth/.code = \def\bear@mouth{#1},
+ mouth = \bear@body!30!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -57,117 +59,185 @@
3D/.code = \bear@threeDtrue,
back/.code = \bear@backtrue,
contour/.code = \bear@contourtrue
- \def\bear@contour{#1},
+ \def\bear@contour{#1}
+ \def\bear@mouth{#1},
contour/.default = black,
outline/.forward to = /bear/contour,
}
\def\bear@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.8, 0.0) rectangle (0.8, 2.13);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbear@threeD
+ \def\bear@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifbear@contour
+ \def\bear@part@draw[##1]{\draw[##1,\bear@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\bear@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bearhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bear@part@draw[\bear@body!70!black] (0.525,0.9) ellipse[x radius=0.35, y radius=0.15, rotate=-50];
+ \bear@part@draw[\bear@body!70!black] (-0.525,0.9) ellipse[x radius=0.35, y radius=0.15, rotate=50];
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbear@back
+ \bear@part@draw[\bear@body!70!black] (0.425, 0.3) circle[radius=0.28];
+ \bear@part@draw[\bear@body!70!black] (-0.425, 0.3) circle[radius=0.28];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bear@part@draw[\bear@body!70!black] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
+ \unless\ifbear@back
+ \bear@part@draw[\bear@body!50!white] (0,0.7) ellipse[x radius=0.35, y radius=0.4];
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bearhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifbear@back
+ \bear@part@draw[\bear@body!70!black] (0.425, 0.3) circle[radius=0.28];
+ \bear@part@draw[\bear@body!70!black] (-0.425, 0.3) circle[radius=0.28];
+ \bear@part@draw[\bear@body!50!white] (0.425, 0.3) circle[radius=0.17];
+ \bear@part@draw[\bear@body!50!white] (-0.425, 0.3) circle[radius=0.17];
+ \fi% back
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bear@part@draw[\bear@body!70!black] (0.375, 1.95) circle[radius=0.15];
+ \bear@part@draw[\bear@body!70!black] (-0.375, 1.95) circle[radius=0.15];
+ \unless\ifbear@back
+ \bear@part@draw[\bear@body!50!white] (0.375, 1.95) circle[radius=0.1];
+ \bear@part@draw[\bear@body!50!white] (-0.375, 1.95) circle[radius=0.1];
+ \fi% back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bear@part@draw[\bear@body!70!black] (0, 1.55) circle[radius=0.5];
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifbear@back
+ %
+ % Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bear@part@draw[\bear@body!50!white] (0, 1.4) ellipse[x radius=0.28, y radius=0.2];
+ \bear@part@draw[\bear@body!70!white!80!red] (0, 1.5) ellipse[x radius=0.15, y radius=0.08];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bear@part@draw[\bear@eye] (-0.155, 1.7) circle[radius=0.05];
+ \bear@part@draw[\bear@eye] (0.155, 1.7) circle[radius=0.05];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\bear@mouth,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bearhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Bear]{B\"ar, the teddy bear}
%
-% minimal bounding box size
+%\emph{If you look very closely at the group picture in \href{https://www.tug.org/TUGboat/tb39-2/tb122wright-tug18.pdf}{TUG goes to Rio} you can spot the real B\"ar in it}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.8, 0.0) rectangle (0.8, 2.13);
+%\subsection{Package name}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-bears}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+%\subsection{Basic Usage}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+%\begin{tcblisting}{}
+%\bear
+%\end{tcblisting}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%\subsection{Options}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifbear@threeD
- \def\bear@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifbear@contour
- \def\bear@part@draw[##1]{\draw[##1,\bear@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\bear@part@draw[##1]{\fill[##1]}
- \fi
-\fi
+%The basic teddy bear can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\bear[body=blue]
+%\end{tcblisting}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\bear[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bear[mouth=red]
+%\end{tcblisting}
%
-% Body parts (center: x=0.925)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%To view the teddy bear from behind:
+%\begin{tcblisting}{}
+%\bear[back]
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname bearhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!70!black] (0.525,0.9) ellipse[x radius=0.35, y radius=0.15, rotate=-50];
-\bear@part@draw[\bear@body!70!black] (-0.525,0.9) ellipse[x radius=0.35, y radius=0.15, rotate=50];
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifbear@back
- \bear@part@draw[\bear@body!70!black] (0.425, 0.3) circle[radius=0.28];
- \bear@part@draw[\bear@body!70!black] (-0.425, 0.3) circle[radius=0.28];
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!70!black] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
-\unless\ifbear@back
- \bear@part@draw[\bear@body!50!white] (0,0.7) ellipse[x radius=0.35, y radius=0.4];
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname bearhookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifbear@back
- \bear@part@draw[\bear@body!70!black] (0.425, 0.3) circle[radius=0.28];
- \bear@part@draw[\bear@body!70!black] (-0.425, 0.3) circle[radius=0.28];
- \bear@part@draw[\bear@body!50!white] (0.425, 0.3) circle[radius=0.17];
- \bear@part@draw[\bear@body!50!white] (-0.425, 0.3) circle[radius=0.17];
-\fi
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!70!black] (0.375, 1.95) circle[radius=0.15];
-\bear@part@draw[\bear@body!70!black] (-0.375, 1.95) circle[radius=0.15];
-\unless\ifbear@back
- \bear@part@draw[\bear@body!50!white] (0.375, 1.95) circle[radius=0.1];
- \bear@part@draw[\bear@body!50!white] (-0.375, 1.95) circle[radius=0.1];
-\fi
-%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!70!black] (0, 1.55) circle[radius=0.5];
-%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifbear@back
-%
-% Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!50!white] (0, 1.4) ellipse[x radius=0.28, y radius=0.2];
-\bear@part@draw[\bear@body!70!white!80!red] (0, 1.5) ellipse[x radius=0.15, y radius=0.08];
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@eye] (-0.155, 1.7) circle[radius=0.05];
-\bear@part@draw[\bear@eye] (0.155, 1.7) circle[radius=0.05];
-%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifbear@contour
- \draw[\bear@contour,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
-\else
- \draw[\bear@body!30!black,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
-\fi
-%
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname bearhookbody\endcsname
-\csname tikzlinghookbody\endcsname
+%The key \lstinline|3D| will make the teddy bear 3-dimensional:
+%\begin{tcblisting}{}
+%\bear[3D]
+%\end{tcblisting}
%
-}
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\bear[contour=black]
+%\end{tcblisting}
+%
+%\subsection{Extension}
+%
+%The B\"ar and Ulrike Fischer wrote the fantastic \lstinline|bearwear| package, that provides many different clothing options for the \lstinline|TikZbears|. All the other \tikzlings admire them for the nice clothing!
+%
+%A short example:
+%
+%\begin{tcblisting}{}
+%%\usepackage{bearwear}
+%\bear
+%\bearwear[
+% long sleeves,
+% shirt=red!80!black
+%]
+%\end{tcblisting}
+%
+%Many more options and examples can be found in the package documentation \url{https://ctan.org/pkg/bearwear}.
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty
index 818f713d44..6c88a2e3d7 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/bee.tex
+ % !TeX root = ./examples/bee.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-bees}[2021/04/16 version v0.6 Drawing bees in TikZ]
+\ProvidesPackage{tikzlings-bees}[2021/08/06 version v0.8 Drawing bees in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -76,119 +76,187 @@
}
\def\bee@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.88,0.1) rectangle (0.88, 2.4);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbee@threeD
+ \def\bee@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifbee@contour
+ \def\bee@part@draw[##1]{\draw[##1,\bee@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\bee@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname beeshookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ \ifbee@back
+ %
+ % Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \fill[\bee@antennas,rotate around={15:(-0.175,2.115)}] (-0.2,1.93) rectangle (-0.15,2.3);
+ \fill[\bee@antennas,rotate around={-15:(0.175,2.115)}] (0.2,1.93) rectangle (0.15,2.3);
+ \bee@part@draw[\bee@antennas] (-0.22,2.30) circle[radius=0.07];
+ \bee@part@draw[\bee@antennas] (0.22,2.30) circle[radius=0.07];
+ \else% back
+ % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbee@contour
+ \bee@part@draw[\bee@wings] (0.5,0.8) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (0.45,1.25) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (-0.5,0.8) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (-0.45,1.25) circle[radius=0.35];
+ \else% contour
+ \fill[\bee@wings] (0.45,1.25) circle[radius=0.35] (0.5,0.8) circle[radius=0.35];
+ \fill[\bee@wings] (-0.45,1.25) circle[radius=0.35](-0.5,0.8) circle[radius=0.35];
+ \fi% contour
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \begin{scope}
+ \bee@part@draw[\bee@body] (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
+ \clip (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
+ % stripes
+ \bee@part@draw[\bee@stripes] (-0.475,1.3) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
+ (-0.475,1.0) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
+ (-0.475,0.65) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
+ (-0.475,0.35) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle;
+ \end{scope}
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname beeshookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbee@back
+ %
+ % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbee@contour
+ \bee@part@draw[\bee@wings] (0.5,0.8) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (0.45,1.25) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (-0.5,0.8) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (-0.45,1.25) circle[radius=0.35];
+ \else% contour
+ \fill[\bee@wings] (0.45,1.25) circle[radius=0.35] (0.5,0.8) circle[radius=0.35];
+ \fill[\bee@wings] (-0.45,1.25) circle[radius=0.35](-0.5,0.8) circle[radius=0.35];
+ \fi% contour
+ \else% back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bee@part@draw[\bee@eye] (-0.15,1.8) circle[radius=0.05];
+ \bee@part@draw[\bee@eye] (0.15,1.8) circle[radius=0.05];
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bee@part@draw[\bee@hands] (-0.25,0.88) circle[x radius=0.07,y radius=0.2, rotate=25];
+ \bee@part@draw[\bee@hands] (0.25,0.88) circle[x radius=0.07,y radius=0.2, rotate=-25];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\bee@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.6) arc [start angle=-40, end angle=-140, radius=0.16];
+ %
+ % Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \fill[\bee@antennas,rotate around={15:(-0.175,2.115)}] (-0.2,1.93) rectangle (-0.15,2.3);
+ \fill[\bee@antennas,rotate around={-15:(0.175,2.115)}] (0.2,1.93) rectangle (0.15,2.3);
+ \bee@part@draw[\bee@antennas] (-0.22,2.30) circle[radius=0.07];
+ \bee@part@draw[\bee@antennas] (0.22,2.30) circle[radius=0.07];
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname beeshookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.88,0.1) rectangle (0.88, 2.4);
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Bee]{Beeing, the bee}
%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+%\emph{The bee was kindly contributed by @marmot}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+%\subsection{Package name}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-bees}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifbee@threeD
- \def\bee@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifbee@contour
- \def\bee@part@draw[##1]{\draw[##1,\bee@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\bee@part@draw[##1]{\fill[##1]}
- \fi
-\fi
+%\subsection{Basic Usage}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\begin{tcblisting}{}
+%\bee
+%\end{tcblisting}
%
-% Body parts (center: x=0)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{Options}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname beeshookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
+%The basic bee can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\bee[body=blue]
+%\end{tcblisting}
%
-\ifbee@back
- % Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \fill[\bee@antennas,rotate around={15:(-0.175,2.115)}] (-0.2,1.93) rectangle (-0.15,2.3);
- \fill[\bee@antennas,rotate around={-15:(0.175,2.115)}] (0.2,1.93) rectangle (0.15,2.3);
- \bee@part@draw[\bee@antennas] (-0.22,2.30) circle[radius=0.07];
- \bee@part@draw[\bee@antennas] (0.22,2.30) circle[radius=0.07];
-\else
- % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \ifbee@contour
- \bee@part@draw[\bee@wings] (0.5,0.8) circle[radius=0.35];
- \bee@part@draw[\bee@wings] (0.45,1.25) circle[radius=0.35];
- \bee@part@draw[\bee@wings] (-0.5,0.8) circle[radius=0.35];
- \bee@part@draw[\bee@wings] (-0.45,1.25) circle[radius=0.35];
- \else
- \fill[\bee@wings] (0.45,1.25) circle[radius=0.35] (0.5,0.8) circle[radius=0.35];
- \fill[\bee@wings] (-0.45,1.25) circle[radius=0.35](-0.5,0.8) circle[radius=0.35];
- \fi
-\fi
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\bee[antennas=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bee[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bee[mouth=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bee[wings=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bee[hands=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bee[stripes=red]
+%\end{tcblisting}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{scope}
- \bee@part@draw[\bee@body] (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
- \clip (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
- % stripes
- \bee@part@draw[\bee@stripes] (-0.475,1.3) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
- (-0.475,1.0) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
- (-0.475,0.65) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
- (-0.475,0.35) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle;
-\end{scope}
+%To view the bee from behind:
+%\begin{tcblisting}{}
+%\bee[back]
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname beeshookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%The key \lstinline|3D| will make the bee 3-dimensional:
+%\begin{tcblisting}{}
+%\bee[3D]
+%\end{tcblisting}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifbee@back
- %
- % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \ifbee@contour
- \bee@part@draw[\bee@wings] (0.5,0.8) circle[radius=0.35];
- \bee@part@draw[\bee@wings] (0.45,1.25) circle[radius=0.35];
- \bee@part@draw[\bee@wings] (-0.5,0.8) circle[radius=0.35];
- \bee@part@draw[\bee@wings] (-0.45,1.25) circle[radius=0.35];
- \else
- \fill[\bee@wings] (0.45,1.25) circle[radius=0.35] (0.5,0.8) circle[radius=0.35];
- \fill[\bee@wings] (-0.45,1.25) circle[radius=0.35](-0.5,0.8) circle[radius=0.35];
- \fi
-\else
- %
- % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bee@part@draw[\bee@eye] (-0.15,1.8) circle[radius=0.05];
- \bee@part@draw[\bee@eye] (0.15,1.8) circle[radius=0.05];
- %
- % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bee@part@draw[\bee@hands] (-0.25,0.88) circle[x radius=0.07,y radius=0.2, rotate=25];
- \bee@part@draw[\bee@hands] (0.25,0.88) circle[x radius=0.07,y radius=0.2, rotate=-25];
- %
- % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\bee@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.6) arc [start angle=-40, end angle=-140, radius=0.16];
- %
- % Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \fill[\bee@antennas,rotate around={15:(-0.175,2.115)}] (-0.2,1.93) rectangle (-0.15,2.3);
- \fill[\bee@antennas,rotate around={-15:(0.175,2.115)}] (0.2,1.93) rectangle (0.15,2.3);
- \bee@part@draw[\bee@antennas] (-0.22,2.30) circle[radius=0.07];
- \bee@part@draw[\bee@antennas] (0.22,2.30) circle[radius=0.07];
- %
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname beeshookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\bee[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty
new file mode 100644
index 0000000000..bca48e2680
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty
@@ -0,0 +1,263 @@
+ % !TeX root = ./examples/bug.tex
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{tikzlings-bugs}[2021/08/06 version v0.8 Drawing bugs in TikZ]
+
+\RequirePackage{tikz}
+\RequirePackage{tikzlings-addons}
+
+\newcommand*{\bug}[1][]{%
+ \begin{scope}%
+ \tikzset{/bug/.cd,#1}%
+ \bug@draw%
+ \end{scope}%
+ \thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bughookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
+}
+
+\newif\ifbug@threeD
+\newif\ifbug@back
+\newif\ifbug@contour
+
+\tikzset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Pass unknown keys on to tikz
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ /bug/.search also={/tikz,/pgf,/thing},
+ /bug/.cd,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % body
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ body/.code = \def\bug@body{#1},
+ body = black!90!white,
+ arms/.code = \def\bug@arms{#1},
+ arms = red!80!black,
+ wings/.code = \def\bug@wings{#1},
+ wings = red!80!black,
+ dots/.code = \def\bug@dots{#1},
+ dots = black!90!white,
+ antennas/.code = \def\bug@antennas{#1},
+ antennas = red!80!black,
+ eye/.code = \def\bug@eye{#1},
+ eye = white,
+ pupil/.code = \def\bug@pupil{#1},
+ pupil = black,
+ mouth/.code = \def\bug@mouth{#1},
+ mouth = red,
+ feet/.code = \def\bug@feet{#1},
+ feet = red!80!black,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % options
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ 3D/.code = \bug@threeDtrue,
+ back/.code = \bug@backtrue,
+ contour/.code = \bug@contourtrue
+ \def\bug@contour{#1}
+ \def\bug@antennas{#1}
+ \def\bug@mouth{#1},
+ contour/.default = black,
+ outline/.forward to = /bug/contour,
+}
+
+\def\bug@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.92,0.02) rectangle (0.92, 2.36);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbug@threeD
+ \def\bug@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifbug@contour
+ \def\bug@part@draw[##1]{\draw[##1,\bug@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\bug@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bugshookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ \ifbug@back
+ %
+ % Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\bug@antennas,line width=\scalingfactor*0.8pt] (0.1134, 1.911) .. controls (0.0917, 2.0537) and (0.0986, 2.1999) .. (0.1608, 2.2816) .. controls (0.245, 2.3919) and (0.3278, 2.3011) .. (0.3272, 2.2192) .. controls (0.3266, 2.1341) and (0.2237, 2.0423) .. (0.1978, 2.1538);
+ \draw[\bug@antennas,line width=\scalingfactor*0.8pt] (-0.1134, 1.911) .. controls (-0.0917, 2.0537) and (-0.0986, 2.1999) .. (-0.1608, 2.2816) .. controls (-0.245, 2.3919) and (-0.3278, 2.3011) .. (-0.3272, 2.2192) .. controls (-0.3266, 2.1341) and (-0.2237, 2.0423) .. (-0.1978, 2.1538);
+ \else% back
+ %
+ % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bug@part@draw[\bug@wings] (-0.0955, 1.4222) .. controls (-0.2086, 1.6765) and (-0.692, 1.2508) .. (-0.8174, 1.0023) .. controls (-0.9304, 0.7786) and (-0.9533, 0.379) .. (-0.7355, 0.2548) .. controls (-0.5988, 0.1768) and (-0.4043, 0.3269) .. (-0.3054, 0.4494) .. controls (-0.097, 0.7075) and (0.0589, 1.0749) .. (-0.0955, 1.4222) -- cycle;
+ \bug@part@draw[\bug@wings] (0.0955, 1.4222) .. controls (0.2086, 1.6765) and (0.692, 1.2508) .. (0.8174, 1.0023) .. controls (0.9304, 0.7786) and (0.9533, 0.379) .. (0.7355, 0.2548) .. controls (0.5988, 0.1768) and (0.4043, 0.3269) .. (0.3054, 0.4494) .. controls (0.097, 0.7075) and (-0.0589, 1.0749) .. (0.0955, 1.4222) -- cycle;
+ \ifbug@contour
+ \bug@part@draw[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
+ \else% contour
+ \fill[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
+ \fi% contour
+ \fi% back
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bug@part@draw[\bug@feet] (0.2,0.1) ellipse[x radius=0.18, y radius=0.06];
+ \bug@part@draw[\bug@feet] (-0.2,0.1) ellipse[x radius=0.18, y radius=0.06];
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bug@part@draw[\bug@body] ( 0.55, 0.75) .. controls ( 0.55, 0.40) and ( 0.55, 0.08) .. ( 0.00, 0.08) .. controls (-0.55, 0.08) and (-0.55, 0.40) .. (-0.55, 0.75) .. controls (-0.55, 1.13) and (-0.30, 1.44) .. ( 0.00, 1.44) .. controls ( 0.30, 1.44) and ( 0.55, 1.13) .. ( 0.55, 0.75) -- cycle;
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bug@part@draw[\bug@body] (0,1.7) circle [radius=0.37];
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bugshookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifbug@back
+ %
+ % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bug@part@draw[\bug@wings] (-0.0955, 1.4222) .. controls (-0.2086, 1.6765) and (-0.692, 1.2508) .. (-0.8174, 1.0023) .. controls (-0.9304, 0.7786) and (-0.9533, 0.379) .. (-0.7355, 0.2548) .. controls (-0.5988, 0.1768) and (-0.4043, 0.3269) .. (-0.3054, 0.4494) .. controls (-0.097, 0.7075) and (0.0589, 1.0749) .. (-0.0955, 1.4222) -- cycle;
+ \bug@part@draw[\bug@wings] (0.0955, 1.4222) .. controls (0.2086, 1.6765) and (0.692, 1.2508) .. (0.8174, 1.0023) .. controls (0.9304, 0.7786) and (0.9533, 0.379) .. (0.7355, 0.2548) .. controls (0.5988, 0.1768) and (0.4043, 0.3269) .. (0.3054, 0.4494) .. controls (0.097, 0.7075) and (-0.0589, 1.0749) .. (0.0955, 1.4222) -- cycle;
+ \ifbug@contour
+ \bug@part@draw[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
+ \else% contour
+ \fill[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
+ \fi% contour
+ \else% back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bug@part@draw[\bug@eye] (0.13,1.75) ellipse[x radius=0.067, y radius=0.085];
+ \bug@part@draw[\bug@eye] (-0.13,1.75) ellipse[x radius=0.067, y radius=0.085];
+ \bug@part@draw[\bug@pupil] (0.12,1.73) ellipse[x radius=0.019, y radius=0.029];
+ \bug@part@draw[\bug@pupil] (-0.12,1.73) ellipse[x radius=0.019, y radius=0.029];
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \bug@part@draw[\bug@arms] (-0.25,0.88) circle[x radius=0.07,y radius=0.18, rotate=35];
+ \bug@part@draw[\bug@arms] (0.25,0.88) circle[x radius=0.07,y radius=0.18, rotate=-35];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\bug@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.56) arc [start angle=-40, end angle=-140, radius=0.16];
+ %
+ % Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\bug@antennas,line width=\scalingfactor*0.8pt] (0.1134, 1.911) .. controls (0.0917, 2.0537) and (0.0986, 2.1999) .. (0.1608, 2.2816) .. controls (0.245, 2.3919) and (0.3278, 2.3011) .. (0.3272, 2.2192) .. controls (0.3266, 2.1341) and (0.2237, 2.0423) .. (0.1978, 2.1538);
+ \draw[\bug@antennas,line width=\scalingfactor*0.8pt] (-0.1134, 1.911) .. controls (-0.0917, 2.0537) and (-0.0986, 2.1999) .. (-0.1608, 2.2816) .. controls (-0.245, 2.3919) and (-0.3278, 2.3011) .. (-0.3272, 2.2192) .. controls (-0.3266, 2.1341) and (-0.2237, 2.0423) .. (-0.1978, 2.1538);
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bugshookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Documentation
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Bug]{Marie, the bug}
+%
+%\emph{For a French girl who likes ladybugs -- the name comes from the German word for ladybug ``Marienkäfer''}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-bugs}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\bug
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic bug can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\bug[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\bug[antennas=blue]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bug[eye=blue]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bug[pupil=blue]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bug[mouth=blue]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bug[arms=blue]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bug[wings=blue]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\bug[feet=blue]
+%\end{tcblisting}
+%
+%To view the bug from behind:
+%\begin{tcblisting}{}
+%\bug[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the bug 3-dimensional:
+%\begin{tcblisting}{}
+%\bug[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\bug[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty b/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
index fd3559c347..4081fa4a23 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/cat.tex
+ % !TeX root = ./examples/cat.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-cats}[2021/04/16 version v0.6 Drawing cats in TikZ]
+\ProvidesPackage{tikzlings-cats}[2021/08/06 version v0.8 Drawing cats in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -114,193 +114,287 @@
}
\def\cat@draw{%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.56,0.1) rectangle (1.63, 2.22);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifcat@threeD
- \def\cat@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifcat@contour
- \def\cat@part@draw[##1]{\draw[##1,\cat@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\cat@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname cathookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{pgfinterruptboundingbox}
- \cat@part@draw[\cat@body] (0.3, 0.5) .. controls (0.55, 0.87) and (0.73, 1.50) .. (1.05, 1.65) .. controls (1.32, 1.77) and (1.76, 1.34) .. (1.56,1.33) .. controls (0.92, 2.03) and (0.86, 0.60) .. (0.5, 0.37) -- cycle;
-\end{pgfinterruptboundingbox}
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifcat@back
- \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
- \cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[\cat@body] (0.5462, 0.7155) .. controls (0.5462, 0.1823) and (0.3259, 0.17) .. (0, 0.17) .. controls (-0.3259, 0.17) and (-0.5462, 0.1823) .. (-0.5462, 0.7155) .. controls (-0.5554, 1.2487) and (-0.3075, 1.6768) .. (0, 1.6768) .. controls (0.3075, 1.6768) and (0.5554, 1.2487) .. (0.5462, 0.7155) -- cycle;
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname cathookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[\cat@body]
-(0.12, 2.0392) .. controls (0.16, 2.1584) and (0.37, 2.22) .. (0.37, 2.20) .. controls (0.37, 2.2) and (0.39, 1.9) .. (0.2721, 1.9) .. controls (0.1891, 1.88) and (0.12, 1.88) .. (0.12, 2.0392) -- cycle;
-\cat@part@draw[\cat@body]
-(-0.12, 2.0392) .. controls (-0.16, 2.1584) and (-0.37, 2.22) .. (-0.37, 2.20) .. controls (-0.37, 2.2) and (-0.39, 1.9) .. (-0.2721, 1.9) .. controls (-0.1891, 1.88) and (-0.12, 1.88) .. (-0.12, 2.0392) -- cycle;
-%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[\cat@body] (0,1.64) circle[radius=0.44];
-%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifcat@back
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[\cat@eye] (-0.1014, 1.7491) .. controls (-0.1014, 1.7491) and (-0.1451, 1.7171) .. (-0.1841, 1.7284) .. controls (-0.2231, 1.7397) and (-0.2427, 1.79) .. (-0.2427, 1.79) .. controls (-0.2427, 1.79) and (-0.1992, 1.8221) .. (-0.1602, 1.8108) .. controls (-0.1212, 1.7995) and (-0.1014, 1.7491) .. (-0.1014, 1.7491) -- cycle;
-\cat@part@draw[\cat@eye] (0.1014, 1.7491) .. controls (0.1014, 1.7491) and (0.1451, 1.7171) .. (0.1841, 1.7284) .. controls (0.2231, 1.7397) and (0.2427, 1.79) .. (0.2427, 1.79) .. controls (0.2427, 1.79) and (0.1992, 1.8221) .. (0.1602, 1.8108) .. controls (0.1212, 1.7995) and (0.1014, 1.7491) .. (0.1014, 1.7491) -- cycle;
-%
-% Pupils %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[\cat@pupil]
- (-0.1720, 1.8071)
- .. controls (-0.1720+\cat@pupil@width, 1.7827+\cat@pupil@offset) and (-0.1720+\cat@pupil@width, 1.7584-\cat@pupil@offset) .. (-0.1720, 1.7341)
- .. controls (-0.1720-\cat@pupil@width, 1.7584-\cat@pupil@offset) and (-0.1720-\cat@pupil@width, 1.7827+\cat@pupil@offset) .. (-0.1720, 1.8071)
- -- cycle;
-\cat@part@draw[\cat@pupil]
- ( 0.1720, 1.8071)
- .. controls ( 0.1720+\cat@pupil@width, 1.7827+\cat@pupil@offset) and ( 0.1720+\cat@pupil@width, 1.7584-\cat@pupil@offset) .. ( 0.1720, 1.7341)
- .. controls ( 0.1720-\cat@pupil@width, 1.7584-\cat@pupil@offset) and ( 0.1720-\cat@pupil@width, 1.7827+\cat@pupil@offset) .. ( 0.1720, 1.8071)
- -- cycle;
-%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\draw[\cat@whiskers,line width=\scalingfactor*0.2pt] (-0.16, 1.527) .. controls (-0.16, 1.527) and (-0.062, 1.420) .. ( 0.000, 1.556) .. controls ( 0.062, 1.420) and ( 0.16, 1.527) .. ( 0.16, 1.527);
-%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[\cat@nose] (-0.069, 1.6452) .. controls (-0.0524, 1.6613) and (0.0524, 1.6613) .. (0.069, 1.6452) .. controls (0.08, 1.625) and (0.0206, 1.55) .. (0, 1.55) .. controls (-0.0206, 1.55) and (-0.08, 1.625) .. (-0.069, 1.6452) -- cycle;
-%
-% Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\cat@whiskers] (0.0788, 1.5946) .. controls (0.1658, 1.6099) and (0.2086, 1.5439) .. (0.2956, 1.5286) -- (0.2956, 1.5386) .. controls (0.2097, 1.5537) and (0.1648, 1.6097) .. (0.0788, 1.5946) -- cycle;
-\fill[\cat@whiskers] (-0.0788, 1.5946) .. controls (-0.1658, 1.6099) and (-0.2087, 1.5439) .. (-0.2956, 1.5286) -- (-0.2956, 1.5386) .. controls (-0.2097, 1.5537) and (-0.1648, 1.6097) .. (-0.0788, 1.5946) -- cycle;
-\fill[\cat@whiskers] (0.0752, 1.6081) .. controls (0.1583, 1.6383) and (0.2171, 1.6109) .. (0.3002, 1.5807) -- (0.3002, 1.5907) .. controls (0.2174, 1.6208) and (0.158, 1.6382) .. (0.0752, 1.6081) -- cycle;
-\fill[\cat@whiskers] (-0.0752, 1.6081) .. controls (-0.1583, 1.6383) and (-0.2171, 1.6109) .. (-0.3002, 1.5807) -- (-0.3002, 1.5907) .. controls (-0.2174, 1.6208) and (-0.158, 1.6382) .. (-0.0752, 1.6081) -- cycle;
-\fill[\cat@whiskers] (0.0671, 1.6243) .. controls (0.1414, 1.6725) and (0.2182, 1.6964) .. (0.2925, 1.6482) -- (0.2925, 1.6582) .. controls (0.2179, 1.7066) and (0.1417, 1.6727) .. (0.0671, 1.6243) -- cycle;
-\fill[\cat@whiskers] (-0.0671, 1.6243) .. controls (-0.1414, 1.6725) and (-0.2182, 1.6964) .. (-0.2925, 1.6482) -- (-0.2925, 1.6582) .. controls (-0.2179, 1.7066) and (-0.1417, 1.6727) .. (-0.0671, 1.6243) -- cycle;
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
-\cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
-%
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname cathookbody\endcsname
-\csname tikzlinghookbody\endcsname
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.56,0.1) rectangle (1.63, 2.22);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifcat@threeD
+ \def\cat@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifcat@contour
+ \def\cat@part@draw[##1]{\draw[##1,\cat@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\cat@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname cathookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[\cat@body,overlay] (0.3, 0.5) .. controls (0.55, 0.87) and (0.73, 1.50) .. (1.05, 1.65) .. controls (1.32, 1.77) and (1.76, 1.34) .. (1.56,1.33) .. controls (0.92, 2.03) and (0.86, 0.60) .. (0.5, 0.37) -- cycle;
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifcat@back
+ \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
+ \cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[\cat@body] (0.5462, 0.7155) .. controls (0.5462, 0.1823) and (0.3259, 0.17) .. (0, 0.17) .. controls (-0.3259, 0.17) and (-0.5462, 0.1823) .. (-0.5462, 0.7155) .. controls (-0.5554, 1.2487) and (-0.3075, 1.6768) .. (0, 1.6768) .. controls (0.3075, 1.6768) and (0.5554, 1.2487) .. (0.5462, 0.7155) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname cathookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[\cat@body]
+ (0.12, 2.0392) .. controls (0.16, 2.1584) and (0.37, 2.22) .. (0.37, 2.20) .. controls (0.37, 2.2) and (0.39, 1.9) .. (0.2721, 1.9) .. controls (0.1891, 1.88) and (0.12, 1.88) .. (0.12, 2.0392) -- cycle;
+ \cat@part@draw[\cat@body]
+ (-0.12, 2.0392) .. controls (-0.16, 2.1584) and (-0.37, 2.22) .. (-0.37, 2.20) .. controls (-0.37, 2.2) and (-0.39, 1.9) .. (-0.2721, 1.9) .. controls (-0.1891, 1.88) and (-0.12, 1.88) .. (-0.12, 2.0392) -- cycle;
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[\cat@body] (0,1.64) circle[radius=0.44];
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifcat@back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[\cat@eye] (-0.1014, 1.7491) .. controls (-0.1014, 1.7491) and (-0.1451, 1.7171) .. (-0.1841, 1.7284) .. controls (-0.2231, 1.7397) and (-0.2427, 1.79) .. (-0.2427, 1.79) .. controls (-0.2427, 1.79) and (-0.1992, 1.8221) .. (-0.1602, 1.8108) .. controls (-0.1212, 1.7995) and (-0.1014, 1.7491) .. (-0.1014, 1.7491) -- cycle;
+ \cat@part@draw[\cat@eye] (0.1014, 1.7491) .. controls (0.1014, 1.7491) and (0.1451, 1.7171) .. (0.1841, 1.7284) .. controls (0.2231, 1.7397) and (0.2427, 1.79) .. (0.2427, 1.79) .. controls (0.2427, 1.79) and (0.1992, 1.8221) .. (0.1602, 1.8108) .. controls (0.1212, 1.7995) and (0.1014, 1.7491) .. (0.1014, 1.7491) -- cycle;
+ %
+ % Pupils %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[\cat@pupil] (-0.1720, 1.8071) .. controls (-0.1720+\cat@pupil@width, 1.7827+\cat@pupil@offset) and (-0.1720+\cat@pupil@width, 1.7584-\cat@pupil@offset) .. (-0.1720, 1.7341) .. controls (-0.1720-\cat@pupil@width, 1.7584-\cat@pupil@offset) and (-0.1720-\cat@pupil@width, 1.7827+\cat@pupil@offset) .. (-0.1720, 1.8071) -- cycle;
+ \cat@part@draw[\cat@pupil] ( 0.1720, 1.8071) .. controls ( 0.1720+\cat@pupil@width, 1.7827+\cat@pupil@offset) and ( 0.1720+\cat@pupil@width, 1.7584-\cat@pupil@offset) .. ( 0.1720, 1.7341) .. controls ( 0.1720-\cat@pupil@width, 1.7584-\cat@pupil@offset) and ( 0.1720-\cat@pupil@width, 1.7827+\cat@pupil@offset) .. ( 0.1720, 1.8071) -- cycle;
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\cat@whiskers,line width=\scalingfactor*0.2pt] (-0.16, 1.527) .. controls (-0.16, 1.527) and (-0.062, 1.420) .. ( 0.000, 1.556) .. controls ( 0.062, 1.420) and ( 0.16, 1.527) .. ( 0.16, 1.527);
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[\cat@nose] (-0.069, 1.6452) .. controls (-0.0524, 1.6613) and (0.0524, 1.6613) .. (0.069, 1.6452) .. controls (0.08, 1.625) and (0.0206, 1.55) .. (0, 1.55) .. controls (-0.0206, 1.55) and (-0.08, 1.625) .. (-0.069, 1.6452) -- cycle;
+ %
+ % Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \fill[\cat@whiskers] (0.0788, 1.5946) .. controls (0.1658, 1.6099) and (0.2086, 1.5439) .. (0.2956, 1.5286) -- (0.2956, 1.5386) .. controls (0.2097, 1.5537) and (0.1648, 1.6097) .. (0.0788, 1.5946) -- cycle;
+ \fill[\cat@whiskers] (-0.0788, 1.5946) .. controls (-0.1658, 1.6099) and (-0.2087, 1.5439) .. (-0.2956, 1.5286) -- (-0.2956, 1.5386) .. controls (-0.2097, 1.5537) and (-0.1648, 1.6097) .. (-0.0788, 1.5946) -- cycle;
+ \fill[\cat@whiskers] (0.0752, 1.6081) .. controls (0.1583, 1.6383) and (0.2171, 1.6109) .. (0.3002, 1.5807) -- (0.3002, 1.5907) .. controls (0.2174, 1.6208) and (0.158, 1.6382) .. (0.0752, 1.6081) -- cycle;
+ \fill[\cat@whiskers] (-0.0752, 1.6081) .. controls (-0.1583, 1.6383) and (-0.2171, 1.6109) .. (-0.3002, 1.5807) -- (-0.3002, 1.5907) .. controls (-0.2174, 1.6208) and (-0.158, 1.6382) .. (-0.0752, 1.6081) -- cycle;
+ \fill[\cat@whiskers] (0.0671, 1.6243) .. controls (0.1414, 1.6725) and (0.2182, 1.6964) .. (0.2925, 1.6482) -- (0.2925, 1.6582) .. controls (0.2179, 1.7066) and (0.1417, 1.6727) .. (0.0671, 1.6243) -- cycle;
+ \fill[\cat@whiskers] (-0.0671, 1.6243) .. controls (-0.1414, 1.6725) and (-0.2182, 1.6964) .. (-0.2925, 1.6482) -- (-0.2925, 1.6582) .. controls (-0.2179, 1.7066) and (-0.1417, 1.6727) .. (-0.0671, 1.6243) -- cycle;
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
+ \cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname cathookbody\endcsname
+ \csname tikzlinghookbody\endcsname
}
\def\cat@tombstone{%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.55,0.39) rectangle (0.55, 2.06);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifcat@threeD
- \def\cat@part@draw[##1]{\shade[ball color=##1]}
-\else
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.55,0.39) rectangle (0.55, 2.06);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifcat@threeD
+ \def\cat@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifcat@contour
+ \def\cat@part@draw[##1]{\draw[##1,\cat@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\cat@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Drawing the tomebstone
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname cathookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Stone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[gray] (-0.55,0.4) -- (-0.55,1.5) arc [start angle=180, end angle=0, radius=0.55] -- (0.55,0.4) -- cycle;
+ \node[scale=\scalingfactor] at (0,1.3) {R.I.P.};
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname cathookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % soil %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \cat@part@draw[brown!65!black] (1,0.15) arc [start angle=50, end angle=130, radius=1.56] -- cycle;
+ %
+ % flower %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifcat@contour
- \def\cat@part@draw[##1]{\draw[##1,\cat@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\cat@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
+ \draw[\cat@contour,line width=\scalingfactor*0.4pt] (-0.01,0.3) arc [start angle=-15, end angle=30, radius=0.7];
+ \else% contour
+ \draw[green!50!brown,line width=\scalingfactor*0.4pt] (-0.01,0.3) arc [start angle=-15, end angle=30, radius=0.7];
+ \fi% contour
+ \cat@part@draw[green!50!brown] (-0.1377, 0.7384) .. controls (-0.1775, 0.5828) and (-0.1479, 0.4649) .. (0.0072, 0.4246) .. controls (0.0570, 0.5636) and (-0.1529, 0.6447) .. (-0.1377, 0.7384) -- cycle;
+ \cat@part@draw[green!50!brown] (0.1527, 0.7334) .. controls (0.1925, 0.5778) and (0.1629, 0.4599) .. (0.0178, 0.4196) .. controls (-0.0420, 0.5586) and (0.1679, 0.6397) .. (0.1527, 0.7334) -- cycle;
+ \foreach \i in {0,51.42857,...,359}{
+ \cat@part@draw[yellow!50!white,rotate around={\i:(-0.0865, 0.8219)}] (-0.087, 0.822) .. controls (-0.087, 0.822) and (-0.1635, 0.6638) .. (-0.0818, 0.6653) .. controls (-0.0066, 0.6646) and (-0.087, 0.822) .. (-0.087, 0.822) -- cycle;
+ }
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname cathookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Drawing the tomebstone
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname cathookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Stone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[gray] (-0.55,0.4) -- (-0.55,1.5) arc [start angle=180, end angle=0, radius=0.55] -- (0.55,0.4) -- cycle;
-\node[scale=\scalingfactor] at (0,1.3) {R.I.P.};
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname cathookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% soil %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cat@part@draw[brown!65!black] (1,0.15) arc [start angle=50, end angle=130, radius=1.56] -- cycle;
-%
-% flower
-\ifcat@contour
- \draw[\cat@contour,line width=\scalingfactor*0.4pt] (-0.01,0.3) arc [start angle=-15, end angle=30, radius=0.7];
-\else
- \draw[green!50!brown,line width=\scalingfactor*0.4pt] (-0.01,0.3) arc [start angle=-15, end angle=30, radius=0.7];
-\fi
-\cat@part@draw[green!50!brown] (-0.1377, 0.7384) .. controls (-0.1775, 0.5828) and (-0.1479, 0.4649) .. (0.0072, 0.4246) .. controls (0.0570, 0.5636) and (-0.1529, 0.6447) .. (-0.1377, 0.7384) -- cycle;
-\cat@part@draw[green!50!brown] (0.1527, 0.7334) .. controls (0.1925, 0.5778) and (0.1629, 0.4599) .. (0.0178, 0.4196) .. controls (-0.0420, 0.5586) and (0.1679, 0.6397) .. (0.1527, 0.7334) -- cycle;
-\foreach \i in {0,51.42857,...,359}{
- \cat@part@draw[yellow!50!white,rotate around={\i:(-0.0865, 0.8219)}] (-0.087, 0.822) .. controls (-0.087, 0.822) and (-0.1635, 0.6638) .. (-0.0818, 0.6653) .. controls (-0.0066, 0.6646) and (-0.087, 0.822) .. (-0.087, 0.822) -- cycle;
-}
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname cathookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%\clearpage
+%\section[Cat]{MisTi$k$Zelees, the cat}
+%
+%\emph{Named after the worlds best singing cat}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-cats}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\cat
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic cat can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\cat[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\cat[eye=green]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\cat[pupil=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\cat[nose=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\cat[whiskers=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\cat[paws=red]
+%\end{tcblisting}
+%
+%The shape of the \lstinline|pupil| can be changed with the \lstinline|pupilwidth| option:
+%\begin{tcblisting}{}
+%\cat[pupilwidth=0.015]
+%\end{tcblisting}
+%
+%Additionally several predefined widths exist:
+%\begin{tcolorbox}
+%\begin{lstlisting}[morekeywords={narrow,medium,wide,very,pupils}]
+%\cat[narrow pupils]
+%
+%\cat[medium pupils]
+%
+%\cat[wide pupils]
+%
+%\cat[very wide pupils]
+%\end{lstlisting}
+%
+%\tcblower
+%\begin{tikzpicture}[yshift=2.4cm,xshift=1.8cm]
+%\cat[narrow pupils]
+%\cat[medium pupils,xshift=2.5cm]
+%\cat[wide pupils,yshift=-2.5cm]
+%\cat[very wide pupils,xshift=2.5cm,yshift=-2.5cm]
+%\end{tikzpicture}
+%\end{tcolorbox}
+%
+%There is also the special option \lstinline|schroedinger|. This cat is both alive and dead as long as you did not compile your document.
+%Be prepared for a possibly disturbing scene when you open the pdf, this option is not suited for sensitive \tikzlings.
+%\begingroup
+%\makeatletter
+%\renewcommand*{\cat}[1][]{%
+% \tikzset{/cat/.cd,#1}%
+% \cat@tombstone%
+%}
+%\renewcommand{\cathookbackground}{}
+%\makeatother
+%\begin{tcblisting}{}
+%\cat[schroedinger]
+%\end{tcblisting}
+%\endgroup
+%
+%To view the cat from behind:
+%\begin{tcblisting}{}
+%\cat[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the cat 3-dimensional:
+%\begin{tcblisting}{}
+%\cat[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\cat[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty b/graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty
index af16df2564..0d7a805572 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/chicken.tex
+ % !TeX root = ./examples/chicken.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-chickens}[2021/04/16 version v0.6 Draw chickens in TikZ]
+\ProvidesPackage{tikzlings-chickens}[2021/08/06 version v0.8 Draw chickens in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -82,256 +82,321 @@
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Grown up chicken
-%
+%%
+%% Grown up chicken
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\chicken@draw{%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.96, 0.08) rectangle (0.96, 2.35);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifchicken@threeD
- \def\chicken@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifchicken@contour
- \def\chicken@part@draw[##1]{\draw[##1,\chicken@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\chicken@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0.925)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname chickenhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\chicken@part@draw[\chicken@body] (0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=-65];
-\chicken@part@draw[\chicken@body] (0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=-43];
-\chicken@part@draw[\chicken@body] (0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=-18];
-\chicken@part@draw[\chicken@body] (-0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=65];
-\chicken@part@draw[\chicken@body] (-0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=43];
-\chicken@part@draw[\chicken@body] (-0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=18];
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifchicken@back
- \chicken@part@draw[\chicken@feet] (0.19,0.3) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (-0.19,0.3) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=20];
- \chicken@part@draw[\chicken@feet] (0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=40];
- \chicken@part@draw[\chicken@feet] (-0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (-0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
- \chicken@part@draw[\chicken@feet] (-0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\chicken@part@draw[\chicken@body!50!white] ( 0.00, 0.33) .. controls (-0.60, 0.33) and (-0.55, 0.65) .. (-0.55, 0.90) .. controls (-0.55, 1.10) and (-0.48, 1.20) .. (-0.39, 1.40) .. controls (-0.32, 1.58) and (-0.32, 2.09) .. ( 0.00, 2.09) .. controls ( 0.32, 2.09) and ( 0.32, 1.58) .. ( 0.39, 1.40) .. controls ( 0.48, 1.20) and ( 0.55, 1.10) .. ( 0.55, 0.90) .. controls ( 0.55, 0.65) and ( 0.60, 0.33) .. ( 0, 0.33) -- cycle;
-\chicken@part@draw[\chicken@body,decoration={snake,amplitude=\scalingfactor*1.5pt,segment length=\scalingfactor*6.1pt}] ( -0.39, 1.40) .. controls (-0.32, 1.58) and (-0.32, 2.09) .. ( 0.00, 2.09) .. controls ( 0.32, 2.09) and ( 0.32, 1.58) .. ( 0.39, 1.40) decorate {arc [start angle=-60,end angle=-120,radius=0.77]} -- cycle;
-%
-% Comb %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\chicken@part@draw[\chicken@comb] (0.04,2.132) ellipse[x radius=0.22, y radius=0.06, rotate=70];
-\chicken@part@draw[\chicken@comb] (-0.03,2.095) ellipse[x radius=0.17, y radius=0.06, rotate=92];
-\chicken@part@draw[\chicken@comb] (-0.082,2.060) ellipse[x radius=0.15, y radius=0.06, rotate=120];
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname chickenhookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifchicken@back
- \chicken@part@draw[\chicken@eye] (0.135,1.8) ellipse[x radius=0.06, y radius=0.07];
- \chicken@part@draw[\chicken@eye] (-0.135,1.8) ellipse[x radius=0.06, y radius=0.07];
- \chicken@part@draw[\chicken@pupil] (0.124,1.78) ellipse[x radius=0.017, y radius=0.027];
- \chicken@part@draw[\chicken@pupil] (-0.124,1.78) ellipse[x radius=0.017, y radius=0.027];
-\fi
-%
-% Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifchicken@back
- \chicken@part@draw[\chicken@comb] (-0.04, 1.57) ellipse[x radius=0.04, y radius=0.08, rotate=-20];
- \chicken@part@draw[\chicken@comb] (0.04, 1.57) ellipse[x radius=0.04, y radius=0.08, rotate=20];
- \chicken@part@draw[\chicken@bill] (-0.09, 1.7) -- (0, 1.58) -- (0.09, 1.7) arc [start angle=50, end angle=130, radius=0.14] -- cycle;
-\fi
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifchicken@back
- \chicken@part@draw[\chicken@feet] (0.19,0.3) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (-0.19,0.3) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=20];
- \chicken@part@draw[\chicken@feet] (0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=40];
- \chicken@part@draw[\chicken@feet] (-0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (-0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
- \chicken@part@draw[\chicken@feet] (-0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
-\fi
-%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifchicken@back
- \chicken@part@draw[\chicken@body] (0.12, 0.795) ellipse[x radius=0.20, y radius=0.06, rotate=58];
- \chicken@part@draw[\chicken@body] (0.04, 0.87) ellipse[x radius=0.25, y radius=0.06, rotate=80];
- \chicken@part@draw[\chicken@body] (-0.03, 0.83) ellipse[x radius=0.20, y radius=0.06, rotate=102];
- \chicken@part@draw[\chicken@body] (-0.082, 0.76) ellipse[x radius=0.17, y radius=0.06, rotate=130];
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname chickenhookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.96, 0.08) rectangle (0.96, 2.35);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifchicken@threeD
+ \def\chicken@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifchicken@contour
+ \def\chicken@part@draw[##1]{\draw[##1,\chicken@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\chicken@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname chickenhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \chicken@part@draw[\chicken@body] (0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=-65];
+ \chicken@part@draw[\chicken@body] (0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=-43];
+ \chicken@part@draw[\chicken@body] (0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=-18];
+ \chicken@part@draw[\chicken@body] (-0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=65];
+ \chicken@part@draw[\chicken@body] (-0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=43];
+ \chicken@part@draw[\chicken@body] (-0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=18];
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifchicken@back
+ \chicken@part@draw[\chicken@feet] (0.19,0.3) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (-0.19,0.3) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=20];
+ \chicken@part@draw[\chicken@feet] (0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=40];
+ \chicken@part@draw[\chicken@feet] (-0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (-0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
+ \chicken@part@draw[\chicken@feet] (-0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \chicken@part@draw[\chicken@body!50!white] ( 0.00, 0.33) .. controls (-0.60, 0.33) and (-0.55, 0.65) .. (-0.55, 0.90) .. controls (-0.55, 1.10) and (-0.48, 1.20) .. (-0.39, 1.40) .. controls (-0.32, 1.58) and (-0.32, 2.09) .. ( 0.00, 2.09) .. controls ( 0.32, 2.09) and ( 0.32, 1.58) .. ( 0.39, 1.40) .. controls ( 0.48, 1.20) and ( 0.55, 1.10) .. ( 0.55, 0.90) .. controls ( 0.55, 0.65) and ( 0.60, 0.33) .. ( 0, 0.33) -- cycle;
+ \chicken@part@draw[\chicken@body,decoration={snake,amplitude=\scalingfactor*1.5pt,segment length=\scalingfactor*6.1pt}] ( -0.39, 1.40) .. controls (-0.32, 1.58) and (-0.32, 2.09) .. ( 0.00, 2.09) .. controls ( 0.32, 2.09) and ( 0.32, 1.58) .. ( 0.39, 1.40) decorate {arc [start angle=-60,end angle=-120,radius=0.77]} -- cycle;
+ %
+ % Comb %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \chicken@part@draw[\chicken@comb] (0.04,2.132) ellipse[x radius=0.22, y radius=0.06, rotate=70];
+ \chicken@part@draw[\chicken@comb] (-0.03,2.095) ellipse[x radius=0.17, y radius=0.06, rotate=92];
+ \chicken@part@draw[\chicken@comb] (-0.082,2.060) ellipse[x radius=0.15, y radius=0.06, rotate=120];
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname chickenhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifchicken@back
+ \chicken@part@draw[\chicken@eye] (0.135,1.8) ellipse[x radius=0.06, y radius=0.07];
+ \chicken@part@draw[\chicken@eye] (-0.135,1.8) ellipse[x radius=0.06, y radius=0.07];
+ \chicken@part@draw[\chicken@pupil] (0.124,1.78) ellipse[x radius=0.017, y radius=0.027];
+ \chicken@part@draw[\chicken@pupil] (-0.124,1.78) ellipse[x radius=0.017, y radius=0.027];
+ \fi% back
+ %
+ % Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifchicken@back
+ \chicken@part@draw[\chicken@comb] (-0.04, 1.57) ellipse[x radius=0.04, y radius=0.08, rotate=-20];
+ \chicken@part@draw[\chicken@comb] (0.04, 1.57) ellipse[x radius=0.04, y radius=0.08, rotate=20];
+ \chicken@part@draw[\chicken@bill] (-0.09, 1.7) -- (0, 1.58) -- (0.09, 1.7) arc [start angle=50, end angle=130, radius=0.14] -- cycle;
+ \fi% back
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifchicken@back
+ \chicken@part@draw[\chicken@feet] (0.19,0.3) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (-0.19,0.3) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=20];
+ \chicken@part@draw[\chicken@feet] (0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=40];
+ \chicken@part@draw[\chicken@feet] (-0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (-0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
+ \chicken@part@draw[\chicken@feet] (-0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
+ \fi% back
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifchicken@back
+ \chicken@part@draw[\chicken@body] (0.12, 0.795) ellipse[x radius=0.20, y radius=0.06, rotate=58];
+ \chicken@part@draw[\chicken@body] (0.04, 0.87) ellipse[x radius=0.25, y radius=0.06, rotate=80];
+ \chicken@part@draw[\chicken@body] (-0.03, 0.83) ellipse[x radius=0.20, y radius=0.06, rotate=102];
+ \chicken@part@draw[\chicken@body] (-0.082, 0.76) ellipse[x radius=0.17, y radius=0.06, rotate=130];
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname chickenhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Baby chicken
-%
+%%
+%% Baby chicken
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\chicken@drawbaby{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.53, 0.1) rectangle (0.53, 1.22);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifchicken@threeD
+ \def\chicken@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifchicken@contour
+ \def\chicken@part@draw[##1]{\draw[##1,\chicken@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\chicken@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts (center: x=0.925)
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname chickenhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \begin{scope}[scale=0.55]
+ \chicken@part@draw[\chicken@baby] (0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=-65];
+ \chicken@part@draw[\chicken@baby] (0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=-43];
+ \chicken@part@draw[\chicken@baby] (0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=-18];
+ \chicken@part@draw[\chicken@baby] (-0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=65];
+ \chicken@part@draw[\chicken@baby] (-0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=43];
+ \chicken@part@draw[\chicken@baby] (-0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=18];
+ \end{scope}
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifchicken@back
+ \begin{scope}[scale=0.67]
+ \chicken@part@draw[\chicken@feet] (0.19,0.38) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (-0.19,0.38) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (0.175,0.27) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (0.225,0.28) ellipse[x radius=0.03, y radius=0.1, rotate=20];
+ \chicken@part@draw[\chicken@feet] (0.275,0.3) ellipse[x radius=0.03, y radius=0.1, rotate=40];
+ \chicken@part@draw[\chicken@feet] (-0.175,0.27) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (-0.225,0.28) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
+ \chicken@part@draw[\chicken@feet] (-0.275,0.3) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
+ \end{scope}
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \chicken@part@draw[\chicken@baby] (0,0.55) circle [radius=0.3];
+ %
+ % Comb %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \begin{scope}[scale=0.52]
+ \chicken@part@draw[\chicken@baby] (0.04,2.142) ellipse[x radius=0.2, y radius=0.05, rotate=70];
+ \chicken@part@draw[\chicken@baby] (-0.03,2.105) ellipse[x radius=0.15, y radius=0.05, rotate=92];
+ \chicken@part@draw[\chicken@baby] (-0.082,2.070) ellipse[x radius=0.13, y radius=0.05, rotate=120];
+ \end{scope}
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \chicken@part@draw[\chicken@baby] (0,0.87) circle [radius=0.25];
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname chickenhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifchicken@back
+ \chicken@part@draw[\chicken@eye] (0.075,0.925) ellipse[x radius=0.055, y radius=0.065];
+ \chicken@part@draw[\chicken@eye] (-0.075,0.925) ellipse[x radius=0.055, y radius=0.065];
+ \chicken@part@draw[\chicken@pupil] (0.07,0.91) ellipse[x radius=0.017, y radius=0.024];
+ \chicken@part@draw[\chicken@pupil] (-0.07,0.91) ellipse[x radius=0.017, y radius=0.024];
+ \fi% back
+ %
+ % Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifchicken@back
+ \chicken@part@draw[\chicken@bill] (-0.05, 0.81) -- (0, 0.74) -- (0.05, 0.81) arc [start angle=60, end angle=120, radius=0.1] -- cycle;
+ \fi% back
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifchicken@back
+ \begin{scope}[scale=0.67]
+ \chicken@part@draw[\chicken@feet] (0.19,0.38) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (-0.19,0.38) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (0.175,0.27) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (0.225,0.28) ellipse[x radius=0.03, y radius=0.1, rotate=20];
+ \chicken@part@draw[\chicken@feet] (0.275,0.3) ellipse[x radius=0.03, y radius=0.1, rotate=40];
+ \chicken@part@draw[\chicken@feet] (-0.175,0.27) ellipse[x radius=0.03, y radius=0.1];
+ \chicken@part@draw[\chicken@feet] (-0.225,0.28) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
+ \chicken@part@draw[\chicken@feet] (-0.275,0.3) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
+ \end{scope}
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname chickenhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.53, 0.1) rectangle (0.53, 1.22);
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Chicken]{Paulette, the chicken}
%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+%\emph{Paulette is named after the French word for chicken ``poulet''}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%\subsection{Package name}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifchicken@threeD
- \def\chicken@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifchicken@contour
- \def\chicken@part@draw[##1]{\draw[##1,\chicken@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\chicken@part@draw[##1]{\fill[##1]}
- \fi
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-chickens}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{Basic Usage}
%
-% Body parts (center: x=0.925)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\begin{tcblisting}{}
+%\chicken
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname chickenhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
+%\subsection{Options}
%
-% Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{scope}[scale=0.55]
- \chicken@part@draw[\chicken@baby] (0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=-65];
- \chicken@part@draw[\chicken@baby] (0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=-43];
- \chicken@part@draw[\chicken@baby] (0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=-18];
- \chicken@part@draw[\chicken@baby] (-0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=65];
- \chicken@part@draw[\chicken@baby] (-0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=43];
- \chicken@part@draw[\chicken@baby] (-0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=18];
-\end{scope}
+%The basic chicken can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\chicken[body=blue]
+%\end{tcblisting}
%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifchicken@back
- \begin{scope}[scale=0.67]
- \chicken@part@draw[\chicken@feet] (0.19,0.38) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (-0.19,0.38) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (0.175,0.27) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (0.225,0.28) ellipse[x radius=0.03, y radius=0.1, rotate=20];
- \chicken@part@draw[\chicken@feet] (0.275,0.3) ellipse[x radius=0.03, y radius=0.1, rotate=40];
- \chicken@part@draw[\chicken@feet] (-0.175,0.27) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (-0.225,0.28) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
- \chicken@part@draw[\chicken@feet] (-0.275,0.3) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
- \end{scope}
-\fi
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\chicken[comb=green]
+%\end{tcblisting}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\chicken@part@draw[\chicken@baby] (0,0.55) circle [radius=0.3];
+%\begin{tcblisting}{}
+%\chicken[eye=red]
+%\end{tcblisting}
%
-% Comb %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{scope}[scale=0.52]
- \chicken@part@draw[\chicken@baby] (0.04,2.142) ellipse[x radius=0.2, y radius=0.05, rotate=70];
- \chicken@part@draw[\chicken@baby] (-0.03,2.105) ellipse[x radius=0.15, y radius=0.05, rotate=92];
- \chicken@part@draw[\chicken@baby] (-0.082,2.070) ellipse[x radius=0.13, y radius=0.05, rotate=120];
-\end{scope}
+%\begin{tcblisting}{}
+%\chicken[pupil=red]
+%\end{tcblisting}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\chicken@part@draw[\chicken@baby] (0,0.87) circle [radius=0.25];
+%\begin{tcblisting}{}
+%\chicken[bill=red]
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname chickenhookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%\begin{tcblisting}{}
+%\chicken[feet=red]
+%\end{tcblisting}
%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifchicken@back
- \chicken@part@draw[\chicken@eye] (0.075,0.925) ellipse[x radius=0.055, y radius=0.065];
- \chicken@part@draw[\chicken@eye] (-0.075,0.925) ellipse[x radius=0.055, y radius=0.065];
- \chicken@part@draw[\chicken@pupil] (0.07,0.91) ellipse[x radius=0.017, y radius=0.024];
- \chicken@part@draw[\chicken@pupil] (-0.07,0.91) ellipse[x radius=0.017, y radius=0.024];
-\fi
+%There is also the special option \lstinline|baby| which will draw a baby chicken called \emph{Pio}:
+%\begin{tcblisting}{}
+%\chicken[baby=yellow]
+%\end{tcblisting}
%
-% Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifchicken@back
- \chicken@part@draw[\chicken@bill] (-0.05, 0.81) -- (0, 0.74) -- (0.05, 0.81) arc [start angle=60, end angle=120, radius=0.1] -- cycle;
-\fi
+%To view the chicken from behind:
+%\begin{tcblisting}{}
+%\chicken[back]
+%\end{tcblisting}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifchicken@back
- \begin{scope}[scale=0.67]
- \chicken@part@draw[\chicken@feet] (0.19,0.38) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (-0.19,0.38) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (0.175,0.27) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (0.225,0.28) ellipse[x radius=0.03, y radius=0.1, rotate=20];
- \chicken@part@draw[\chicken@feet] (0.275,0.3) ellipse[x radius=0.03, y radius=0.1, rotate=40];
- \chicken@part@draw[\chicken@feet] (-0.175,0.27) ellipse[x radius=0.03, y radius=0.1];
- \chicken@part@draw[\chicken@feet] (-0.225,0.28) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
- \chicken@part@draw[\chicken@feet] (-0.275,0.3) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
- \end{scope}
-\fi
-%%
-%% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\ifchicken@back
-% \chicken@part@draw[\chicken@body] (0.12, 0.795) ellipse[x radius=0.20, y radius=0.06, rotate=58];
-% \chicken@part@draw[\chicken@body] (0.04, 0.87) ellipse[x radius=0.25, y radius=0.06, rotate=80];
-% \chicken@part@draw[\chicken@body] (-0.03, 0.83) ellipse[x radius=0.20, y radius=0.06, rotate=102];
-% \chicken@part@draw[\chicken@body] (-0.082, 0.76) ellipse[x radius=0.17, y radius=0.06, rotate=130];
-%\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname chickenhookbody\endcsname
-\csname tikzlinghookbody\endcsname
+%The key \lstinline|3D| will make the chicken 3-dimensional:
+%\begin{tcblisting}{}
+%\chicken[3D]
+%\end{tcblisting}
%
-}
-
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\chicken[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty b/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
index fdeaa64177..3ff1dec919 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/coati.tex
+ % !TeX root = ./examples/coati.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-coatis}[2021/04/16 version v0.6 Drawing coatis in TikZ]
+\ProvidesPackage{tikzlings-coatis}[2021/08/06 version v0.8 Drawing coatis in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -68,179 +68,240 @@
}
\def\coati@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.84,0.1) rectangle (1.63,2.26);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifcoati@threeD
+ \def\coati@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifcoati@contour
+ \def\coati@part@draw[##1]{\draw[##1,\coati@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\coati@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname coatihookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \coati@part@draw[\coati@body!80!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \coati@part@draw[\coati@body!80!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@body!50!darkgray] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
+ \begin{scope}
+ \clip (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.8,1.15)}] (0.6,1.1) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.9,1.35)}] (0.7,1.3) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-50:(1.0,1.5)}] (0.8,1.45) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-80:(1.2,1.6)}] (1.0,1.55) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-130:(1.5,1.5)}] (1.3,1.45) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.55,0.65)}] (0.35,0.6) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.65,0.9)}] (0.45,0.85) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-40:(0.35,0.45)}] (0.15,0.4) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-60:(0.05,0.3)}] (-0.15,0.25) rectangle ++(0.4,0.1);
+ \end{scope}
+ \fi% back
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \coati@part@draw[\coati@body!80!white] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70];
+ \coati@part@draw[\coati@body!80!white] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \coati@part@draw[\coati@body!50!darkgray] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname coatihookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \begin{scope}[rotate around={\coati@rotatehead:(0,1.68)}]
+ %
+ % Sidewards head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifcoati@sideward
+ %
+ % Left Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \coati@part@draw[\coati@body!45!white!95!orange] (-0.212, 2.135) ellipse[x radius=0.09, y radius=0.12, rotate=-16];
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@body!80!white] (-0.212, 2.135) ellipse[x radius=0.065, y radius=0.09, rotate=-16];
+ \fi% back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifcoati@back
+ \coati@part@draw[\coati@body!45!white!95!orange] (0.4569, 1.5608) .. controls (0.3680, 1.3594) and (0.0005, 1.2699) .. (-0.1826, 1.3507) .. controls (-0.3657, 1.4315) and (-0.5475, 1.7632) .. (-0.4587, 1.9646) .. controls (-0.1103, 2.3578) and (0.5123, 2.0832) .. (0.4569, 1.5608) -- cycle;
+ \else% back
+ \coati@part@draw[\coati@body!45!white!95!orange] (0.4808, 1.7911) .. controls (0.5682, 1.2837) and (-0.3468, 1.3575) .. (-0.6360, 1.3679) .. controls (-0.7582, 1.4729) and (-0.5198, 1.7911) .. (-0.5198, 1.7911) .. controls (-0.3597, 2.2914) and (0.3207, 2.2914) .. (0.4808, 1.7911) -- cycle;
+ \fi% back
+ %
+ % Cheek %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@body!80!white] (0.30, 1.4552) .. controls (0.30, 1.4552) and (0.1016, 1.7565) .. (-0.0005, 1.7581) -- (-0.6360, 1.3679) .. controls (-0.3083, 1.3437) and (0.0283, 1.332) .. (0.30, 1.4552) -- cycle (-0.4166, 1.9824) .. controls (-0.4166, 1.9824) and (-0.2413, 1.9758) .. (-0.2226, 1.9112) -- (-0.6875, 1.4906) .. controls (-0.6875, 1.4906) and (-0.5712, 1.7549) .. (-0.4166, 1.9824) -- cycle;
+ \fi% back
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@body!50!black] (-0.605, 1.453) circle[radius=0.09];
+ \fi% back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@eye] (0.007, 1.624) ellipse[x radius=0.04, y radius=0.06];
+ \coati@part@draw[\coati@eye] (-0.38, 1.865) ellipse[x radius=0.035, y radius=0.055];
+ \fi% back
+ %
+ % Right Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \coati@part@draw[\coati@body!45!white!95!orange] (0.417, 1.875) ellipse[x radius=0.1, y radius=0.14, rotate=-16];
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@body!80!white] (0.417, 1.875) ellipse[x radius=0.07, y radius=0.10, rotate=-16];
+ \fi% back
+ %
+ % Normal Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else% sidewards
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifcoati@back
+ \coati@part@draw[\coati@body!45!white!95!orange] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
+ \else% back
+ \coati@part@draw[\coati@body!45!white!95!orange] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
+ \fi% back
+ %
+ % Cheeks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@body!80!white] (-0.4935, 1.7443) .. controls (-0.4935, 1.7443) and (-0.1917, 1.7798) .. (-0.1371, 1.7333) .. controls (-0.07, 1.2) and (-0.07, 1.2) .. (-0.07, 1.2) .. controls (-0.259, 1.3169) and (-0.46, 1.5665) .. (-0.4935, 1.7443) -- cycle (0.4935, 1.7443) .. controls (0.4935, 1.7443) and (0.1917, 1.7798) .. (0.1371, 1.7333) .. controls (0.07, 1.2) and (0.07, 1.2) .. (0.07, 1.2) .. controls (0.259, 1.3169) and (0.46, 1.5665) .. (0.4935, 1.7443) -- cycle;
+ \fi% back
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@body!50!black] (0, 1.248) circle[radius=0.09];
+ \fi% back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@eye] (0.23, 1.62) circle[radius=0.05];
+ \coati@part@draw[\coati@eye] (-0.23, 1.62) circle[radius=0.05];
+ \fi% back
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \coati@part@draw[\coati@body!45!white!95!orange] (0.44, 2.02) circle[radius=0.12];
+ \coati@part@draw[\coati@body!45!white!95!orange] (-0.44, 2.02) circle[radius=0.12];
+ \unless\ifcoati@back
+ \coati@part@draw[\coati@body!80!white] (0.44, 2.02) circle[radius=0.09];
+ \coati@part@draw[\coati@body!80!white] (-0.44, 2.02) circle[radius=0.09];
+ \fi% back
+ %
+ \fi% sidewards
+ \end{scope}
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifcoati@back
+ \coati@part@draw[\coati@body!50!darkgray] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
+ \begin{scope}
+ \clip (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.8,1.15)}] (0.6,1.1) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.9,1.35)}] (0.7,1.3) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-50:(1.0,1.5)}] (0.8,1.45) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-80:(1.2,1.6)}] (1.0,1.55) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-130:(1.5,1.5)}] (1.3,1.45) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.55,0.65)}] (0.35,0.6) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.65,0.9)}] (0.45,0.85) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-40:(0.35,0.45)}] (0.15,0.4) rectangle ++(0.4,0.1);
+ \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-60:(0.05,0.3)}] (-0.15,0.25) rectangle ++(0.4,0.1);
+ \end{scope}
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname coatihookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.84,0.1) rectangle (1.63,2.26);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+%\clearpage
+%\section[Coati]{007, the coati}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%\emph{Named after a coati living in the zoo of M\"onchengladbach}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifcoati@threeD
- \def\coati@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifcoati@contour
- \def\coati@part@draw[##1]{\draw[##1,\coati@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\coati@part@draw[##1]{\fill[##1]}
- \fi
-\fi
+%\subsection{Package name}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-coatis}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% Body parts (center: x=0)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{Basic Usage}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname coatihookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\coati@part@draw[\coati@body!80!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\coati@part@draw[\coati@body!80!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+%\begin{tcblisting}{}
+%\coati
+%\end{tcblisting}
%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifcoati@back
- \coati@part@draw[\coati@body!50!darkgray] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
- \begin{scope}
- \clip (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.8,1.15)}] (0.6,1.1) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.9,1.35)}] (0.7,1.3) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-50:(1.0,1.5)}] (0.8,1.45) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-80:(1.2,1.6)}] (1.0,1.55) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-130:(1.5,1.5)}] (1.3,1.45) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.55,0.65)}] (0.35,0.6) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.65,0.9)}] (0.45,0.85) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-40:(0.35,0.45)}] (0.15,0.4) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-60:(0.05,0.3)}] (-0.15,0.25) rectangle ++(0.4,0.1);
- \end{scope}
-\fi
+%\subsection{Options}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\coati@part@draw[\coati@body!80!white] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70];
-\coati@part@draw[\coati@body!80!white] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
+%The basic coati can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\coati[body=blue]
+%\end{tcblisting}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\coati@part@draw[\coati@body!50!darkgray] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+%In addition to the colour of the body, the colour of the eyes can be adjusted:
+%\begin{tcblisting}{}
+%\coati[eye=red]
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname coatihookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{scope}[rotate around={\coati@rotatehead:(0,1.68)}]
+%The head of the coati can be rotated, but please don't overdo this, otherwise his neck might break!
+%\begin{tcblisting}{}
+%\coati[rotatehead=-15]
+%\end{tcblisting}
%
-% Sidewards head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifcoati@sideward
- %
- % Left Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!45!white!95!orange] (-0.212, 2.135) ellipse[x radius=0.09, y radius=0.12, rotate=-16];
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (-0.212, 2.135) ellipse[x radius=0.065, y radius=0.09, rotate=-16];
- \fi
- %
- % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \ifcoati@back
- \coati@part@draw[\coati@body!45!white!95!orange] (0.4569, 1.5608) .. controls (0.3680, 1.3594) and (0.0005, 1.2699) .. (-0.1826, 1.3507) .. controls (-0.3657, 1.4315) and (-0.5475, 1.7632) .. (-0.4587, 1.9646) .. controls (-0.1103, 2.3578) and (0.5123, 2.0832) .. (0.4569, 1.5608) -- cycle;
- \else
- \coati@part@draw[\coati@body!45!white!95!orange] (0.4808, 1.7911) .. controls (0.5682, 1.2837) and (-0.3468, 1.3575) .. (-0.6360, 1.3679) .. controls (-0.7582, 1.4729) and (-0.5198, 1.7911) .. (-0.5198, 1.7911) .. controls (-0.3597, 2.2914) and (0.3207, 2.2914) .. (0.4808, 1.7911) -- cycle;
- \fi
- %
- % Cheek %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (0.30, 1.4552) .. controls (0.30, 1.4552) and (0.1016, 1.7565) .. (-0.0005, 1.7581) -- (-0.6360, 1.3679) .. controls (-0.3083, 1.3437) and (0.0283, 1.332) .. (0.30, 1.4552) -- cycle (-0.4166, 1.9824) .. controls (-0.4166, 1.9824) and (-0.2413, 1.9758) .. (-0.2226, 1.9112) -- (-0.6875, 1.4906) .. controls (-0.6875, 1.4906) and (-0.5712, 1.7549) .. (-0.4166, 1.9824) -- cycle;
- \fi
- % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!50!black] (-0.605, 1.453) circle[radius=0.09];
- \fi
- %
- % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \unless\ifcoati@back
- \coati@part@draw[\coati@eye] (0.007, 1.624) ellipse[x radius=0.04, y radius=0.06];
- \coati@part@draw[\coati@eye] (-0.38, 1.865) ellipse[x radius=0.035, y radius=0.055];
- \fi
- %
- % Right Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!45!white!95!orange] (0.417, 1.875) ellipse[x radius=0.1, y radius=0.14, rotate=-16];
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (0.417, 1.875) ellipse[x radius=0.07, y radius=0.10, rotate=-16];
- \fi
+%For the head an alternative sidewards facing head is available. It can be combined with the \lstinline|rotatehead| option.
+%\begin{tcblisting}{}
+%\coati[sideward]
+%\end{tcblisting}
%
-% Normal Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\else
- %
- % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \ifcoati@back
- \coati@part@draw[\coati@body!45!white!95!orange] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
- \else
- \coati@part@draw[\coati@body!45!white!95!orange] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
- \fi
- %
- % Cheeks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (-0.4935, 1.7443) .. controls (-0.4935, 1.7443) and (-0.1917, 1.7798) .. (-0.1371, 1.7333) .. controls (-0.07, 1.2) and (-0.07, 1.2) .. (-0.07, 1.2) .. controls (-0.259, 1.3169) and (-0.46, 1.5665) .. (-0.4935, 1.7443) -- cycle (0.4935, 1.7443) .. controls (0.4935, 1.7443) and (0.1917, 1.7798) .. (0.1371, 1.7333) .. controls (0.07, 1.2) and (0.07, 1.2) .. (0.07, 1.2) .. controls (0.259, 1.3169) and (0.46, 1.5665) .. (0.4935, 1.7443) -- cycle;
- \fi
- %
- % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!50!black] (0, 1.248) circle[radius=0.09];
- \fi
- %
- % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \unless\ifcoati@back
- \coati@part@draw[\coati@eye] (0.23, 1.62) circle[radius=0.05];
- \coati@part@draw[\coati@eye] (-0.23, 1.62) circle[radius=0.05];
- \fi
- %
- % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!45!white!95!orange] (0.44, 2.02) circle[radius=0.12];
- \coati@part@draw[\coati@body!45!white!95!orange] (-0.44, 2.02) circle[radius=0.12];
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (0.44, 2.02) circle[radius=0.09];
- \coati@part@draw[\coati@body!80!white] (-0.44, 2.02) circle[radius=0.09];
- \fi
- %
-\fi
-\end{scope}
+%To view the coati from behind:
+%\begin{tcblisting}{}
+%\coati[back]
+%\end{tcblisting}
%
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifcoati@back
- \coati@part@draw[\coati@body!50!darkgray] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
- \begin{scope}
- \clip (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.8,1.15)}] (0.6,1.1) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.9,1.35)}] (0.7,1.3) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-50:(1.0,1.5)}] (0.8,1.45) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-80:(1.2,1.6)}] (1.0,1.55) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-130:(1.5,1.5)}] (1.3,1.45) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.55,0.65)}] (0.35,0.6) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.65,0.9)}] (0.45,0.85) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-40:(0.35,0.45)}] (0.15,0.4) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-60:(0.05,0.3)}] (-0.15,0.25) rectangle ++(0.4,0.1);
- \end{scope}
-\fi
+%The key \lstinline|3D| will make the coati 3-dimensional:
+%\begin{tcblisting}{}
+%\coati[3D]
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname coatihookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
-
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\coati[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf b/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf
index a51cde1b4d..67259e6d03 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex b/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex
index 36537f2ba6..f33ece7dae 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex
@@ -43,6 +43,68 @@
\newcommand{\miktex}{MiK\TeX\xspace}
\newcommand{\texlive}{\TeX{}Live\xspace}
+% including commented lines from the .sty files %%%%%%%%%%%%%%%%%%%%%%
+% thanks to Phelype Oleinik https://topanswers.xyz/tex?q=1861#a2092
+\ExplSyntaxOn
+\makeatletter
+\iow_new:N \l__tikzlings_iow
+\tl_new:N \l__tikzlings_file_name_tl
+\NewDocumentCommand \CommentInput { m }
+ { \tikzlings_comment_input:n {#1} }
+\cs_new_protected:Npn \tikzlings_comment_input:n #1
+ {
+ \file_get_full_name:nNTF {#1} \l__tikzlings_file_name_tl
+ { \__tikzlings_comment_input: }
+ { \msg_error:nnn { tikzlings } { file-not-found } {#1} }
+ }
+\msg_new:nnn { tikzlings } { file-not-found } { File~'#1'~not~found. }
+\cs_new_protected:Npn \__tikzlings_comment_input:
+ {
+ \group_begin:
+ \cctab_select:N \c_other_cctab
+ \int_set:Nn \tex_endlinechar:D { `\^^M }
+ \use:x { \tex_everyeof:D { \exp_not:N \q_nil \char_generate:nn { 13 } { 13 } } }
+ \char_set_active_eq:NN \^^M \__tikzlings_process_line:w
+ \char_set_catcode_active:N \^^M
+ \iow_open:Nn \l__tikzlings_iow { \c_sys_jobname_str . cif } % cif => comment input file
+ \exp_after:wN \__tikzlings_process_line:w
+ \tex_input:D { \l__tikzlings_file_name_tl }
+ \iow_close:N \l__tikzlings_iow
+ \group_end:
+ \declare@file@substitution { \l__tikzlings_file_name_tl } { \c_sys_jobname_str . cif }
+ \input { \l__tikzlings_file_name_tl }
+ \undeclare@file@substitution { \l__tikzlings_file_name_tl }
+ }
+\group_begin:
+\char_set_catcode_active:N \^^M
+\char_set_active_eq:NN \^^M \scan_stop:
+\cs_new_protected:Npx \__tikzlings_process_line:w #1 ^^M
+ { \exp_not:N \__tikzlings_parse_line:w ^^M #1 ^^M \c_percent_str \s_stop }
+\cs_set_protected:Npn \__tikzlings_tmp:w #1
+ {
+ \cs_new_protected:Npn \__tikzlings_parse_line:w ##1 ^^M #1 ##2 \s_stop
+ {
+ \tl_if_empty:nTF {##1}
+ {
+ \peek_charcode_remove:NTF #1
+ { \__tikzlings_ignore_line:w }
+ { \__tikzlings_output_line:w }
+ ##2 \s_stop ^^M
+ }
+ {
+ \tl_set:Nx \l_tmpa_tl { \tl_tail:n {##1} }
+ \tl_if_eq:NNF \l_tmpa_tl \q_nil { ^^M }
+ }
+ }
+ \cs_new_protected:Npn \__tikzlings_output_line:w ##1 ^^M #1 \s_stop
+ { \iow_now:Nn \l__tikzlings_iow {##1} }
+ \cs_new_protected:Npn \__tikzlings_ignore_line:w ##1 \s_stop { }
+ }
+\exp_args:No \__tikzlings_tmp:w { \c_percent_str }
+\group_end:
+\makeatother
+\ExplSyntaxOff
+
% customisation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addtokomafont{sectioning}{\color{SteelBlue}}
\addtokomafont{date}{\normalsize}
@@ -93,17 +155,27 @@
alsoletter={3},
emphstyle=\color{red!60!black},
emph=[1]{
- tikzlings,
- tikzlings-marmots, tikzlings-bears, tikzlings-coatis, tikzlings-koalas, tikzlings-marmots, tikzlings-owls, tikzlings-penguins, tikzlings-snowmen, tikzlings-mice, tikzlings-moles, tikzlings-sloths, tikzlings-pigs, tikzlings-cats, tikzlings-hippos, tikzlings-rhinos, tikzlings-pandas, tikzlings-bees, tikzlings-anteaters, tikzlings-squirrels, tikzlings-sheep, tikzlings-chickens, tikzlings-elephants,
- body, 3D, rotatehead, sideward, blush, sleeping, whiskers, teeth, shadow, askphil, leftstep, rightstep, eye, nose, pupil, bill, feet, belly, ask, phil, mouth, buttons, rotatearms, paws, back, pupilwidth, globalwarming, wings, antennas, stripes,
- scale, yshift, xshift, rotate, hands, muzzle, schroedinger, toes,
- hat, tophat, beret, strawhat, ribbon, harlequin, niuqelrah, witch, magichat, magicstars, crown, queencrown, kingcrown, santa, chef, graduate, tassel, alien, book, bookcolour, signpost, signcolour, signback, speech, think, bubblecolour, pizza, cheese, baguette, cake, icecream, flavoura, flavourb, flavourc, milkshake, wine, cricket, hockey, football, crystalball, magicwand, rollingpin, lightsaber, torch, basket, easter, egga, eggb, eggc, crozier, shovel, pickaxe, umbrella, umbrellaclosed, handbag, cocktail, monocle, contour, comb, baby,
+ % package names
+ tikzlings, tikzlings-marmots, tikzlings-bears, tikzlings-coatis, tikzlings-koalas, tikzlings-marmots, tikzlings-owls, tikzlings-penguins, tikzlings-snowmen, tikzlings-mice, tikzlings-moles, tikzlings-sloths, tikzlings-pigs, tikzlings-cats, tikzlings-hippos, tikzlings-rhinos, tikzlings-pandas, tikzlings-bees, tikzlings-anteaters, tikzlings-squirrels, tikzlings-sheep, tikzlings-chickens, tikzlings-elephants, tikzlings-bugs, tikzlings-bats,
+ % tikzlings options
+ body, 3D, rotatehead, sideward, blush, sleeping, whiskers, teeth, shadow, askphil, leftstep, rightstep, eye, nose, pupil, bill, feet, belly, ask, phil, mouth, rotatearms, paws, back, pupilwidth, globalwarming, wings, antennas, stripes, arms, ears, tail, eyelid, hands, muzzle, schroedinger, toes, monocle, contour, comb, baby,
+ % acessoires
+ buttons, hat, tophat, beret, strawhat, ribbon, harlequin, niuqelrah, witch, magichat, magicstars, crown, queencrown, kingcrown, santa, chef, graduate, tassel, alien, book, bookcolour, signpost, signcolour, signback, speech, think, bubblecolour, pizza, cheese, baguette, cake, icecream, flavoura, flavourb, flavourc, milkshake, wine, cricket, hockey, football, crystalball, magicwand, rollingpin, lightsaber, torch, basket, easter, egga, eggb, eggc, crozier, shovel, pickaxe, umbrella, umbrellaclosed, handbag, cocktail, strawbroom, strawbroomstick, strawbroomribbon, broom, broomstick,
+ % tikz options
+ scale, yshift, xshift, rotate,
+ % other
+ figchild, standalone, document,
},
texcsstyle=*\color{SteelBlue!50!black}\bfseries,
keywordstyle=\color{red!60!black}\bfseries,
morekeywords={tikzpicture},
moretexcs={
- usepackage, usetikzlibrary, marmot, coati, bear, koala, owl, penguin, thing, tikzling, snowman, mouse, moles, sloth, pig, cat, hippo, rhino, panda, bee, anteater, squirrel, bearwear, sheep, chicken, elephant, tikzlinghookbackground, tikzlinghookbelly, tikzlinghookbody, tikzlinghookforeground, mousehookbelly
+ % latex keywords
+ usepackage, usetikzlibrary,
+ % tikzlings names
+ marmot, coati, bear, koala, owl, penguin, thing, tikzling, snowman, mouse, moles, sloth, pig, cat, hippo, rhino, panda, bee, anteater, squirrel, bearwear, sheep, chicken, elephant, bug, bat,
+ % other
+ tikzlinghookbackground, tikzlinghookbelly, tikzlinghookbody, tikzlinghookforeground, mousehookbelly
},
delim ={[s][\ttfamily\color{green!50!black}]{$}{$}},
moredelim=[is][\footnotesize\ttfamily\color{orange!70!black}]{|}{|},
@@ -151,7 +223,7 @@
\url{https://github.com/samcarter/tikzlings}\\
\url{https://www.ctan.org/pkg/tikzlings}
}{samcarter}}
-\date{Version v0.6 \textendash{} 2021/04/16}
+\date{Version v0.8 \textendash{} 2021/08/06}
\begin{document}
\maketitle
@@ -260,7 +332,7 @@ With regard to the individual components of the \tikzlings, they are located in
\end{tikzpicture}
\end{center}
-In addition the hooks \lstinline|\tikzlinghookbackground|, \lstinline|\tikzlinghookbelly|, \lstinline|\tikzlinghookbody| and \lstinline|\tikzlinghookforeground| are available and will effect all \tikzlings.
+{\raggedright In addition, the hooks \lstinline|\tikzlinghookbackground|, \lstinline|\tikzlinghookbelly|,\newline \lstinline|\tikzlinghookbody| and \lstinline|\tikzlinghookforeground| are available and will effect all\newline \tikzlings.}
A short example how the hooks can be used:
\begin{tcblisting}{}
@@ -280,1328 +352,20 @@ A short example how the hooks can be used:
\tableofcontents
\endgroup
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Anteater
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Anteater]{Peter, the anteater}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-anteaters}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\anteater
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic anteater can be modified by changing its colour:
-\begin{tcblisting}{}
-\anteater[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\anteater[eye=red]
-\end{tcblisting}
-
-To view the anteater from behind:
-\begin{tcblisting}{}
-\anteater[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the anteater 3-dimensional:
-\begin{tcblisting}{}
-\anteater[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\anteater[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Bear
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Bear]{B\"ar, the teddy bear}
-
-\emph{If you look very closely at the group picture in \href{https://www.tug.org/TUGboat/tb39-2/tb122wright-tug18.pdf}{TUG goes to Rio} you can spot the real B\"ar in it}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-bears}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\bear
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic teddy bear can be modified by changing its colour:
-\begin{tcblisting}{}
-\bear[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\bear[eye=red]
-\end{tcblisting}
-
-To view the teddy bear from behind:
-\begin{tcblisting}{}
-\bear[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the teddy bear 3-dimensional:
-\begin{tcblisting}{}
-\bear[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\bear[contour=black]
-\end{tcblisting}
-
-\subsection{Extension}
-
-The B\"ar and Ulrike Fischer wrote the fantastic \lstinline|bearwear| package, that provides many different clothing options for the \lstinline|TikZbears|. All the other \tikzlings admire them for the nice clothing!
-
-A short example:
-
-\begin{tcblisting}{}
-%\usepackage{bearwear}
-\bear
-\bearwear[
- long sleeves,
- shirt=red!80!black
-]
-\end{tcblisting}
-
-Many more options and examples can be found in the package documentation \url{https://ctan.org/pkg/bearwear}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Bee
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Bee]{Beeing, the bee}
-
-\emph{The bee was kindly contributed by @marmot}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-bees}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\bee
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic bee can be modified by changing its colour:
-\begin{tcblisting}{}
-\bee[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of various body parts can be adjusted:
-\begin{tcblisting}{}
-\bee[antennas=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\bee[eye=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\bee[mouth=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\bee[wings=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\bee[hands=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\bee[stripes=red]
-\end{tcblisting}
-
-To view the bee from behind:
-\begin{tcblisting}{}
-\bee[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the bee 3-dimensional:
-\begin{tcblisting}{}
-\bee[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\bee[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Cat
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Cat]{MisTi$k$Zelees, the cat}
-
-\emph{Named after the worlds best singing cat}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-cats}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\cat
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic cat can be modified by changing its colour:
-\begin{tcblisting}{}
-\cat[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of various body parts can be adjusted:
-\begin{tcblisting}{}
-\cat[eye=green]
-\end{tcblisting}
-\begin{tcblisting}{}
-\cat[pupil=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\cat[nose=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\cat[whiskers=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\cat[paws=red]
-\end{tcblisting}
-
-The shape of the \lstinline|pupil| can be changed with the \lstinline|pupilwidth| option:
-\begin{tcblisting}{}
-\cat[pupilwidth=0.015]
-\end{tcblisting}
-
-Additionally several predefined widths exist:
-\begin{tcolorbox}
-\begin{lstlisting}[morekeywords={narrow,medium,wide,very,pupils}]
-\cat[narrow pupils]
-
-\cat[medium pupils]
-
-\cat[wide pupils]
-
-\cat[very wide pupils]
-\end{lstlisting}
-
-\tcblower
-\begin{tikzpicture}[yshift=2.4cm,xshift=1.8cm]
-\cat[narrow pupils]
-\cat[medium pupils,xshift=2.5cm]
-\cat[wide pupils,yshift=-2.5cm]
-\cat[very wide pupils,xshift=2.5cm,yshift=-2.5cm]
-\end{tikzpicture}
-\end{tcolorbox}
-
-There is also the special option \lstinline|schroedinger|. This cat is both alive and dead as long as you did not compile your document.
-Be prepared for a possibly disturbing scene when you open the pdf, this option is not suited for sensitive \tikzlings.
-\begingroup
\makeatletter
-\renewcommand*{\cat}[1][]{%
- \tikzset{/cat/.cd,#1}%
- \cat@tombstone%
+% modified from https://chat.stackexchange.com/transcript/message/56515698#56515698
+\ExplSyntaxOn
+\cs_new_protected:Npn \tikzlings_load_stys:N #1 {
+ \clist_map_inline:Nn #1 {
+ \exp_args:Nx \CommentInput {
+ tikzlings- \__tikzlings_after_slash:w ##1 / / \s_stop .sty
+ }
+ }
}
-\renewcommand{\cathookbackground}{}
+\cs_new_eq:NN \tikzling@loadstys \tikzlings_load_stys:N
+\ExplSyntaxOff
+\tikzling@loadstys\tikzling@list
\makeatother
-\begin{tcblisting}{}
-\cat[schroedinger]
-\end{tcblisting}
-\endgroup
-
-To view the cat from behind:
-\begin{tcblisting}{}
-\cat[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the cat 3-dimensional:
-\begin{tcblisting}{}
-\cat[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\cat[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Chicken
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Chicken]{Paulette, the chicken}
-
-\emph{Paulette is named after the French word for chicken ``poulet''}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-chickens}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\chicken
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic chicken can be modified by changing its colour:
-\begin{tcblisting}{}
-\chicken[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of various body parts can be adjusted:
-\begin{tcblisting}{}
-\chicken[comb=green]
-\end{tcblisting}
-
-\begin{tcblisting}{}
-\chicken[eye=red]
-\end{tcblisting}
-
-\begin{tcblisting}{}
-\chicken[pupil=red]
-\end{tcblisting}
-
-\begin{tcblisting}{}
-\chicken[bill=red]
-\end{tcblisting}
-
-\begin{tcblisting}{}
-\chicken[feet=red]
-\end{tcblisting}
-
-There is also the special option \lstinline|baby| which will draw a baby chicken called \emph{Pio}:
-\begin{tcblisting}{}
-\chicken[baby=yellow]
-\end{tcblisting}
-
-To view the chicken from behind:
-\begin{tcblisting}{}
-\chicken[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the chicken 3-dimensional:
-\begin{tcblisting}{}
-\chicken[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\chicken[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Coati
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Coati]{007, the coati}
-
-\emph{Named after a coati living in the zoo of M\"onchengladbach}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-coatis}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\coati
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic coati can be modified by changing its colour:
-\begin{tcblisting}{}
-\coati[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\coati[eye=red]
-\end{tcblisting}
-
-The head of the coati can be rotated, but please don't overdo this, otherwise his neck might break!
-\begin{tcblisting}{}
-\coati[rotatehead=-15]
-\end{tcblisting}
-
-For the head an alternative sidewards facing head is available. It can be combined with the \lstinline|rotatehead| option.
-\begin{tcblisting}{}
-\coati[sideward]
-\end{tcblisting}
-
-To view the coati from behind:
-\begin{tcblisting}{}
-\coati[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the coati 3-dimensional:
-\begin{tcblisting}{}
-\coati[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\coati[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Chicken
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Elephant]{Johannes, the elephant}
-
-\emph{The namesake of Johannes loves elephants}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-elephants}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\elephant
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic elephant can be modified by changing its colour:
-\begin{tcblisting}{}
-\elephant[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\elephant[eye=red]
-\end{tcblisting}
-
-To view the elephant from behind:
-\begin{tcblisting}{}
-\elephant[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the elephant 3-dimensional:
-\begin{tcblisting}{}
-\elephant[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\elephant[contour=black]
-\end{tcblisting}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Hippo
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Hippo]{Sieglinde, the hippo}
-
-\emph{For the winner of the 2019 Groundhog Challenge}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-hippos}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\hippo
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic hippo can be modified by changing its colour:
-\begin{tcblisting}{}
-\hippo[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\hippo[eye=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\hippo[pupil=red]
-\end{tcblisting}
-
-The hippo can also do its nails:
-\begin{tcblisting}{}
-\hippo[toes=red]
-\end{tcblisting}
-
-To view the hippo from behind:
-\begin{tcblisting}{}
-\hippo[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the hippo 3-dimensional:
-\begin{tcblisting}{}
-\hippo[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\hippo[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Koala
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Koala]{Will, the koala}
-
-\emph{The koala was generously contributed by @marmot and is named in honour of a \LaTeX{} developer from Down Under}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-koalas}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\koala
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic koala can be modified by changing its colour:
-\begin{tcblisting}{}
-\koala[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\koala[eye=red]
-\end{tcblisting}
-
-It can also blush
-\begin{tcblisting}{}
-\koala[blush]
-\end{tcblisting}
-
-and if tired, it is going to take a nap:
-\begin{tcblisting}{}
-\koala[sleeping]
-\end{tcblisting}
-
-To view the koala from behind:
-\begin{tcblisting}{}
-\koala[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the koala 3-dimensional:
-\begin{tcblisting}{}
-\koala[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\koala[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Marmot
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Marmot]{Phil, the marmot}
-
-\emph{Phil got his name from Punxsutawney Phil, the famous weather forecasting groundhog}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-marmots}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\marmot
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic marmot can be modified by changing its colour:
-\begin{tcblisting}{}
-\marmot[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\marmot[eye=red]
-\end{tcblisting}
-
-The marmot can also blush
-\begin{tcblisting}{}
-\marmot[blush]
-\end{tcblisting}
-
-and whiskers can be added:
-\begin{tcblisting}{}
-\marmot[whiskers=gray]
-\end{tcblisting}
-
-Some marmots even show their chisel teeth:
-\begin{tcblisting}{}
-\marmot[teeth=white]
-\end{tcblisting}
-
-or can cast a shadow:
-\begin{tcblisting}{}
-\marmot[shadow]
-\end{tcblisting}
-
-This ability is important if you want to ask Punxsutawney Phil\footnote{\url{https://en.wikipedia.org/wiki/Punxsutawney_Phil}} on Groundhog Day how the weather is going to be. With a probability derived from the statistics of 120 Groundhog Days\footnote{\url{https://www.livescience.com/32974-punxsutawney-phil-weather-prediction-accuracy.html}} the option \lstinline|askphil| might or might not result in a shadow.
-\begin{tcblisting}{}
-\marmot[askphil]
-\end{tcblisting}
-
-If a good weather prognosis is derived, the happy marmot can dance by lifting up its left and right foot:
-\begin{tcblisting}{}
-\marmot[leftstep]
-\marmot[rightstep,xshift=2cm]
-\end{tcblisting}
-
-To view the marmot from behind:
-\begin{tcblisting}{}
-\marmot[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the marmot 3-dimensional:
-\begin{tcblisting}{}
-\marmot[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\marmot[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Moles
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Mole]{Wilhelm, the mole}
-
-\emph{The mole was added in celebration of the international mole day and is named after the chemist Wilhelm Ostwald}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-moles}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\textcolor{red!60!black}{\textbf{Attention:} In contrast to the other \tikzlings the macro name is the plural form to avoid conflicts with \lstinline|siunitx| and similar packages.}
-\begin{tcblisting}{}
-\moles
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic mole can be modified by changing its colour:
-\begin{tcblisting}{}
-\moles[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of various body parts can be adjusted:
-\begin{tcblisting}{}
-\moles[eye=red]
-\end{tcblisting}
-
-\begin{tcblisting}{}
-\moles[muzzle=red]
-\end{tcblisting}
-
-\begin{tcblisting}{}
-\moles[hands=red]
-\end{tcblisting}
-
-\begin{tcblisting}{}
-\moles[feet=red]
-\end{tcblisting}
-
-To view the mole from behind:
-\begin{tcblisting}{}
-\moles[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the mole 3-dimensional:
-\begin{tcblisting}{}
-\moles[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\moles[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Mouse
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Mouse]{Tokz, the mouse}
-
-\emph{The idea for the mouse came from an Italian \LaTeX{} user -- Tokz is a combination of the Italian word for mouse and \TikZ}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-mice}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\mouse
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic mouse can be modified by changing its colour:
-\begin{tcblisting}{}
-\mouse[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\mouse[eye=red]
-\end{tcblisting}
-
-The rotation angle of its arms can be adjusted:
-\begin{tcblisting}{}
-\mouse[rotatearms=40]
-\end{tcblisting}
-
-And the mouse can lift its legs:
-\begin{tcblisting}{}
-\mouse[leftstep]
-\mouse[rightstep,xshift=2cm]
-\end{tcblisting}
-
-To view the mouse from behind:
-\begin{tcblisting}{}
-\mouse[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the mouse 3-dimensional:
-\begin{tcblisting}{}
-\mouse[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\mouse[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Owl
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Owl]{Jake, the owl}
-
-\emph{The owl Jake was inspired by the avatar of one of the world's top TikZperts}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-owls}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\owl
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic owl can be modified by changing its colour:
-\begin{tcblisting}{}
-\owl[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of various body parts can be adjusted:
-\begin{tcblisting}{}
-\owl[eye=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\owl[pupil=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\owl[bill=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\owl[feet=red]
-\end{tcblisting}
-
-To view the owl from behind:
-\begin{tcblisting}{}
-\owl[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the owl 3-dimensional:
-\begin{tcblisting}{}
-\owl[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\owl[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Panda
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Panda]{Meng Meng, the panda}
-
-\emph{Meng Meng is named after one of the pandas at the zoological garden Berlin}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-pandas}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\panda
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic panda can be modified by changing its colour:
-\begin{tcblisting}{}
-\panda[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\panda[eye=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\panda[pupil=red]
-\end{tcblisting}
-
-To view the panda from behind:
-\begin{tcblisting}{}
-\panda[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the panda 3-dimensional:
-\begin{tcblisting}{}
-\panda[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\panda[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Penguin
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Penguin]{Tux, the penguin}
-
-\emph{Dedicated to the Linux mascot}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-penguins}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\penguin
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic penguin can be modified by changing its colour:
-\begin{tcblisting}{}
-\penguin[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of various body parts can be adjusted:
-\begin{tcblisting}{}
-\penguin[eye=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\penguin[pupil=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\penguin[bill=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\penguin[belly=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\penguin[feet=red]
-\end{tcblisting}
-
-To view the penguin from behind:
-\begin{tcblisting}{}
-\penguin[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the penguin 3-dimensional:
-\begin{tcblisting}{}
-\penguin[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\penguin[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Pig
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Pig]{Ms Piggy, the pig}
-
-\emph{Added on February 5th, 2019 to commemorate the Chinese year of the pig}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-pigs}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\pig
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic pig can be modified by changing its colour:
-\begin{tcblisting}{}
-\pig[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\pig[eye=red]
-\end{tcblisting}
-
-To view the pig from behind:
-\begin{tcblisting}{}
-\pig[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the pig 3-dimensional:
-\begin{tcblisting}{}
-\pig[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\pig[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Rhino
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Rhino]{D\"urer, the rhino}
-
-\emph{Named after Albrecht D\"urer who painted an amazing rhino merely based on stories}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-rhinos}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\rhino
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic rhino can be modified by changing its colour:
-\begin{tcblisting}{}
-\rhino[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\rhino[eye=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\rhino[pupil=red]
-\end{tcblisting}
-
-The hippo can also do its nails:
-\begin{tcblisting}{}
-\rhino[toes=red]
-\end{tcblisting}
-
-To view the rhino from behind:
-\begin{tcblisting}{}
-\rhino[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the rhino 3-dimensional:
-\begin{tcblisting}{}
-\rhino[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\rhino[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Sheep
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Sheep]{Mókollur, the sheep}
-
-\emph{The sheep was kindly contributed by @Plergux. Mókollur is a bit silly and likes to goof off. This sheep's favourite food are boiled potatoes.}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-sheep}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\sheep
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic sheep can be modified by changing its colour:
-\begin{tcblisting}{}
-\sheep[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\sheep[eye=red]
-\end{tcblisting}
-
-The sheep can also blush
-\begin{tcblisting}{}
-\sheep[blush]
-\end{tcblisting}
-
-and put on a monocle
-\begin{tcblisting}{}
-\sheep[monocle]
-\end{tcblisting}
-
-To view the sheep from behind:
-\begin{tcblisting}{}
-\sheep[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the sheep 3-dimensional:
-\begin{tcblisting}{}
-\sheep[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\sheep[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Sloth
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Sloth]{Riley, the sloth}
-
-\emph{One of good souls behind the TugBoat once met a sloth called Riley}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-sloths}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\sloth
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic sloth can be modified by changing its colour:
-\begin{tcblisting}{}
-\sloth[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\sloth[eye=red]
-\end{tcblisting}
-
-If tired, the sloth can take a nap:
-\begin{tcblisting}{}
-\sloth[sleeping]
-\end{tcblisting}
-
-To view the sloth from behind:
-\begin{tcblisting}{}
-\sloth[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the sloth 3-dimensional:
-\begin{tcblisting}{}
-\sloth[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\sloth[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Squirrel
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Squirrel]{Ratatosk, the squirrel}
-
-\emph{named after the squirrel from Norse mythology who climbs around Yggdrasil}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-squirrels}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\squirrel
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic squirrel can be modified by changing its colour:
-\begin{tcblisting}{}
-\squirrel[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of the eyes can be adjusted:
-\begin{tcblisting}{}
-\squirrel[eye=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\squirrel[pupil=red]
-\end{tcblisting}
-
-To view the squirrel from behind:
-\begin{tcblisting}{}
-\squirrel[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the squirrel 3-dimensional:
-\begin{tcblisting}{}
-\squirrel[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\squirrel[contour=black]
-\end{tcblisting}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Snowman
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\clearpage
-\section[Snowman]{Yuki, the snowman}
-
-\emph{Yuki is the transcription of the Japanese word for snow}
-
-\subsection{Package name}
-
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings-snowmen}|
-\vspace*{0.5cm}
-\end{tcolorbox}
-
-\subsection{Basic Usage}
-
-\begin{tcblisting}{}
-\snowman
-\end{tcblisting}
-
-\subsection{Options}
-
-The basic snowman can be modified by changing its colour:
-\begin{tcblisting}{}
-\snowman[body=blue]
-\end{tcblisting}
-
-In addition to the colour of the body, the colour of various body parts can be adjusted:
-\begin{tcblisting}{}
-\snowman[eye=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\snowman[nose=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\snowman[mouth=red]
-\end{tcblisting}
-\begin{tcblisting}{}
-\snowman[buttons=red]
-\end{tcblisting}
-
-The biggest enemy of the snowman are raising temperatures:
-\begin{tcblisting}{}
-\snowman[globalwarming,tophat]
-\end{tcblisting}
-
-To view the snowman from behind:
-\begin{tcblisting}{}
-\snowman[back]
-\end{tcblisting}
-
-The key \lstinline|3D| will make the snowman 3-dimensional:
-\begin{tcblisting}{}
-\snowman[3D]
-\end{tcblisting}
-
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
-\snowman[contour=black]
-\end{tcblisting}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -1736,7 +500,7 @@ A list of all available accessories is given below. For completeness the default
\end{tcblisting}
\begin{tcblisting}{}
-\koala[
+\bat[
queencrown=yellow
]
\end{tcblisting}
@@ -1818,7 +582,7 @@ A list of all available accessories is given below. For completeness the default
\end{tcblisting}
\begin{tcblisting}{}
-\coati[
+\bug[
baguette=brown
]
\end{tcblisting}
@@ -1859,7 +623,7 @@ A list of all available accessories is given below. For completeness the default
\end{tcblisting}
\begin{tcblisting}{}
-\bee[
+\bug[
hockey=brown
]
\end{tcblisting}
@@ -1936,6 +700,21 @@ A list of all available accessories is given below. For completeness the default
\end{tcblisting}
\begin{tcblisting}{}
+\bug[
+ strawbroom=brown!50!white,
+ strawbroomstick=brown,
+ strawbroomribbon=red!50!black
+]
+\end{tcblisting}
+
+\begin{tcblisting}{}
+\chicken[
+ broom=brown,
+ broomstick=gray!50!black
+]
+\end{tcblisting}
+
+\begin{tcblisting}{}
\rhino[
umbrella=cyan
]
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty b/graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty
index 750dc756ea..58a86d074e 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/elephant.tex
+ % !TeX root = ./examples/elephant.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-elephants}[2021/04/16 version v0.6 Draw teddy elephants in TikZ]
+\ProvidesPackage{tikzlings-elephants}[2021/08/06 version v0.8 Draw teddy elephants in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -63,120 +63,172 @@
}
\def\elephant@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.86, 0.0) rectangle (0.86, 2.17);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifelephant@threeD
+ \def\elephant@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifelephant@contour
+ \def\elephant@part@draw[##1]{\draw[##1,\elephant@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\elephant@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname elephanthookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \elephant@part@draw[\elephant@body] (0.47,0.86) ellipse[x radius=0.35, y radius=0.25, rotate=-50];
+ \elephant@part@draw[\elephant@body] (-0.47,0.86) ellipse[x radius=0.35, y radius=0.25, rotate=50];
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifelephant@back
+ \elephant@part@draw[\elephant@body] (0.425, 0.3) circle[radius=0.28];
+ \elephant@part@draw[\elephant@body] (-0.425, 0.3) circle[radius=0.28];
+ \elephant@part@draw[\elephant@body] (0.57,0.74) circle [radius=0.20];
+ \elephant@part@draw[\elephant@body] (-0.57,0.74) circle [radius=0.20];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \elephant@part@draw[\elephant@body] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
+ \unless\ifelephant@back
+ \elephant@part@draw[\elephant@body!30!white] (0,0.7) ellipse[x radius=0.35, y radius=0.4];
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname elephanthookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifelephant@back
+ \elephant@part@draw[\elephant@body] (0.425, 0.3) circle[radius=0.28];
+ \elephant@part@draw[\elephant@body] (-0.425, 0.3) circle[radius=0.28];
+ \elephant@part@draw[\elephant@body!30!white] (0.425, 0.3) circle[radius=0.17];
+ \elephant@part@draw[\elephant@body!30!white] (-0.425, 0.3) circle[radius=0.17];
+ \elephant@part@draw[\elephant@body] (0.57,0.75) circle [radius=0.20];
+ \elephant@part@draw[\elephant@body!30!white] (0.57,0.74) circle [radius=0.12];
+ \elephant@part@draw[\elephant@body] (-0.57,0.74) circle [radius=0.20];
+ \elephant@part@draw[\elephant@body!30!white] (-0.57,0.74) circle [radius=0.12];
+ \fi% back
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \elephant@part@draw[\elephant@body] (0.5, 1.7) ellipse [x radius=0.35,y radius=0.45];
+ \elephant@part@draw[\elephant@body] (-0.5, 1.7) ellipse [x radius=0.35,y radius=0.45];
+ \unless\ifelephant@back
+ \elephant@part@draw[\elephant@body!30!white] (0.5, 1.7) ellipse [x radius=0.25,y radius=0.35];
+ \elephant@part@draw[\elephant@body!30!white] (-0.5, 1.7) ellipse [x radius=0.25,y radius=0.35];
+ \fi% back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \elephant@part@draw[\elephant@body] (0, 1.55) circle[radius=0.5];
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifelephant@back
+ %
+ % Trunk% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifelephant@threeD
+ \elephant@part@draw[\elephant@body,draw=\elephant@body!70!black,line width=\scalingfactor*0.6pt] (0.1428, 1.4375) .. controls (0.1607, 1.0411) and (0.3327, 1.1276) .. (0.6705, 1.355) -- (0.72, 1.22) .. controls (0.3327, 0.9) and (-0.1607, 0.8) .. (-0.1428, 1.4375) arc [start angle=160, end angle=20, radius=0.155] -- cycle;
+ \fill[\elephant@body!40!black] (0.7, 1.29) circle [radius=0.08];
+ \else% 3D
+ \elephant@part@draw[\elephant@body,draw=\elephant@body!70!black,line width=\scalingfactor*0.6pt] (0.1428, 1.4375) .. controls (0.1607, 1.0411) and (0.3327, 1.1276) .. (0.6705, 1.355) -- (0.72, 1.22) .. controls (0.3327, 0.9) and (-0.1607, 0.8) .. (-0.1428, 1.4375);
+ \elephant@part@draw[\elephant@body!70!black] (0.7, 1.29) circle [radius=0.08];
+ \fi% 3D
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \elephant@part@draw[\elephant@eye] (-0.155, 1.7) circle[radius=0.05];
+ \elephant@part@draw[\elephant@eye] (0.155, 1.7) circle[radius=0.05];
+ %
+ \fi% back
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifelephant@back
+ \draw[\elephant@body!30!white,line width=\scalingfactor*0.6pt] (0, 0.5904) .. controls (-0.1619, 0.4147) and (0.203, 0.4157) .. (0.2422, 0.2712);
+ \elephant@part@draw[\elephant@body!30!white] (0.2008, 0.1949) .. controls (0.2452, 0.2121) and (0.2799, 0.242) .. (0.2691, 0.2755) .. controls (0.2611, 0.3005) and (0.2127, 0.3115) .. (0.1927, 0.2945) .. controls (0.1674, 0.2729) and (0.2082, 0.2383) .. (0.2008, 0.1949) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname elephanthookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.86, 0.0) rectangle (0.86, 2.17);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifelephant@threeD
- \def\elephant@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifelephant@contour
- \def\elephant@part@draw[##1]{\draw[##1,\elephant@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\elephant@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0.925)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Elephant]{Johannes, the elephant}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname elephanthookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\elephant@part@draw[\elephant@body] (0.47,0.86) ellipse[x radius=0.35, y radius=0.25, rotate=-50];
-\elephant@part@draw[\elephant@body] (-0.47,0.86) ellipse[x radius=0.35, y radius=0.25, rotate=50];
+%\emph{The namesake of Johannes loves elephants}
%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifelephant@back
- \elephant@part@draw[\elephant@body] (0.425, 0.3) circle[radius=0.28];
- \elephant@part@draw[\elephant@body] (-0.425, 0.3) circle[radius=0.28];
- \elephant@part@draw[\elephant@body] (0.57,0.74) circle [radius=0.20];
- \elephant@part@draw[\elephant@body] (-0.57,0.74) circle [radius=0.20];
-\fi
+%\subsection{Package name}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\elephant@part@draw[\elephant@body] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
-\unless\ifelephant@back
- \elephant@part@draw[\elephant@body!30!white] (0,0.7) ellipse[x radius=0.35, y radius=0.4];
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-elephants}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname elephanthookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%\subsection{Basic Usage}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifelephant@back
- \elephant@part@draw[\elephant@body] (0.425, 0.3) circle[radius=0.28];
- \elephant@part@draw[\elephant@body] (-0.425, 0.3) circle[radius=0.28];
- \elephant@part@draw[\elephant@body!30!white] (0.425, 0.3) circle[radius=0.17];
- \elephant@part@draw[\elephant@body!30!white] (-0.425, 0.3) circle[radius=0.17];
- \elephant@part@draw[\elephant@body] (0.57,0.75) circle [radius=0.20];
- \elephant@part@draw[\elephant@body!30!white] (0.57,0.74) circle [radius=0.12];
- \elephant@part@draw[\elephant@body] (-0.57,0.74) circle [radius=0.20];
- \elephant@part@draw[\elephant@body!30!white] (-0.57,0.74) circle [radius=0.12];
-\fi
+%\begin{tcblisting}{}
+%\elephant
+%\end{tcblisting}
%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\elephant@part@draw[\elephant@body] (0.5, 1.7) ellipse [x radius=0.35,y radius=0.45];
-\elephant@part@draw[\elephant@body] (-0.5, 1.7) ellipse [x radius=0.35,y radius=0.45];
-\unless\ifelephant@back
- \elephant@part@draw[\elephant@body!30!white] (0.5, 1.7) ellipse [x radius=0.25,y radius=0.35];
- \elephant@part@draw[\elephant@body!30!white] (-0.5, 1.7) ellipse [x radius=0.25,y radius=0.35];
-\fi
+%\subsection{Options}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\elephant@part@draw[\elephant@body] (0, 1.55) circle[radius=0.5];
+%The basic elephant can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\elephant[body=blue]
+%\end{tcblisting}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifelephant@back
+%In addition to the colour of the body, the colour of the eyes can be adjusted:
+%\begin{tcblisting}{}
+%\elephant[eye=red]
+%\end{tcblisting}
%
-% Trunk% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifelephant@threeD
- \elephant@part@draw[\elephant@body,draw=\elephant@body!70!black,line width=\scalingfactor*0.6pt] (0.1428, 1.4375) .. controls (0.1607, 1.0411) and (0.3327, 1.1276) .. (0.6705, 1.355) -- (0.72, 1.22) .. controls (0.3327, 0.9) and (-0.1607, 0.8) .. (-0.1428, 1.4375) arc [start angle=160, end angle=20, radius=0.155] -- cycle;
- \fill[\elephant@body!40!black] (0.7, 1.29) circle [radius=0.08];
-\else
- \elephant@part@draw[\elephant@body,draw=\elephant@body!70!black,line width=\scalingfactor*0.6pt] (0.1428, 1.4375) .. controls (0.1607, 1.0411) and (0.3327, 1.1276) .. (0.6705, 1.355) -- (0.72, 1.22) .. controls (0.3327, 0.9) and (-0.1607, 0.8) .. (-0.1428, 1.4375);
- \elephant@part@draw[\elephant@body!70!black] (0.7, 1.29) circle [radius=0.08];
-\fi
+%To view the elephant from behind:
+%\begin{tcblisting}{}
+%\elephant[back]
+%\end{tcblisting}
%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\elephant@part@draw[\elephant@eye] (-0.155, 1.7) circle[radius=0.05];
-\elephant@part@draw[\elephant@eye] (0.155, 1.7) circle[radius=0.05];
+%The key \lstinline|3D| will make the elephant 3-dimensional:
+%\begin{tcblisting}{}
+%\elephant[3D]
+%\end{tcblisting}
%
-\fi
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifelephant@back
- \draw[\elephant@body!30!white,line width=\scalingfactor*0.6pt] (0, 0.5904) .. controls (-0.1619, 0.4147) and (0.203, 0.4157) .. (0.2422, 0.2712);
- \elephant@part@draw[\elephant@body!30!white] (0.2008, 0.1949) .. controls (0.2452, 0.2121) and (0.2799, 0.242) .. (0.2691, 0.2755) .. controls (0.2611, 0.3005) and (0.2127, 0.3115) .. (0.1927, 0.2945) .. controls (0.1674, 0.2729) and (0.2082, 0.2383) .. (0.2008, 0.1949) -- cycle;
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname elephanthookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\elephant[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty b/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
index ec3735b920..eaeeb97c33 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/hippo.tex
+ % !TeX root = ./examples/hippo.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-hippos}[2021/04/16 version v0.6 Drawing hippos in TikZ]
+\ProvidesPackage{tikzlings-hippos}[2021/08/06 version v0.8 Drawing hippos in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -53,6 +53,8 @@
pupil = black,
toes/.code = \def\hippo@toes{#1},
toes = \hippo@body!55!white,
+ mouth/.code = \def\hippo@mouth{#1},
+ mouth = \hippo@body!70!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -61,139 +63,198 @@
3D/.code = \hippo@threeDtrue,
back/.code = \hippo@backtrue,
contour/.code = \hippo@contourtrue
- \def\hippo@contour{#1},
+ \def\hippo@contour{#1}
+ \def\hippo@mouth{#1},
contour/.default = black,
outline/.forward to = /hippo/contour,
}
\def\hippo@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.625,0.1) rectangle (0.625, 2.17);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifhippo@threeD
+ \def\hippo@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifhippo@contour
+ \def\hippo@part@draw[##1]{\draw[##1,\hippo@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\hippo@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname hippohookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \hippo@part@draw[\hippo@body] (0.23,2.03) ellipse[x radius=0.09, y radius=0.13, rotate=-30];
+ \hippo@part@draw[\hippo@body] (-0.23,2.03) ellipse[x radius=0.09, y radius=0.13, rotate=30];
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifhippo@back
+ \begin{scope}
+ \clip (-0.5,0.4) rectangle (0.5,0.13);
+ \hippo@part@draw[\hippo@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
+ \hippo@part@draw[\hippo@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
+ \end{scope}
+ \fi% back
+ %
+ % Nose if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifhippo@back
+ \hippo@part@draw[\hippo@body!80!white] (0, 1.55) ellipse[x radius=0.42, y radius=0.2];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \hippo@part@draw[\hippo@body!55!white] ( 0.6, 0.8 ) .. controls ( 0.6 , 0.4) and ( 0.35, 0.19) .. ( 0.0, 0.19) .. controls (-0.35, 0.19) and (-0.6 , 0.4) .. (-0.6, 0.8 ) .. controls (-0.6 , 1.3) and (-0.35, 1.65) .. ( 0.0, 1.65) .. controls ( 0.35, 1.65) and ( 0.6 , 1.3) .. ( 0.6, 0.8) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname hippohookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifhippo@back
+ \hippo@part@draw[\hippo@body] (0.35,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=90];
+ \hippo@part@draw[\hippo@body] (-0.35,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=-90];
+ \fi% back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \hippo@part@draw[\hippo@body!55!white] (0, 1.76) circle[radius=0.36];
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifhippo@back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifhippo@contour
+ \hippo@part@draw[\hippo@eye] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+ \hippo@part@draw[\hippo@eye] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+ \hippo@part@draw[\hippo@pupil] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+ \hippo@part@draw[\hippo@pupil] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+ \else% contour
+ \fill[\hippo@eye] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+ \fill[\hippo@eye] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+ \fill[\hippo@pupil] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+ \fill[\hippo@pupil] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+ \fi% contour
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \hippo@part@draw[\hippo@body!80!white] (0, 1.55) ellipse[x radius=0.42, y radius=0.2];
+ \hippo@part@draw[\hippo@body!70!black] (-0.07, 1.63) circle[radius=0.035];
+ \hippo@part@draw[\hippo@body!70!black] (0.07, 1.63) circle[radius=0.035];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifhippo@threeD
+ \draw[black,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
+ \else% 3D
+ \draw[\hippo@mouth,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2];
+ \fi% 3D
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \begin{scope}
+ \clip (-0.5,0.4) rectangle (0.5,0.13);
+ \hippo@part@draw[\hippo@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
+ \hippo@part@draw[\hippo@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
+ \hippo@part@draw[\hippo@toes] (0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
+ \hippo@part@draw[\hippo@toes] (0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
+ \hippo@part@draw[\hippo@toes] (0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
+ \hippo@part@draw[\hippo@toes] (-0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
+ \hippo@part@draw[\hippo@toes] (-0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
+ \hippo@part@draw[\hippo@toes] (-0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
+ \end{scope}
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname hippohookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.625,0.1) rectangle (0.625, 2.17);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifhippo@threeD
- \def\hippo@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifhippo@contour
- \def\hippo@part@draw[##1]{\draw[##1,\hippo@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\hippo@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Hippo]{Sieglinde, the hippo}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname hippohookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hippo@part@draw[\hippo@body] (0.23,2.03) ellipse[x radius=0.09, y radius=0.13, rotate=-30];
-\hippo@part@draw[\hippo@body] (-0.23,2.03) ellipse[x radius=0.09, y radius=0.13, rotate=30];
+%\emph{For the winner of the 2019 Groundhog Challenge}
%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifhippo@back
- \begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \hippo@part@draw[\hippo@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \hippo@part@draw[\hippo@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \end{scope}
-\fi
+%\subsection{Package name}
%
-% Nose if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifhippo@back
- \hippo@part@draw[\hippo@body!80!white] (0, 1.55) ellipse[x radius=0.42, y radius=0.2];
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-hippos}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hippo@part@draw[\hippo@body!55!white] ( 0.6, 0.8 ) .. controls ( 0.6 , 0.4) and ( 0.35, 0.19) .. ( 0.0, 0.19) .. controls (-0.35, 0.19) and (-0.6 , 0.4) .. (-0.6, 0.8 ) .. controls (-0.6 , 1.3) and (-0.35, 1.65) .. ( 0.0, 1.65) .. controls ( 0.35, 1.65) and ( 0.6 , 1.3) .. ( 0.6, 0.8) -- cycle;
+%\subsection{Basic Usage}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname hippohookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifhippo@back
- \hippo@part@draw[\hippo@body] (0.35,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=90];
- \hippo@part@draw[\hippo@body] (-0.35,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=-90];
-\fi
+%\begin{tcblisting}{}
+%\hippo
+%\end{tcblisting}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hippo@part@draw[\hippo@body!55!white] (0, 1.76) circle[radius=0.36];
+%\subsection{Options}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifhippo@back
+%The basic hippo can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\hippo[body=blue]
+%\end{tcblisting}
%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifhippo@contour
- \hippo@part@draw[\hippo@eye] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
- \hippo@part@draw[\hippo@eye] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
- \hippo@part@draw[\hippo@pupil] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
- \hippo@part@draw[\hippo@pupil] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
-\else
- \fill[\hippo@eye] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
- \fill[\hippo@eye] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
- \fill[\hippo@pupil] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
- \fill[\hippo@pupil] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
-\fi
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\hippo[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\hippo[pupil=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\hippo[mouth=red]
+%\end{tcblisting}
%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hippo@part@draw[\hippo@body!80!white] (0, 1.55) ellipse[x radius=0.42, y radius=0.2];
-\hippo@part@draw[\hippo@body!70!black] (-0.07, 1.63) circle[radius=0.035];
-\hippo@part@draw[\hippo@body!70!black] (0.07, 1.63) circle[radius=0.035];
+%The hippo can also do its nails:
+%\begin{tcblisting}{}
+%\hippo[toes=red]
+%\end{tcblisting}
%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifhippo@threeD
- \draw[black,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
-\else
- \ifhippo@contour
- \draw[\hippo@contour,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2];
- \else
- \draw[\hippo@body!70!black,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2];
- \fi
-\fi
+%To view the hippo from behind:
+%\begin{tcblisting}{}
+%\hippo[back]
+%\end{tcblisting}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \hippo@part@draw[\hippo@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \hippo@part@draw[\hippo@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \hippo@part@draw[\hippo@toes] (0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (-0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (-0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (-0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
-\end{scope}
+%The key \lstinline|3D| will make the hippo 3-dimensional:
+%\begin{tcblisting}{}
+%\hippo[3D]
+%\end{tcblisting}
%
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname hippohookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\hippo[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty b/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
index 873a910b8e..43281e9d2d 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/koala.tex
+ % !TeX root = ./examples/koala.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-koalas}[2021/04/16 version v0.6 Drawing koalas in TikZ]
+\ProvidesPackage{tikzlings-koalas}[2021/08/06 version v0.8 Drawing koalas in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -56,158 +56,216 @@
body = gray!75!white,
eye/.code = \def\koala@eye{#1},
eye = black,
+ mouth/.code = \def\koala@mouth{#1},
+ mouth = \koala@body!40!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- blush/.code = \koala@blushtrue,
+ blush/.code = \koala@blushtrue
+ \def\koala@blushcolor{#1},
+ blush/.default = red,
sleeping/.code = \koala@sleepingtrue,
- 3D/.code = \koala@threeDtrue,
+ 3D/.code = \koala@threeDtrue
+ \def\koala@mouth{black},
back/.code = \koala@backtrue,
contour/.code = \koala@contourtrue
- \def\koala@contour{#1},
+ \def\koala@contour{#1}
+ \def\koala@blushcolor{#1}
+ \def\koala@mouth{#1},
contour/.default = black,
outline/.forward to = /koala/contour,
}
\def\koala@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.88,0.1) rectangle (0.88, 2.35);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifkoala@threeD
+ \def\koala@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifkoala@contour
+ \def\koala@part@draw[##1]{\draw[##1,\koala@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\koala@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname koalahookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \koala@part@draw[\koala@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body] (0.405, 2.1) ellipse[x radius=0.3, y radius=0.23];
+ \koala@part@draw[\koala@body] (-0.405, 2.1) ellipse[x radius=0.3, y radius=0.23];
+ \unless\ifkoala@back
+ \koala@part@draw[\koala@body!40!white] (-0.405, 2.1) ellipse[x radius=0.15, y radius=0.12];
+ \koala@part@draw[\koala@body!40!white] (0.405, 2.1) ellipse[x radius=0.15, y radius=0.12];
+ \fi% back
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70];
+ \koala@part@draw[\koala@body!50!black] (-0.745,0.65) ellipse[x radius=0.12, y radius=0.08, rotate=-20];
+ \koala@part@draw[\koala@body] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
+ \koala@part@draw[\koala@body!50!black] (0.745,0.65) ellipse[x radius=0.12, y radius=0.08, rotate=20];
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifkoala@back
+ \koala@part@draw[\koala@body!40!white] ( 0.425, 0.71) .. controls ( 0.425, 0.41) and ( 0.255, 0.27) .. ( 0 , 0.27) .. controls (-0.255, 0.27) and (-0.425, 0.41) .. (-0.425, 0.71) .. controls (-0.425, 1.01) and (-0.255, 1.20) .. ( 0 , 1.20) .. controls ( 0.225, 1.20) and ( 0.425, 1.01) .. ( 0.425, 0.71) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname koalahookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body] (0,1.67) ellipse[x radius=0.55, y radius=0.45];
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifkoala@back
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body!40!black] (-0.1501, 1.5609) .. controls (-0.1784, 1.4833) and (-0.0827, 1.4108) .. ( 0.0000, 1.4108) .. controls ( 0.0827, 1.4108) and ( 0.1784, 1.4833) .. ( 0.1501, 1.5609) .. controls ( 0.1290, 1.6191) and ( 0.1187, 1.6573) .. ( 0.0750, 1.7010) .. controls ( 0.0336, 1.7424) and (-0.0336, 1.7424) .. (-0.0750, 1.7010) .. controls (-0.1187, 1.6573) and (-0.1290, 1.6191) .. (-0.1501, 1.5609) -- cycle;
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifkoala@sleeping
+ \fill[\koala@body!50!black] (0.2534, 1.675) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={20:(0.2925, 1.6925)}] (0.29, 1.68) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={-20:(0.2143, 1.6925)}] (0.2168, 1.68) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={40:(0.3255, 1.7025)}] (0.323, 1.69) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={-40:(0.1813, 1.7025)}] (0.1838, 1.69) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black] (-0.2534, 1.675) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={-20:(-0.2925, 1.6925)}] (-0.29, 1.68) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={20:(-0.2143, 1.6925)}] (-0.2168, 1.68) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={-40:(-0.3255, 1.7025)}] (-0.323, 1.69) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={40:(-0.1813, 1.7025)}] (-0.1838, 1.69) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black, even odd rule] (0.3331, 1.741) .. controls (0.3331, 1.685) and (0.1737, 1.685) .. (0.1737, 1.741) .. controls (0.1737, 1.848) and (0.3331, 1.848) .. (0.3331, 1.741) -- cycle (0.328, 1.741) .. controls (0.323, 1.705) and (0.184, 1.705) .. (0.179, 1.741) .. controls (0.184, 1.843) and (0.323, 1.843) .. (0.328, 1.741) -- cycle;
+ \fill[\koala@body!50!black, even odd rule] (-0.3331, 1.741) .. controls (-0.3331, 1.685) and (-0.1737, 1.685) .. (-0.1737, 1.741) .. controls (-0.1737, 1.848) and (-0.3331, 1.848) .. (-0.3331, 1.741) -- cycle (-0.328, 1.741) .. controls (-0.323, 1.705) and (-0.184, 1.705) .. (-0.179, 1.741) .. controls (-0.184, 1.843) and (-0.323, 1.843) .. (-0.328, 1.741) -- cycle;
+ \else% sleeping
+ \koala@part@draw[\koala@eye] (-0.255, 1.74) circle[radius=0.08];
+ \koala@part@draw[\koala@eye] (0.255, 1.74) circle[radius=0.08];
+ \fill[white] (-0.27, 1.76) circle[radius=0.015];
+ \fill[white] (0.24, 1.76) circle[radius=0.015];
+ \fi% sleeping
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\koala@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % optional
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifkoala@blush
+ \fill[\koala@blushcolor,path fading=koala@blush] (-0.3, 1.52) circle[radius=0.1];
+ \fill[\koala@blushcolor,path fading=koala@blush] (0.3, 1.52) circle[radius=0.1];
+ \fi% blush
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname koalahookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.88,0.1) rectangle (0.88, 2.35);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifkoala@threeD
- \def\koala@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifkoala@contour
- \def\koala@part@draw[##1]{\draw[##1,\koala@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\koala@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Koala]{Will, the koala}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname koalahookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
+%\emph{The koala was generously contributed by @marmot and is named in honour of a \LaTeX{} developer from Down Under}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\koala@part@draw[\koala@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+%\subsection{Package name}
%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (0.405, 2.1) ellipse[x radius=0.3, y radius=0.23];
-\koala@part@draw[\koala@body] (-0.405, 2.1) ellipse[x radius=0.3, y radius=0.23];
-\unless\ifkoala@back
- \koala@part@draw[\koala@body!40!white] (-0.405, 2.1) ellipse[x radius=0.15, y radius=0.12];
- \koala@part@draw[\koala@body!40!white] (0.405, 2.1) ellipse[x radius=0.15, y radius=0.12];
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-koalas}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70];
-\koala@part@draw[\koala@body!50!black] (-0.745,0.65) ellipse[x radius=0.12, y radius=0.08, rotate=-20];
-\koala@part@draw[\koala@body] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
-\koala@part@draw[\koala@body!50!black] (0.745,0.65) ellipse[x radius=0.12, y radius=0.08, rotate=20];
+%\subsection{Basic Usage}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+%\begin{tcblisting}{}
+%\koala
+%\end{tcblisting}
%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifkoala@back
- \koala@part@draw[\koala@body!40!white] ( 0.425, 0.71) .. controls ( 0.425, 0.41) and ( 0.255, 0.27) .. ( 0 , 0.27) .. controls (-0.255, 0.27) and (-0.425, 0.41) .. (-0.425, 0.71) .. controls (-0.425, 1.01) and (-0.255, 1.20) .. ( 0 , 1.20) .. controls ( 0.225, 1.20) and ( 0.425, 1.01) .. ( 0.425, 0.71) -- cycle;
-\fi
+%\subsection{Options}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname koalahookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%The basic koala can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\koala[body=blue]
+%\end{tcblisting}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (0,1.67) ellipse[x radius=0.55, y radius=0.45];
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\koala[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\koala[mouth=red]
+%\end{tcblisting}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifkoala@back
+%It can also blush
+%\begin{tcblisting}{}
+%\koala[blush=red]
+%\end{tcblisting}
%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body!40!black] (-0.1501, 1.5609) .. controls (-0.1784, 1.4833) and (-0.0827, 1.4108) .. ( 0.0000, 1.4108) .. controls ( 0.0827, 1.4108) and ( 0.1784, 1.4833) .. ( 0.1501, 1.5609) .. controls ( 0.1290, 1.6191) and ( 0.1187, 1.6573) .. ( 0.0750, 1.7010) .. controls ( 0.0336, 1.7424) and (-0.0336, 1.7424) .. (-0.0750, 1.7010) .. controls (-0.1187, 1.6573) and (-0.1290, 1.6191) .. (-0.1501, 1.5609) -- cycle;
+%and if tired, it is going to take a nap:
+%\begin{tcblisting}{}
+%\koala[sleeping]
+%\end{tcblisting}
%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifkoala@sleeping
- \fill[\koala@body!50!black] (0.2534, 1.675) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={20:(0.2925, 1.6925)}] (0.29, 1.68) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={-20:(0.2143, 1.6925)}] (0.2168, 1.68) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={40:(0.3255, 1.7025)}] (0.323, 1.69) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={-40:(0.1813, 1.7025)}] (0.1838, 1.69) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black] (-0.2534, 1.675) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={-20:(-0.2925, 1.6925)}] (-0.29, 1.68) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={20:(-0.2143, 1.6925)}] (-0.2168, 1.68) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={-40:(-0.3255, 1.7025)}] (-0.323, 1.69) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={40:(-0.1813, 1.7025)}] (-0.1838, 1.69) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black, even odd rule] (0.3331, 1.741) .. controls (0.3331, 1.685) and (0.1737, 1.685) .. (0.1737, 1.741) .. controls (0.1737, 1.848) and (0.3331, 1.848) .. (0.3331, 1.741) -- cycle (0.328, 1.741) .. controls (0.323, 1.705) and (0.184, 1.705) .. (0.179, 1.741) .. controls (0.184, 1.843) and (0.323, 1.843) .. (0.328, 1.741) -- cycle;
- \fill[\koala@body!50!black, even odd rule] (-0.3331, 1.741) .. controls (-0.3331, 1.685) and (-0.1737, 1.685) .. (-0.1737, 1.741) .. controls (-0.1737, 1.848) and (-0.3331, 1.848) .. (-0.3331, 1.741) -- cycle (-0.328, 1.741) .. controls (-0.323, 1.705) and (-0.184, 1.705) .. (-0.179, 1.741) .. controls (-0.184, 1.843) and (-0.323, 1.843) .. (-0.328, 1.741) -- cycle;
-\else
- \koala@part@draw[\koala@eye] (-0.255, 1.74) circle[radius=0.08];
- \koala@part@draw[\koala@eye] (0.255, 1.74) circle[radius=0.08];
- \fill[white] (-0.27, 1.76) circle[radius=0.015];
- \fill[white] (0.24, 1.76) circle[radius=0.015];
-\fi
+%To view the koala from behind:
+%\begin{tcblisting}{}
+%\koala[back]
+%\end{tcblisting}
%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifkoala@threeD
- \draw[black,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
-\else
- \ifkoala@contour
- \draw[\koala@contour,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
- \else
- \draw[\koala@body!40!black,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%The key \lstinline|3D| will make the koala 3-dimensional:
+%\begin{tcblisting}{}
+%\koala[3D]
+%\end{tcblisting}
%
-% optional
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifkoala@blush
- \ifkoala@contour
- \fill[\koala@contour,path fading=koala@blush] (-0.3, 1.52) circle[radius=0.1];
- \fill[\koala@contour,path fading=koala@blush] (0.3, 1.52) circle[radius=0.1];
- \else
- \fill[red,path fading=koala@blush] (-0.3, 1.52) circle[radius=0.1];
- \fill[red,path fading=koala@blush] (0.3, 1.52) circle[radius=0.1];
- \fi
-\fi
-%
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname koalahookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
-
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\koala[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-list.sty b/graphics/pgf/contrib/tikzlings/tikzlings-list.sty
index c2b02ebc29..6a9acbb57d 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-list.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-list.sty
@@ -1,4 +1,4 @@
-\ProvidesPackage{tikzlings-list}[2021/04/16 version v0.6 Helper package for the tikzlings]
+\ProvidesPackage{tikzlings-list}[2021/08/06 version v0.8 Helper package for the tikzlings]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -7,8 +7,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\tikzling@list{
anteater/anteaters,
+ bat/bats,
bear/bears,
bee/bees,
+ bug/bugs,
cat/cats,
chicken/chickens,
coati/coatis,
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty b/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
index 44d0dd0987..7e1968e22e 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/marmot.tex
+ % !TeX root = ./examples/marmot.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-marmots}[2021/04/16 version v0.6 Drawing marmots in TikZ]
+\ProvidesPackage{tikzlings-marmots}[2021/08/06 version v0.8 Drawing marmots in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -78,12 +78,16 @@
body = brown,
eye/.code = \def\marmot@eye{#1},
eye = \marmot@body!50!black,
+ mouth/.code = \def\marmot@mouth{#1},
+ mouth = \marmot@body!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- blush/.code = \marmot@blushtrue,
+ blush/.code = \marmot@blushtrue
+ \def\marmot@blushcolor{#1},
+ blush/.default = red,
whiskers/.code = \marmot@whiskerstrue
\def\marmot@whiskers{#1},
whiskers/.default = gray,
@@ -100,175 +104,253 @@
right step/.forward to = /marmot/rightstep,
back/.code = \marmot@backtrue,
contour/.code = \marmot@contourtrue
- \def\marmot@contour{#1},
+ \def\marmot@contour{#1}
+ \def\marmot@blushcolor{#1}
+ \def\marmot@mouth{#1},
contour/.default = black,
outline/.forward to = /marmot/contour,
}
\def\marmot@draw{%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.625,0.1) rectangle (0.905, 2.17);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmarmot@threeD
- \def\marmot@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifmarmot@contour
- \def\marmot@part@draw[##1]{\draw[##1,\marmot@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\marmot@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% shadow
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname marmothookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-\ifmarmot@askphil
- \pgfmathparse{int(random(1,120))}
- \let\marmot@random=\pgfmathresult
- \ifnum\marmot@random>17
- \marmot@shadowtrue
- \fi
-\fi
-%
-\ifmarmot@shadow
- \fill[opacity=0,blur shadow,] (0.3,0.5) ellipse[x radius=0.28, y radius=0.8, rotate=-80];
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmarmot@leftstep
- \marmot@part@draw[\marmot@body!50!black] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
-\else
- \marmot@part@draw[\marmot@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\fi
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.625,0.1) rectangle (0.905, 2.17);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmarmot@threeD
+ \def\marmot@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifmarmot@contour
+ \def\marmot@part@draw[##1]{\draw[##1,\marmot@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\marmot@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % shadow
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname marmothookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ \ifmarmot@askphil
+ \pgfmathparse{int(random(1,120))}
+ \let\marmot@random=\pgfmathresult
+ \ifnum\marmot@random>17
+ \marmot@shadowtrue
+ \fi
+ \fi% askphil
+ %
+ \ifmarmot@shadow
+ \fill[opacity=0,blur shadow,] (0.3,0.5) ellipse[x radius=0.28, y radius=0.8, rotate=-80];
+ \fi% shadow
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmarmot@leftstep
+ \marmot@part@draw[\marmot@body!50!black] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \marmot@part@draw[\marmot@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
+ %
+ \ifmarmot@rightstep
+ \marmot@part@draw[\marmot@body!50!black] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \marmot@part@draw[\marmot@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \marmot@part@draw[\marmot@body!50!black] (0.255,2.03) ellipse[x radius=0.09, y radius=0.13];
+ \marmot@part@draw[\marmot@body!50!black] (-0.255,2.03) ellipse[x radius=0.09, y radius=0.13];
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmarmot@back
+ \marmot@part@draw[\marmot@body!50!black] (0.8856, 0.6504) .. controls (0.8656, 0.3803) and (0.0267, 0.2202) .. (0.0167, 0.4203) .. controls (-0.0033, 0.5404) and (0.1104, 0.4397) .. (0.3951, 0.4803) .. controls (0.6557, 0.5175) and (0.8856, 0.7005) .. (0.8856, 0.6504);
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \marmot@part@draw[\marmot@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmarmot@back
+ \marmot@part@draw[\marmot@body!50!black] (0.8856, 0.6504) .. controls (0.8656, 0.3803) and (0.0267, 0.2202) .. (0.0167, 0.4203) .. controls (-0.0033, 0.5404) and (0.1104, 0.4397) .. (0.3951, 0.4803) .. controls (0.6557, 0.5175) and (0.8856, 0.7005) .. (0.8856, 0.6504);
+ \fi% back
+ %
+ % Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmarmot@back
+ \marmot@part@draw[\marmot@body!50!white] (0.425, 0.71) .. controls (0.425, 0.41) and (0.245, 0.37) .. (0, 0.37) .. controls (-0.245, 0.37) and (-0.425, 0.41) .. (-0.425, 0.71) .. controls (-0.425, 1.01) and (-0.225, 1.26) .. (0, 1.26) .. controls (0.225, 1.26) and (0.425, 1.01) .. (0.425, 0.71) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname marmothookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmarmot@back
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \marmot@part@draw[\marmot@body!50!black] (0.385,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=70];
+ \marmot@part@draw[\marmot@body!50!black] (-0.385,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=-70];
+ %
+ % Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \marmot@part@draw[\marmot@body!50!white] (0,1.47) ellipse[x radius=0.23, y radius=0.13];
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \marmot@part@draw[\marmot@body!50!black] (0,1.6) circle[radius=0.08];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \marmot@part@draw[\marmot@eye] (-0.155,1.77) circle[radius=0.05];
+ \marmot@part@draw[\marmot@eye] (0.155,1.77) circle[radius=0.05];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \fill[\marmot@mouth] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] -- (-0.14,1.51) -- (-0.14,1.51) arc [start angle=-160, end angle=-20, radius=0.144] -- cycle ;
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % optional
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmarmot@blush
+ \fill[\marmot@blushcolor,path fading=marmot@blush] (-0.295,1.6) circle[radius=0.1];
+ \fill[\marmot@blushcolor,path fading=marmot@blush] (0.295,1.6) circle[radius=0.1];
+ \fi% blush
+ %
+ % Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmarmot@whiskers
+ \fill[\marmot@whiskers] (0.0788, 1.6146) .. controls (0.1658, 1.6299) and (0.2086, 1.5639) .. (0.2956, 1.5486) -- (0.2956, 1.5586) .. controls (0.2097, 1.5737) and (0.1648, 1.6297) .. (0.0788, 1.6146) -- cycle;
+ \fill[\marmot@whiskers] (-0.0788, 1.6146) .. controls (-0.1658, 1.6299) and (-0.2087, 1.5639) .. (-0.2956, 1.5486) -- (-0.2956, 1.5586) .. controls (-0.2097, 1.5737) and (-0.1648, 1.6297) .. (-0.0788, 1.6146) -- cycle;
+ \fill[\marmot@whiskers] (0.0752, 1.6281) .. controls (0.1583, 1.6583) and (0.2171, 1.6309) .. (0.3002, 1.6007) -- (0.3002, 1.6107) .. controls (0.2174, 1.6408) and (0.158, 1.6582) .. (0.0752, 1.6281) -- cycle;
+ \fill[\marmot@whiskers] (-0.0752, 1.6281) .. controls (-0.1583, 1.6583) and (-0.2171, 1.6309) .. (-0.3002, 1.6007) -- (-0.3002, 1.6107) .. controls (-0.2174, 1.6408) and (-0.158, 1.6582) .. (-0.0752, 1.6281) -- cycle;
+ \fill[\marmot@whiskers] (0.0671, 1.6443) .. controls (0.1414, 1.6925) and (0.2182, 1.7164) .. (0.2925, 1.6682) -- (0.2925, 1.6782) .. controls (0.2179, 1.7266) and (0.1417, 1.6927) .. (0.0671, 1.6443) -- cycle;
+ \fill[\marmot@whiskers] (-0.0671, 1.6443) .. controls (-0.1414, 1.6925) and (-0.2182, 1.7164) .. (-0.2925, 1.6682) -- (-0.2925, 1.6782) .. controls (-0.2179, 1.7266) and (-0.1417, 1.6927) .. (-0.0671, 1.6443) -- cycle;
+ \fi% whiskers
+ %
+ % Teeth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmarmot@teeth
+ \fill[\marmot@body!50!black] (0.048,1.413) rectangle (-0.048,1.373);
+ \fill[\marmot@teeth] (-0.045,1.407) rectangle (-0.004,1.376);
+ \fill[\marmot@teeth] (0.045,1.407) rectangle (0.004,1.376);
+ \fi% teeth
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname marmothookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
-\ifmarmot@rightstep
- \marmot@part@draw[\marmot@body!50!black] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
-\else
- \marmot@part@draw[\marmot@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\fi
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body!50!black] (0.255,2.03) ellipse[x radius=0.09, y radius=0.13];
-\marmot@part@draw[\marmot@body!50!black] (-0.255,2.03) ellipse[x radius=0.09, y radius=0.13];
-%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifmarmot@back
- \marmot@part@draw[\marmot@body!50!black] (0.8856, 0.6504) .. controls (0.8656, 0.3803) and (0.0267, 0.2202) .. (0.0167, 0.4203) .. controls (-0.0033, 0.5404) and (0.1104, 0.4397) .. (0.3951, 0.4803) .. controls (0.6557, 0.5175) and (0.8856, 0.7005) .. (0.8856, 0.6504);
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
-%
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmarmot@back
- \marmot@part@draw[\marmot@body!50!black] (0.8856, 0.6504) .. controls (0.8656, 0.3803) and (0.0267, 0.2202) .. (0.0167, 0.4203) .. controls (-0.0033, 0.5404) and (0.1104, 0.4397) .. (0.3951, 0.4803) .. controls (0.6557, 0.5175) and (0.8856, 0.7005) .. (0.8856, 0.6504);
-\fi
-%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifmarmot@back
- \marmot@part@draw[\marmot@body!50!white] (0.425, 0.71) .. controls (0.425, 0.41) and (0.245, 0.37) .. (0, 0.37) .. controls (-0.245, 0.37) and (-0.425, 0.41) .. (-0.425, 0.71) .. controls (-0.425, 1.01) and (-0.225, 1.26) .. (0, 1.26) .. controls (0.225, 1.26) and (0.425, 1.01) .. (0.425, 0.71) -- cycle;
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname marmothookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifmarmot@back
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body!50!black] (0.385,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=70];
-\marmot@part@draw[\marmot@body!50!black] (-0.385,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=-70];
-%
-% Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body!50!white] (0,1.47) ellipse[x radius=0.23, y radius=0.13];
-%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body!50!black] (0,1.6) circle[radius=0.08];
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@eye] (-0.155,1.77) circle[radius=0.05];
-\marmot@part@draw[\marmot@eye] (0.155,1.77) circle[radius=0.05];
-%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmarmot@contour
- \fill[\marmot@contour] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] -- (-0.14,1.51) -- (-0.14,1.51) arc [start angle=-160, end angle=-20, radius=0.144] -- cycle ;
-\else
- \fill[\marmot@body!50!black] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] -- (-0.14,1.51) -- (-0.14,1.51) arc [start angle=-160, end angle=-20, radius=0.144] -- cycle ;
-\fi
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% optional
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmarmot@blush
- \ifmarmot@contour
- \fill[\marmot@contour,path fading=marmot@blush] (-0.295,1.6) circle[radius=0.1];
- \fill[\marmot@contour,path fading=marmot@blush] (0.295,1.6) circle[radius=0.1];
- \else
- \fill[red,path fading=marmot@blush] (-0.295,1.6) circle[radius=0.1];
- \fill[red,path fading=marmot@blush] (0.295,1.6) circle[radius=0.1];
- \fi
-\fi
-%
-% Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmarmot@whiskers
- \fill[\marmot@whiskers] (0.0788, 1.6146) .. controls (0.1658, 1.6299) and (0.2086, 1.5639) .. (0.2956, 1.5486) -- (0.2956, 1.5586) .. controls (0.2097, 1.5737) and (0.1648, 1.6297) .. (0.0788, 1.6146) -- cycle;
- \fill[\marmot@whiskers] (-0.0788, 1.6146) .. controls (-0.1658, 1.6299) and (-0.2087, 1.5639) .. (-0.2956, 1.5486) -- (-0.2956, 1.5586) .. controls (-0.2097, 1.5737) and (-0.1648, 1.6297) .. (-0.0788, 1.6146) -- cycle;
- \fill[\marmot@whiskers] (0.0752, 1.6281) .. controls (0.1583, 1.6583) and (0.2171, 1.6309) .. (0.3002, 1.6007) -- (0.3002, 1.6107) .. controls (0.2174, 1.6408) and (0.158, 1.6582) .. (0.0752, 1.6281) -- cycle;
- \fill[\marmot@whiskers] (-0.0752, 1.6281) .. controls (-0.1583, 1.6583) and (-0.2171, 1.6309) .. (-0.3002, 1.6007) -- (-0.3002, 1.6107) .. controls (-0.2174, 1.6408) and (-0.158, 1.6582) .. (-0.0752, 1.6281) -- cycle;
- \fill[\marmot@whiskers] (0.0671, 1.6443) .. controls (0.1414, 1.6925) and (0.2182, 1.7164) .. (0.2925, 1.6682) -- (0.2925, 1.6782) .. controls (0.2179, 1.7266) and (0.1417, 1.6927) .. (0.0671, 1.6443) -- cycle;
- \fill[\marmot@whiskers] (-0.0671, 1.6443) .. controls (-0.1414, 1.6925) and (-0.2182, 1.7164) .. (-0.2925, 1.6682) -- (-0.2925, 1.6782) .. controls (-0.2179, 1.7266) and (-0.1417, 1.6927) .. (-0.0671, 1.6443) -- cycle;
-\fi
-%
-% Teeth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmarmot@teeth
- \fill[\marmot@body!50!black] (0.048,1.413) rectangle (-0.048,1.373);
- \fill[\marmot@teeth] (-0.045,1.407) rectangle (-0.004,1.376);
- \fill[\marmot@teeth] (0.045,1.407) rectangle (0.004,1.376);
-\fi
-%
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname marmothookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
-
+%\clearpage
+%\section[Marmot]{Phil, the marmot}
+%
+%\emph{Phil got his name from Punxsutawney Phil, the famous weather forecasting groundhog}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-marmots}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\marmot
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic marmot can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\marmot[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\marmot[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\marmot[mouth=red]
+%\end{tcblisting}
+%
+%The marmot can also blush
+%\begin{tcblisting}{}
+%\marmot[blush=red]
+%\end{tcblisting}
+%
+%and whiskers can be added:
+%\begin{tcblisting}{}
+%\marmot[whiskers=gray]
+%\end{tcblisting}
+%
+%Some marmots even show their chisel teeth:
+%\begin{tcblisting}{}
+%\marmot[teeth=white]
+%\end{tcblisting}
+%
+%or can cast a shadow:
+%\begin{tcblisting}{}
+%\marmot[shadow]
+%\end{tcblisting}
+%
+%This ability is important if you want to ask Punxsutawney Phil\footnote{\url{https://en.wikipedia.org/wiki/Punxsutawney_Phil}} on Groundhog Day how the weather is going to be. With a probability derived from the statistics of 120 Groundhog Days\footnote{\hbadness=99999\url{https://www.livescience.com/32974-punxsutawney-phil-weather-prediction-accuracy.html}} the option \lstinline|askphil| might or might not result in a shadow.
+%\begin{tcblisting}{}
+%\marmot[askphil]
+%\end{tcblisting}
+%
+%If a good weather prognosis is derived, the happy marmot can dance by lifting up its left and right foot:
+%\begin{tcblisting}{}
+%\marmot[leftstep]
+%\marmot[rightstep,xshift=2cm]
+%\end{tcblisting}
+%
+%To view the marmot from behind:
+%\begin{tcblisting}{}
+%\marmot[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the marmot 3-dimensional:
+%\begin{tcblisting}{}
+%\marmot[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\marmot[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty b/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
index 0b36ea82e3..5b3be0abe1 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/mouse.tex
+ % !TeX root = ./examples/mouse.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-mice}[2021/04/16 version v0.6 Drawing mice in TikZ]
+\ProvidesPackage{tikzlings-mice}[2021/08/06 version v0.8 Drawing mice in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -53,6 +53,8 @@
body = gray!90!white,
eye/.code = \def\mouse@eye{#1},
eye = \mouse@body!50!black,
+ whiskers/.code = \def\mouse@whiskers{#1},
+ whiskers = \mouse@body!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -69,140 +71,197 @@
right step/.forward to = /mouse/rightstep,
back/.code = \mouse@backtrue,
contour/.code = \mouse@contourtrue
- \def\mouse@contour{#1},
+ \def\mouse@contour{#1}
+ \def\mouse@whiskers{#1},
contour/.default = black,
outline/.forward to = /mouse/contour,
}
\def\mouse@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.625,0.1) rectangle (0.905, 2.17);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmouse@threeD
+ \def\mouse@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifmouse@contour
+ \def\mouse@part@draw[##1]{\draw[##1,\mouse@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\mouse@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname mousehookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmouse@leftstep
+ \mouse@part@draw[\mouse@body!65!white] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \mouse@part@draw[\mouse@body!65!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
+ %
+ \ifmouse@rightstep
+ \mouse@part@draw[\mouse@body!65!white] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \mouse@part@draw[\mouse@body!65!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \mouse@part@draw[\mouse@body!65!white] (0.36, 2.17) circle[radius=0.28];
+ \mouse@part@draw[\mouse@body!65!white] (-0.36, 2.17) circle[radius=0.28];
+ \unless\ifmouse@back
+ \mouse@part@draw[\mouse@body] (0.36, 2.17) circle[radius=0.15];
+ \mouse@part@draw[\mouse@body] (-0.36, 2.17) circle[radius=0.15];
+ \fi% back
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmouse@back
+ \mouse@part@draw[\mouse@body!65!white] (1.0825, 1.6326) .. controls (1.3527, 1.7527) and (1.6609, 1.3164) .. (1.5928, 1.3124) .. controls (0.9164, 2.186) and (0.8338, 0.6325) .. (0.3708, 0.4451) .. controls (0.2529, 0.3974) and (-0.0064, 0.3874) .. (-0.0064, 0.3874) .. controls (-0.0776, 0.3765) and (-0.0862, 0.5026) .. (-0.0092, 0.5034) .. controls (-0.0092, 0.5034) and (0.0363, 0.4591) .. (0.3516, 0.54360) .. controls (0.6710, 0.6988) and (0.7613, 1.4825) .. (1.0825, 1.6326) -- cycle;
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \mouse@part@draw[\mouse@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname mousehookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmouse@back
+ \mouse@part@draw[\mouse@body!65!white] (1.0825, 1.6326) .. controls (1.3527, 1.7527) and (1.6609, 1.3164) .. (1.5928, 1.3124) .. controls (0.9164, 2.186) and (0.8338, 0.6325) .. (0.3708, 0.4451) .. controls (0.2529, 0.3974) and (-0.0064, 0.3874) .. (-0.0064, 0.3874) .. controls (-0.0776, 0.3765) and (-0.0862, 0.5026) .. (-0.0092, 0.5034) .. controls (-0.0092, 0.5034) and (0.0363, 0.4591) .. (0.3516, 0.54360) .. controls (0.6710, 0.6988) and (0.7613, 1.4825) .. (1.0825, 1.6326) -- cycle;
+ \fi% back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmouse@back
+ \mouse@part@draw[\mouse@body!65!white]
+ (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) ..
+ (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) ..
+ (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) ..
+ (0.5, 1.8) -- cycle;
+ \else% back
+ \mouse@part@draw[\mouse@body!65!white] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
+ \fi% back
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmouse@back
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \mouse@part@draw[\mouse@body!65!white,rotate around={-\mouse@rotatearms:(0.47,1.15)}] (0.47,0.93) ellipse[x radius=0.13, y radius=0.24];
+ \mouse@part@draw[\mouse@body!65!white,rotate around={\mouse@rotatearms:(-0.47,1.15)}] (-0.47,0.93) ellipse[x radius=0.13, y radius=0.24];
+ %
+ % Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \fill[\mouse@whiskers] (0.0788, 1.2046) .. controls (0.1658, 1.2199) and (0.2086, 1.1539) .. (0.2956, 1.1386) -- (0.2956, 1.1486) .. controls (0.2097, 1.1637) and (0.1648, 1.2197) .. (0.0788, 1.2046) -- cycle;
+ \fill[\mouse@whiskers] (-0.0788, 1.2046) .. controls (-0.1658, 1.2199) and (-0.2087, 1.1539) .. (-0.2956, 1.1386) -- (-0.2956, 1.1486) .. controls (-0.2097, 1.1637) and (-0.1648, 1.2197) .. (-0.0788, 1.2046) -- cycle;
+ \fill[\mouse@whiskers] (0.0752, 1.2181) .. controls (0.1583, 1.2483) and (0.2171, 1.2209) .. (0.3002, 1.1907) -- (0.3002, 1.2007) .. controls (0.2174, 1.2308) and (0.158, 1.2482) .. (0.0752, 1.2181) -- cycle;
+ \fill[\mouse@whiskers] (-0.0752, 1.2181) .. controls (-0.1583, 1.2483) and (-0.2171, 1.2209) .. (-0.3002, 1.1907) -- (-0.3002, 1.2007) .. controls (-0.2174, 1.2308) and (-0.158, 1.2482) .. (-0.0752, 1.2181) -- cycle;
+ \fill[\mouse@whiskers] (0.0671, 1.2343) .. controls (0.1414, 1.2825) and (0.2182, 1.3064) .. (0.2925, 1.2582) -- (0.2925, 1.2682) .. controls (0.2179, 1.3166) and (0.1417, 1.2827) .. (0.0671, 1.2343) -- cycle;
+ \fill[\mouse@whiskers] (-0.0671, 1.2343) .. controls (-0.1414, 1.2825) and (-0.2182, 1.3064) .. (-0.2925, 1.2582) -- (-0.2925, 1.2682) .. controls (-0.2179, 1.3166) and (-0.1417, 1.2827) .. (-0.0671, 1.2343) -- cycle;
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \mouse@part@draw[\mouse@body!50!black] (0, 1.248) circle[radius=0.09];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \mouse@part@draw[\mouse@eye] (0.23, 1.68) circle[radius=0.05];
+ \mouse@part@draw[\mouse@eye] (-0.23, 1.68) circle[radius=0.05];
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname mousehookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.625,0.1) rectangle (0.905, 2.17);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmouse@threeD
- \def\mouse@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifmouse@contour
- \def\mouse@part@draw[##1]{\draw[##1,\mouse@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\mouse@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Mouse]{Tokz, the mouse}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname mousehookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmouse@leftstep
- \mouse@part@draw[\mouse@body!65!white] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
-\else
- \mouse@part@draw[\mouse@body!65!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\fi
+%\emph{The idea for the mouse came from an Italian \LaTeX{} user -- Tokz is a combination of the Italian word for mouse and \TikZ}
%
-\ifmouse@rightstep
- \mouse@part@draw[\mouse@body!65!white] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
-\else
- \mouse@part@draw[\mouse@body!65!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\fi
+%\subsection{Package name}
%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!65!white] (0.36, 2.17) circle[radius=0.28];
-\mouse@part@draw[\mouse@body!65!white] (-0.36, 2.17) circle[radius=0.28];
-\unless\ifmouse@back
- \mouse@part@draw[\mouse@body] (0.36, 2.17) circle[radius=0.15];
- \mouse@part@draw[\mouse@body] (-0.36, 2.17) circle[radius=0.15];
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-mice}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifmouse@back
- \mouse@part@draw[\mouse@body!65!white] (1.0825, 1.6326) .. controls (1.3527, 1.7527) and (1.6609, 1.3164) .. (1.5928, 1.3124) .. controls (0.9164, 2.186) and (0.8338, 0.6325) .. (0.3708, 0.4451) .. controls (0.2529, 0.3974) and (-0.0064, 0.3874) .. (-0.0064, 0.3874) .. controls (-0.0776, 0.3765) and (-0.0862, 0.5026) .. (-0.0092, 0.5034) .. controls (-0.0092, 0.5034) and (0.0363, 0.4591) .. (0.3516, 0.54360) .. controls (0.6710, 0.6988) and (0.7613, 1.4825) .. (1.0825, 1.6326) -- cycle;
-\fi
+%\subsection{Basic Usage}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+%\begin{tcblisting}{}
+%\mouse
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname mousehookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmouse@back
- \mouse@part@draw[\mouse@body!65!white] (1.0825, 1.6326) .. controls (1.3527, 1.7527) and (1.6609, 1.3164) .. (1.5928, 1.3124) .. controls (0.9164, 2.186) and (0.8338, 0.6325) .. (0.3708, 0.4451) .. controls (0.2529, 0.3974) and (-0.0064, 0.3874) .. (-0.0064, 0.3874) .. controls (-0.0776, 0.3765) and (-0.0862, 0.5026) .. (-0.0092, 0.5034) .. controls (-0.0092, 0.5034) and (0.0363, 0.4591) .. (0.3516, 0.54360) .. controls (0.6710, 0.6988) and (0.7613, 1.4825) .. (1.0825, 1.6326) -- cycle;
-\fi
+%\subsection{Options}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmouse@back
- \mouse@part@draw[\mouse@body!65!white]
- (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) ..
- (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) ..
- (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) ..
- (0.5, 1.8) -- cycle;
-\else
- \mouse@part@draw[\mouse@body!65!white] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
-\fi
+%The basic mouse can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\mouse[body=blue]
+%\end{tcblisting}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifmouse@back
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\mouse[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\mouse[whiskers=red]
+%\end{tcblisting}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!65!white,rotate around={-\mouse@rotatearms:(0.47,1.15)}] (0.47,0.93) ellipse[x radius=0.13, y radius=0.24];
-\mouse@part@draw[\mouse@body!65!white,rotate around={\mouse@rotatearms:(-0.47,1.15)}] (-0.47,0.93) ellipse[x radius=0.13, y radius=0.24];
+%The rotation angle of its arms can be adjusted:
+%\begin{tcblisting}{}
+%\mouse[rotatearms=40]
+%\end{tcblisting}
%
-% Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmouse@contour
- \fill[\mouse@contour] (0.0788, 1.2046) .. controls (0.1658, 1.2199) and (0.2086, 1.1539) .. (0.2956, 1.1386) -- (0.2956, 1.1486) .. controls (0.2097, 1.1637) and (0.1648, 1.2197) .. (0.0788, 1.2046) -- cycle;
- \fill[\mouse@contour] (-0.0788, 1.2046) .. controls (-0.1658, 1.2199) and (-0.2087, 1.1539) .. (-0.2956, 1.1386) -- (-0.2956, 1.1486) .. controls (-0.2097, 1.1637) and (-0.1648, 1.2197) .. (-0.0788, 1.2046) -- cycle;
- \fill[\mouse@contour] (0.0752, 1.2181) .. controls (0.1583, 1.2483) and (0.2171, 1.2209) .. (0.3002, 1.1907) -- (0.3002, 1.2007) .. controls (0.2174, 1.2308) and (0.158, 1.2482) .. (0.0752, 1.2181) -- cycle;
- \fill[\mouse@contour] (-0.0752, 1.2181) .. controls (-0.1583, 1.2483) and (-0.2171, 1.2209) .. (-0.3002, 1.1907) -- (-0.3002, 1.2007) .. controls (-0.2174, 1.2308) and (-0.158, 1.2482) .. (-0.0752, 1.2181) -- cycle;
- \fill[\mouse@contour] (0.0671, 1.2343) .. controls (0.1414, 1.2825) and (0.2182, 1.3064) .. (0.2925, 1.2582) -- (0.2925, 1.2682) .. controls (0.2179, 1.3166) and (0.1417, 1.2827) .. (0.0671, 1.2343) -- cycle;
- \fill[\mouse@contour] (-0.0671, 1.2343) .. controls (-0.1414, 1.2825) and (-0.2182, 1.3064) .. (-0.2925, 1.2582) -- (-0.2925, 1.2682) .. controls (-0.2179, 1.3166) and (-0.1417, 1.2827) .. (-0.0671, 1.2343) -- cycle;
-\else
- \fill[\mouse@body!50!black] (0.0788, 1.2046) .. controls (0.1658, 1.2199) and (0.2086, 1.1539) .. (0.2956, 1.1386) -- (0.2956, 1.1486) .. controls (0.2097, 1.1637) and (0.1648, 1.2197) .. (0.0788, 1.2046) -- cycle;
- \fill[\mouse@body!50!black] (-0.0788, 1.2046) .. controls (-0.1658, 1.2199) and (-0.2087, 1.1539) .. (-0.2956, 1.1386) -- (-0.2956, 1.1486) .. controls (-0.2097, 1.1637) and (-0.1648, 1.2197) .. (-0.0788, 1.2046) -- cycle;
- \fill[\mouse@body!50!black] (0.0752, 1.2181) .. controls (0.1583, 1.2483) and (0.2171, 1.2209) .. (0.3002, 1.1907) -- (0.3002, 1.2007) .. controls (0.2174, 1.2308) and (0.158, 1.2482) .. (0.0752, 1.2181) -- cycle;
- \fill[\mouse@body!50!black] (-0.0752, 1.2181) .. controls (-0.1583, 1.2483) and (-0.2171, 1.2209) .. (-0.3002, 1.1907) -- (-0.3002, 1.2007) .. controls (-0.2174, 1.2308) and (-0.158, 1.2482) .. (-0.0752, 1.2181) -- cycle;
- \fill[\mouse@body!50!black] (0.0671, 1.2343) .. controls (0.1414, 1.2825) and (0.2182, 1.3064) .. (0.2925, 1.2582) -- (0.2925, 1.2682) .. controls (0.2179, 1.3166) and (0.1417, 1.2827) .. (0.0671, 1.2343) -- cycle;
- \fill[\mouse@body!50!black] (-0.0671, 1.2343) .. controls (-0.1414, 1.2825) and (-0.2182, 1.3064) .. (-0.2925, 1.2582) -- (-0.2925, 1.2682) .. controls (-0.2179, 1.3166) and (-0.1417, 1.2827) .. (-0.0671, 1.2343) -- cycle;
-\fi
+%And the mouse can lift its legs:
+%\begin{tcblisting}{}
+%\mouse[leftstep]
+%\mouse[rightstep,xshift=2cm]
+%\end{tcblisting}
%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!50!black] (0, 1.248) circle[radius=0.09];
+%To view the mouse from behind:
+%\begin{tcblisting}{}
+%\mouse[back]
+%\end{tcblisting}
%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@eye] (0.23, 1.68) circle[radius=0.05];
-\mouse@part@draw[\mouse@eye] (-0.23, 1.68) circle[radius=0.05];
+%The key \lstinline|3D| will make the mouse 3-dimensional:
+%\begin{tcblisting}{}
+%\mouse[3D]
+%\end{tcblisting}
%
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname mousehookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
-
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\mouse[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty b/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
index cf04bc19f2..9846cc5824 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/mole.tex
+ % !TeX root = ./examples/mole.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-moles}[2021/04/16 version v0.6 Drawing moles in TikZ]
+\ProvidesPackage{tikzlings-moles}[2021/08/06 version v0.8 Drawing moles in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -56,6 +56,8 @@
hands = red!20!white!50!brown,
muzzle/.code = \def\moles@muzzle{#1},
muzzle = red!20!white!50!brown,
+ mouth/.code = \def\moles@mouth{#1},
+ mouth = \moles@body!60!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -65,128 +67,194 @@
back/.code = \moles@backtrue,
contour/.code = \moles@contourtrue
\def\moles@contour{#1}
+ \def\moles@mouth{#1}
\def\moles@eye{#1},
contour/.default = black,
outline/.forward to = /moles/contour,
}
\def\moles@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.625,0.1) rectangle (0.905, 2.17);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmoles@threeD
+ \def\moles@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifmoles@contour
+ \def\moles@part@draw[##1]{\draw[##1,\moles@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\moles@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname moleshookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \moles@part@draw[\moles@feet] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \moles@part@draw[\moles@feet] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmoles@back
+ \moles@part@draw[\moles@body] (0.8856, 0.6504) .. controls (0.8656, 0.3803) and (0.0267, 0.2202) .. (0.0167, 0.4203) .. controls (-0.0033, 0.5404) and (0.1104, 0.4397) .. (0.3951, 0.4803) .. controls (0.6557, 0.5175) and (0.8856, 0.7005) .. (0.8856, 0.6504);
+ \fi% back
+ %
+ % Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \moles@part@draw[\moles@body] (-0.09, 2.06) .. controls (-0.09, 2.06) and (-0.13, 2.25) .. (-0.07, 2.27) .. controls (-0.09, 2.13) and (0.04, 2.08) .. (0.04, 2.08) .. controls (0.04, 2.08) and (0.02, 2.20) .. (0.06, 2.21) .. controls (0.06, 2.11) and (0.13, 2.08) .. (0.13, 2.08) -- cycle;
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \moles@part@draw[\moles@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmoles@back
+ \moles@part@draw[\moles@body] (0.8856, 0.6504) .. controls (0.8656, 0.3803) and (0.0267, 0.2202) .. (0.0167, 0.4203) .. controls (-0.0033, 0.5404) and (0.1104, 0.4397) .. (0.3951, 0.4803) .. controls (0.6557, 0.5175) and (0.8856, 0.7005) .. (0.8856, 0.6504) -- cycle;
+ \fi% back
+ %
+ % Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmoles@back
+ \moles@part@draw[\moles@body!50!white] (0.425, 0.71) .. controls (0.425, 0.41) and (0.245, 0.37) .. (0, 0.37) .. controls (-0.245, 0.37) and (-0.425, 0.41) .. (-0.425, 0.71) .. controls (-0.425, 1.01) and (-0.225, 1.26) .. (0, 1.26) .. controls (0.225, 1.26) and (0.425, 1.01) .. (0.425, 0.71) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname moleshookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmoles@back
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \moles@part@draw[\moles@body] (0.37,0.86) ellipse[x radius=0.27, y radius=0.13, rotate=70];
+ \moles@part@draw[\moles@body] (-0.37,0.86) ellipse[x radius=0.27, y radius=0.13, rotate=-70];
+ %
+ % Hands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmoles@contour
+ \moles@part@draw[] (-0.37,0.6) -- (-0.32,0.53) -- (-0.3,0.6) -- (-0.23,0.55) -- (-0.23,0.64) -- (-0.16,0.59) -- (-0.18,0.67) -- cycle;
+ \moles@part@draw[] (0.37,0.6) -- (0.32,0.53) -- (0.3,0.6) -- (0.23,0.55) -- (0.23,0.64) -- (0.16,0.59) -- (0.18,0.67) -- cycle;
+ \else% contour
+ \fill[white] (-0.37,0.6) -- (-0.32,0.53) -- (-0.3,0.6) -- (-0.23,0.55) -- (-0.23,0.64) -- (-0.16,0.59) -- (-0.18,0.67) -- cycle;
+ \fill[white] (0.37,0.6) -- (0.32,0.53) -- (0.3,0.6) -- (0.23,0.55) -- (0.23,0.64) -- (0.16,0.59) -- (0.18,0.67) -- cycle;
+ \fi% contour
+ \moles@part@draw[\moles@hands] (0.285,0.65) ellipse[x radius=0.08, y radius=0.13, rotate=70];
+ \moles@part@draw[\moles@hands] (-0.285,0.65) ellipse[x radius=0.08, y radius=0.13, rotate=-70];
+ %
+ % Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \moles@part@draw[\moles@muzzle] ( 0.22, 1.46) .. controls ( 0.22, 1.50) and ( 0.22, 1.53) .. ( 0.17, 1.56) .. controls ( 0.11, 1.58) and ( 0.05, 1.66) .. ( 0.00, 1.66) .. controls (-0.05, 1.66) and (-0.11, 1.58) .. (-0.17, 1.56) .. controls (-0.22, 1.53) and (-0.22, 1.50) .. (-0.22, 1.46) .. controls (-0.22, 1.39) and (-0.14, 1.33) .. ( 0.00, 1.33) .. controls ( 0.14, 1.33) and ( 0.22, 1.39) .. ( 0.22, 1.46) -- cycle;
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \moles@part@draw[\moles@body!60!black] (0,1.67) circle[radius=0.055];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmoles@threeD
+ \fill[\moles@eye] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
+ \fill[\moles@eye!50!black] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
+ \else% 3D
+ \fill[\moles@eye] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
+ \fill[\moles@eye] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
+ \fi% 3D
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\moles@mouth, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] ;
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname moleshookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.625,0.1) rectangle (0.905, 2.17);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmoles@threeD
- \def\moles@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifmoles@contour
- \def\moles@part@draw[##1]{\draw[##1,\moles@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\moles@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Mole]{Wilhelm, the mole}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname moleshookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
+%\emph{The mole was added in celebration of the international mole day and is named after the chemist Wilhelm Ostwald}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\moles@part@draw[\moles@feet] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\moles@part@draw[\moles@feet] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+%\subsection{Package name}
%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifmoles@back
- \moles@part@draw[\moles@body] (0.8856, 0.6504) .. controls (0.8656, 0.3803) and (0.0267, 0.2202) .. (0.0167, 0.4203) .. controls (-0.0033, 0.5404) and (0.1104, 0.4397) .. (0.3951, 0.4803) .. controls (0.6557, 0.5175) and (0.8856, 0.7005) .. (0.8856, 0.6504);
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-moles}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\moles@part@draw[\moles@body] (-0.09, 2.06) .. controls (-0.09, 2.06) and (-0.13, 2.25) .. (-0.07, 2.27) .. controls (-0.09, 2.13) and (0.04, 2.08) .. (0.04, 2.08) .. controls (0.04, 2.08) and (0.02, 2.20) .. (0.06, 2.21) .. controls (0.06, 2.11) and (0.13, 2.08) .. (0.13, 2.08) -- cycle;
+%\subsection{Basic Usage}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\moles@part@draw[\moles@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+%\textcolor{red!60!black}{\textbf{Attention:} In contrast to the other \tikzlings the macro name is the plural form to avoid conflicts with \lstinline|siunitx| and similar packages.}
+%\begin{tcblisting}{}
+%\moles
+%\end{tcblisting}
%
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmoles@back
- \moles@part@draw[\moles@body] (0.8856, 0.6504) .. controls (0.8656, 0.3803) and (0.0267, 0.2202) .. (0.0167, 0.4203) .. controls (-0.0033, 0.5404) and (0.1104, 0.4397) .. (0.3951, 0.4803) .. controls (0.6557, 0.5175) and (0.8856, 0.7005) .. (0.8856, 0.6504) -- cycle;
-\fi
+%\subsection{Options}
%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifmoles@back
- \moles@part@draw[\moles@body!50!white] (0.425, 0.71) .. controls (0.425, 0.41) and (0.245, 0.37) .. (0, 0.37) .. controls (-0.245, 0.37) and (-0.425, 0.41) .. (-0.425, 0.71) .. controls (-0.425, 1.01) and (-0.225, 1.26) .. (0, 1.26) .. controls (0.225, 1.26) and (0.425, 1.01) .. (0.425, 0.71) -- cycle;
-\fi
+%The basic mole can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\moles[body=blue]
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname moleshookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\moles[eye=red]
+%\end{tcblisting}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifmoles@back
+%\begin{tcblisting}{}
+%\moles[muzzle=red]
+%\end{tcblisting}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\moles@part@draw[\moles@body] (0.37,0.86) ellipse[x radius=0.27, y radius=0.13, rotate=70];
-\moles@part@draw[\moles@body] (-0.37,0.86) ellipse[x radius=0.27, y radius=0.13, rotate=-70];
+%\begin{tcblisting}{}
+%\moles[hands=red]
+%\end{tcblisting}
%
-% Hands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmoles@contour
- \moles@part@draw[] (-0.37,0.6) -- (-0.32,0.53) -- (-0.3,0.6) -- (-0.23,0.55) -- (-0.23,0.64) -- (-0.16,0.59) -- (-0.18,0.67) -- cycle;
- \moles@part@draw[] (0.37,0.6) -- (0.32,0.53) -- (0.3,0.6) -- (0.23,0.55) -- (0.23,0.64) -- (0.16,0.59) -- (0.18,0.67) -- cycle;
-\else
- \fill[white] (-0.37,0.6) -- (-0.32,0.53) -- (-0.3,0.6) -- (-0.23,0.55) -- (-0.23,0.64) -- (-0.16,0.59) -- (-0.18,0.67) -- cycle;
- \fill[white] (0.37,0.6) -- (0.32,0.53) -- (0.3,0.6) -- (0.23,0.55) -- (0.23,0.64) -- (0.16,0.59) -- (0.18,0.67) -- cycle;
-\fi
-\moles@part@draw[\moles@hands] (0.285,0.65) ellipse[x radius=0.08, y radius=0.13, rotate=70];
-\moles@part@draw[\moles@hands] (-0.285,0.65) ellipse[x radius=0.08, y radius=0.13, rotate=-70];
+%\begin{tcblisting}{}
+%\moles[feet=red]
+%\end{tcblisting}
%
-% Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\moles@part@draw[\moles@muzzle] ( 0.22, 1.46) .. controls ( 0.22, 1.50) and ( 0.22, 1.53) .. ( 0.17, 1.56) .. controls ( 0.11, 1.58) and ( 0.05, 1.66) .. ( 0.00, 1.66) .. controls (-0.05, 1.66) and (-0.11, 1.58) .. (-0.17, 1.56) .. controls (-0.22, 1.53) and (-0.22, 1.50) .. (-0.22, 1.46) .. controls (-0.22, 1.39) and (-0.14, 1.33) .. ( 0.00, 1.33) .. controls ( 0.14, 1.33) and ( 0.22, 1.39) .. ( 0.22, 1.46) -- cycle;
+%\begin{tcblisting}{}
+%\moles[mouth=red]
+%\end{tcblisting}
%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\moles@part@draw[\moles@body!60!black] (0,1.67) circle[radius=0.055];
+%To view the mole from behind:
+%\begin{tcblisting}{}
+%\moles[back]
+%\end{tcblisting}
%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmoles@threeD
- \fill[\moles@eye] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
- \fill[\moles@eye!50!black] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
-\else
- \fill[\moles@eye] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
- \fill[\moles@eye] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
-\fi
+%The key \lstinline|3D| will make the mole 3-dimensional:
+%\begin{tcblisting}{}
+%\moles[3D]
+%\end{tcblisting}
%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifmoles@contour
- \draw[\moles@contour, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] ;
-\else
- \draw[\moles@body!60!black, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] ;
-\fi
-%
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname moleshookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\moles[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty b/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
index 977593bbbb..d10b5c6a57 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/owl.tex
+ % !TeX root = ./examples/owl.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-owls}[2021/04/16 version v0.6 Draw owls in TikZ]
+\ProvidesPackage{tikzlings-owls}[2021/08/06 version v0.8 Draw owls in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -70,113 +70,174 @@
}
\def\owl@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.73, 0.08) rectangle (0.73, 2.24);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifowl@threeD
+ \def\owl@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifowl@contour
+ \def\owl@part@draw[##1]{\draw[##1,\owl@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\owl@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname owlhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \owl@part@draw[\owl@body] (0.575,0.8) ellipse[x radius=0.38, y radius=0.1, rotate=-80];
+ \owl@part@draw[\owl@body] (-0.575,0.8) ellipse[x radius=0.38, y radius=0.1, rotate=80];
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifowl@back
+ \owl@part@draw[\owl@feet] (0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
+ \owl@part@draw[\owl@feet] (0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=20];
+ \owl@part@draw[\owl@feet] (0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=40];
+ \owl@part@draw[\owl@feet] (-0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
+ \owl@part@draw[\owl@feet] (-0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
+ \owl@part@draw[\owl@feet] (-0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \owl@part@draw[\owl@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \owl@part@draw[\owl@body] (-0.6361, 1.777) .. controls (-0.6361, 1.777) and (-0.7586, 1.9603) .. (-0.6759, 2.2145) .. controls (-0.3248, 1.912) and (0.3248, 1.912) .. (0.6759, 2.2145) .. controls (0.7586, 1.9603) and (0.6361, 1.777) .. (0.6361, 1.777);
+ %
+ % Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifowl@back
+ \owl@part@draw[\owl@body!50!white] (0.425,0.5) .. controls (0.425,0.31) and (0.245,0.27) .. (0,0.27) .. controls (-0.245,0.27) and (-0.425,0.31) .. (-0.425,0.5) .. controls (-0.425,0.81) and (-0.225,0.98) .. (0,0.98) .. controls (0.225,0.98) and (0.425,0.81) .. (0.425,0.5) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname owlhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \owl@part@draw[\owl@body] (0,1.55) ellipse[x radius=0.7, y radius=0.55];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifowl@back
+ \ifowl@contour
+ \owl@part@draw[\owl@eye] (-0.28, 1.6) circle[radius=0.22];
+ \owl@part@draw[\owl@eye] (0.28, 1.6) circle[radius=0.22];
+ \else% contour
+ \fill[\owl@eye] (-0.28, 1.6) circle[radius=0.22];
+ \fill[\owl@eye] (0.28, 1.6) circle[radius=0.22];
+ \fi% contour
+ \owl@part@draw[\owl@pupil] (-0.28, 1.6) circle[radius=0.15];
+ \owl@part@draw[\owl@pupil] (0.28, 1.6) circle[radius=0.15];
+ \owl@part@draw[white] (0.25, 1.64) circle[radius=0.03];
+ \owl@part@draw[white] (-0.31, 1.64) circle[radius=0.03];
+ \fi% back
+ %
+ % Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifowl@back
+ \owl@part@draw[\owl@bill] (0, 1.4) -- (-0.1, 1.3) -- (0, 1.15) -- (0.1, 1.3) -- cycle;
+ \fi% back
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifowl@back
+ \owl@part@draw[\owl@feet] (0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
+ \owl@part@draw[\owl@feet] (0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=20];
+ \owl@part@draw[\owl@feet] (0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=40];
+ \owl@part@draw[\owl@feet] (-0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
+ \owl@part@draw[\owl@feet] (-0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
+ \owl@part@draw[\owl@feet] (-0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname owlhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.73, 0.08) rectangle (0.73, 2.24);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifowl@threeD
- \def\owl@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifowl@contour
- \def\owl@part@draw[##1]{\draw[##1,\owl@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\owl@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0.925)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname owlhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\owl@part@draw[\owl@body] (0.575,0.8) ellipse[x radius=0.38, y radius=0.1, rotate=-80];
-\owl@part@draw[\owl@body] (-0.575,0.8) ellipse[x radius=0.38, y radius=0.1, rotate=80];
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifowl@back
- \owl@part@draw[\owl@feet] (0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
- \owl@part@draw[\owl@feet] (0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=20];
- \owl@part@draw[\owl@feet] (0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=40];
- \owl@part@draw[\owl@feet] (-0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
- \owl@part@draw[\owl@feet] (-0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
- \owl@part@draw[\owl@feet] (-0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\owl@part@draw[\owl@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\owl@part@draw[\owl@body] (-0.6361, 1.777) .. controls (-0.6361, 1.777) and (-0.7586, 1.9603) .. (-0.6759, 2.2145) .. controls (-0.3248, 1.912) and (0.3248, 1.912) .. (0.6759, 2.2145) .. controls (0.7586, 1.9603) and (0.6361, 1.777) .. (0.6361, 1.777);
-%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifowl@back
- \owl@part@draw[\owl@body!50!white] (0.425,0.5) .. controls (0.425,0.31) and (0.245,0.27) .. (0,0.27) .. controls (-0.245,0.27) and (-0.425,0.31) .. (-0.425,0.5) .. controls (-0.425,0.81) and (-0.225,0.98) .. (0,0.98) .. controls (0.225,0.98) and (0.425,0.81) .. (0.425,0.5) -- cycle;
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname owlhookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\owl@part@draw[\owl@body] (0,1.55) ellipse[x radius=0.7, y radius=0.55];
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifowl@back
- \ifowl@contour
- \owl@part@draw[\owl@eye] (-0.28, 1.6) circle[radius=0.22];
- \owl@part@draw[\owl@eye] (0.28, 1.6) circle[radius=0.22];
- \else
- \fill[\owl@eye] (-0.28, 1.6) circle[radius=0.22];
- \fill[\owl@eye] (0.28, 1.6) circle[radius=0.22];
- \fi
- \owl@part@draw[\owl@pupil] (-0.28, 1.6) circle[radius=0.15];
- \owl@part@draw[\owl@pupil] (0.28, 1.6) circle[radius=0.15];
- \owl@part@draw[white] (0.25, 1.64) circle[radius=0.03];
- \owl@part@draw[white] (-0.31, 1.64) circle[radius=0.03];
-\fi
-%
-% Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifowl@back
- \owl@part@draw[\owl@bill] (0, 1.4) -- (-0.1, 1.3) -- (0, 1.15) -- (0.1, 1.3) -- cycle;
-\fi
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifowl@back
- \owl@part@draw[\owl@feet] (0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
- \owl@part@draw[\owl@feet] (0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=20];
- \owl@part@draw[\owl@feet] (0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=40];
- \owl@part@draw[\owl@feet] (-0.175,0.2) ellipse[x radius=0.03, y radius=0.1];
- \owl@part@draw[\owl@feet] (-0.225,0.21) ellipse[x radius=0.03, y radius=0.1, rotate=-20];
- \owl@part@draw[\owl@feet] (-0.275,0.23) ellipse[x radius=0.03, y radius=0.1, rotate=-40];
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname owlhookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%\clearpage
+%\section[Owl]{Jake, the owl}
+%
+%\emph{The owl Jake was inspired by the avatar of one of the world's top TikZperts}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-owls}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\owl
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic owl can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\owl[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\owl[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\owl[pupil=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\owl[bill=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\owl[feet=red]
+%\end{tcblisting}
+%
+%To view the owl from behind:
+%\begin{tcblisting}{}
+%\owl[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the owl 3-dimensional:
+%\begin{tcblisting}{}
+%\owl[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\owl[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty b/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
index 9a962adac5..3f6301e3ea 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/panda.tex
+ % !TeX root = ./examples/panda.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-pandas}[2021/04/16 version v0.6 Drawing pandas in TikZ]
+\ProvidesPackage{tikzlings-pandas}[2021/08/06 version v0.8 Drawing pandas in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -51,7 +51,9 @@
eye/.code = \def\panda@eye{#1},
eye = white,
pupil/.code = \def\panda@pupil{#1},
- pupil = black,
+ pupil = black,
+ mouth/.code = \def\panda@mouth{#1},
+ mouth = black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -60,114 +62,169 @@
3D/.code = \panda@threeDtrue,
back/.code = \panda@backtrue,
contour/.code = \panda@contourtrue
- \def\panda@contour{#1},
+ \def\panda@contour{#1}
+ \def\panda@mouth{#1},
contour/.default = black,
outline/.forward to = /panda/contour,
}
\def\panda@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.62,0.05) rectangle (0.62, 2.18);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifpanda@threeD
+ \def\panda@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifpanda@contour
+ \def\panda@part@draw[##1]{\draw[##1,\panda@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\panda@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname pandahookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifpanda@back
+ \panda@part@draw[black] (0.32, 0.27) circle[radius=0.2];
+ \panda@part@draw[black] (-0.32, 0.27) circle[radius=0.2];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \panda@part@draw[\panda@body!55!white] (0,0.78) ellipse[x radius=0.57, y radius=0.65];
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname pandahookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpanda@back
+ \begin{scope}[yshift=-0.08cm]
+ \panda@part@draw[black] (0.28,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=70];
+ \panda@part@draw[black] (-0.28,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=-70];
+ \end{scope}
+ \fi% back
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpanda@back
+ \panda@part@draw[black] (0.32, 0.27) circle[radius=0.2];
+ \panda@part@draw[black] (-0.32, 0.27) circle[radius=0.2];
+ \fi% back
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \panda@part@draw[black] (0.32, 2) circle[radius=0.15];
+ \panda@part@draw[black] (-0.32, 2) circle[radius=0.15];
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \panda@part@draw[\panda@body!55!white] (0.4897, 1.5886) .. controls (0.4614, 1.8238) and (0.25, 2.1172) .. (0, 2.1134) .. controls (-0.25, 2.1172) and (-0.4614, 1.8238) .. (-0.4897, 1.5886) .. controls (-0.5261, 1.3269) and (-0.2748, 1.2377) .. (0, 1.2377) .. controls (0.2748, 1.2377) and (0.5261, 1.3269) .. (0.4897, 1.5886) -- cycle;
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpanda@back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \panda@part@draw[black] (0.3732, 1.6905) .. controls (0.3498, 1.767) and (0.2032, 1.8059) .. (0.0944, 1.7715) .. controls (-0.0145, 1.7371) and (0.173, 1.5479) .. (0.2508, 1.5443) .. controls (0.3286, 1.5407) and (0.3965, 1.614) .. (0.3732, 1.6905) -- cycle;
+ \panda@part@draw[black] (-0.3732, 1.6905) .. controls (-0.3498, 1.767) and (-0.2032, 1.8059) .. (-0.0944, 1.7715) .. controls (0.0145, 1.7371) and (-0.173, 1.5479) .. (-0.2508, 1.5443) .. controls (-0.3286, 1.5407) and (-0.3965, 1.614) .. (-0.3732, 1.6905) -- cycle;
+ \panda@part@draw[\panda@eye] (-0.18, 1.7) circle[radius=0.05];
+ \panda@part@draw[\panda@eye] (0.18, 1.7) circle[radius=0.05];
+ \panda@part@draw[\panda@pupil] (0.17, 1.695) circle[radius=0.02];
+ \panda@part@draw[\panda@pupil] (-0.17, 1.695) circle[radius=0.02];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\panda@mouth,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506) .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477);
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \panda@part@draw[black] (0,1.55) ellipse[x radius=0.07, y radius=0.04];
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname pandahookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.62,0.05) rectangle (0.62, 2.18);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpanda@threeD
- \def\panda@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifpanda@contour
- \def\panda@part@draw[##1]{\draw[##1,\panda@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\panda@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname pandahookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpanda@back
- \panda@part@draw[black] (0.32, 0.27) circle[radius=0.2];
- \panda@part@draw[black] (-0.32, 0.27) circle[radius=0.2];
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\panda@part@draw[\panda@body!55!white] (0,0.78) ellipse[x radius=0.57, y radius=0.65];
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname pandahookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpanda@back
- \begin{scope}[yshift=-0.08cm]
- \panda@part@draw[black] (0.28,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=70];
- \panda@part@draw[black] (-0.28,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=-70];
- \end{scope}
-\fi
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpanda@back
- \panda@part@draw[black] (0.32, 0.27) circle[radius=0.2];
- \panda@part@draw[black] (-0.32, 0.27) circle[radius=0.2];
-\fi
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\panda@part@draw[black] (0.32, 2) circle[radius=0.15];
-\panda@part@draw[black] (-0.32, 2) circle[radius=0.15];
-%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\panda@part@draw[\panda@body!55!white] (0.4897, 1.5886) .. controls (0.4614, 1.8238) and (0.25, 2.1172) .. (0, 2.1134) .. controls (-0.25, 2.1172) and (-0.4614, 1.8238) .. (-0.4897, 1.5886) .. controls (-0.5261, 1.3269) and (-0.2748, 1.2377) .. (0, 1.2377) .. controls (0.2748, 1.2377) and (0.5261, 1.3269) .. (0.4897, 1.5886) -- cycle;
-%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpanda@back
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\panda@part@draw[black] (0.3732, 1.6905) .. controls (0.3498, 1.767) and (0.2032, 1.8059) .. (0.0944, 1.7715) .. controls (-0.0145, 1.7371) and (0.173, 1.5479) .. (0.2508, 1.5443) .. controls (0.3286, 1.5407) and (0.3965, 1.614) .. (0.3732, 1.6905) -- cycle;
-\panda@part@draw[black] (-0.3732, 1.6905) .. controls (-0.3498, 1.767) and (-0.2032, 1.8059) .. (-0.0944, 1.7715) .. controls (0.0145, 1.7371) and (-0.173, 1.5479) .. (-0.2508, 1.5443) .. controls (-0.3286, 1.5407) and (-0.3965, 1.614) .. (-0.3732, 1.6905) -- cycle;
-\panda@part@draw[\panda@eye] (-0.18, 1.7) circle[radius=0.05];
-\panda@part@draw[\panda@eye] (0.18, 1.7) circle[radius=0.05];
-\panda@part@draw[\panda@pupil] (0.17, 1.695) circle[radius=0.02];
-\panda@part@draw[\panda@pupil] (-0.17, 1.695) circle[radius=0.02];
-%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpanda@contour
- \draw[\panda@contour,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506) .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477);
-\else
- \draw[black,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506) .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477);
-\fi
-%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\panda@part@draw[black] (0,1.55) ellipse[x radius=0.07, y radius=0.04];
-%
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname pandahookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%\clearpage
+%\section[Panda]{Meng Meng, the panda}
+%
+%\emph{Meng Meng is named after one of the pandas at the zoological garden Berlin}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-pandas}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\panda
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic panda can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\panda[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\panda[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\panda[pupil=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\panda[mouth=red]
+%\end{tcblisting}
+%
+%To view the panda from behind:
+%\begin{tcblisting}{}
+%\panda[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the panda 3-dimensional:
+%\begin{tcblisting}{}
+%\panda[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\panda[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty b/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
index fe99f485fa..7d2a6b5310 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/pingu.tex
+ % !TeX root = ./examples/pingu.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-penguins}[2021/04/16 version v0.6 Draw penguins in TikZ]
+\ProvidesPackage{tikzlings-penguins}[2021/08/06 version v0.8 Draw penguins in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -72,103 +72,167 @@
}
\def\penguin@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.865, 0.15) rectangle (0.865, 2.13);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifpenguin@threeD
+ \def\penguin@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifpenguin@contour
+ \def\penguin@part@draw[##1]{\draw[##1,\penguin@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\penguin@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname penguinhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \penguin@part@draw[\penguin@body] (0.575,1.2) ellipse[x radius=0.38, y radius=0.1, rotate=-50];
+ \penguin@part@draw[\penguin@body] (-0.575,1.2) ellipse[x radius=0.38, y radius=0.1, rotate=50];
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifpenguin@back
+ \penguin@part@draw[\penguin@feet]
+ (-0.265, 0.3941) .. controls (-0.283, 0.4505) and (-0.373, 0.6014) .. (-0.470, 0.6533) .. controls (-0.571, 0.7075) and (-0.576, 0.6369) .. (-0.554, 0.596) .. controls (-0.526, 0.5416) and (-0.573, 0.5302) .. (-0.602, 0.5384) .. controls (-0.695, 0.5653) and (-0.767, 0.5169) .. (-0.684, 0.434) .. controls (-0.664, 0.4137) and (-0.587, 0.3557) .. (-0.699, 0.3492) .. controls (-0.772, 0.345) and (-0.779, 0.268) .. (-0.689, 0.2445) .. controls (-0.597, 0.2206) and (-0.476, 0.2043) .. (-0.34, 0.2096) .. controls (-0.252, 0.2131) and (-0.237, 0.3059) .. (-0.265, 0.3941) -- cycle;
+ \penguin@part@draw[\penguin@feet]
+ (0.265, 0.3941) .. controls (0.283, 0.4505) and (0.3725, 0.6014) .. (0.469, 0.6533) .. controls (0.571, 0.7075) and (0.5756, 0.6369) .. (0.554, 0.596) .. controls (0.526, 0.5416) and (0.5733, 0.5302) .. (0.602, 0.5384) .. controls (0.695, 0.5653) and (0.7672, 0.5169) .. (0.684, 0.434) .. controls (0.663, 0.4137) and (0.587, 0.3557) .. (0.699, 0.3492) .. controls (0.772, 0.345) and (0.7789, 0.268) .. (0.689, 0.2445) .. controls (0.597, 0.2206) and (0.4764, 0.2043) .. (0.34, 0.2096) .. controls (0.252, 0.2131) and (0.2368, 0.3059) .. (0.265, 0.3941) -- cycle;
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \penguin@part@draw[\penguin@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpenguin@back
+ \penguin@part@draw[\penguin@belly] (0, 0.6) ellipse[x radius=0.48, y radius=0.35];
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname penguinhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpenguin@back
+ \penguin@part@draw[\penguin@feet]
+ (-0.265, 0.3941) .. controls (-0.283, 0.4505) and (-0.373, 0.6014) .. (-0.470, 0.6533) .. controls (-0.571, 0.7075) and (-0.576, 0.6369) .. (-0.554, 0.596) .. controls (-0.526, 0.5416) and (-0.573, 0.5302) .. (-0.602, 0.5384) .. controls (-0.695, 0.5653) and (-0.767, 0.5169) .. (-0.684, 0.434) .. controls (-0.664, 0.4137) and (-0.587, 0.3557) .. (-0.699, 0.3492) .. controls (-0.772, 0.345) and (-0.779, 0.268) .. (-0.689, 0.2445) .. controls (-0.597, 0.2206) and (-0.476, 0.2043) .. (-0.34, 0.2096) .. controls (-0.252, 0.2131) and (-0.237, 0.3059) .. (-0.265, 0.3941) -- cycle;
+ \penguin@part@draw[\penguin@feet]
+ (0.265, 0.3941) .. controls (0.283, 0.4505) and (0.3725, 0.6014) .. (0.469, 0.6533) .. controls (0.571, 0.7075) and (0.5756, 0.6369) .. (0.554, 0.596) .. controls (0.526, 0.5416) and (0.5733, 0.5302) .. (0.602, 0.5384) .. controls (0.695, 0.5653) and (0.7672, 0.5169) .. (0.684, 0.434) .. controls (0.663, 0.4137) and (0.587, 0.3557) .. (0.699, 0.3492) .. controls (0.772, 0.345) and (0.7789, 0.268) .. (0.689, 0.2445) .. controls (0.597, 0.2206) and (0.4764, 0.2043) .. (0.34, 0.2096) .. controls (0.252, 0.2131) and (0.2368, 0.3059) .. (0.265, 0.3941) -- cycle;
+ \fi% back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpenguin@back
+ \ifpenguin@contour
+ \penguin@part@draw[\penguin@eye] (-0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=-10];
+ \penguin@part@draw[\penguin@pupil] (-0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=-3];
+ \penguin@part@draw[\penguin@eye] (0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=10];
+ \penguin@part@draw[\penguin@pupil] (0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=3];
+ \else% contour
+ \fill[\penguin@eye] (-0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=-10];
+ \fill[\penguin@pupil] (-0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=-3];
+ \fill[\penguin@eye] (0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=10];
+ \fill[\penguin@pupil] (0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=3];
+ \fi% contour
+ \fi% back
+ %
+ % Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpenguin@back
+ \penguin@part@draw[\penguin@bill] (0.323, 1.4591) .. controls (0.1467, 1.3257) and (0.1066, 1.4365) .. (0, 1.4358) .. controls (-0.1066, 1.4365) and (-0.1467, 1.3257) .. (-0.323, 1.4591) .. controls (-0.1267, 1.075) and (0.1267, 1.075) .. (0.323, 1.4591) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname penguinhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.865, 0.15) rectangle (0.865, 2.13);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpenguin@threeD
- \def\penguin@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifpenguin@contour
- \def\penguin@part@draw[##1]{\draw[##1,\penguin@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\penguin@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0.925)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname penguinhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\penguin@part@draw[\penguin@body] (0.575,1.2) ellipse[x radius=0.38, y radius=0.1, rotate=-50];
-\penguin@part@draw[\penguin@body] (-0.575,1.2) ellipse[x radius=0.38, y radius=0.1, rotate=50];
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpenguin@back
- \penguin@part@draw[\penguin@feet]
- (-0.265, 0.3941) .. controls (-0.283, 0.4505) and (-0.373, 0.6014) .. (-0.470, 0.6533) .. controls (-0.571, 0.7075) and (-0.576, 0.6369) .. (-0.554, 0.596) .. controls (-0.526, 0.5416) and (-0.573, 0.5302) .. (-0.602, 0.5384) .. controls (-0.695, 0.5653) and (-0.767, 0.5169) .. (-0.684, 0.434) .. controls (-0.664, 0.4137) and (-0.587, 0.3557) .. (-0.699, 0.3492) .. controls (-0.772, 0.345) and (-0.779, 0.268) .. (-0.689, 0.2445) .. controls (-0.597, 0.2206) and (-0.476, 0.2043) .. (-0.34, 0.2096) .. controls (-0.252, 0.2131) and (-0.237, 0.3059) .. (-0.265, 0.3941) -- cycle;
- \penguin@part@draw[\penguin@feet]
- (0.265, 0.3941) .. controls (0.283, 0.4505) and (0.3725, 0.6014) .. (0.469, 0.6533) .. controls (0.571, 0.7075) and (0.5756, 0.6369) .. (0.554, 0.596) .. controls (0.526, 0.5416) and (0.5733, 0.5302) .. (0.602, 0.5384) .. controls (0.695, 0.5653) and (0.7672, 0.5169) .. (0.684, 0.434) .. controls (0.663, 0.4137) and (0.587, 0.3557) .. (0.699, 0.3492) .. controls (0.772, 0.345) and (0.7789, 0.268) .. (0.689, 0.2445) .. controls (0.597, 0.2206) and (0.4764, 0.2043) .. (0.34, 0.2096) .. controls (0.252, 0.2131) and (0.2368, 0.3059) .. (0.265, 0.3941) -- cycle;
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\penguin@part@draw[\penguin@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
-%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpenguin@back
- \penguin@part@draw[\penguin@belly] (0, 0.6) ellipse[x radius=0.48, y radius=0.35];
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname penguinhookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpenguin@back
- \penguin@part@draw[\penguin@feet]
- (-0.265, 0.3941) .. controls (-0.283, 0.4505) and (-0.373, 0.6014) .. (-0.470, 0.6533) .. controls (-0.571, 0.7075) and (-0.576, 0.6369) .. (-0.554, 0.596) .. controls (-0.526, 0.5416) and (-0.573, 0.5302) .. (-0.602, 0.5384) .. controls (-0.695, 0.5653) and (-0.767, 0.5169) .. (-0.684, 0.434) .. controls (-0.664, 0.4137) and (-0.587, 0.3557) .. (-0.699, 0.3492) .. controls (-0.772, 0.345) and (-0.779, 0.268) .. (-0.689, 0.2445) .. controls (-0.597, 0.2206) and (-0.476, 0.2043) .. (-0.34, 0.2096) .. controls (-0.252, 0.2131) and (-0.237, 0.3059) .. (-0.265, 0.3941) -- cycle;
- \penguin@part@draw[\penguin@feet]
- (0.265, 0.3941) .. controls (0.283, 0.4505) and (0.3725, 0.6014) .. (0.469, 0.6533) .. controls (0.571, 0.7075) and (0.5756, 0.6369) .. (0.554, 0.596) .. controls (0.526, 0.5416) and (0.5733, 0.5302) .. (0.602, 0.5384) .. controls (0.695, 0.5653) and (0.7672, 0.5169) .. (0.684, 0.434) .. controls (0.663, 0.4137) and (0.587, 0.3557) .. (0.699, 0.3492) .. controls (0.772, 0.345) and (0.7789, 0.268) .. (0.689, 0.2445) .. controls (0.597, 0.2206) and (0.4764, 0.2043) .. (0.34, 0.2096) .. controls (0.252, 0.2131) and (0.2368, 0.3059) .. (0.265, 0.3941) -- cycle;
-\fi
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpenguin@back
- \ifpenguin@contour
- \penguin@part@draw[\penguin@eye] (-0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=-10];
- \penguin@part@draw[\penguin@pupil] (-0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=-3];
- \penguin@part@draw[\penguin@eye] (0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=10];
- \penguin@part@draw[\penguin@pupil] (0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=3];
- \else
- \fill[\penguin@eye] (-0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=-10];
- \fill[\penguin@pupil] (-0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=-3];
- \fill[\penguin@eye] (0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=10];
- \fill[\penguin@pupil] (0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=3];
- \fi
-\fi
-%
-% Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpenguin@back
- \penguin@part@draw[\penguin@bill] (0.323, 1.4591) .. controls (0.1467, 1.3257) and (0.1066, 1.4365) .. (0, 1.4358) .. controls (-0.1066, 1.4365) and (-0.1467, 1.3257) .. (-0.323, 1.4591) .. controls (-0.1267, 1.075) and (0.1267, 1.075) .. (0.323, 1.4591) -- cycle;
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname penguinhookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%\clearpage
+%\section[Penguin]{Tux, the penguin}
+%
+%\emph{Dedicated to the Linux mascot}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-penguins}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\penguin
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic penguin can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\penguin[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\penguin[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\penguin[pupil=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\penguin[bill=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\penguin[belly=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\penguin[feet=red]
+%\end{tcblisting}
+%
+%To view the penguin from behind:
+%\begin{tcblisting}{}
+%\penguin[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the penguin 3-dimensional:
+%\begin{tcblisting}{}
+%\penguin[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\penguin[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty b/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
index 6909df1fe3..bcfa92efd1 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/pig.tex
+ % !TeX root = ./examples/pig.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-pigs}[2021/04/16 version v0.6 Drawing pigs in TikZ]
+\ProvidesPackage{tikzlings-pigs}[2021/08/06 version v0.8 Drawing pigs in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -50,140 +50,190 @@
body/.code = \def\pig@body{#1},
body = pigdark,
eye/.code = \def\pig@eye{#1},
- eye = gray,
+ eye = gray,
+ tail/.code = \def\pig@tail{#1},
+ tail = \pig@body,
+ mouth/.code = \def\pig@mouth{#1},
+ mouth = gray,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \pig@threeDtrue,
+ 3D/.code = \pig@threeDtrue
+ \def\pig@mouth{gray!70!black},
back/.code = \pig@backtrue,
contour/.code = \pig@contourtrue
- \def\pig@contour{#1},
+ \def\pig@contour{#1}
+ \def\pig@mouth{#1}
+ \def\pig@tail{#1},
contour/.default = black,
outline/.forward to = /pig/contour,
}
\def\pig@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.625,0.1) rectangle (0.905, 2.27);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifpig@threeD
+ \def\pig@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifpig@contour
+ \def\pig@part@draw[##1]{\draw[##1,\pig@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\pig@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname pighookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpig@back
+ \draw[\pig@tail,line width=\scalingfactor*0.8pt] (0.8431, 0.583) .. controls (0.8609, 0.4063) and (0.7006, 0.361) .. (0.6384, 0.4293) .. controls (0.5762, 0.4976) and (0.5613, 0.6052) .. (0.6551, 0.629) .. controls (0.7537, 0.6541) and (0.7759, 0.5628) .. (0.7455, 0.4948) .. controls (0.6412, 0.2697) and (0.3543, 0.356) .. (0.2638, 0.4238) .. controls (0.1967, 0.4779) and (0.1788, 0.6076) .. (0.3192, 0.633) .. controls (0.6000, 0.6836) and (0.5130, 0.3048) .. (0.2098, 0.3322) .. controls (0.0809, 0.3438) and (0.0809, 0.5236) .. (0.0809, 0.5236);
+ \fi% back
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifpig@back
+ \pig@part@draw[\pig@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
+ \pig@part@draw[\pig@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pig@part@draw[\pig@body!55!white] ( 0.6, 0.8 ) .. controls ( 0.6 , 0.4) and ( 0.35, 0.16) .. ( 0.0, 0.16) .. controls (-0.35, 0.16) and (-0.6 , 0.4) .. (-0.6, 0.8 ) .. controls (-0.6 , 1.3) and (-0.35, 1.5) .. ( 0.0, 1.5) .. controls ( 0.35, 1.5) and ( 0.6 , 1.3) .. ( 0.6, 0.75) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname pighookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpig@back
+ \pig@part@draw[\pig@body] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
+ \pig@part@draw[\pig@body] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
+ \fi% back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pig@part@draw[\pig@body!55!white] (0,1.64) ellipse[x radius=.5, y radius=.5];
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifpig@back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pig@part@draw[\pig@eye] (-0.09, 1.82) circle[radius=0.02];
+ \pig@part@draw[\pig@eye] ( 0.09, 1.82) circle[radius=0.02];
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pig@part@draw[\pig@body] (0, 1.62) ellipse[x radius=0.18, y radius=0.14];
+ \pig@part@draw[gray] (-0.06, 1.62) circle[radius=0.035];
+ \pig@part@draw[gray] ( 0.06, 1.62) circle[radius=0.035];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\pig@mouth,line width=\scalingfactor*0.4pt] (0.105, 1.46) arc [start angle=-50, end angle=-130, radius=0.16] ;
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pig@part@draw[\pig@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
+ \pig@part@draw[\pig@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
+ %
+ \fi% back
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pig@part@draw[\pig@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
+ \pig@part@draw[\pig@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \pig@part@draw[\pig@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
+ \pig@part@draw[\pig@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifpig@back
+ \draw[\pig@tail,line width=\scalingfactor*0.8pt] (0.8431, 0.583) .. controls (0.8609, 0.4063) and (0.7006, 0.361) .. (0.6384, 0.4293) .. controls (0.5762, 0.4976) and (0.5613, 0.6052) .. (0.6551, 0.629) .. controls (0.7537, 0.6541) and (0.7759, 0.5628) .. (0.7455, 0.4948) .. controls (0.6412, 0.2697) and (0.3543, 0.356) .. (0.2638, 0.4238) .. controls (0.1967, 0.4779) and (0.1788, 0.6076) .. (0.3192, 0.633) .. controls (0.6000, 0.6836) and (0.5130, 0.3048) .. (0.2098, 0.3322) .. controls (0.0809, 0.3438) and (0.0809, 0.5236) .. (0.0809, 0.5236);
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname pighookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.625,0.1) rectangle (0.905, 2.27);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpig@threeD
- \def\pig@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifpig@contour
- \def\pig@part@draw[##1]{\draw[##1,\pig@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\pig@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname pighookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpig@back
- \ifpig@contour
- \draw[\pig@contour,line width=\scalingfactor*0.8pt] (0.8431, 0.583) .. controls (0.8609, 0.4063) and (0.7006, 0.361) .. (0.6384, 0.4293) .. controls (0.5762, 0.4976) and (0.5613, 0.6052) .. (0.6551, 0.629) .. controls (0.7537, 0.6541) and (0.7759, 0.5628) .. (0.7455, 0.4948) .. controls (0.6412, 0.2697) and (0.3543, 0.356) .. (0.2638, 0.4238) .. controls (0.1967, 0.4779) and (0.1788, 0.6076) .. (0.3192, 0.633) .. controls (0.6000, 0.6836) and (0.5130, 0.3048) .. (0.2098, 0.3322) .. controls (0.0809, 0.3438) and (0.0809, 0.5236) .. (0.0809, 0.5236);
- \else
- \draw[\pig@body,line width=\scalingfactor*0.8pt] (0.8431, 0.583) .. controls (0.8609, 0.4063) and (0.7006, 0.361) .. (0.6384, 0.4293) .. controls (0.5762, 0.4976) and (0.5613, 0.6052) .. (0.6551, 0.629) .. controls (0.7537, 0.6541) and (0.7759, 0.5628) .. (0.7455, 0.4948) .. controls (0.6412, 0.2697) and (0.3543, 0.356) .. (0.2638, 0.4238) .. controls (0.1967, 0.4779) and (0.1788, 0.6076) .. (0.3192, 0.633) .. controls (0.6000, 0.6836) and (0.5130, 0.3048) .. (0.2098, 0.3322) .. controls (0.0809, 0.3438) and (0.0809, 0.5236) .. (0.0809, 0.5236);
- \fi
-\fi
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpig@back
- \pig@part@draw[\pig@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
- \pig@part@draw[\pig@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
-\fi%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pig@part@draw[\pig@body!55!white] ( 0.6, 0.8 ) .. controls ( 0.6 , 0.4) and ( 0.35, 0.16) .. ( 0.0, 0.16) .. controls (-0.35, 0.16) and (-0.6 , 0.4) .. (-0.6, 0.8 ) .. controls (-0.6 , 1.3) and (-0.35, 1.5) .. ( 0.0, 1.5) .. controls ( 0.35, 1.5) and ( 0.6 , 1.3) .. ( 0.6, 0.75) -- cycle;
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname pighookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpig@back
- \pig@part@draw[\pig@body] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
- \pig@part@draw[\pig@body] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
-\fi
-%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pig@part@draw[\pig@body!55!white] (0,1.64) ellipse[x radius=.5, y radius=.5];
-%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifpig@back
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pig@part@draw[\pig@eye] (-0.09, 1.82) circle[radius=0.02];
-\pig@part@draw[\pig@eye] ( 0.09, 1.82) circle[radius=0.02];
-%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pig@part@draw[\pig@body] (0, 1.62) ellipse[x radius=0.18, y radius=0.14];
-\pig@part@draw[gray] (-0.06, 1.62) circle[radius=0.035];
-\pig@part@draw[gray] ( 0.06, 1.62) circle[radius=0.035];
-%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpig@threeD
- \draw[gray!70!black,line width=\scalingfactor*0.4pt] (0.105, 1.46) arc [start angle=-50, end angle=-130, radius=0.16] ;
-\else
- \ifpig@contour
- \draw[\pig@contour,line width=\scalingfactor*0.4pt] (0.105, 1.46) arc [start angle=-50, end angle=-130, radius=0.16] ;
- \else
- \draw[gray,line width=\scalingfactor*0.4pt] (0.105, 1.46) arc [start angle=-50, end angle=-130, radius=0.16] ;
- \fi
-\fi
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pig@part@draw[\pig@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
-\pig@part@draw[\pig@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
-%
-\fi
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pig@part@draw[\pig@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
-\pig@part@draw[\pig@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
-\pig@part@draw[\pig@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
-\pig@part@draw[\pig@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
-%
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifpig@back
- \ifpig@contour
- \draw[\pig@contour,line width=\scalingfactor*0.8pt] (0.8431, 0.583) .. controls (0.8609, 0.4063) and (0.7006, 0.361) .. (0.6384, 0.4293) .. controls (0.5762, 0.4976) and (0.5613, 0.6052) .. (0.6551, 0.629) .. controls (0.7537, 0.6541) and (0.7759, 0.5628) .. (0.7455, 0.4948) .. controls (0.6412, 0.2697) and (0.3543, 0.356) .. (0.2638, 0.4238) .. controls (0.1967, 0.4779) and (0.1788, 0.6076) .. (0.3192, 0.633) .. controls (0.6000, 0.6836) and (0.5130, 0.3048) .. (0.2098, 0.3322) .. controls (0.0809, 0.3438) and (0.0809, 0.5236) .. (0.0809, 0.5236);
- \else
- \draw[\pig@body,line width=\scalingfactor*0.8pt] (0.8431, 0.583) .. controls (0.8609, 0.4063) and (0.7006, 0.361) .. (0.6384, 0.4293) .. controls (0.5762, 0.4976) and (0.5613, 0.6052) .. (0.6551, 0.629) .. controls (0.7537, 0.6541) and (0.7759, 0.5628) .. (0.7455, 0.4948) .. controls (0.6412, 0.2697) and (0.3543, 0.356) .. (0.2638, 0.4238) .. controls (0.1967, 0.4779) and (0.1788, 0.6076) .. (0.3192, 0.633) .. controls (0.6000, 0.6836) and (0.5130, 0.3048) .. (0.2098, 0.3322) .. controls (0.0809, 0.3438) and (0.0809, 0.5236) .. (0.0809, 0.5236);
- \fi
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname pighookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%\clearpage
+%\section[Pig]{Ms Piggy, the pig}
+%
+%\emph{Added on February 5th, 2019 to commemorate the Chinese year of the pig}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-pigs}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\pig
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic pig can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\pig[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\pig[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\pig[tail=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\pig[mouth=red]
+%\end{tcblisting}
+%
+%To view the pig from behind:
+%\begin{tcblisting}{}
+%\pig[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the pig 3-dimensional:
+%\begin{tcblisting}{}
+%\pig[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\pig[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty b/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
index c804c424bc..53eaf36bfc 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/rhino.tex
+ % !TeX root = ./examples/rhino.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-rhinos}[2021/04/16 version v0.6 Drawing rhinos in TikZ]
+\ProvidesPackage{tikzlings-rhinos}[2021/08/06 version v0.8 Drawing rhinos in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -53,148 +53,207 @@
eye/.code = \def\rhino@eye{#1},
eye = white,
pupil/.code = \def\rhino@pupil{#1},
- pupil = black,
+ pupil = black,
+ mouth/.code = \def\rhino@mouth{#1},
+ mouth = \rhino@body!70!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \rhino@threeDtrue,
+ 3D/.code = \rhino@threeDtrue
+ \def\rhino@mouth{black},
back/.code = \rhino@backtrue,
contour/.code = \rhino@contourtrue
- \def\rhino@contour{#1},
+ \def\rhino@contour{#1}
+ \def\rhino@mouth{#1},
contour/.default = black,
outline/.forward to = /rhino/contour,
}
\def\rhino@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.625,0.1) rectangle (0.625, 2.17);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifrhino@threeD
+ \def\rhino@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifrhino@contour
+ \def\rhino@part@draw[##1]{\draw[##1,\rhino@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\rhino@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname rhinohookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \rhino@part@draw[\rhino@body] (-0.1772, 2.0686) .. controls (-0.2057, 2.1602) and (-0.3552, 2.2076) .. (-0.3552, 2.1922) .. controls (-0.3552, 2.1922) and (-0.3694, 1.9615) .. (-0.2855, 1.9615) .. controls (-0.2264, 1.9462) and (-0.1772, 1.9462) .. (-0.1772, 2.0686) -- cycle;
+ \rhino@part@draw[\rhino@body] (0.1772, 2.0686) .. controls (0.2057, 2.1602) and (0.3552, 2.2076) .. (0.3552, 2.1922) .. controls (0.3552, 2.1922) and (0.3694, 1.9615) .. (0.2855, 1.9615) .. controls (0.2264, 1.9462) and (0.1772, 1.9462) .. (0.1772, 2.0686) -- cycle;
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifrhino@back
+ \begin{scope}
+ \clip (-0.5,0.4) rectangle (0.5,0.13);
+ \rhino@part@draw[\rhino@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
+ \rhino@part@draw[\rhino@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
+ \end{scope}
+ \fi% back
+ %
+ % Nose if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifrhino@back
+ \rhino@part@draw[\rhino@body!80!white] (0, 1.55) ellipse[x radius=0.36, y radius=0.2];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \rhino@part@draw[\rhino@body!55!white] ( 0.55, 0.8 ) .. controls ( 0.55 , 0.4) and ( 0.35, 0.19) .. ( 0.0, 0.19) .. controls (-0.35, 0.19) and (-0.55 , 0.4) .. (-0.55, 0.8 ) .. controls (-0.55 , 1.3) and (-0.35, 1.65) .. ( 0.0, 1.65) .. controls ( 0.35, 1.65) and ( 0.55 , 1.3) .. ( 0.55, 0.75) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname rhinohookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifrhino@back
+ \rhino@part@draw[\rhino@body] (0.3,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=90];
+ \rhino@part@draw[\rhino@body] (-0.3,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=-90];
+ \fi% back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \rhino@part@draw[\rhino@body!55!white] (0, 1.76) circle[radius=0.36];
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifrhino@back
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifrhino@contour
+ \rhino@part@draw[\rhino@eye] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+ \rhino@part@draw[\rhino@eye] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+ \rhino@part@draw[\rhino@pupil] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+ \rhino@part@draw[\rhino@pupil] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+ \else% contour
+ \fill[\rhino@eye] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+ \fill[\rhino@eye] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+ \fill[\rhino@pupil] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+ \fill[\rhino@pupil] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+ \fi% contour
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \rhino@part@draw[\rhino@body!80!white] (0, 1.55) ellipse[x radius=0.36, y radius=0.2];
+ %
+ % Horn %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \rhino@part@draw[white!95!yellow] (0, 1.7911) .. controls (-0.0231, 1.7372) and (-0.0463, 1.6832) .. (-0.0642, 1.6274) .. controls (-0.0687, 1.6132) and (-0.0724, 1.5981) .. (-0.0678, 1.5834) .. controls (-0.0603, 1.552) and (-0.0287, 1.5287) .. (0, 1.531) .. controls (0.0287, 1.5287) and (0.0603, 1.552) .. (0.0678, 1.5834) .. controls (0.0724, 1.5981) and (0.0687, 1.6132) .. (0.0642, 1.6274) .. controls (0.0463, 1.6832) and (0.0231, 1.7372) .. (0, 1.7911) -- cycle;
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\rhino@mouth,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \begin{scope}
+ \clip (-0.5,0.4) rectangle (0.5,0.13);
+ \rhino@part@draw[\rhino@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
+ \rhino@part@draw[\rhino@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
+ \rhino@part@draw[\rhino@toes] (0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
+ \rhino@part@draw[\rhino@toes] (0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
+ \rhino@part@draw[\rhino@toes] (0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
+ \rhino@part@draw[\rhino@toes] (-0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
+ \rhino@part@draw[\rhino@toes] (-0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
+ \rhino@part@draw[\rhino@toes] (-0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
+ \end{scope}
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname rhinohookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.625,0.1) rectangle (0.625, 2.17);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifrhino@threeD
- \def\rhino@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifrhino@contour
- \def\rhino@part@draw[##1]{\draw[##1,\rhino@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\rhino@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Rhino]{D\"urer, the rhino}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname rhinohookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\rhino@part@draw[\rhino@body] (-0.1772, 2.0686) .. controls (-0.2057, 2.1602) and (-0.3552, 2.2076) .. (-0.3552, 2.1922) .. controls (-0.3552, 2.1922) and (-0.3694, 1.9615) .. (-0.2855, 1.9615) .. controls (-0.2264, 1.9462) and (-0.1772, 1.9462) .. (-0.1772, 2.0686) -- cycle;
-\rhino@part@draw[\rhino@body] (0.1772, 2.0686) .. controls (0.2057, 2.1602) and (0.3552, 2.2076) .. (0.3552, 2.1922) .. controls (0.3552, 2.1922) and (0.3694, 1.9615) .. (0.2855, 1.9615) .. controls (0.2264, 1.9462) and (0.1772, 1.9462) .. (0.1772, 2.0686) -- cycle;
-%
-% Feet if back%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifrhino@back
- \begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \rhino@part@draw[\rhino@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \rhino@part@draw[\rhino@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \end{scope}
-\fi
+%\emph{Named after Albrecht D\"urer who painted an amazing rhino merely based on stories}
%
-% Nose if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifrhino@back
- \rhino@part@draw[\rhino@body!80!white] (0, 1.55) ellipse[x radius=0.36, y radius=0.2];
-\fi
+%\subsection{Package name}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\rhino@part@draw[\rhino@body!55!white] ( 0.55, 0.8 ) .. controls ( 0.55 , 0.4) and ( 0.35, 0.19) .. ( 0.0, 0.19) .. controls (-0.35, 0.19) and (-0.55 , 0.4) .. (-0.55, 0.8 ) .. controls (-0.55 , 1.3) and (-0.35, 1.65) .. ( 0.0, 1.65) .. controls ( 0.35, 1.65) and ( 0.55 , 1.3) .. ( 0.55, 0.75) -- cycle;
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-rhinos}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname rhinohookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%\subsection{Basic Usage}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifrhino@back
- \rhino@part@draw[\rhino@body] (0.3,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=90];
- \rhino@part@draw[\rhino@body] (-0.3,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=-90];
-\fi
+%\begin{tcblisting}{}
+%\rhino
+%\end{tcblisting}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\rhino@part@draw[\rhino@body!55!white] (0, 1.76) circle[radius=0.36];
+%\subsection{Options}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifrhino@back
+%The basic rhino can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\rhino[body=blue]
+%\end{tcblisting}
%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifrhino@contour
- \rhino@part@draw[\rhino@eye] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
- \rhino@part@draw[\rhino@eye] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
- \rhino@part@draw[\rhino@pupil] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
- \rhino@part@draw[\rhino@pupil] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
-\else
- \fill[\rhino@eye] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
- \fill[\rhino@eye] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
- \fill[\rhino@pupil] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
- \fill[\rhino@pupil] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
-\fi
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\rhino[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\rhino[pupil=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\rhino[mouth=red]
+%\end{tcblisting}
%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\rhino@part@draw[\rhino@body!80!white] (0, 1.55) ellipse[x radius=0.36, y radius=0.2];
+%The hippo can also do its nails:
+%\begin{tcblisting}{}
+%\rhino[toes=red]
+%\end{tcblisting}
%
-% Horn %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\rhino@part@draw[white!95!yellow] (0, 1.7911) .. controls (-0.0231, 1.7372) and (-0.0463, 1.6832) .. (-0.0642, 1.6274) .. controls (-0.0687, 1.6132) and (-0.0724, 1.5981) .. (-0.0678, 1.5834) .. controls (-0.0603, 1.552) and (-0.0287, 1.5287) .. (0, 1.531) .. controls (0.0287, 1.5287) and (0.0603, 1.552) .. (0.0678, 1.5834) .. controls (0.0724, 1.5981) and (0.0687, 1.6132) .. (0.0642, 1.6274) .. controls (0.0463, 1.6832) and (0.0231, 1.7372) .. (0, 1.7911) -- cycle;
+%To view the rhino from behind:
+%\begin{tcblisting}{}
+%\rhino[back]
+%\end{tcblisting}
%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifrhino@threeD
- \draw[black,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
-\else
- \ifrhino@contour
- \draw[\rhino@contour,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
- \else
- \draw[\rhino@body!70!black,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
- \fi
-\fi
+%The key \lstinline|3D| will make the rhino 3-dimensional:
+%\begin{tcblisting}{}
+%\rhino[3D]
+%\end{tcblisting}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \rhino@part@draw[\rhino@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \rhino@part@draw[\rhino@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \rhino@part@draw[\rhino@toes] (0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (-0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (-0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (-0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
-\end{scope}
-%
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname rhinohookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\rhino[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty b/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
index 9ef0135463..14a02e4356 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/sheep.tex
+ % !TeX root = ./examples/sheep.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-sheep}[2021/04/16 version v0.6 Drawing sheep in TikZ]
+\ProvidesPackage{tikzlings-sheep}[2021/08/06 version v0.8 Drawing sheep in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -55,157 +55,213 @@
body = brown!50!darkgray!97!yellow,
eye/.code = \def\sheep@eye{#1},
eye = \sheep@body!50!black,
+ nose/.code = \def\sheep@nose{#1},
+ nose = \sheep@body!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- blush/.code = \sheep@blushtrue,
+ blush/.code = \sheep@blushtrue
+ \def\sheep@blushcolor{#1},
+ blush/.default = red,
monocle/.code = \sheep@monocletrue,
3D/.code = \sheep@threeDtrue,
back/.code = \sheep@backtrue,
contour/.code = \sheep@contourtrue
- \def\sheep@contour{#1},
+ \def\sheep@contour{#1}
+ \def\sheep@blushcolor{#1}
+ \def\sheep@nose{#1},
contour/.default = black,
outline/.forward to = /sheep/contour,
}
\def\sheep@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.7,0.08) rectangle (0.7,2.33);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@threeD
+ \def\sheep@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifsheep@contour
+ \def\sheep@part@draw[##1]{\draw[##1,\sheep@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\sheep@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname sheephookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@back
+ \sheep@part@draw[\sheep@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
+ \sheep@part@draw[\sheep@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname sheephookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsheep@back
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
+ \fi% back
+ %
+ % Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@back
+ \sheep@part@draw[\sheep@body!45!white!95!orange,rounded corners=\scalingfactor*0.1pt] (0,0.7) -- (0.08, 0.3236) arc (0:-180:\scalingfactor*2pt) -- cycle;
+ \fi% back
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsheep@back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (0.4, 1.8) .. controls (0.4, 1.5) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.4, 1.5) .. (-0.4, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.4, 1.8) -- cycle;
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsheep@back
+ \sheep@part@draw[\sheep@eye] (0.2, 1.66) circle[radius=0.06];
+ \sheep@part@draw[\sheep@eye] (-0.2, 1.66) circle[radius=0.06];
+ \fi% back
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\sheep@nose,line width=\scalingfactor*0.8pt,line cap=round] (0.16,1.43) arc [start angle=-30, end angle=-150, radius=0.185] (0.0,1.335) -- (0,1.175);
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (0.3216,0.13) arc (-15:195:0.10) -- (0.16,0.13) to [bend left] (0.25,0.13) -- cycle;
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (-0.3216,0.13) arc (195:-15:0.10) -- (-0.16,0.13) to[bend right] (-0.25,0.13) --cycle;
+ %
+ % Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+ %
+ % Blush %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@blush
+ \fill[\sheep@blushcolor,path fading=sheep@blush] (-0.25, 1.5) circle[radius=0.1];
+ \fill[\sheep@blushcolor,path fading=sheep@blush] (0.25, 1.5) circle[radius=0.1];
+ \fi% blush
+ %
+ % monocle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@monocle
+ \draw[black,line width=\scalingfactor*0.4pt] (0.2, 1.66) circle[radius=0.09];
+ \draw[black,line width=\scalingfactor*0.4pt,rounded corners=\scalingfactor*0.01pt] (0.26,1.6) .. controls (0.3,1.54) .. (0.3,1.5) .. controls (0.28,1.45) .. (0.35,1.4);
+ \fi% monocle
+ %
+ \fi% end showing details only for front
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname sheephookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.7,0.08) rectangle (0.7,2.33);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@threeD
- \def\sheep@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifsheep@contour
- \def\sheep@part@draw[##1]{\draw[##1,\sheep@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\sheep@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Sheep]{Mókollur, the sheep}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname sheephookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@back
- \sheep@part@draw[\sheep@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
- \sheep@part@draw[\sheep@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
-%
+%\emph{The sheep was kindly contributed by @Plergux. Mókollur is a bit silly and likes to goof off. This sheep's favourite food are boiled potatoes.}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname sheephookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%\subsection{Package name}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsheep@back
- \sheep@part@draw[\sheep@body!45!white!95!orange] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-sheep}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+%\subsection{Basic Usage}
%
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@back
- \sheep@part@draw[\sheep@body!45!white!95!orange,rounded corners=\scalingfactor*0.1pt] (0,0.7) -- (0.08, 0.3236) arc (0:-180:\scalingfactor*2pt) -- cycle;
-\fi
+%\begin{tcblisting}{}
+%\sheep
+%\end{tcblisting}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsheep@back
+%\subsection{Options}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@back
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.4, 1.8) .. controls (0.4, 1.5) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.4, 1.5) .. (-0.4, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.4, 1.8) -- cycle;
-\else
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.4, 1.8) .. controls (0.4, 1.5) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.4, 1.5) .. (-0.4, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.4, 1.8) -- cycle;
-\fi
+%The basic sheep can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\sheep[body=blue]
+%\end{tcblisting}
%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsheep@back
- \sheep@part@draw[\sheep@eye] (0.2, 1.66) circle[radius=0.06];
- \sheep@part@draw[\sheep@eye] (-0.2, 1.66) circle[radius=0.06];
-\fi
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\sheep[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\sheep[nose=red]
+%\end{tcblisting}
%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@contour
- \draw[\sheep@contour,line width=\scalingfactor*0.8pt,line cap=round] (0.16,1.43) arc [start angle=-30, end angle=-150, radius=0.185] (0.0,1.335) -- (0,1.175);
-\else
- \draw[\sheep@body!50!black,line width=\scalingfactor*0.8pt,line cap=round] (0.16,1.43) arc [start angle=-30, end angle=-150, radius=0.185] (0.0,1.335) -- (0,1.175);
-\fi
+%The sheep can also blush
+%\begin{tcblisting}{}
+%\sheep[blush=red]
+%\end{tcblisting}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body!45!white!95!orange] (0.3216,0.13) arc (-15:195:0.10) -- (0.16,0.13) to [bend left] (0.25,0.13) -- cycle;
-\sheep@part@draw[\sheep@body!45!white!95!orange] (-0.3216,0.13) arc (195:-15:0.10) -- (-0.16,0.13) to[bend right] (-0.25,0.13) --cycle;
+%and put on a monocle
+%\begin{tcblisting}{}
+%\sheep[monocle]
+%\end{tcblisting}
%
-% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+%To view the sheep from behind:
+%\begin{tcblisting}{}
+%\sheep[back]
+%\end{tcblisting}
%
-% Blush %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@blush
- \ifsheep@contour
- \fill[\sheep@contour,path fading=sheep@blush] (-0.25, 1.5) circle[radius=0.1];
- \fill[\sheep@contour,path fading=sheep@blush] (0.25, 1.5) circle[radius=0.1];
- \else
- \fill[red,path fading=sheep@blush] (-0.25, 1.5) circle[radius=0.1];
- \fill[red,path fading=sheep@blush] (0.25, 1.5) circle[radius=0.1];
- \fi
-\fi
+%The key \lstinline|3D| will make the sheep 3-dimensional:
+%\begin{tcblisting}{}
+%\sheep[3D]
+%\end{tcblisting}
%
-% monocle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@monocle
- \draw[black,line width=\scalingfactor*0.4pt] (0.2, 1.66) circle[radius=0.09];
- \draw[black,line width=\scalingfactor*0.4pt,rounded corners=\scalingfactor*0.01pt] (0.26,1.6) .. controls (0.3,1.54) .. (0.3,1.5) .. controls (0.28,1.45) .. (0.35,1.4);
-\fi
-%
-\fi % end showing details only for front
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname sheephookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\sheep[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty b/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
index 8543155b7b..f42a95aba2 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/sloth.tex
+ % !TeX root = ./examples/sloth.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-sloths}[2021/04/16 version v0.6 Drawing sloths in TikZ]
+\ProvidesPackage{tikzlings-sloths}[2021/08/06 version v0.8 Drawing sloths in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -53,6 +53,10 @@
body = slothcol,
eye/.code = \def\sloth@eye{#1},
eye = black,
+ eyelid/.code = \def\sloth@eyelid{#1},
+ eyelid = \sloth@body!50!white,
+ mouth/.code = \def\sloth@mouth{#1},
+ mouth = \sloth@body!40!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -62,206 +66,251 @@
3D/.code = \sloth@threeDtrue,
back/.code = \sloth@backtrue,
contour/.code = \sloth@contourtrue
- \def\sloth@contour{#1},
+ \def\sloth@contour{#1}
+ \def\sloth@mouth{#1}
+ \def\sloth@eyelid{#1},
contour/.default = black,
outline/.forward to = /sloth/contour,
}
\def\sloth@draw{%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.7,0.12) rectangle (0.7, 2.27);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsloth@threeD
- \def\sloth@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifsloth@contour
- \def\sloth@part@draw[##1]{\draw[##1,\sloth@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\sloth@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname slothhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Arms if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsloth@back
- \sloth@part@draw[\sloth@body] (0.53,0.95) ellipse[x radius=0.1, y radius=0.27, rotate=10];
- \sloth@part@draw[\sloth@body] (-0.53,0.95) ellipse[x radius=0.1, y radius=0.27, rotate=-10];
-\fi
-%
-% Feet if back%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsloth@back
- \fill[\sloth@body!50!black] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019,rotate=-10];
- \fill[\sloth@body!50!black] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
- \fill[\sloth@body!50!black] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
- \fill[\sloth@body!50!black] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
- \fill[\sloth@body!50!black] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
- \fill[\sloth@body!50!black] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
- \sloth@part@draw[\sloth@body] (0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=25];
- \sloth@part@draw[\sloth@body] (-0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=-25];
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sloth@part@draw[\sloth@body!85!black] (0.53,0.85) .. controls (0.53,0.29) and (0.32,0.22) .. (0,0.22) .. controls (-0.32,0.22) and (-0.53,0.29) ..
-(-0.53,0.85) .. controls (-0.53,1.41) and (-0.32,1.87) .. (0,1.87) .. controls (0.33,1.87) and (0.53,1.41) .. (0.53,0.85) -- cycle;
-%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsloth@back
- \sloth@part@draw[\sloth@body!70!white] (0.36, 0.74) .. controls (0.36, 0.49) and (0.22, 0.41) .. (0, 0.41) .. controls (-0.22, 0.41) and (-0.36, 0.49) .. (-0.36, 0.74) .. controls (-0.36, 1) and (-0.22, 1.16) .. (0, 1.16) .. controls (0.22, 1.16) and (0.36, 1) .. (0.36, 0.74) -- cycle;
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname slothhookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sloth@part@draw[\sloth@body] (-0.1128,2.0724) .. controls (-0.1128,2.0724) and (-0.1499,2.2329) .. (-0.0972,2.2525) .. controls (-0.1082,2.1318) and (-0.0047,2.0839) .. (-0.0047,2.0839) .. controls (-0.0047,2.0839) and (-0.0219,2.1866) .. (0.0145,2.1933) .. controls (0.0142,2.1159) and (0.0770,2.0884) .. (0.0770,2.0884) -- cycle;
-%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sloth@part@draw[\sloth@body]
-( 0.50,1.67) .. controls ( 0.50,1.91) and ( 0.27,2.10) ..
-( 0.00,2.10) .. controls (-0.27,2.10) and (-0.50,1.91) .. (-0.50,1.67) .. controls (-0.50,1.43) and (-0.33,1.28) ..
-( 0.00,1.28) .. controls ( 0.33,1.28) and ( 0.50,1.43) ..
-( 0.50,1.67) -- cycle;
-%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsloth@back
-%
-\sloth@part@draw[\sloth@body!50!white] ( 0.40,1.67) .. controls ( 0.40,1.90) and ( 0.12,2.09) .. ( 0.00,1.93) .. controls (-0.12,2.09) and (-0.40,1.90) .. (-0.40,1.67) .. controls (-0.40,1.45) and (-0.25,1.38) .. ( 0.00,1.38) .. controls ( 0.25,1.38) and ( 0.40,1.45) .. ( 0.40,1.67) -- cycle;
-%
-% behind the eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsloth@contour
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.3785,1.5336) .. controls (0.3012,1.5864) and (0.1829,1.6693) .. (0.1377,1.7234) .. controls (0.1184,1.7464) and (0.1624,1.8242) .. (0.1906,1.8137) .. controls (0.2673,1.7851) and (0.3597,1.7125) .. (0.3994,1.6531) .. controls (0.4129,1.6328) and (0.3785,1.5336) .. (0.3785,1.5336) -- cycle;
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.3785,1.5336) .. controls (-0.3012,1.5864) and (-0.1829,1.6693) .. (-0.1377,1.7234) .. controls (-0.1184,1.7464) and (-0.1624,1.8242) .. (-0.1906,1.8137) .. controls (-0.2673,1.7851) and (-0.3597,1.7125) .. (-0.3994,1.6531) .. controls (-0.4129,1.6328) and (-0.3785,1.5336) .. (-0.3785,1.5336) -- cycle;
-\else
- \fill[\sloth@body!60!black] (0.3785,1.5336) .. controls (0.3012,1.5864) and (0.1829,1.6693) .. (0.1377,1.7234) .. controls (0.1184,1.7464) and (0.1624,1.8242) .. (0.1906,1.8137) .. controls (0.2673,1.7851) and (0.3597,1.7125) .. (0.3994,1.6531) .. controls (0.4129,1.6328) and (0.3785,1.5336) .. (0.3785,1.5336) -- cycle;
- \fill[\sloth@body!60!black] (-0.3785,1.5336) .. controls (-0.3012,1.5864) and (-0.1829,1.6693) .. (-0.1377,1.7234) .. controls (-0.1184,1.7464) and (-0.1624,1.8242) .. (-0.1906,1.8137) .. controls (-0.2673,1.7851) and (-0.3597,1.7125) .. (-0.3994,1.6531) .. controls (-0.4129,1.6328) and (-0.3785,1.5336) .. (-0.3785,1.5336) -- cycle;
-\fi
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsloth@sleeping
- \ifsloth@contour
- \fill[\sloth@contour] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@contour,rotate around={22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@contour,rotate around={44:(0.195, 1.76)}] (0.195, 1.701) rectangle ++(0.005, 0.02);
- \fill[\sloth@contour,rotate around={-22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@contour,rotate around={-44:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.7,0.12) rectangle (0.7, 2.27);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsloth@threeD
+ \def\sloth@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifsloth@contour
+ \def\sloth@part@draw[##1]{\draw[##1,\sloth@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\sloth@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname slothhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Arms if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsloth@back
+ \sloth@part@draw[\sloth@body] (0.53,0.95) ellipse[x radius=0.1, y radius=0.27, rotate=10];
+ \sloth@part@draw[\sloth@body] (-0.53,0.95) ellipse[x radius=0.1, y radius=0.27, rotate=-10];
+ \fi% back
+ %
+ % Feet if back%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsloth@back
+ \fill[\sloth@body!50!black] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019,rotate=-10];
+ \fill[\sloth@body!50!black] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
+ \fill[\sloth@body!50!black] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
+ \fill[\sloth@body!50!black] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
+ \fill[\sloth@body!50!black] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
+ \fill[\sloth@body!50!black] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
+ \sloth@part@draw[\sloth@body] (0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=25];
+ \sloth@part@draw[\sloth@body] (-0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=-25];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sloth@part@draw[\sloth@body!85!black] (0.53,0.85) .. controls (0.53,0.29) and (0.32,0.22) .. (0,0.22) .. controls (-0.32,0.22) and (-0.53,0.29) ..
+ (-0.53,0.85) .. controls (-0.53,1.41) and (-0.32,1.87) .. (0,1.87) .. controls (0.33,1.87) and (0.53,1.41) .. (0.53,0.85) -- cycle;
+ %
+ % Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsloth@back
+ \sloth@part@draw[\sloth@body!70!white] (0.36, 0.74) .. controls (0.36, 0.49) and (0.22, 0.41) .. (0, 0.41) .. controls (-0.22, 0.41) and (-0.36, 0.49) .. (-0.36, 0.74) .. controls (-0.36, 1) and (-0.22, 1.16) .. (0, 1.16) .. controls (0.22, 1.16) and (0.36, 1) .. (0.36, 0.74) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname slothhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sloth@part@draw[\sloth@body] (-0.1128,2.0724) .. controls (-0.1128,2.0724) and (-0.1499,2.2329) .. (-0.0972,2.2525) .. controls (-0.1082,2.1318) and (-0.0047,2.0839) .. (-0.0047,2.0839) .. controls (-0.0047,2.0839) and (-0.0219,2.1866) .. (0.0145,2.1933) .. controls (0.0142,2.1159) and (0.0770,2.0884) .. (0.0770,2.0884) -- cycle;
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sloth@part@draw[\sloth@body]
+ ( 0.50,1.67) .. controls ( 0.50,1.91) and ( 0.27,2.10) ..
+ ( 0.00,2.10) .. controls (-0.27,2.10) and (-0.50,1.91) .. (-0.50,1.67) .. controls (-0.50,1.43) and (-0.33,1.28) ..
+ ( 0.00,1.28) .. controls ( 0.33,1.28) and ( 0.50,1.43) ..
+ ( 0.50,1.67) -- cycle;
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsloth@back
%
- \fill[\sloth@contour] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@contour,rotate around={22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@contour,rotate around={44:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@contour,rotate around={-22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@contour,rotate around={-44:(-0.195, 1.76)}] (-0.195, 1.701) rectangle ++(0.005, 0.02);
+ % Inner part of hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sloth@part@draw[\sloth@body!50!white] ( 0.40,1.67) .. controls ( 0.40,1.90) and ( 0.12,2.09) .. ( 0.00,1.93) .. controls (-0.12,2.09) and (-0.40,1.90) .. (-0.40,1.67) .. controls (-0.40,1.45) and (-0.25,1.38) .. ( 0.00,1.38) .. controls ( 0.25,1.38) and ( 0.40,1.45) .. ( 0.40,1.67) -- cycle;
%
- \draw[\sloth@contour, fill=white,line width=\scalingfactor*0.4pt] (0.237, 1.743) .. controls (0.237, 1.712) and (0.157, 1.712) .. (0.157, 1.743) .. controls (0.157, 1.802) and (0.237, 1.802) .. (0.237, 1.743) -- cycle;
- \draw[\sloth@contour, fill=white,line width=\scalingfactor*0.4pt] (-0.237, 1.743) .. controls (-0.237, 1.712) and (-0.157, 1.712) .. (-0.157, 1.743) .. controls (-0.157, 1.802) and (-0.237, 1.802) .. (-0.237, 1.743) -- cycle;
- \else
- \fill[\sloth@body!50!white] (0.237, 1.743) .. controls (0.237, 1.712) and (0.157, 1.712) .. (0.157, 1.743) .. controls (0.157, 1.802) and (0.237, 1.802) .. (0.237, 1.743) -- cycle;
- \fill[\sloth@body!50!white] (-0.237, 1.743) .. controls (-0.237, 1.712) and (-0.157, 1.712) .. (-0.157, 1.743) .. controls (-0.157, 1.802) and (-0.237, 1.802) .. (-0.237, 1.743) -- cycle;
+ % behind the eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsloth@contour
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.3785,1.5336) .. controls (0.3012,1.5864) and (0.1829,1.6693) .. (0.1377,1.7234) .. controls (0.1184,1.7464) and (0.1624,1.8242) .. (0.1906,1.8137) .. controls (0.2673,1.7851) and (0.3597,1.7125) .. (0.3994,1.6531) .. controls (0.4129,1.6328) and (0.3785,1.5336) .. (0.3785,1.5336) -- cycle;
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.3785,1.5336) .. controls (-0.3012,1.5864) and (-0.1829,1.6693) .. (-0.1377,1.7234) .. controls (-0.1184,1.7464) and (-0.1624,1.8242) .. (-0.1906,1.8137) .. controls (-0.2673,1.7851) and (-0.3597,1.7125) .. (-0.3994,1.6531) .. controls (-0.4129,1.6328) and (-0.3785,1.5336) .. (-0.3785,1.5336) -- cycle;
+ \else% contour
+ \fill[\sloth@body!60!black] (0.3785,1.5336) .. controls (0.3012,1.5864) and (0.1829,1.6693) .. (0.1377,1.7234) .. controls (0.1184,1.7464) and (0.1624,1.8242) .. (0.1906,1.8137) .. controls (0.2673,1.7851) and (0.3597,1.7125) .. (0.3994,1.6531) .. controls (0.4129,1.6328) and (0.3785,1.5336) .. (0.3785,1.5336) -- cycle;
+ \fill[\sloth@body!60!black] (-0.3785,1.5336) .. controls (-0.3012,1.5864) and (-0.1829,1.6693) .. (-0.1377,1.7234) .. controls (-0.1184,1.7464) and (-0.1624,1.8242) .. (-0.1906,1.8137) .. controls (-0.2673,1.7851) and (-0.3597,1.7125) .. (-0.3994,1.6531) .. controls (-0.4129,1.6328) and (-0.3785,1.5336) .. (-0.3785,1.5336) -- cycle;
+ \fi% contour
%
- \fill[\sloth@body!50!white] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@body!50!white,rotate around={22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@body!50!white,rotate around={44:(0.195, 1.76)}] (0.195, 1.701) rectangle ++(0.005, 0.02);
- \fill[\sloth@body!50!white,rotate around={-22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@body!50!white,rotate around={-44:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsloth@sleeping
+ \fill[\sloth@eyelid] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={44:(0.195, 1.76)}] (0.195, 1.701) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={-22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={-44:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ %
+ \fill[\sloth@eyelid] (-0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={44:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={-22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={-44:(-0.195, 1.76)}] (-0.195, 1.701) rectangle ++(0.005, 0.02);
+ %
+ \sloth@part@draw[\sloth@eyelid] (0.237, 1.743) .. controls (0.237, 1.712) and (0.157, 1.712) .. (0.157, 1.743) .. controls (0.157, 1.802) and (0.237, 1.802) .. (0.237, 1.743) -- cycle;
+ \sloth@part@draw[\sloth@eyelid] (-0.237, 1.743) .. controls (-0.237, 1.712) and (-0.157, 1.712) .. (-0.157, 1.743) .. controls (-0.157, 1.802) and (-0.237, 1.802) .. (-0.237, 1.743) -- cycle;
+ \else% sleeping
+ \sloth@part@draw[\sloth@eye] (0.193,1.75) circle[radius=0.04];
+ \sloth@part@draw[\sloth@eye] (-0.193,1.75) circle[radius=0.04];
+ \fill[white] (-0.2 ,1.765) circle[radius=0.006];
+ \fill[white] ( 0.186,1.765) circle[radius=0.006];
+ \fi% sleeping
%
- \fill[\sloth@body!50!white] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@body!50!white,rotate around={22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@body!50!white,rotate around={44:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@body!50!white,rotate around={-22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@body!50!white,rotate around={-44:(-0.195, 1.76)}] (-0.195, 1.701) rectangle ++(0.005, 0.02);
- \fi
-\else
- \sloth@part@draw[\sloth@eye] (0.193,1.75) circle[radius=0.04];
- \sloth@part@draw[\sloth@eye] (-0.193,1.75) circle[radius=0.04];
- \fill[white] (-0.2 ,1.765) circle[radius=0.006];
- \fill[white] ( 0.186,1.765) circle[radius=0.006];
-\fi
-%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sloth@part@draw[\sloth@body!40!black] (0,1.665) ellipse[x radius=0.078, y radius=0.048];
-%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsloth@contour
- \draw[\sloth@contour,line width=\scalingfactor*0.4pt] (0.115, 1.55) arc [start angle=-40, end angle=-140, radius=0.16];
-\else
- \draw[\sloth@body!40!black,line width=\scalingfactor*0.4pt] (0.115, 1.55) arc [start angle=-40, end angle=-140, radius=0.16];
-\fi
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sloth@part@draw[\sloth@body] (-0.50, 1.24) .. controls (-0.54, 1.24) and (-0.55, 1.20) .. (-0.56, 1.17) .. controls (-0.61, 1.06) and (-0.63, 0.95) .. (-0.64, 0.83) .. controls (-0.64, 0.80) and (-0.64, 0.77) .. (-0.63, 0.74) .. controls (-0.57, 0.66) and (-0.47, 0.60) .. (-0.38, 0.56) .. controls (-0.31, 0.54) and (-0.23, 0.52) .. (-0.16, 0.54) .. controls (-0.12, 0.54) and (-0.10, 0.59) .. (-0.13, 0.61) .. controls (-0.17, 0.68) and (-0.24, 0.73) .. (-0.30, 0.77) .. controls (-0.34, 0.79) and (-0.38, 0.81) .. (-0.42, 0.83) .. controls (-0.41, 0.92) and (-0.41, 1.01) .. (-0.42, 1.09) .. controls (-0.43, 1.14) and (-0.44, 1.19) .. (-0.48, 1.23) .. controls (-0.48, 1.24) and (-0.49, 1.24) .. (-0.50, 1.24) -- cycle;
-\sloth@part@draw[\sloth@body] (0.50, 1.24) .. controls (0.54, 1.24) and (0.55, 1.20) .. (0.56, 1.17) .. controls (0.61, 1.06) and (0.63, 0.95) .. (0.64, 0.83) .. controls (0.64, 0.80) and (0.64, 0.77) .. (0.63, 0.74) .. controls (0.57, 0.66) and (0.47, 0.60) .. (0.38, 0.56) .. controls (0.31, 0.54) and (0.23, 0.52) .. (0.16, 0.54) .. controls (0.12, 0.54) and (0.10, 0.59) .. (0.13, 0.61) .. controls (0.17, 0.68) and (0.24, 0.73) .. (0.30, 0.77) .. controls (0.34, 0.79) and (0.38, 0.81) .. (0.42, 0.83) .. controls (0.41, 0.92) and (0.41, 1.01) .. (0.42, 1.09) .. controls (0.43, 1.14) and (0.44, 1.19) .. (0.48, 1.23) .. controls (0.48, 1.24) and (0.49, 1.24) .. (0.50, 1.24) -- cycle;
-%
-\ifsloth@contour
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=110];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=117];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=125];
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sloth@part@draw[\sloth@body!40!black] (0,1.665) ellipse[x radius=0.078, y radius=0.048];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\sloth@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.55) arc [start angle=-40, end angle=-140, radius=0.16];
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sloth@part@draw[\sloth@body] (-0.50, 1.24) .. controls (-0.54, 1.24) and (-0.55, 1.20) .. (-0.56, 1.17) .. controls (-0.61, 1.06) and (-0.63, 0.95) .. (-0.64, 0.83) .. controls (-0.64, 0.80) and (-0.64, 0.77) .. (-0.63, 0.74) .. controls (-0.57, 0.66) and (-0.47, 0.60) .. (-0.38, 0.56) .. controls (-0.31, 0.54) and (-0.23, 0.52) .. (-0.16, 0.54) .. controls (-0.12, 0.54) and (-0.10, 0.59) .. (-0.13, 0.61) .. controls (-0.17, 0.68) and (-0.24, 0.73) .. (-0.30, 0.77) .. controls (-0.34, 0.79) and (-0.38, 0.81) .. (-0.42, 0.83) .. controls (-0.41, 0.92) and (-0.41, 1.01) .. (-0.42, 1.09) .. controls (-0.43, 1.14) and (-0.44, 1.19) .. (-0.48, 1.23) .. controls (-0.48, 1.24) and (-0.49, 1.24) .. (-0.50, 1.24) -- cycle;
+ \sloth@part@draw[\sloth@body] (0.50, 1.24) .. controls (0.54, 1.24) and (0.55, 1.20) .. (0.56, 1.17) .. controls (0.61, 1.06) and (0.63, 0.95) .. (0.64, 0.83) .. controls (0.64, 0.80) and (0.64, 0.77) .. (0.63, 0.74) .. controls (0.57, 0.66) and (0.47, 0.60) .. (0.38, 0.56) .. controls (0.31, 0.54) and (0.23, 0.52) .. (0.16, 0.54) .. controls (0.12, 0.54) and (0.10, 0.59) .. (0.13, 0.61) .. controls (0.17, 0.68) and (0.24, 0.73) .. (0.30, 0.77) .. controls (0.34, 0.79) and (0.38, 0.81) .. (0.42, 0.83) .. controls (0.41, 0.92) and (0.41, 1.01) .. (0.42, 1.09) .. controls (0.43, 1.14) and (0.44, 1.19) .. (0.48, 1.23) .. controls (0.48, 1.24) and (0.49, 1.24) .. (0.50, 1.24) -- cycle;
+ %
+ \ifsloth@contour
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=110];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=117];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=125];
+ %
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=-110];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=-117];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=-125];
+ \else% contour
+ \fill[\sloth@body!50!black] (0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=110];
+ \fill[\sloth@body!50!black] (0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=117];
+ \fill[\sloth@body!50!black] (0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=125];
+ %
+ \fill[\sloth@body!50!black] (-0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=-110];
+ \fill[\sloth@body!50!black] (-0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=-117];
+ \fill[\sloth@body!50!black] (-0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=-125];
+ \fi% contour
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sloth@part@draw[\sloth@body] (0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=25];
+ \sloth@part@draw[\sloth@body] (-0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=-25];
+ %
+ \ifsloth@contour
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=-10];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
+ \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
+ \else% contour
+ \fill[\sloth@body!50!black] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=-10];
+ \fill[\sloth@body!50!black] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
+ \fill[\sloth@body!50!black] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
+ \fill[\sloth@body!50!black] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
+ \fill[\sloth@body!50!black] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
+ \fill[\sloth@body!50!black] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
+ \fi% contour
+ %
+ \fi% back
%
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=-110];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=-117];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=-125];
-\else
- \fill[\sloth@body!50!black] (0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=110];
- \fill[\sloth@body!50!black] (0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=117];
- \fill[\sloth@body!50!black] (0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=125];
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname slothhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
%
- \fill[\sloth@body!50!black] (-0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=-110];
- \fill[\sloth@body!50!black] (-0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=-117];
- \fill[\sloth@body!50!black] (-0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=-125];
-\fi
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sloth@part@draw[\sloth@body] (0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=25];
-\sloth@part@draw[\sloth@body] (-0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=-25];
-%
-\ifsloth@contour
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=-10];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
- \draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
-\else
- \fill[\sloth@body!50!black] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=-10];
- \fill[\sloth@body!50!black] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
- \fill[\sloth@body!50!black] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
- \fill[\sloth@body!50!black] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
- \fill[\sloth@body!50!black] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
- \fill[\sloth@body!50!black] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
-\fi
-%
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname slothhookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Documentation
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Sloth]{Riley, the sloth}
+%
+%\emph{One of good souls behind the TugBoat once met a sloth called Riley}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-sloths}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\sloth
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic sloth can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\sloth[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\sloth[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\sloth[mouth=red]
+%\end{tcblisting}
+%
+%If tired, the sloth can take a nap:
+%\begin{tcblisting}{}
+%\sloth[sleeping]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\sloth[sleeping,eyelid=red]
+%\end{tcblisting}
+%
+%To view the sloth from behind:
+%\begin{tcblisting}{}
+%\sloth[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the sloth 3-dimensional:
+%\begin{tcblisting}{}
+%\sloth[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\sloth[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty b/graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty
index a7b194cf27..5b5f851352 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/snowman.tex
+ % !TeX root = ./examples/snowman.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-snowmen}[2021/04/16 version v0.6 Draw snowmen in TikZ]
+\ProvidesPackage{tikzlings-snowmen}[2021/08/06 version v0.8 Draw snowmen in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -76,128 +76,196 @@
}
\def\snowman@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.75, 0.0) rectangle (0.75, 2.13);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsnowman@threeD
+ \def\snowman@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifsnowman@contour
+ \def\snowman@part@draw[##1]{\draw[##1,\snowman@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\snowman@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname snowmanhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Global warming %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsnowman@globalwarming
+ %
+ % Puddle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsnowman@contour
+ \draw[\snowman@contour,fill=white,line width=\scalingfactor*0.4pt] (0,1.15) ellipse[x radius=1.6,y radius=1.15];
+ \else% contour
+ \fill[\snowman@globalwarming] (0,1.15) ellipse[x radius=1.6,y radius=1.15];
+ \fi% contour
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname snowmanhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \fill[\snowman@mouth] (0,1.23) circle[radius=0.025];
+ \fill[\snowman@mouth] (0.06,1.3) circle[radius=0.025];
+ \fill[\snowman@mouth] (-0.06,1.27) circle[radius=0.025];
+ \fill[\snowman@mouth] (0.09,1.37) circle[radius=0.025];
+ \fill[\snowman@mouth] (-0.18,1.28) circle[radius=0.025];
+ \fill[\snowman@mouth] (0.2,1.28) circle[radius=0.025];
+ \fill[\snowman@mouth] (-0.25,1.2) circle[radius=0.025];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \snowman@part@draw[\snowman@eye] (-0.5,1.75) circle[radius=0.06];
+ \snowman@part@draw[\snowman@eye] (-0.1,1.55) circle[radius=0.06];
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \snowman@part@draw[\snowman@nose] (-0.6,1.4) -- (-0.8,1.42) -- (-0.6,1.54) (-0.6,1.4) arc[radius=0.07, start angle=-90, end angle=90];
+ %
+ % Buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \snowman@part@draw[\snowman@buttons] (0.1,0.8) circle[radius=0.06];
+ \snowman@part@draw[\snowman@buttons] (-0.15,0.55) circle[radius=0.06];
+ \snowman@part@draw[\snowman@buttons] (0,0.25) circle[radius=0.06];
+ %
+ % normal snowman %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else% global warming
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \snowman@part@draw[\snowman@body] (0.5,1.1) ellipse[x radius=0.3, y radius=0.12, rotate=-50];
+ \snowman@part@draw[\snowman@body] (-0.5,1.1) ellipse[x radius=0.3, y radius=0.12, rotate=50];
+ %
+ % Body + Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \snowman@part@draw[\snowman@body] (0,0.5) ellipse[x radius=0.6, y radius=0.5];
+ \snowman@part@draw[\snowman@body] (0,1.1) ellipse[x radius=0.5, y radius=0.4];
+ \snowman@part@draw[\snowman@body] (0,1.7) circle[radius=0.4];
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname snowmanhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsnowman@back
+ %
+ % Mouth% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \fill[\snowman@mouth] (0,1.5) circle[radius=0.016];
+ \fill[\snowman@mouth] (0.04,1.507) circle[radius=0.016];
+ \fill[\snowman@mouth] (-0.04,1.507) circle[radius=0.016];
+ \fill[\snowman@mouth] (0.08,1.522) circle[radius=0.016];
+ \fill[\snowman@mouth] (-0.08,1.522) circle[radius=0.016];
+ \fill[\snowman@mouth] (0.12,1.543) circle[radius=0.016];
+ \fill[\snowman@mouth] (-0.12,1.543) circle[radius=0.016];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \snowman@part@draw[\snowman@eye] (-0.155,1.8) circle[radius=0.04];
+ \snowman@part@draw[\snowman@eye] (0.155,1.8) circle[radius=0.04];
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \snowman@part@draw[\snowman@nose] (0,1.72) arc [radius=0.05, start angle=90, end angle=270] (0,1.62) -- (0.15,1.64) -- (0,1.72);
+ %
+ % Buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \snowman@part@draw[\snowman@buttons] (0,1.15) circle[radius=0.04];
+ \snowman@part@draw[\snowman@buttons] (0,0.95) circle[radius=0.04];
+ \snowman@part@draw[\snowman@buttons] (0,0.75) circle[radius=0.04];
+ %
+ \fi% back
+ %
+ \fi% global warming
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname snowmanhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.75, 0.0) rectangle (0.75, 2.13);
+%\clearpage
+%\section[Snowman]{Yuki, the snowman}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\emph{Yuki is the transcription of the Japanese word for snow}
%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+%\subsection{Package name}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-snowmen}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%\subsection{Basic Usage}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsnowman@threeD
- \def\snowman@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifsnowman@contour
- \def\snowman@part@draw[##1]{\draw[##1,\snowman@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\snowman@part@draw[##1]{\fill[##1]}
- \fi
-\fi
+%\begin{tcblisting}{}
+%\snowman
+%\end{tcblisting}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{Options}
%
-% Body parts
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%The basic snowman can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\snowman[body=blue]
+%\end{tcblisting}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname snowmanhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\snowman[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\snowman[nose=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\snowman[mouth=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\snowman[buttons=red]
+%\end{tcblisting}
%
-% Global warming %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsnowman@globalwarming
- %
- % Puddle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \ifsnowman@contour
- \draw[\snowman@contour,fill=white,line width=\scalingfactor*0.4pt] (0,1.15) ellipse[x radius=1.6,y radius=1.15];
- \else
- \fill[\snowman@globalwarming] (0,1.15) ellipse[x radius=1.6,y radius=1.15];
- \fi
- %
- % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \csname snowmanhookbelly\endcsname
- \csname tikzlinghookbelly\endcsname
- %
- % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \fill[\snowman@mouth] (0,1.23) circle[radius=0.025];
- \fill[\snowman@mouth] (0.06,1.3) circle[radius=0.025];
- \fill[\snowman@mouth] (-0.06,1.27) circle[radius=0.025];
- \fill[\snowman@mouth] (0.09,1.37) circle[radius=0.025];
- \fill[\snowman@mouth] (-0.18,1.28) circle[radius=0.025];
- \fill[\snowman@mouth] (0.2,1.28) circle[radius=0.025];
- \fill[\snowman@mouth] (-0.25,1.2) circle[radius=0.025];
- %
- % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@eye] (-0.5,1.75) circle[radius=0.06];
- \snowman@part@draw[\snowman@eye] (-0.1,1.55) circle[radius=0.06];
- %
- % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@nose] (-0.6,1.4) -- (-0.8,1.42) -- (-0.6,1.54) (-0.6,1.4) arc[radius=0.07, start angle=-90, end angle=90];
- %
- % Buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@buttons] (0.1,0.8) circle[radius=0.06];
- \snowman@part@draw[\snowman@buttons] (-0.15,0.55) circle[radius=0.06];
- \snowman@part@draw[\snowman@buttons] (0,0.25) circle[radius=0.06];
+%The biggest enemy of the snowman are raising temperatures:
+%\begin{tcblisting}{}
+%\snowman[globalwarming,tophat]
+%\end{tcblisting}
%
-% normal snowman %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\else
- %
- % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@body] (0.5,1.1) ellipse[x radius=0.3, y radius=0.12, rotate=-50];
- \snowman@part@draw[\snowman@body] (-0.5,1.1) ellipse[x radius=0.3, y radius=0.12, rotate=50];
- %
- % Body + Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@body] (0,0.5) ellipse[x radius=0.6, y radius=0.5];
- \snowman@part@draw[\snowman@body] (0,1.1) ellipse[x radius=0.5, y radius=0.4];
- \snowman@part@draw[\snowman@body] (0,1.7) circle[radius=0.4];
- %
- % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \csname snowmanhookbelly\endcsname
- \csname tikzlinghookbelly\endcsname
- %
- % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \unless\ifsnowman@back
- %
- % Mouth% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \fill[\snowman@mouth] (0,1.5) circle[radius=0.016];
- \fill[\snowman@mouth] (0.04,1.507) circle[radius=0.016];
- \fill[\snowman@mouth] (-0.04,1.507) circle[radius=0.016];
- \fill[\snowman@mouth] (0.08,1.522) circle[radius=0.016];
- \fill[\snowman@mouth] (-0.08,1.522) circle[radius=0.016];
- \fill[\snowman@mouth] (0.12,1.543) circle[radius=0.016];
- \fill[\snowman@mouth] (-0.12,1.543) circle[radius=0.016];
- %
- % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@eye] (-0.155,1.8) circle[radius=0.04];
- \snowman@part@draw[\snowman@eye] (0.155,1.8) circle[radius=0.04];
- %
- % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@nose] (0,1.72) arc [radius=0.05, start angle=90, end angle=270] (0,1.62) -- (0.15,1.64) -- (0,1.72);
- %
- % Buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@buttons] (0,1.15) circle[radius=0.04];
- \snowman@part@draw[\snowman@buttons] (0,0.95) circle[radius=0.04];
- \snowman@part@draw[\snowman@buttons] (0,0.75) circle[radius=0.04];
- %
-\fi\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname snowmanhookbody\endcsname
-\csname tikzlinghookbody\endcsname
+%To view the snowman from behind:
+%\begin{tcblisting}{}
+%\snowman[back]
+%\end{tcblisting}
%
-}
+%The key \lstinline|3D| will make the snowman 3-dimensional:
+%\begin{tcblisting}{}
+%\snowman[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\snowman[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty b/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty
index 79a604bd74..2fc85db01f 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/squirrel.tex
+ % !TeX root = ./examples/squirrel.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-squirrels}[2021/04/16 version v0.6 Drawing squirrels in TikZ]
+\ProvidesPackage{tikzlings-squirrels}[2021/08/06 version v0.8 Drawing squirrels in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -65,126 +65,177 @@
}
\def\squirrel@draw{%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.53,0.1) rectangle (1.12,2.15);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsquirrel@threeD
- \def\squirrel@part@draw[##1]{\shade[ball color=##1]}
-\else
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.53,0.1) rectangle (1.12,2.15);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsquirrel@threeD
+ \def\squirrel@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifsquirrel@contour
+ \def\squirrel@part@draw[##1]{\draw[##1,\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\squirrel@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname squirrelhookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ %
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsquirrel@back
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray]
+ (0.9795, 1.089) .. controls (0.9795, 1.089) and (1.0684, 1.2135) .. (1.0837, 1.2877) .. controls (1.1483, 1.6164) and (0.7470, 1.8317) .. (0.5217, 1.7097) .. controls (0.3005, 1.5585) and (0.3397, 1.2578) .. (0.3951, 1.0501) .. controls (0.4419, 0.9023) and (0.5439, 0.6908) .. (0.4287, 0.5889) .. controls (0.3845, 0.5503) and (0.2295, 0.4255) .. (0.0123, 0.3869) .. controls (0.3032, 0.1931) and (1.0822, 0.6445) .. (0.8789, 1.0501) .. controls (0.8607, 1.114) and (0.8154, 1.1881) .. (0.8716, 1.2309) .. controls (0.9325, 1.2193) and (0.9536, 1.1463) .. (0.9795, 1.089) -- cycle;
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \squirrel@part@draw[\squirrel@body]
+ (0.5,0.5) .. controls (0.5,0.09) and (-0.5,0.09) .. (-0.5,0.5) .. controls (-0.5,0.85) and (-0.25,1.6) .. (0,1.7) .. controls (0.25,1.6) and (0.5,0.85) .. (0.5,0.5) -- cycle;
+ %
+ % Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsquirrel@back
+ \squirrel@part@draw[\squirrel@body!85!white] (0.35,0.5) .. controls (0.35,0.22) and (-0.35,0.22) .. (-0.35,0.5) .. controls (-0.35,0.7) and (-0.17,1.2) .. (0,1.2) .. controls (0.17,1.2) and (0.35,0.7) .. (0.35,0.5) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname squirrelhookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.1920,1.9906) .. controls (0.1657,2.0780) and (0.1839,2.1332) .. (0.1839,2.1332) .. controls (0.1839,2.1332) and (0.1123,2.1773) .. (0.0941,2.0720) .. controls (0.0716,2.0156) and (0.0753,1.9519) .. (0.1023,1.9293) .. controls (0.1293,1.9068) and (0.1696,1.9342) .. (0.1920,1.9906) -- cycle;
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray]
+ (-0.1920,1.9906) .. controls (-0.1657,2.0780) and (-0.1839,2.1332) .. (-0.1839,2.1332) .. controls (-0.1839,2.1332) and (-0.1123,2.1773) .. (-0.0941,2.0720) .. controls (-0.0716,2.0156) and (-0.0753,1.9519) .. (-0.1023,1.9293) .. controls (-0.1293,1.9068) and (-0.1696,1.9342) .. (-0.1920,1.9906) -- cycle;
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsquirrel@contour
- \def\squirrel@part@draw[##1]{\draw[##1,\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\squirrel@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname squirrelhookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-%
-% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsquirrel@back
- \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray]
- (0.9795, 1.089) .. controls (0.9795, 1.089) and (1.0684, 1.2135) .. (1.0837, 1.2877) .. controls (1.1483, 1.6164) and (0.7470, 1.8317) .. (0.5217, 1.7097) .. controls (0.3005, 1.5585) and (0.3397, 1.2578) .. (0.3951, 1.0501) .. controls (0.4419, 0.9023) and (0.5439, 0.6908) .. (0.4287, 0.5889) .. controls (0.3845, 0.5503) and (0.2295, 0.4255) .. (0.0123, 0.3869) .. controls (0.3032, 0.1931) and (1.0822, 0.6445) .. (0.8789, 1.0501) .. controls (0.8607, 1.114) and (0.8154, 1.1881) .. (0.8716, 1.2309) .. controls (0.9325, 1.2193) and (0.9536, 1.1463) .. (0.9795, 1.089) -- cycle;
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\squirrel@part@draw[\squirrel@body]
- (0.5,0.5) .. controls (0.5,0.09) and (-0.5,0.09) .. (-0.5,0.5) .. controls (-0.5,0.85) and (-0.25,1.6) .. (0,1.7) .. controls (0.25,1.6) and (0.5,0.85) .. (0.5,0.5) -- cycle;
-%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsquirrel@back
- \squirrel@part@draw[\squirrel@body!85!white] (0.35,0.5) .. controls (0.35,0.22) and (-0.35,0.22) .. (-0.35,0.5) .. controls (-0.35,0.7) and (-0.17,1.2) .. (0,1.2) .. controls (0.17,1.2) and (0.35,0.7) .. (0.35,0.5) -- cycle;
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname squirrelhookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.1920,1.9906) .. controls (0.1657,2.0780) and (0.1839,2.1332) .. (0.1839,2.1332) .. controls (0.1839,2.1332) and (0.1123,2.1773) .. (0.0941,2.0720) .. controls (0.0716,2.0156) and (0.0753,1.9519) .. (0.1023,1.9293) .. controls (0.1293,1.9068) and (0.1696,1.9342) .. (0.1920,1.9906) -- cycle;
-\squirrel@part@draw[\squirrel@body!70!brown!50!darkgray]
-(-0.1920,1.9906) .. controls (-0.1657,2.0780) and (-0.1839,2.1332) .. (-0.1839,2.1332) .. controls (-0.1839,2.1332) and (-0.1123,2.1773) .. (-0.0941,2.0720) .. controls (-0.0716,2.0156) and (-0.0753,1.9519) .. (-0.1023,1.9293) .. controls (-0.1293,1.9068) and (-0.1696,1.9342) .. (-0.1920,1.9906) -- cycle;
-%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsquirrel@contour
- \squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3];
- \squirrel@part@draw[\squirrel@body] (0.2,1.6) circle[radius=0.15];
- \squirrel@part@draw[\squirrel@body] (-0.2,1.6) circle[radius=0.15];
- \ifsquirrel@back
\squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3];
- \fi
-\else
- \squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3] (0.2,1.6) circle[radius=0.15] (-0.2,1.6) circle[radius=0.15];
-\fi
-%
-\ifsquirrel@back
- % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray]
- (0.9795, 1.089) .. controls (0.9795, 1.089) and (1.0684, 1.2135) .. (1.0837, 1.2877) .. controls (1.1483, 1.6164) and (0.7470, 1.8317) .. (0.5217, 1.7097) .. controls (0.3005, 1.5585) and (0.3397, 1.2578) .. (0.3951, 1.0501) .. controls (0.4419, 0.9023) and (0.5439, 0.6908) .. (0.4287, 0.5889) .. controls (0.3845, 0.5503) and (0.2295, 0.4255) .. (0.0123, 0.3869) .. controls (0.3032, 0.1931) and (1.0822, 0.6445) .. (0.8789, 1.0501) .. controls (0.8607, 1.114) and (0.8154, 1.1881) .. (0.8716, 1.2309) .. controls (0.9325, 1.2193) and (0.9536, 1.1463) .. (0.9795, 1.089) -- cycle;
-\else
-%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\squirrel@part@draw[\squirrel@body!70!brown!60!black] (0,1.66) ellipse[x radius=0.06, y radius=0.03];
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\squirrel@part@draw[\squirrel@eye] (0.07,1.78) ellipse[x radius=0.05, y radius=0.07];
-\squirrel@part@draw[\squirrel@eye] (-0.07,1.78) ellipse[x radius=0.05, y radius=0.07];
-\squirrel@part@draw[\squirrel@pupil] (0.07,1.76) ellipse[x radius=0.017, y radius=0.027];
-\squirrel@part@draw[\squirrel@pupil] (-0.07,1.76) ellipse[x radius=0.017, y radius=0.027];
-%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsquirrel@contour
- \draw[\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.025,1.567) rectangle ++(0.02,0.03);
- \draw[\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt] (0.025,1.567) rectangle ++(-0.02,0.03);
- \draw[\squirrel@contour,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61);
-\else
- \fill[white] (-0.025,1.567) rectangle ++(0.02,0.03);
- \fill[white] (0.025,1.567) rectangle ++(-0.02,0.03);
- \draw[\squirrel@body!70!brown!60!black,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61);
-\fi
-%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.2,0.85) ellipse[x radius=0.22, y radius=0.11, rotate=70];
-\squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.2,0.85) ellipse[x radius=0.22, y radius=0.11, rotate=-70];
-%
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname squirrelhookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
+ \squirrel@part@draw[\squirrel@body] (0.2,1.6) circle[radius=0.15];
+ \squirrel@part@draw[\squirrel@body] (-0.2,1.6) circle[radius=0.15];
+ \ifsquirrel@back
+ \squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3];
+ \fi% back
+ \else% contour
+ \squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3] (0.2,1.6) circle[radius=0.15] (-0.2,1.6) circle[radius=0.15];
+ \fi% contour
+ %
+ \ifsquirrel@back
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray]
+ (0.9795, 1.089) .. controls (0.9795, 1.089) and (1.0684, 1.2135) .. (1.0837, 1.2877) .. controls (1.1483, 1.6164) and (0.7470, 1.8317) .. (0.5217, 1.7097) .. controls (0.3005, 1.5585) and (0.3397, 1.2578) .. (0.3951, 1.0501) .. controls (0.4419, 0.9023) and (0.5439, 0.6908) .. (0.4287, 0.5889) .. controls (0.3845, 0.5503) and (0.2295, 0.4255) .. (0.0123, 0.3869) .. controls (0.3032, 0.1931) and (1.0822, 0.6445) .. (0.8789, 1.0501) .. controls (0.8607, 1.114) and (0.8154, 1.1881) .. (0.8716, 1.2309) .. controls (0.9325, 1.2193) and (0.9536, 1.1463) .. (0.9795, 1.089) -- cycle;
+ \else% back
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \squirrel@part@draw[\squirrel@body!70!brown!60!black] (0,1.66) ellipse[x radius=0.06, y radius=0.03];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \squirrel@part@draw[\squirrel@eye] (0.07,1.78) ellipse[x radius=0.05, y radius=0.07];
+ \squirrel@part@draw[\squirrel@eye] (-0.07,1.78) ellipse[x radius=0.05, y radius=0.07];
+ \squirrel@part@draw[\squirrel@pupil] (0.07,1.76) ellipse[x radius=0.017, y radius=0.027];
+ \squirrel@part@draw[\squirrel@pupil] (-0.07,1.76) ellipse[x radius=0.017, y radius=0.027];
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsquirrel@contour
+ \draw[\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.025,1.567) rectangle ++(0.02,0.03);
+ \draw[\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt] (0.025,1.567) rectangle ++(-0.02,0.03);
+ \draw[\squirrel@contour,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61);
+ \else% contour
+ \fill[white] (-0.025,1.567) rectangle ++(0.02,0.03);
+ \fill[white] (0.025,1.567) rectangle ++(-0.02,0.03);
+ \draw[\squirrel@body!70!brown!60!black,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61);
+ \fi% contour
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.2,0.85) ellipse[x radius=0.22, y radius=0.11, rotate=70];
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.2,0.85) ellipse[x radius=0.22, y radius=0.11, rotate=-70];
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname squirrelhookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Documentation
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Squirrel]{Ratatosk, the squirrel}
+%
+%\emph{named after the squirrel from Norse mythology who climbs around Yggdrasil}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-squirrels}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{}
+%\squirrel
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic squirrel can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\squirrel[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of the eyes can be adjusted:
+%\begin{tcblisting}{}
+%\squirrel[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\squirrel[pupil=red]
+%\end{tcblisting}
+%
+%To view the squirrel from behind:
+%\begin{tcblisting}{}
+%\squirrel[back]
+%\end{tcblisting}
+%
+%The key \lstinline|3D| will make the squirrel 3-dimensional:
+%\begin{tcblisting}{}
+%\squirrel[3D]
+%\end{tcblisting}
+%
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\squirrel[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings.sty b/graphics/pgf/contrib/tikzlings/tikzlings.sty
index 77e2bbc984..0413709e69 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings.sty
@@ -12,7 +12,7 @@
% See http://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings}[2021/04/16 version v0.6 Collection of packages to draw animals and other beings in TikZ]
+\ProvidesPackage{tikzlings}[2021/08/06 version v0.8 Collection of packages to draw animals and other beings in TikZ]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%