summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-cats.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-cats.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-cats.sty100
1 files changed, 55 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-cats.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-cats.sty
index d34599cd7aa..41dc7521ad7 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-cats.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-cats.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% Released under the LaTeX Project Public License v1.3c or later
-%% See http://www.latex-project.org/lppl.txt
+%% See https://www.latex-project.org/lppl.txt
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-cats}[2022/06/17 version v1.0 Drawing cats in TikZ]
+\ProvidesPackage{tikzlings-cats}[2025/01/05 version v2.2 Drawing cats in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -24,13 +24,13 @@
\else
\ifdefined\pdfrandomseed % pdflatex
\else
- \ifdefined\randomseed
+ \ifdefined\randomseed
\let\pdfrandomseed\randomseed % post TL19 xelatex and lualatex
\else
\let\pdfrandomseed\time % pre TL19 xelatex
\fi
\fi
- \pgfmathsetseed{\number\pdfrandomseed}
+ \pgfmathsetseed{\number\pdfrandomseed}
\fi
\ExplSyntaxOff
@@ -59,6 +59,7 @@
\newif\ifcat@schroedinger
\newif\ifcat@back
\newif\ifcat@contour
+\newif\ifcat@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,21 +104,23 @@
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \cat@threeDtrue,
schroedinger/.code = \cat@schroedingertrue,
- back/.code = \cat@backtrue,
+ openmouth/.code = \cat@openmouthtrue,
+ open mouth/.forward to = /cat/openmouth,
+ 3D/.code = \cat@threeDtrue,
+ back/.code = \cat@backtrue,
contour/.code = \cat@contourtrue
\def\cat@contour{#1}
\def\cat@whiskers{#1},
- contour/.default = black,
- outline/.forward to = /cat/contour,
+ contour/.default = black,
+ outline/.forward to = /cat/contour,
}
\def\cat@draw{%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.56,0.1) rectangle (1.63, 2.22);
@@ -134,7 +137,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -152,7 +155,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -164,7 +167,7 @@
%
% 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];
\cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
\fi% back
%
@@ -176,10 +179,8 @@
\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;
+ \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];
@@ -196,7 +197,11 @@
\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);
+ \ifcat@openmouth
+ \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];
+ \else
+ \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);
+ \fi
%
% 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;
@@ -210,8 +215,8 @@
\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];
+ \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
%
@@ -224,7 +229,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.55,0.39) rectangle (0.55, 2.06);
@@ -241,7 +246,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -257,7 +262,7 @@
\fi% 3D
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% Drawing the tomebstone
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -307,50 +312,55 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-cats}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-cats}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic cat}}
%\cat
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic cat can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\cat[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\cat[eye=green]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\cat[pupil=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Nose colour}}
%\cat[nose=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Whiskers colour}}
%\cat[whiskers=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Paw colour}}
%\cat[paws=red]
%\end{tcblisting}
%
-%The shape of the \lstinline|pupil| can be changed with the \lstinline|pupilwidth| option:
-%\begin{tcblisting}{}
+% The cat can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\cat[openmouth]
+%\end{tcblisting}
+%
+%The shape of the \saminline|pupil| can be changed with the \saminline|pupilwidth| option:
+%\begin{tcblisting}{title={Width of pupils}}
%\cat[pupilwidth=0.015]
%\end{tcblisting}
%
%Additionally several predefined widths exist:
-%\begin{tcolorbox}
-%\begin{lstlisting}[morekeywords={narrow,medium,wide,very,pupils}]
+%\begin{tcolorbox}[title={Predefined pupil widths}]
+%\begin{samcode}
%\cat[narrow pupils]
%
%\cat[medium pupils]
@@ -358,7 +368,7 @@
%\cat[wide pupils]
%
%\cat[very wide pupils]
-%\end{lstlisting}
+%\end{samcode}
%
%\tcblower
%\begin{tikzpicture}[yshift=2.4cm,xshift=1.8cm]
@@ -369,7 +379,7 @@
%\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.
+%There is also the special option \saminline|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
@@ -379,22 +389,22 @@
%}
%\renewcommand{\cathookbackground}{}
%\makeatother
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Schrödingers cat}}
%\cat[schroedinger]
%\end{tcblisting}
%\endgroup
%
%To view the cat from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\cat[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the cat 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the cat 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\cat[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\cat[contour=black]
%\end{tcblisting}