Debian Codegraph @

texmf-dist/tex/latex/tikzlings/tikzlings-cats.sty

raw
1 % !TeX root = ./examples/cat.tex
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %%
4 %% This package is part of the TikZlings package
5 %% A package to bring cute little animals and other beings into tikz
6 %% Maintained by samcarter
7 %%
8 %% Project repository and bug tracker:
9 %% https://github.com/samcarter/tikzlings
10 %%
11 %% Released under the LaTeX Project Public License v1.3c or later
12 %% See https://www.latex-project.org/lppl.txt
13 %%
14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15 \ProvidesPackage{tikzlings-cats}[2025/12/11 version v2.5 Drawing cats in TikZ]
16
17 \RequirePackage{tikz}
18 \RequirePackage{tikzlings-addons}
19
20 \ExplSyntaxOn
21 \ifdefined\sys_rand_seed:
22 \pgfmathsetseed{\sys_rand_seed:}
23 \else
24 \ifdefined\pdfrandomseed % pdflatex
25 \else
26 \ifdefined\randomseed
27 \let\pdfrandomseed\randomseed % post TL19 xelatex and lualatex
28 \else
29 \let\pdfrandomseed\time % pre TL19 xelatex
30 \fi
31 \fi
32 \pgfmathsetseed{\number\pdfrandomseed}
33 \fi
34 \ExplSyntaxOff
35
36 \newcommand*{\cat}[1][]{%
37 \begin{scope}%
38 \tikzset{/cat/.cd,#1}%
39 \ifcat@schroedinger
40 \pgfmathparse{int(random(0,1))}
41 \let\cat@random=\pgfmathresult
42 \ifnum\cat@random=1
43 \cat@tombstone%
44 \else
45 \cat@draw%
46 \fi
47 \else
48 \cat@draw%
49 \fi
50 \end{scope}%
51 \thing[#1]%
52 % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 \UseHook{tikzlings/cat/foreground}
54 \UseHook{tikzlings/foreground}
55 \csname cathookforeground\endcsname
56 \csname tikzlinghookforeground\endcsname
57 }
58
59 \newif\ifcat@threeD
60 \newif\ifcat@schroedinger
61 \newif\ifcat@back
62 \newif\ifcat@contour
63 \newif\ifcat@openmouth
64
65 \NewHook{tikzlings/cat/background}
66 \NewHook{tikzlings/cat/belly}
67 \NewHook{tikzlings/cat/body}
68 \NewHook{tikzlings/cat/foreground}
69
70 \tikzset{
71 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72 %
73 % Pass unknown keys on to tikz
74 %
75 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
76 /cat/.search also={/tikz,/pgf,/thing},
77 /cat/.cd,
78 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79 %
80 % body
81 %
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83 body/.store in = \cat@body,
84 body = gray!30!black,
85 whiskers/.store in = \cat@whiskers,
86 whiskers = gray!50!white,
87 whisker/.forward to = /cat/whiskers,
88 eyes/.store in = \cat@eyes,
89 eyes = yellow!80!orange,
90 eye/.forward to = /cat/eyes,
91 pupils/.store in = \cat@pupils,
92 pupils = black,
93 pupil/.forward to = /cat/pupils,
94 pupilwidth/.code = \def\cat@pupil@width{#1}
95 \edef\cat@pupil@offset{\strip@pt\dimexpr#1pt/4},
96 pupil width/.forward to = /cat/pupilwidth,
97 narrow pupils/.code = \def\cat@pupil@width{0.005}
98 \edef\cat@pupil@offset{\strip@pt\dimexpr 0.005pt/4},
99 medium pupils/.code = \def\cat@pupil@width{0.015}
100 \edef\cat@pupil@offset{\strip@pt\dimexpr 0.015pt/4},
101 wide pupils/.code = \def\cat@pupil@width{0.025}
102 \edef\cat@pupil@offset{\strip@pt\dimexpr 0.025pt/4},
103 very wide pupils/.code = \def\cat@pupil@width{0.050}
104 \edef\cat@pupil@offset{\strip@pt\dimexpr 0.050pt/4},
105 pupil width = 0.015,
106 paws/.store in = \cat@paws,
107 paws = \cat@body,
108 paw/.forward to = /cat/paws,
109 nose/.store in = \cat@nose,
110 nose = red!40!white!80!gray,
111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112 %
113 % options
114 %
115 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
116 schroedinger/.code = \cat@schroedingertrue,
117 openmouth/.code = \cat@openmouthtrue,
118 open mouth/.forward to = /cat/openmouth,
119 3D/.code = \cat@threeDtrue,
120 back/.code = \cat@backtrue,
121 contour/.code = \cat@contourtrue
122 \def\cat@contour{#1}
123 \def\cat@whiskers{#1},
124 contour/.default = black,
125 outline/.forward to = /cat/contour,
126 }
127
128 \def\cat@draw{%
129 %
130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
131 %
132 % minimal bounding box size
133 %
134 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
135 \path (-0.56,0.1) rectangle (1.63, 2.22);
136 %
137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
138 %
139 % store the current scale factor
140 % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
141 %
142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
143 \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
144 \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
145 \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
146 \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
147 %
148 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
149 %
150 % switch between 2D, 3D and contours, from
151 % https://chat.stackexchange.com/transcript/message/45991801#45991801
152 %
153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
154 \ifcat@threeD
155 \def\cat@part@draw[##1]{\shade[ball color=##1]}
156 \else% 3D
157 \ifcat@contour
158 \def\cat@part@draw[##1]{\draw[##1,\cat@contour,fill=white,line width=\scalingfactor*0.4pt]}
159 \else% contour
160 \def\cat@part@draw[##1]{\fill[##1]}
161 \fi% contour
162 \fi% 3D
163 %
164 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165 %
166 % Body parts
167 %
168 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
169 %
170 % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
171 \UseHook{tikzlings/cat/background}
172 \UseHook{tikzlings/background}
173 \csname cathookbackground\endcsname
174 \csname tikzlinghookbackground\endcsname
175 %
176 % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
177 \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;
178 %
179 % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
180 \ifcat@back
181 \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
182 \cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
183 \fi% back
184 %
185 % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
186 \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;
187 %
188 % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
189 \UseHook{tikzlings/cat/belly}
190 \UseHook{tikzlings/belly}
191 \csname cathookbelly\endcsname
192 \csname tikzlinghookbelly\endcsname
193 %
194 % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195 \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;
196 \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;
197 %
198 % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199 \cat@part@draw[\cat@body] (0,1.64) circle[radius=0.44];
200 %
201 % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
202 \unless\ifcat@back
203 %
204 % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
205 \cat@part@draw[\cat@eyes] (-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;
206 \cat@part@draw[\cat@eyes] (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;
207 %
208 % Pupils %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
209 \cat@part@draw[\cat@pupils] (-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;
210 \cat@part@draw[\cat@pupils] ( 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;
211 %
212 % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
213 \ifcat@openmouth
214 \filldraw[\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) (0.16,1.527) arc [start angle=-20, end angle=-160, radius=0.17];
215 \else
216 \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);
217 \fi
218 %
219 % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
220 \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;
221 %
222 % Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
223 \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;
224 \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;
225 \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;
226 \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;
227 \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;
228 \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;
229 %
230 % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
231 \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
232 \cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
233 %
234 \fi% back
235 %
236 % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
237 \UseHook{tikzlings/cat/body}
238 \UseHook{tikzlings/body}
239 \csname cathookbody\endcsname
240 \csname tikzlinghookbody\endcsname
241 }
242
243 \def\cat@tombstone{%
244 %
245 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
246 %
247 % minimal bounding box size
248 %
249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
250 \path (-0.55,0.39) rectangle (0.55, 2.06);
251 %
252 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
253 %
254 % store the current scale factor
255 % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
256 %
257 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
258 \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
259 \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
260 \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
261 \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
262 %
263 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
264 %
265 % switch between 2D, 3D and contours, from
266 % https://chat.stackexchange.com/transcript/message/45991801#45991801
267 %
268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
269 \ifcat@threeD
270 \def\cat@part@draw[##1]{\shade[ball color=##1]}
271 \else% 3D
272 \ifcat@contour
273 \def\cat@part@draw[##1]{\draw[##1,\cat@contour,fill=white,line width=\scalingfactor*0.4pt]}
274 \else% contour
275 \def\cat@part@draw[##1]{\fill[##1]}
276 \fi% contour
277 \fi% 3D
278 %
279 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
280 %
281 % Drawing the tomebstone
282 %
283 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
284 %
285 % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
286 \UseHook{tikzlings/cat/background}
287 \UseHook{tikzlings/background}
288 \csname cathookbackground\endcsname
289 \csname tikzlinghookbackground\endcsname
290 %
291 % Stone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
292 \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;
293 \node[scale=\scalingfactor] at (0,1.3) {R.I.P.};
294 %
295 % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
296 \UseHook{tikzlings/cat/belly}
297 \UseHook{tikzlings/belly}
298 \csname cathookbelly\endcsname
299 \csname tikzlinghookbelly\endcsname
300 %
301 % soil %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
302 \cat@part@draw[brown!65!black] (1,0.15) arc [start angle=50, end angle=130, radius=1.56] -- cycle;
303 %
304 % flower %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
305 \ifcat@contour
306 \draw[\cat@contour,line width=\scalingfactor*0.4pt] (-0.01,0.3) arc [start angle=-15, end angle=30, radius=0.7];
307 \else% contour
308 \draw[green!50!brown,line width=\scalingfactor*0.4pt] (-0.01,0.3) arc [start angle=-15, end angle=30, radius=0.7];
309 \fi% contour
310 \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;
311 \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;
312 \foreach \i in {0,51.42857,...,359}{
313 \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;
314 }
315 %
316 % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
317 \UseHook{tikzlings/cat/body}
318 \UseHook{tikzlings/body}
319 \csname cathookbody\endcsname
320 \csname tikzlinghookbody\endcsname
321 %
322 }
323
324 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
325 %%
326 %% Documentation
327 %%
328 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
329 %\clearpage
330 %\section[Cat]{MisTi$k$Zelees, the cat}
331 %
332 %\emph{Named after the worlds best singing cat}
333 %
334 %\subsection{Package name}
335 %
336 %\begin{tcolorbox}[title={Package usage}]
337 %\begin{samcode}
338 %\usepackage{tikzlings-cats}
339 %\end{samcode}
340 %\end{tcolorbox}
341 %
342 %\subsection{Basic Usage}
343 %
344 %\begin{tcblisting}{title={Basic cat}}
345 %\cat
346 %\end{tcblisting}
347 %
348 %\subsection{Options}
349 %
350 %The basic cat can be modified by changing its colour:
351 %\begin{tcblisting}{title={Body colour}}
352 %\cat[body=blue]
353 %\end{tcblisting}
354 %
355 %In addition to the colour of the body, the colour of various body parts can be adjusted:
356 %\begin{tcblisting}{title={Eye colour}}
357 %\cat[eyes=green]
358 %\end{tcblisting}
359 %\begin{tcblisting}{title={Pupil colour}}
360 %\cat[pupils=red]
361 %\end{tcblisting}
362 %\begin{tcblisting}{title={Nose colour}}
363 %\cat[nose=red]
364 %\end{tcblisting}
365 %\begin{tcblisting}{title={Whiskers colour}}
366 %\cat[whiskers=red]
367 %\end{tcblisting}
368 %\begin{tcblisting}{title={Paw colour}}
369 %\cat[paws=red]
370 %\end{tcblisting}
371 %
372 % The cat can open its mouth:
373 %\begin{tcblisting}{title={Open mouth}}
374 %\cat[openmouth]
375 %\end{tcblisting}
376 %
377 %The shape of the \saminline|pupils| can be changed with the \saminline|pupilwidth| option:
378 %\begin{tcblisting}{title={Width of pupils}}
379 %\cat[pupilwidth=0.015]
380 %\end{tcblisting}
381 %
382 %Additionally several predefined widths exist:
383 %\begin{tcolorbox}[title={Predefined pupil widths}]
384 %\begin{samcode}
385 %\cat[narrow pupils]
386 %
387 %\cat[medium pupils]
388 %
389 %\cat[wide pupils]
390 %
391 %\cat[very wide pupils]
392 %\end{samcode}
393 %
394 %\tcblower
395 %\begin{tikzpicture}[yshift=2.4cm,xshift=1.8cm]
396 %\cat[narrow pupils]
397 %\cat[medium pupils,xshift=2.5cm]
398 %\cat[wide pupils,yshift=-2.5cm]
399 %\cat[very wide pupils,xshift=2.5cm,yshift=-2.5cm]
400 %\end{tikzpicture}
401 %\end{tcolorbox}
402 %
403 %There is also the special option \saminline|schroedinger|. This cat is both alive and dead as long as you did not compile your document.
404 %Be prepared for a possibly disturbing scene when you open the pdf, this option is not suited for sensitive \tikzlings.
405 %\begingroup
406 %\makeatletter
407 %\renewcommand*{\cat}[1][]{%
408 % \tikzset{/cat/.cd,#1}%
409 % \cat@tombstone%
410 %}
411 %\RemoveFromHook{tikzlings/cat/background}
412 %\makeatother
413 %\begin{tcblisting}{title={Schrödingers cat}}
414 %\cat[schroedinger]
415 %\end{tcblisting}
416 %\endgroup
417 %\AddToHook{tikzlings/cat/background}{\path (-1.6,0.1) rectangle (0.905, 2.17);}
418 %
419 %To view the cat from behind:
420 %\begin{tcblisting}{title={Back view}}
421 %\cat[back]
422 %\end{tcblisting}
423 %
424 %The key \saminline|3D| will make the cat 3-dimensional:
425 %\begin{tcblisting}{title={3D view}}
426 %\cat[3D]
427 %\end{tcblisting}
428 %
429 %And finally the \saminline|contour| key will only draw the outlines:
430 %\begin{tcblisting}{title={Contours}}
431 %\cat[contour=black]
432 %\end{tcblisting}