summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-04-23 03:02:25 +0000
committerNorbert Preining <norbert@preining.info>2020-04-23 03:02:25 +0000
commitb86f6f3256611ce04f593d897b9cf412d18fa062 (patch)
treec5fecf75a10834f6ca5b39548a48f67d6294918c /graphics
parente0e2537ccbac6924b371be81092c1177e817162c (diff)
CTAN sync 202004230302
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks-doc.pdfbin439733 -> 440630 bytes
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks-doc.tex584
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks.sty215
-rw-r--r--graphics/pgf/contrib/tikzlings/README.md11
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-addons.sty232
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty168
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bears.sty82
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bees.sty169
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-cats.sty67
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty143
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-doc.pdfbin473505 -> 539609 bytes
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-doc.tex635
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty104
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty77
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty77
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-mice.sty92
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-moles.sty73
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-owls.sty84
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty74
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty72
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty84
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty96
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty133
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-snowmans.sty134
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty162
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings.sty19
-rw-r--r--graphics/tpic2pdftex/Makefile.in16
-rw-r--r--graphics/tpic2pdftex/aclocal.m450
-rwxr-xr-xgraphics/tpic2pdftex/configure.texk4
29 files changed, 2540 insertions, 1117 deletions
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf b/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf
index cbcdb1bb3a..296ff06bb1 100644
--- a/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf
+++ b/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex b/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex
index 34de5f9863..fbe6f48fae 100644
--- a/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex
+++ b/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex
@@ -14,12 +14,12 @@
\documentclass[parskip=half]{scrartcl}
% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{tikzducks}
-\usetikzlibrary{ducks}
+\usetikzlibrary{ducks,3d}
\usepackage[most]{tcolorbox}
\usepackage[paper=a4paper,margin=3cm,foot=2cm]{geometry}
\usepackage{url}
@@ -46,37 +46,37 @@
\setlength{\footnotemargin}{0.7em}
\lstdefinestyle{duckstyle}{%
- language={[latex]TeX},
- tabsize=2,
- breaklines,
- basicstyle=\footnotesize\ttfamily,
- commentstyle={\color{green!50!black}\slshape},
- columns=fullflexible,
- emphstyle=\color{orange!70!black},
- emph=[1]{water,body,head,eye,pupil,bill,grumpy,tshirt,jacket,tie,cape,shorthair,longhair,crazyhair,recedinghair,eyebrow,beard,glasses,sunglasses,alien,hat,cap,santa,chef,cheese,graduate,tassel,beret,crown,unicorn,icecream,flavoura,flavourb,flavourc,book,bookcolour,signpost,signcolour,signback,magichat,magicstars,magicwand,witch,cricket,rollingpin,lightsaber,torch,cake,pizza,hockey,baguette,wing,football,mask,bunny,inear,necklace,milkshake,wine,peakedcap,prison,tophat,speech,bubblecolour,think,buttons,sheep,squareglasses,tail,basket,easter,egga,eggb,eggc,mohican,mullet,horsetail,darthvader,crozier,queencrown,kingcrown,wing,laughing,parrot,stethoscope,niuqelrah,harlequin,neckerchief,woggle,snowduck,invisible,strawhat,ribbon,vampire,parting,crystalball,helmet,shovel,pickaxe,bowtie,lapel,umbrella,umbrellaclosed,handbag,cocktail,viking,devil,aodai,conicalhat,overleaf},
- texcsstyle=*\color{duckblue}\bfseries,
- keywordstyle=\color{red!60!black}\bfseries,
- morekeywords={tikzpicture,picture,scope,patterns,calc,pgfinterruptboundingbox},
- moretexcs={duck,picduck,path,definecolor,duckpathjacket,duckpathbody,duckpathgrumpybill,duckpathbill,duckpathtshirt,duckpathcape,duckpathshorthair,duckpathlonghair,duckpathcrazyhair,duckpathrecedinghair,duckpathcrown,scalebox,foreach,node,draw,PassOptionsToPackage,usetikzlibrary,selectcolormodel,colorlet,insignia,stripes,color,includegraphics,mcap,setboardfontcolors,setboardfontencoding,WhiteQueenOnWhite,WhiteKingOnWhite,superstripes,shuffleducks,randuck,randomhead,randomaccessories,duckpathmohican,duckpathmullet,duckpathqueencrown,duckpathkingcrown,duckpathdarthvader,duckpathhorsetail,tikzset,duckpathwing,shade},
- delim ={[s][\ttfamily\color{green!50!black}]{$}{$}},
- moredelim=[is][\footnotesize\ttfamily\color{orange!70!black}]{|}{|},
- index=[1][emph]
+ language={[latex]TeX},
+ tabsize=2,
+ breaklines,
+ basicstyle=\footnotesize\ttfamily,
+ commentstyle={\color{green!50!black}\slshape},
+ columns=fullflexible,
+ emphstyle=\color{orange!70!black},
+ emph=[1]{water,body,head,eye,pupil,bill,grumpy,tshirt,jacket,tie,cape,shorthair,longhair,crazyhair,recedinghair,eyebrow,beard,glasses,sunglasses,alien,hat,cap,santa,chef,cheese,graduate,tassel,beret,crown,unicorn,icecream,flavoura,flavourb,flavourc,book,bookcolour,signpost,signcolour,signback,magichat,magicstars,magicwand,witch,cricket,rollingpin,lightsaber,torch,cake,pizza,hockey,baguette,wing,football,mask,bunny,inear,necklace,milkshake,wine,peakedcap,prison,tophat,speech,bubblecolour,think,buttons,sheep,squareglasses,tail,basket,easter,egga,eggb,eggc,mohican,mullet,horsetail,darthvader,crozier,queencrown,kingcrown,wing,laughing,parrot,stethoscope,niuqelrah,harlequin,neckerchief,woggle,snowduck,invisible,strawhat,ribbon,vampire,parting,crystalball,helmet,shovel,pickaxe,bowtie,lapel,umbrella,umbrellaclosed,handbag,cocktail,viking,devil,aodai,conicalhat,overleaf,sailor},
+ texcsstyle=*\color{duckblue}\bfseries,
+ keywordstyle=\color{red!60!black}\bfseries,
+ morekeywords={tikzpicture,picture,scope,patterns,calc,pgfinterruptboundingbox},
+ moretexcs={duck,picduck,path,definecolor,duckpathjacket,duckpathbody,duckpathgrumpybill,duckpathbill,duckpathtshirt,duckpathcape,duckpathshorthair,duckpathlonghair,duckpathcrazyhair,duckpathrecedinghair,duckpathcrown,scalebox,foreach,node,draw,PassOptionsToPackage,usetikzlibrary,selectcolormodel,colorlet,insignia,stripes,color,includegraphics,mcap,setboardfontcolors,setboardfontencoding,WhiteQueenOnWhite,WhiteKingOnWhite,superstripes,shuffleducks,randuck,randomhead,randomaccessories,duckpathmohican,duckpathmullet,duckpathqueencrown,duckpathkingcrown,duckpathdarthvader,duckpathhorsetail,tikzset,duckpathwing,shade,duckhookbackground,duckhookbody,duckhookclothing,duckhookhair,duckhookhat,duckhookforeground},
+ delim ={[s][\ttfamily\color{green!50!black}]{$}{$}},
+ moredelim=[is][\footnotesize\ttfamily\color{orange!70!black}]{|}{|},
+ index=[1][emph]
}
\tcbset{%
- colframe=duckblue,
- arc=2mm,
- fonttitle=\bfseries,
- sidebyside,
- listing options={style=duckstyle},
- center lower,
- righthand width=6.5cm,
- bottom=0pt,
- top=0pt,
- before lower={%
- \setlength{\parskip}{0.5cm}%
- \spaceskip=5\fontdimen2\font%
- },
+ colframe=duckblue,
+ arc=2mm,
+ fonttitle=\bfseries,
+ sidebyside,
+ listing options={style=duckstyle},
+ center lower,
+ righthand width=6.5cm,
+ bottom=0pt,
+ top=0pt,
+ before lower={%
+ \setlength{\parskip}{0.5cm}%
+ \spaceskip=5\fontdimen2\font%
+ },
}
\lstset{style=duckstyle}
@@ -87,11 +87,11 @@
\newlength{\duckoffset}
\cfoot{%
- \tikzset{external/export=false}%
- \shuffleducks
- \begin{tikzpicture}[scale=0.5]
- \duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
- \end{tikzpicture}
+ \tikzset{external/export=false}%
+ \shuffleducks
+ \begin{tikzpicture}[scale=0.5]
+ \duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
+ \end{tikzpicture}
}
\pagestyle{scrheadings}
\indexsetup{firstpagestyle=scrheadings}
@@ -99,24 +99,24 @@
\usetikzlibrary{external}
\ifnum\pdfshellescape=1
- \tikzexternalize[prefix=./tikzducks-doc-figures/]
+ \tikzexternalize[prefix=./tikzducks-doc-figures/]
\fi
% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{The \texorpdfstring{\tikzducks}{tikzducks} package}
\subtitle{using ducks in \TikZ}
\author{%
- \texorpdfstring{\texttt{samcarter} (alias
- \tikzset{external/export=false}%
- \begin{tikzpicture}[scale=0.3,baseline=3pt]
- \duck[body=yellow!50!brown!50!white,
- longhair=red!50!brown,
- jacket=blue!50!black]
- \end{tikzpicture})\\[0.8em]
- \url{https://github.com/samcarter/tikzducks}\\
- \url{https://www.ctan.org/pkg/tikzducks}
- }{samcarter}}
-\date{Version v1.3 \textendash{} 2020/01/03}
+ \texorpdfstring{\texttt{samcarter} (alias
+ \tikzset{external/export=false}%
+ \begin{tikzpicture}[scale=0.3,baseline=3pt]
+ \duck[body=yellow!50!brown!50!white,
+ longhair=red!50!brown,
+ jacket=blue!50!black]
+ \end{tikzpicture})\\[0.8em]
+ \url{https://github.com/samcarter/tikzducks}\\
+ \url{https://www.ctan.org/pkg/tikzducks}
+ }{samcarter}}
+\date{Version v1.4 \textendash{} 2020/04/22}
\begin{document}
\maketitle
@@ -126,38 +126,38 @@
\label{intro}
Rubber ducks can be made of latex, but can they also be made with \LaTeX? Yes! The \tikzducks package is a \LaTeX{} package for rubber ducks to be used in \TikZ pictures.
-This project is a continuation of an answer at TeX.Stackexchange: \href{tex.stackexchange.com/a/347458/36296}{How can we draw a duck?}.
+This project is a continuation of \href{tex.stackexchange.com/a/347458/36296}{How can we draw a duck?}.
This package is work in progress (and will probably never be really finished as there is an infinite amount of things which could be added), therefore I would be happy to hear your feedback and ideas how to improve the package.
-The head version of the source code can be found on \url{github.com/samcarter/tikzducks}, including a bug tracker -- please make constructive use of it! A more stable package version can be found on \CTAN (\url{www.ctan.org/pkg/tikzducks}) and is included in both \miktex and \texlive as \tikzducks. If you seek any other assistance (not bug reports/feature requests), I suggest using the \href{https://tex.stackexchange.com/questions/tagged/tikzducks}{\texttt{\{tikzducks\}}-tag} on TeX.Stackexchange.
+The head version of the source code can be found on \url{github.com/samcarter/tikzducks}, including a bug tracker -- please make constructive use of it! A more stable package version can be found on \CTAN (\url{www.ctan.org/pkg/tikzducks}) and is included in both \miktex and \texlive as \tikzducks. If you seek any other assistance (not bug reports/feature requests), I suggest asking a question at \url{topanswers.xyz/tex}.
\subsection{Acknowledgements}
-Without the friendly and helpful community of \href{https://tex.stackexchange.com/}{TeX.Stackexchange} this package would not exist. I would like to thank a few fellow users in particular:
+Without the friendly and helpful community of \TeX{} users this package would not exist. I would like to thank a few fellow users in particular:
First of all
%
-\href{https://tex.stackexchange.com/users/101651/carlatex}{Carla Maggi} for pointing out the overwhelming need of having a \tikzducks package and valuable contribution to the package code, in particular the \hyperref[sec:footballducks]{football ducks},
+Carla Maggi for pointing out the overwhelming need of having a \tikzducks package and valuable contribution to the package code, in particular the \hyperref[sec:footballducks]{football ducks},
%
-\href{https://tex.stackexchange.com/users/3094/paulo-cereda}{Paulo Cereda} for his contagious enthusiasm for ducks (\emph{Quack!}) and
+Paulo Cereda for his contagious enthusiasm for ducks (\emph{Quack!}) and
%
-\href{https://tex.stackexchange.com/users/2388/ulrike-fischer}{Ulrike Fischer} for her useful \TikZ advices and contributions to the package and coming to rescue for keyword highlighting in the package documentation.
+Ulrike Fischer for her useful \TikZ advices and contributions to the package and coming to rescue for keyword highlighting in the package documentation.
Many other users contributed to this package (in random order):
%
-\href{https://tex.stackexchange.com/users/4427/egreg}{Enrico Gregorio} helped to implement the \lstinline|\tikzset{}| interface which makes it much easier to adjust the properties of the ducks to fit the user needs,
+Enrico Gregorio helped to implement the \lstinline|\tikzset{}| interface which makes it much easier to adjust the properties of the ducks to fit the user needs,
%
Andrew Stacey contributed the \TikZ Library ``ducks'',
%
-\href{https://tex.stackexchange.com/users/51022/symbol-1}{Symbol~1} solved a few problems with default key values,
+Symbol~1 solved a few problems with default key values,
%
-\href{https://tex.stackexchange.com/users/148434/mihikma}{Mihikma} created the duck's beard,
+Mihikma created the duck's beard,
%
-\href{https://github.com/yudai-nkt}{Yudai Nakata} helped with problems of \lstinline|\pdfrandomseed|,
+Yudai Nakata helped with problems of \lstinline|\pdfrandomseed|,
%
-@marmot for his seemingly infinite knowledge of \TikZ which he shared with the world on TeX.SE
+@marmot for his seemingly infinite knowledge of \TikZ which he shared with the world
%
-and last but not least my thanks go to \href{https://tex.stackexchange.com/users/5763/martin-schr%c3%b6der}{Martin Schr\"oder} for his feedback to the code review.
+and last but not least my thanks go to Martin Schr\"oder for his feedback to the code review.
\pagebreak
The ducks mostly consist of basic geometric shapes drawn in \TikZ. Some of the more complex shapes (e.g.\ the different hair styles) are first drawn in \texttt{inkscape} (\url{https://inkscape.org}) and then exported to \TikZ paths using the \texttt{SVG to TikZ/PGF} extension (\url{https://github.com/kjellmf/svg2tikz}).
@@ -167,7 +167,7 @@ The ducks mostly consist of basic geometric shapes drawn in \TikZ. Some of the m
The \tikzducks package loads \TikZ, which in turn loads the \lstinline|xcolor| package (amongst others). If you require one of these packages to be loaded with some option, please consider loading it yourself before the \tikzducks package or use, e.g.
\begin{lstlisting}[morekeywords={xcolor,svgnames}]
- \PassOptionsToPackage{svgnames}{xcolor}
+ \PassOptionsToPackage{svgnames}{xcolor}
\end{lstlisting}
It also uses the \lstinline|\usetikzlibrary{patterns}| and \lstinline|\usetikzlibrary{calc}|.
@@ -183,14 +183,14 @@ The shown example ducks are purely fictional characters, any resemblance to real
The basic usage is fairly simple, to draw a duck:
\begin{tcblisting}{title={Basic duck}}
\begin{tikzpicture}
- \duck
+ \duck
\end{tikzpicture}
\end{tcblisting}
To customise this basic duck, the package uses \lstinline|pgf| keys. For almost all parts the colour can be changed using \lstinline|<shape name>=<colour name>|. For example to change the colour of the duck:
\begin{tcblisting}{title={Blue duck}}
\begin{tikzpicture}
- \duck[body=blue]
+ \duck[body=blue]
\end{tikzpicture}
\end{tcblisting}
@@ -199,13 +199,13 @@ If the keyword consists of multiples words, it works both with and without space
\clearpage
In addition to the keys defined in this package, all usual \TikZ and \lstinline|pgf| keys can also be used. For example if the size of the ducks should be changed or shifted:
-\begin{tcblisting}{title={Scaled duck and \emph{The Ugly Duckling}}, righthand width=3cm}
+\begin{tcblisting}{title={Scaled duck and \emph{The Ugly Duckling}}, righthand width=3cm}
\begin{tikzpicture}[scale=0.6]
- \duck
- \duck[xshift=90pt, scale=.3, yshift=150pt]
- \duck[xshift=60pt, scale=.3, yshift=100pt]
- \duck[body=gray!50!white,head=gray!50!white,
- xshift=80pt, scale=.3, yshift=50pt]
+ \duck
+ \duck[xshift=90pt, scale=.3, yshift=150pt]
+ \duck[xshift=60pt, scale=.3, yshift=100pt]
+ \duck[body=gray!50!white,head=gray!50!white,
+ xshift=80pt, scale=.3, yshift=50pt]
\end{tikzpicture}
\end{tcblisting}
@@ -248,7 +248,7 @@ To make the usage easier for the \TikZ-savvy users, Andrew Stacey contributed a
For everybody suffering from anatidaephobia, there is also a special option to not draw the duck:
\begin{tcblisting}{title={Invisible duck}}
\begin{tikzpicture}
- \duck[invisible]
+ \duck[invisible]
\end{tikzpicture}
\end{tcblisting}
@@ -261,7 +261,7 @@ For the \TeX{} purists, there is also a picture mode variant:
\setlength{\unitlength}{0.6mm}
\begin{tcblisting}{title={\texttt{picture} mode duck}}
\begin{picture}(42,44)
- \picduck
+ \picduck
\end{picture}
\end{tcblisting}
}
@@ -272,10 +272,10 @@ The various parts of the duck can also be coloured independently, i.e.\ \lstinli
\begin{tcblisting}{title={Harlequin duck}}
\begin{tikzpicture}
- \duck[body=yellow,
- head=yellow!50!orange,
- bill=red,
- eye=green]
+ \duck[body=yellow,
+ head=yellow!50!orange,
+ bill=red,
+ eye=green]
\end{tikzpicture}
\end{tcblisting}
@@ -283,28 +283,28 @@ Furthermore using the keywords \lstinline|grumpy|, \lstinline|laughing| or \lsti
\begin{tcblisting}{title={Grumpy duck}}
\begin{tikzpicture}
- \duck[grumpy]
+ \duck[grumpy]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[grumpy, bill=cyan]
+ \duck[grumpy, bill=cyan]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Laughing duck}}
\begin{tikzpicture}
- \duck[laughing]
+ \duck[laughing]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[laughing, bill=red]
+ \duck[laughing, bill=red]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Parrot duck}}
\begin{tikzpicture}
- \duck[parrot]
+ \duck[parrot]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[parrot, bill=blue]
+ \duck[parrot, bill=blue]
\end{tikzpicture}
\end{tcblisting}
@@ -315,77 +315,75 @@ Some duck also like to have nice hair cuts, several different hair styles are av
\begin{tcblisting}{title={Long hair duck}}
\begin{tikzpicture}
- \duck[longhair]
+ \duck[longhair]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Short hair duck}}
\begin{tikzpicture}
- \duck[shorthair]
+ \duck[shorthair]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Parting hair duck}}
\begin{tikzpicture}
- \duck[parting]
+ \duck[parting]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Crazy hair duck}}
\begin{tikzpicture}
- \duck[crazyhair]
+ \duck[crazyhair]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Receding hair duck}}
\begin{tikzpicture}
- \duck[recedinghair]
+ \duck[recedinghair]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Mohican duck}}
\begin{tikzpicture}
- \duck[mohican]
+ \duck[mohican]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Mullet duck}}
\begin{tikzpicture}
- \duck[mullet]
+ \duck[mullet]
\end{tikzpicture}
\end{tcblisting}
And of course the colour of each hair style can be adjusted:
\begin{tcblisting}{title={Coloured hair duck}}
\begin{tikzpicture}
- \duck[longhair=teal]
+ \duck[longhair=teal]
\end{tikzpicture}
\end{tcblisting}
Eyebrows and a beard are also part of the package. The colour choice is more tricky for them -- if a colour is explicitly specified (\lstinline|eyebrow=<colour name>| or \lstinline|beard=<colour name>|) this colour is of course used, but if no colour is given, it first falls back to the hair colour and only if the duck does not have any hairs, the default colour is applied.
-\enlargethispage{2\baselineskip}
-
\begin{tcblisting}{title={Eye brow duck}}
\begin{tikzpicture}
- \duck[eyebrow]
+ \duck[eyebrow]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[longhair=blue,eyebrow]
+ \duck[longhair=blue,eyebrow]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[crazyhair=red,eyebrow=blue]
+ \duck[crazyhair=red,eyebrow=blue]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Beard duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[beard=white!80!brown]
+ \duck[beard=white!80!brown]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[recedinghair=white,beard]
+ \duck[recedinghair=white,beard]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{The beard is based on an answer by Mihikma, see \url{https://tex.stackexchange.com/a/401777/36296}}
@@ -398,43 +396,43 @@ A respectable duck needs a suitable wardrobe. It can choose from several differe
\begin{tcblisting}{title={T-shirt duck}}
\begin{tikzpicture}
- \duck[tshirt=red]
+ \duck[tshirt=red]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Jacket duck}}
\begin{tikzpicture}
- \duck[jacket=blue]
+ \duck[jacket=blue]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Tie duck}}
\begin{tikzpicture}
- \duck[tshirt,
- jacket=gray,
- tie]
+ \duck[tshirt,
+ jacket=gray,
+ tie]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Bowtie duck}}
\begin{tikzpicture}
- \duck[tshirt,
- jacket=gray,
- bowtie]
+ \duck[tshirt,
+ jacket=gray,
+ bowtie]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Áo dài duck}}
\begin{tikzpicture}
- \duck[tshirt=cyan,
- aodai=blue!50!black
- ]
+ \duck[tshirt=cyan,
+ aodai=blue!50!black
+ ]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Cape duck}}
\begin{tikzpicture}
- \duck[cape]
+ \duck[cape]
\end{tikzpicture}
\end{tcblisting}
@@ -447,82 +445,88 @@ There is a multitude of things a duck might need. The following examples all als
\begin{tcblisting}{title={Swimming duck}}
\begin{tikzpicture}
- \duck[water=cyan!50!blue]
+ \duck[water=cyan!50!blue]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Alien duck}}
\begin{tikzpicture}
- \duck[alien=green!50!brown]
+ \duck[alien=green!50!brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Hat duck}}
\begin{tikzpicture}
- \duck[hat=red!50!black]
+ \duck[hat=red!50!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Tophat duck}}
\begin{tikzpicture}
- \duck[tophat=blue!20!black]
+ \duck[tophat=blue!20!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Strawhat duck}}
\begin{tikzpicture}
- \duck[strawhat=brown!50!white, ribbon=gray]
+ \duck[strawhat=brown!50!white, ribbon=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Basecap duck}}
\begin{tikzpicture}
- \duck[cap=red!80!black]
+ \duck[cap=red!80!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Conical hat duck}}
\begin{tikzpicture}
- \duck[conicalhat=brown]
+ \duck[conicalhat=brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Santa Duck}}
\begin{tikzpicture}
- \duck[santa=red!80!black,
- beard=white!80!brown]
+ \duck[santa=red!80!black,
+ beard=white!80!brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Graduate duck}}
\begin{tikzpicture}
- \duck[graduate=gray!20!black,tassel=red!70!black]
-\end{tikzpicture}
+ \duck[graduate=gray!20!black,tassel=red!70!black]
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Beret duck}}
\begin{tikzpicture}
- \duck[beret=red!70!black]
-\end{tikzpicture}
+ \duck[beret=red!70!black]
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Peaked cap duck}}
\begin{tikzpicture}
- \duck[peakedcap=blue!50!black]
-\end{tikzpicture}
+ \duck[peakedcap=blue!50!black]
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Harlequin duck}}
\begin{tikzpicture}
- \duck[harlequin=blue,
- niuqelrah=red]
-\end{tikzpicture}
+ \duck[harlequin=blue,
+ niuqelrah=red]
+\end{tikzpicture}
+\end{tcblisting}
+
+\begin{tcblisting}{title={Sailor duck}}
+\begin{tikzpicture}
+ \duck[sailor=white]
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Crown duck}}
\begin{tikzpicture}
\duck[body=black!75!white,
- crown=yellow!70!brown]
+ crown=yellow!70!brown]
\end{tikzpicture}
\begin{tikzpicture}
@@ -535,27 +539,27 @@ There is a multitude of things a duck might need. The following examples all als
\begin{tcblisting}{title={Knight duck}}
\begin{tikzpicture}
- \duck[helmet=gray]
+ \duck[helmet=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Viking duck}}
\begin{tikzpicture}
- \duck[viking=gray]
+ \duck[viking=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Devil duck}}
\begin{tikzpicture}
- \duck[devil=red]
+ \duck[devil=red]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Unicorn duck}}
\begin{tikzpicture}
- \duck[body=pink,
- unicorn=magenta!60!violet,
- longhair=magenta!60!violet]
+ \duck[body=pink,
+ unicorn=magenta!60!violet,
+ longhair=magenta!60!violet]
\end{tikzpicture}
\end{tcblisting}
@@ -588,42 +592,42 @@ There is a multitude of things a duck might need. The following examples all als
\begin{tcblisting}{title={Witch duck}}
\begin{tikzpicture}
- \duck[witch=black!50!gray,
- longhair=red!80!black,
- jacket=black!50!gray,
- magicwand]
+ \duck[witch=black!50!gray,
+ longhair=red!80!black,
+ jacket=black!50!gray,
+ magicwand]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Magic duck}}
\begin{tikzpicture}
- \duck[magichat,magicwand]
+ \duck[magichat,magicwand]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[magichat=teal,
- magicstars=blue!30!cyan,
- magicwand]
+ \duck[magichat=teal,
+ magicstars=blue!30!cyan,
+ magicwand]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Glasses duck}}
\begin{tikzpicture}
- \duck[glasses=red!50!black]
+ \duck[glasses=red!50!black]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[squareglasses=blue!50!black]
+ \duck[squareglasses=blue!50!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Sunglasses duck}}
\begin{tikzpicture}
- \duck[sunglasses=blue]
+ \duck[sunglasses=blue]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Superhero duck}}
\begin{tikzpicture}
- \duck[mask=teal,cape=teal]
+ \duck[mask=teal,cape=teal]
\end{tikzpicture}
\end{tcblisting}
@@ -633,23 +637,23 @@ There is a multitude of things a duck might need. The following examples all als
\end{tikzpicture}
\begin{tikzpicture}
\duck[signpost=\scalebox{0.4}{
- \parbox{2cm}{\color{black}
- \centering Science\\ first}},
- signcolour=brown!70!gray,
- signback=white!80!brown]
+ \parbox{2cm}{\color{black}
+ \centering Science\\ first}},
+ signcolour=brown!70!gray,
+ signback=white!80!brown]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Speaking duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[speech={Bla},bubblecolour=cyan!20!white,laughing]
+ \duck[speech={Bla},bubblecolour=cyan!20!white,laughing]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Thinking duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[think={Blub},bubblecolour=white!95!yellow]
+ \duck[think={Blub},bubblecolour=white!95!yellow]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{Both the speech and thought bubble are inspired by the wonderful \href{https://www.ctan.org/pkg/ducksay}{ducksay package}}
@@ -657,23 +661,23 @@ There is a multitude of things a duck might need. The following examples all als
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Buttons duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[buttons=brown!50!black]
-\end{tikzpicture}
+ \duck[buttons=brown!50!black]
+\end{tikzpicture}
\begin{tikzpicture}
- \duck[jacket=red,buttons]
-\end{tikzpicture}
+ \duck[jacket=red,buttons]
+\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{In case the duck is wearing a jacket, the buttons are positioned a bit lower}
\begin{tcblisting}{title={Dinner jacket duck}}
\begin{tikzpicture}
- \duck[jacket=gray,lapel=black,buttons]
-\end{tikzpicture}
+ \duck[jacket=gray,lapel=black,buttons]
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Book duck}}
\begin{tikzpicture}
- \duck[book=\scalebox{0.5}{\TeX}]
+ \duck[book=\scalebox{0.5}{\TeX}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[book=\scalebox{0.6}{$\pi$}, bookcolour=blue!50!black]
@@ -682,20 +686,20 @@ There is a multitude of things a duck might need. The following examples all als
\begin{tcblisting}{title={Cricket duck}}
\begin{tikzpicture}
- \duck[cricket=red!50!black]
+ \duck[cricket=red!50!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Hockey duck}}
\begin{tikzpicture}
- \duck[hockey=brown!70!black]
+ \duck[hockey=brown!70!black]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Football duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[football=white!85!yellow]
+ \duck[football=white!85!yellow]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{The football duck is simplified version from an answer by Carla Maggi, \url{https://tex.stackexchange.com/a/387126/36296}}
@@ -703,52 +707,52 @@ There is a multitude of things a duck might need. The following examples all als
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Lightsaber duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[lightsaber=red,darthvader=black!30!gray]
+ \duck[lightsaber=red,darthvader=black!30!gray]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{Dedicated to the Counter Wizard (aka Christian Hupfer)}
\begin{tcblisting}{title={Torch duck}}
\begin{tikzpicture}
- \duck[torch=black!30!gray]
+ \duck[torch=black!30!gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Prison duck}}
\begin{tikzpicture}
- \duck[prison=gray]
+ \duck[prison=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Shepherd duck}}
\begin{tikzpicture}
- \duck[crozier=brown!80!black]
+ \duck[crozier=brown!80!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Necklace duck}}
\begin{tikzpicture}
- \duck[necklace=gray!20!white]
-\end{tikzpicture}
+ \duck[necklace=gray!20!white]
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Icecream duck}}
\begin{tikzpicture}
- \duck[icecream]
+ \duck[icecream]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[icecream=brown,
- flavoura=green!50!brown,
- flavourb=white,
- flavourc=red]
+ \duck[icecream=brown,
+ flavoura=green!50!brown,
+ flavourb=white,
+ flavourc=red]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Chef duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[chef=white!95!yellow,
- rollingpin=brown!80!black]
+ \duck[chef=white!95!yellow,
+ rollingpin=brown!80!black]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{The chef duck is based on an idea by Carla Maggi, please see the following link for a more sophisticated version of the toque and the rolling pin: \url{https://tex.stackexchange.com/a/387126/36296}}
@@ -756,137 +760,137 @@ There is a multitude of things a duck might need. The following examples all als
\begin{tcblisting}{title={Cake duck}}
\begin{tikzpicture}
\duck[cake=red!50!violet!80!black]
-\end{tikzpicture}
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Pizza duck}}
\begin{tikzpicture}
\duck[pizza]
-\end{tikzpicture}
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Baguette duck}}
\begin{tikzpicture}
\duck[baguette=brown]
-\end{tikzpicture}
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Cheese duck}}
\begin{tikzpicture}
\duck[cheese=orange]
-\end{tikzpicture}
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Milkshake duck}}
\begin{tikzpicture}
- \duck[milkshake=red!20!white]
-\end{tikzpicture}
+ \duck[milkshake=red!20!white]
+\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Wine duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[wine=red!70!black]
+ \duck[wine=red!70!black]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{According to the resident Italian wine expert of the \href{https://chat.stackexchange.com/transcript/message/40103109}{ TeX.SE chatroom}, the duck is drinking a fine Brunello di Montalcino}
\begin{tcblisting}{title={Cocktail duck}}
\begin{tikzpicture}
- \duck[cocktail]
-\end{tikzpicture}
+ \duck[cocktail]
+\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Wing duck}}
\begin{tikzpicture}
- \duck[wing=yellow!90!brown]
+ \duck[wing=yellow!90!brown]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Basket duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[basket=brown]
+ \duck[basket=brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Easter duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[bunny,easter]
+ \duck[bunny,easter]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[bunny,easter=brown,
- egga=cyan,eggb=orange,eggc=teal]
+ \duck[bunny,easter=brown,
+ egga=cyan,eggb=orange,eggc=teal]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{The basket and Easter basket was kindly contributed by Benito van der Zander}
\begin{tcblisting}{title={Ducktor}}
\begin{tikzpicture}
- \duck[stethoscope=gray!80!black]
+ \duck[stethoscope=gray!80!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Neckerchief duck}}
\begin{tikzpicture}
- \duck[neckerchief=red!70!black,
- woggle=blue!60!black]
+ \duck[neckerchief=red!70!black,
+ woggle=blue!60!black]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Snow Duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[snowduck=white]
+ \duck[snowduck=white]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{The snowduck is dedicated to all Japanese \TeX\ users}
\begin{tcblisting}{title={Vampire Duck}}
\begin{tikzpicture}
- \duck[vampire=white]
+ \duck[vampire=white]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[laughing, vampire=white]
+ \duck[laughing, vampire=white]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Fortune Quacker$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[crystalball=cyan]
+ \duck[crystalball=cyan]
\end{tikzpicture}
\end{tcblisting}
-\footnotetext[\thefootnote]{The crystal ball is kindly contributed by \href{https://tex.stackexchange.com/users/121799/marmot}{@marmot}}
+\footnotetext[\thefootnote]{The crystal ball is kindly contributed by @marmot}
\begin{tcblisting}{title={Shovelling Duck}}
\begin{tikzpicture}
- \duck[shovel=gray]
+ \duck[shovel=gray]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[pickaxe=gray]
+ \duck[pickaxe=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Umbrella Duck}}
\begin{tikzpicture}
- \duck[umbrella=cyan]
+ \duck[umbrella=cyan]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[umbrellaclosed=cyan]
+ \duck[umbrellaclosed=cyan]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Handbag Duck}}
\begin{tikzpicture}
- \duck[handbag=red!70!black]
+ \duck[handbag=red!70!black]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Overleaf Duck$^{\thefootnote}$}}
\begin{tikzpicture}
- \duck[overleaf]
+ \duck[overleaf]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{added to celebrate that \tikzducks are now also available on overleaf, see \url{https://www.overleaf.com/blog/tex-live-upgrade-september-2019}}
@@ -897,7 +901,7 @@ With all these available accessories it might be hard to decide which one to cho
\begin{tcblisting}{title={Random duck}}
\begin{tikzpicture}
- \randuck
+ \randuck
\end{tikzpicture}
\end{tcblisting}
@@ -905,8 +909,8 @@ In case the duck should not be completely random, but only some of the random el
\begin{tcblisting}{title={Random head gear and accessories}}
\begin{tikzpicture}
- \shuffleducks
- \duck[\randomhead, \randomaccessories]
+ \shuffleducks
+ \duck[\randomhead, \randomaccessories]
\end{tikzpicture}
\end{tcblisting}
@@ -916,15 +920,15 @@ This package will never be able to do everything every potential user might want
\begin{tcblisting}{title={Adding things to the duck}}
\begin{tikzpicture}
- \duck
- \fill[blue] (2,0) rectangle (1,1);
+ \duck
+ \fill[blue] (2,0) rectangle (1,1);
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Monochrome duck}}
\begin{tikzpicture}
- \selectcolormodel{gray}
- \duck
+ \selectcolormodel{gray}
+ \duck
\end{tikzpicture}
\end{tcblisting}
@@ -932,9 +936,9 @@ For convenience the more complex paths of this package are stored in macros, whi
\begin{tcblisting}{title={Redraw parts}}
\begin{tikzpicture}
- \duck
- \path[preaction={fill, red!50!black},pattern=fivepointed stars, pattern color=yellow]
- \duckpathlonghair;
+ \duck
+ \path[preaction={fill, red!50!black},pattern=fivepointed stars, pattern color=yellow]
+ \duckpathlonghair;
\end{tikzpicture}
\end{tcblisting}
@@ -943,7 +947,6 @@ In detail, the following paths are available:
\begin{lstlisting}[aboveskip=1.2em,breakindent=0pt]
\duckpathbody, \duckpathgrumpybill, \duckpathbill, \duckpathtshirt, \duckpathjacket,\duckpathcape, \duckpathshorthair, \duckpathlonghair, \duckpathcrazyhair, \duckpathrecedinghair, \duckpathcrown, \duckpathmohican, \duckpathmullet, \duckpathqueencrown, \duckpathkingcrown, \duckpathdarthvader, \duckpathhorsetail
\end{lstlisting}
-\enlargethispage*{\baselineskip}
In case one of the other shapes is needed, please have a look at the package source code, which can be found in \lstinline|tikzducks.sty|.
@@ -953,15 +956,15 @@ To ease the placement of further accessories, some particular spots of the duck
\footnotesize\ttfamily
\begin{tcblisting}{title={\normalfont\normalsize\bfseries Coordinates}}
\begin{tikzpicture}[scale=2]
- \duck
- \fill[black] (wing) circle (0.04);
- \fill[black] (head) circle (0.04);
- \fill[black] (bill) circle (0.04);
- \fill[black] (tail) circle (0.04);
- \node[xshift=15] at (wing) {Wing};
- \node[xshift=15] at (head) {Head};
- \node[xshift=18] at (bill) {Bill};
- \node[xshift=15] at (tail) {Tail};
+ \duck
+ \fill[black] (wing) circle (0.04);
+ \fill[black] (head) circle (0.04);
+ \fill[black] (bill) circle (0.04);
+ \fill[black] (tail) circle (0.04);
+ \node[xshift=15] at (wing) {Wing};
+ \node[xshift=15] at (head) {Head};
+ \node[xshift=18] at (bill) {Bill};
+ \node[xshift=15] at (tail) {Tail};
\end{tikzpicture}
\end{tcblisting}
}
@@ -970,11 +973,80 @@ To distinguish coordinates from multiple ducks in the same \lstinline|tikzpictur
\begin{tcblisting}{title={Named coordinates},listing options={style={duckstyle}, emph={name,wing}}}
\begin{tikzpicture}
- \duck[name=foo]
- \duck[name=bar,xshift=90pt,
- scale=.3,yshift=150pt]
- \draw (foo-wing) -- (bar-wing);
-\end{tikzpicture}
+ \duck[name=foo]
+ \duck[name=bar,xshift=90pt,
+ scale=.3,yshift=150pt]
+ \draw (foo-wing) -- (bar-wing);
+\end{tikzpicture}
+\end{tcblisting}
+
+Sometimes it might desirable to add things at a specific z-position, for example re-draw a t-shirt with some pattern that should be below the duck's hair and accessories. To facilitate this the \tikzducks provide a couple of hooks: \lstinline|\duckhookbackground|, \lstinline|\duckhookbody|, \lstinline|\duckhookclothing|, \lstinline|\duckhookhair|, \lstinline|\duckhookhat| and \lstinline|\duckhookforeground|.
+
+\begin{center}
+\footnotesize\ttfamily \textbackslash duckhook\dots
+
+ \begin{tikzpicture}
+ \newcommand{\planes}{\fill[gray!20!white,opacity=0.9] (-0.1,-0.1) rectangle (2.4,2.4);}
+ \newcommand{\hooks}{\draw[duckblue, rounded corners=3pt, line width=1pt] (-0.1,-0.1) rectangle (2.4,2.4);}
+ \node[font=\footnotesize\ttfamily] at (-0.8,-1.4) {\strut background};
+ \begin{scope}[canvas is zy plane at x=0]
+ \hooks
+ \end{scope}
+ \begin{scope}[canvas is zy plane at x=0.8]
+ \planes
+ \duck
+ \end{scope}
+ \node[font=\footnotesize\ttfamily] at (0.8,-1.4) {\strut body};
+ \begin{scope}[canvas is zy plane at x=1.6]
+ \hooks
+ \end{scope}
+ \begin{scope}[canvas is zy plane at x=2.4]
+ \planes
+ \duck[invisible,jacket=black!50!gray]
+ \end{scope}
+ \node[font=\footnotesize\ttfamily] at (2.4,-1.4) {\strut clothing};
+ \begin{scope}[canvas is zy plane at x=3.2]
+ \hooks
+ \end{scope}
+ \begin{scope}[canvas is zy plane at x=4.0]
+ \planes
+ \duck[invisible,longhair=red!80!black]
+ \end{scope}
+ \node[font=\footnotesize\ttfamily] at (4.0,-1.4) {\strut hair};
+ \begin{scope}[canvas is zy plane at x=4.8]
+ \hooks
+ \end{scope}
+ \begin{scope}[canvas is zy plane at x=5.6]
+ \planes
+ \duck[invisible,witch=black!50!gray];
+ \end{scope}
+ \node[font=\footnotesize\ttfamily] at (5.6,-1.4) {\strut hat};
+ \begin{scope}[canvas is zy plane at x=6.4]
+ \hooks
+ \end{scope}
+ \begin{scope}[canvas is zy plane at x=7.2]
+ \planes
+ \duck[invisible,magicwand]
+ \end{scope}
+ \node[font=\footnotesize\ttfamily] at (7.2,-1.4) {\strut foreground};
+ \begin{scope}[canvas is zy plane at x=8.0]
+ \hooks
+ \end{scope}
+ \end{tikzpicture}
+\end{center}
+
+These hooks can be defined by the user as needed:
+
+\begin{tcblisting}{title={Hooks}}
+\begin{tikzpicture}
+ \begingroup
+ \newcommand{\duckhookclothing}{\path[pattern=fivepointed stars, pattern color=yellow] \duckpathjacket;}
+ \duck[witch=black!50!gray,
+ longhair=red!80!black,
+ jacket=black!50!gray,
+ magicwand]
+ \endgroup
+\end{tikzpicture}
\end{tcblisting}
\clearpage
@@ -988,8 +1060,8 @@ A (non-representative) survey$^{\thefootnote}$\footnotetext[\thefootnote]{see th
\begin{tcblisting}{title={\texttt{stripes} macro}}
\begin{tikzpicture}
- \duck
- \stripes
+ \duck
+ \stripes
\end{tikzpicture}
\end{tcblisting}
@@ -997,47 +1069,47 @@ This may be impractical as the stripes are drawn on top of any accessories or ha
\begin{tcblisting}{title={Using \texttt{stripes} for \texttt{tikzducks}}}
\begin{tikzpicture}
- \duck[longhair,|stripes|={\stripes}]
+ \duck[longhair,|stripes|={\stripes}]
\end{tikzpicture}
\end{tcblisting}
Not all teams wear vertically stripped jerseys, therefore many parameters can be adjusted to best emulate your favourite teams jerseys. The available options are:
\begin{tabular}{@{}ll@{}}
- \lstinline|color| & colour of the stripes, default:
- \lstinline|black| \\
- \lstinline|distance| & periodicity length of the stripes, default:
- \lstinline|0.3| \\
- \lstinline|width| & stripe width, default: \lstinline|0.15| \\
- \lstinline|height| & length of the stripes, default:
- \lstinline|2.7| \\
- \lstinline|initialx| & x coordinate of staring point, default:
- \lstinline|0.1| \\
- \lstinline|initialy| & y coordinate of staring point, default:
- \lstinline|-0.3| \\
- \lstinline|rotate| & rotation angle in degree, default:
- \lstinline|-10|\\
- \lstinline|emblem| & possibility to add logos etc., default: empty\\
+ \lstinline|color| & colour of the stripes, default:
+ \lstinline|black| \\
+ \lstinline|distance| & periodicity length of the stripes, default:
+ \lstinline|0.3| \\
+ \lstinline|width| & stripe width, default: \lstinline|0.15| \\
+ \lstinline|height| & length of the stripes, default:
+ \lstinline|2.7| \\
+ \lstinline|initialx| & x coordinate of staring point, default:
+ \lstinline|0.1| \\
+ \lstinline|initialy| & y coordinate of staring point, default:
+ \lstinline|-0.3| \\
+ \lstinline|rotate| & rotation angle in degree, default:
+ \lstinline|-10|\\
+ \lstinline|emblem| & possibility to add logos etc., default: empty\\
\end{tabular}
Please note that the colour of the stripes only affects the stripes themselves, to influence the colour of the empty space between the stripes, clothe the duck with a \lstinline|tshirt| or \lstinline|jacket| of the desired colour underneath the stripes.
\begin{tcblisting}{title={\texttt{stripes} options}}
\begin{tikzpicture}
- \duck[stripes]
+ \duck[stripes]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[|stripes|={
- \stripes[color=blue]}]
+ \duck[|stripes|={
+ \stripes[color=blue]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
- \stripes[distance=0.6]}]
+ \stripes[distance=0.6]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
- \stripes[width=0.03]}]
+ \stripes[width=0.03]}]
\end{tikzpicture}
\begin{tikzpicture}
@@ -1045,25 +1117,25 @@ Please note that the colour of the stripes only affects the stripes themselves,
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
- \stripes[height=1.0]}]
+ \stripes[height=1.0]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
- \stripes[initialx=1]}]
+ \stripes[initialx=1]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
- \stripes[initialy=0.8]}]
+ \stripes[initialy=0.8]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
- \stripes[rotate=45]}]
+ \stripes[rotate=45]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
- \stripes[rotate=-45]}]
+ \stripes[rotate=-45]}]
\end{tikzpicture}
\end{tcblisting}
@@ -1133,8 +1205,8 @@ A few examples to see \lstinline|stripes| in action:
\begin{tcblisting}{title={Brescia duck}}
\begin{tikzpicture}
\duck[tshirt=blue, jacket=blue,|stripes|={
- \stripes[color=white, rotate=-70, width=0.22,distance=1.1, initialy=0.01]
- \stripes[color=white, rotate=40, width=0.2, distance=1.8, initialy=1.0,initialx=0.285]
+ \stripes[color=white, rotate=-70, width=0.22,distance=1.1, initialy=0.01]
+ \stripes[color=white, rotate=40, width=0.2, distance=1.8, initialy=1.0,initialx=0.285]
},football]
\end{tikzpicture}
\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks.sty b/graphics/pgf/contrib/tikzducks/tikzducks.sty
index f0d9e735ec..aa15e471fa 100644
--- a/graphics/pgf/contrib/tikzducks/tikzducks.sty
+++ b/graphics/pgf/contrib/tikzducks/tikzducks.sty
@@ -12,20 +12,12 @@
% See http://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzducks}[2020/01/03 version v1.3 Draw rubber ducks in TikZ]
+\ProvidesPackage{tikzducks}[2020/04/22 version v1.4 Draw rubber ducks in TikZ]
\RequirePackage{tikz}
\usetikzlibrary{patterns} % for the wizard hat
\usetikzlibrary{calc} % for the sports jerseys
-%\pgfdeclarelayer{backgroundlayer}
-%\pgfdeclarelayer{bodylayer}
-%\pgfdeclarelayer{clothinglayer}
-%\pgfdeclarelayer{hairlayer}
-%\pgfdeclarelayer{hatlayer}
-%
-%\pgfsetlayers{backgroundlayer,bodylayer,clothinglayer,hairlayer,hatlayer,main}
-
\definecolor{duck@overleafcol}{RGB}{72,172,60}
\newcommand*{\duck}[1][]{%
@@ -87,6 +79,7 @@
\newif\ifduck@viking
\newif\ifduck@devil
\newif\ifduck@conicalhat
+\newif\ifduck@sailor
% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifduck@glasses
\newif\ifduck@sunglasses
@@ -174,22 +167,22 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tshirt/.code = \duck@tshirttrue
- \duck@clothingtrue
+ \duck@clothingtrue
\def\duck@tshirt{#1},
tshirt/.default = white,
jacket/.code = \duck@jackettrue
- \duck@clothingtrue
+ \duck@clothingtrue
\def\duck@jacket{#1},
jacket/.default = blue,
tie/.code = \duck@tietrue
\def\duck@tie{#1},
tie/.default = blue,
cape/.code = \duck@capetrue
- \duck@clothingtrue
+ \duck@clothingtrue
\def\duck@cape{#1},
cape/.default = red,
stripes/.code = \duck@stripestrue
- \duck@clothingtrue
+ \duck@clothingtrue
\def\duck@stripes{#1},
stripes/.default = \stripes ,
bowtie/.code = \duck@bowtietrue
@@ -200,7 +193,7 @@
\def\duck@lapel{#1},
lapel/.default = black,
aodai/.code = \duck@aodaitrue
- \duck@clothingtrue
+ \duck@clothingtrue
\def\duck@aodai{#1},
ao dai/.forward to = /duck/aodai,
aodai/.default = blue!50!black,
@@ -336,6 +329,9 @@
\def\duck@conicalhat{#1},
conical hat/.forward to = /duck/conicalhat,
conicalhat/.default = brown!90!orange!90!white,
+ sailor/.code = \duck@sailortrue
+ \def\duck@sailor{#1},
+ sailor/.default = white!80!gray,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Accessories
@@ -507,20 +503,20 @@
umbrella/.code = \duck@umbrellatrue
\def\duck@umbrella{#1},
umbrella/.default = cyan,
- umbrellaclosed/.code = \duck@umbrellaclosedtrue
- \def\duck@umbrellaclosed{#1},
- umbrellaclosed/.default = cyan,
- umbrella closed/.forward to = /duck/umbrellaclosed,
- handbag/.code = \duck@handbagtrue
- \def\duck@handbag{#1},
- handbag/.default = red!70!black,
- cocktail/.code = \duck@cocktailtrue,
+ umbrellaclosed/.code = \duck@umbrellaclosedtrue
+ \def\duck@umbrellaclosed{#1},
+ umbrellaclosed/.default = cyan,
+ umbrella closed/.forward to = /duck/umbrellaclosed,
+ handbag/.code = \duck@handbagtrue
+ \def\duck@handbag{#1},
+ handbag/.default = red!70!black,
+ cocktail/.code = \duck@cocktailtrue,
overleaf/.code = \duck@overleaftrue
\def\duck@body{duck@overleafcol}
\duck@graduatetrue
\def\duck@graduate{black}
\duck@squareglassestrue
- \def\duck@squareglasses{black}
+ \def\duck@squareglasses{black}
}
\def\duck@draw{
@@ -558,7 +554,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -567,7 +563,9 @@
% Environment
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\begin{pgfonlayer}{backgroundlayer}
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname duckhookbackground\endcsname
%
% water %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@water
@@ -588,17 +586,15 @@
\fi
% Conical Hat (background) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@conicalhat
- \fill[\duck@conicalhat!50!black,rotate=-21] (0.265,1.915) ellipse[x radius=0.79, y radius=0.1];
- \fill[\duck@conicalhat!30!black] (0.5501,0.9739) -- (0.2002,1.9676) -- (0.2946,2.0008) -- (0.6445,1.0072) -- cycle;
+ \fill[\duck@conicalhat!50!black,rotate=-21] (0.265,1.915) ellipse[x radius=0.79, y radius=0.1];
+ \fill[\duck@conicalhat!30!black] (0.5501,0.9739) -- (0.2002,1.9676) -- (0.2946,2.0008) -- (0.6445,1.0072) -- cycle;
\fi
%
-%\end{pgfonlayer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% body parts
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\begin{pgfonlayer}{bodylayer}
\ifduck@invisible
\else
%
@@ -617,9 +613,9 @@
\fill[\duck@bill] \duckpathgrumpybill;
\else
\ifduck@laughing
- \begin{pgfinterruptboundingbox}
- \fill[\duck@bill!80!black] (0.40,1.20) .. controls (0.54,1.36) and (0.65,1.31) .. (0.91,1.37) .. controls (0.45,1.06) and (0.36,1.18) .. (0.40,1.20) -- cycle;
- \fill[\duck@bill]
+ \begin{pgfinterruptboundingbox}
+ \fill[\duck@bill!80!black] (0.40,1.20) .. controls (0.54,1.36) and (0.65,1.31) .. (0.91,1.37) .. controls (0.45,1.06) and (0.36,1.18) .. (0.40,1.20) -- cycle;
+ \fill[\duck@bill]
(0.41,1.47) .. controls (0.64,1.53) and (0.54,1.30) ..
(0.91,1.37) .. controls (-0.02,1.10) and (0.28,1.37) ..
(0.41,1.47) -- cycle;
@@ -658,21 +654,23 @@
(-0.03,1.73) ellipse[x radius=0.0286, y radius=0.0643];
%
\fi % from no duck
-%\end{pgfonlayer}
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname duckhookbody\endcsname
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% clothing
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\begin{pgfonlayer}{clothinglayer}
%
% Strap of the conical hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@conicalhat
- \ifduck@clothing
- \fill[\duck@conicalhat!30!black] (1.5943,1.5059) .. controls (1.4384,1.3576) and (1.2780,1.2120) .. (1.0987,1.0923) -- (1.0617,0.9549) .. controls (1.2151,1.0361) and (1.3476,1.1504) .. (1.4785,1.2630) .. controls (1.5417,1.3187) and (1.6038,1.3757) .. (1.6644,1.4344) -- cycle;
- \else
- \fill[\duck@conicalhat!30!black] (1.5943,1.5059) .. controls (1.4384,1.3576) and (1.2780,1.2120) .. (1.0987,1.0923) .. controls (0.9540,0.9995) and (0.7864,0.9875) .. (0.6358,1.0398) .. controls (0.6727,0.9043) and (0.9752,0.9113) .. (1.0617,0.9549) .. controls (1.2151,1.0361) and (1.3476,1.1504) .. (1.4785,1.2630) .. controls (1.5417,1.3187) and (1.6038,1.3757) .. (1.6644,1.4344) -- cycle;
- \fi
+ \ifduck@clothing
+ \fill[\duck@conicalhat!30!black] (1.5943,1.5059) .. controls (1.4384,1.3576) and (1.2780,1.2120) .. (1.0987,1.0923) -- (1.0617,0.9549) .. controls (1.2151,1.0361) and (1.3476,1.1504) .. (1.4785,1.2630) .. controls (1.5417,1.3187) and (1.6038,1.3757) .. (1.6644,1.4344) -- cycle;
+ \else
+ \fill[\duck@conicalhat!30!black] (1.5943,1.5059) .. controls (1.4384,1.3576) and (1.2780,1.2120) .. (1.0987,1.0923) .. controls (0.9540,0.9995) and (0.7864,0.9875) .. (0.6358,1.0398) .. controls (0.6727,0.9043) and (0.9752,0.9113) .. (1.0617,0.9549) .. controls (1.2151,1.0361) and (1.3476,1.1504) .. (1.4785,1.2630) .. controls (1.5417,1.3187) and (1.6038,1.3757) .. (1.6644,1.4344) -- cycle;
+ \fi
\fi
%
% tshirt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -694,21 +692,16 @@
\end{pgfinterruptboundingbox}
\fi
%
-% bowtie %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@bowtie
- \fill[\duck@bowtie] (0.4382, 1.1105) .. controls (0.3984, 1.0671) and (0.3911, 0.9535) .. (0.4116, 0.9176) .. controls (0.4958, 0.9064) and (0.565, 0.9487) .. (0.565, 0.9487) -- (0.6448, 0.9398) .. controls (0.6448, 0.9398) and (0.6777, 0.8844) .. (0.804, 0.8689) .. controls (0.8323, 0.9056) and (0.8422, 1.0026) .. (0.8284, 1.0551) .. controls (0.7881, 1.0942) and (0.6537, 1.0285) .. (0.6537, 1.0285) -- (0.5739, 1.0374) .. controls (0.5739, 1.0374) and (0.5436, 1.0956) .. (0.4382, 1.1105) -- cycle;
-\fi
-%
% Áo dài %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@aodai
- \begin{pgfinterruptboundingbox}
- \fill[\duck@aodai] (1.819,1.419) .. controls (2.871,0.120) and (0.711,-0.145) .. (0.296,0.251) .. controls (-0.118,0.647) and (0.232,1.073) .. (0.440,1.128) -- (0.567,0.927) .. controls (0.567,0.927) and (0.543,0.906) .. (0.509,0.882) -- (0.481,0.929) -- (0.458,0.915) -- (0.487,0.868) .. controls (0.473,0.859) and (0.457,0.850) .. (0.441,0.842) -- (0.422,0.894) -- (0.397,0.885) -- (0.417,0.831) .. controls (0.404,0.826) and (0.391,0.821) .. (0.378,0.818) -- (0.364,0.869) -- (0.338,0.862) -- (0.351,0.815) .. controls (0.334,0.814) and (0.318,0.817) .. (0.304,0.825) .. controls (0.303,0.774) and (0.329,0.759) .. (0.365,0.763) -- (0.376,0.722) -- (0.402,0.729) -- (0.391,0.768) .. controls (0.405,0.772) and (0.420,0.778) .. (0.435,0.784) -- (0.447,0.750) -- (0.472,0.759) -- (0.459,0.796) .. controls (0.477,0.805) and (0.496,0.815) .. (0.512,0.825) -- (0.533,0.791) -- (0.556,0.805) -- (0.535,0.840) .. controls (0.567,0.860) and (0.590,0.877) .. (0.590,0.877) .. controls (1.011,1.168) and (0.887,0.936) .. (1.819,1.419) -- cycle;
- \end{pgfinterruptboundingbox}
+ \begin{pgfinterruptboundingbox}
+ \fill[\duck@aodai] (1.819,1.419) .. controls (2.871,0.120) and (0.711,-0.145) .. (0.296,0.251) .. controls (-0.118,0.647) and (0.232,1.073) .. (0.440,1.128) -- (0.567,0.927) .. controls (0.567,0.927) and (0.543,0.906) .. (0.509,0.882) -- (0.481,0.929) -- (0.458,0.915) -- (0.487,0.868) .. controls (0.473,0.859) and (0.457,0.850) .. (0.441,0.842) -- (0.422,0.894) -- (0.397,0.885) -- (0.417,0.831) .. controls (0.404,0.826) and (0.391,0.821) .. (0.378,0.818) -- (0.364,0.869) -- (0.338,0.862) -- (0.351,0.815) .. controls (0.334,0.814) and (0.318,0.817) .. (0.304,0.825) .. controls (0.303,0.774) and (0.329,0.759) .. (0.365,0.763) -- (0.376,0.722) -- (0.402,0.729) -- (0.391,0.768) .. controls (0.405,0.772) and (0.420,0.778) .. (0.435,0.784) -- (0.447,0.750) -- (0.472,0.759) -- (0.459,0.796) .. controls (0.477,0.805) and (0.496,0.815) .. (0.512,0.825) -- (0.533,0.791) -- (0.556,0.805) -- (0.535,0.840) .. controls (0.567,0.860) and (0.590,0.877) .. (0.590,0.877) .. controls (1.011,1.168) and (0.887,0.936) .. (1.819,1.419) -- cycle;
+ \end{pgfinterruptboundingbox}
\fi
%
% lapel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@lapel
- \fill[\duck@lapel] (0.490,1.145) .. controls (0.3984,1.13) and (0.3515,1.08) .. (0.3515,1.08) -- (0.4265,1.0192) -- (0.35,0.98) -- (0.513,0.700) -- (1.0089,0.9162) -- (0.9547,0.9868) -- (1.1194,0.9782) -- (1.0822,1.135) .. controls (0.9616,1.1) and (0.8648,1.0300) .. (0.513,0.700) -- cycle;
+ \fill[\duck@lapel] (0.490,1.145) .. controls (0.3984,1.13) and (0.3515,1.08) .. (0.3515,1.08) -- (0.4265,1.0192) -- (0.35,0.98) -- (0.513,0.700) -- (1.0089,0.9162) -- (0.9547,0.9868) -- (1.1194,0.9782) -- (1.0822,1.135) .. controls (0.9616,1.1) and (0.8648,1.0300) .. (0.513,0.700) -- cycle;
\fi
%
% stripes for football jersey %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -723,6 +716,11 @@
\end{pgfinterruptboundingbox}
\fi
%
+% bowtie %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@bowtie
+ \fill[\duck@bowtie] (0.4382, 1.1105) .. controls (0.3984, 1.0671) and (0.3911, 0.9535) .. (0.4116, 0.9176) .. controls (0.4958, 0.9064) and (0.565, 0.9487) .. (0.565, 0.9487) -- (0.6448, 0.9398) .. controls (0.6448, 0.9398) and (0.6777, 0.8844) .. (0.804, 0.8689) .. controls (0.8323, 0.9056) and (0.8422, 1.0026) .. (0.8284, 1.0551) .. controls (0.7881, 1.0942) and (0.6537, 1.0285) .. (0.6537, 1.0285) -- (0.5739, 1.0374) .. controls (0.5739, 1.0374) and (0.5436, 1.0956) .. (0.4382, 1.1105) -- cycle;
+\fi
+%
% necklace (not really clothing, but needs to be below the hair) %%%%%
\ifduck@necklace
\fill[\duck@necklace] (0.5000,1.112) circle[radius=0.032] (0.5100,1.050) circle[radius=0.032] (0.5200,0.990) circle[radius=0.032] (0.5400,0.931) circle[radius=0.032] (0.5825,0.885) circle[radius=0.032] (0.6450,0.885) circle[radius=0.032] (0.7000,0.910) circle[radius=0.032] (0.7500,0.945) circle[radius=0.032] (0.8000,0.980) circle[radius=0.032] (0.8500,1.020) circle[radius=0.032] (0.9000,1.050) circle[radius=0.032] (0.9500,1.080) circle[radius=0.032] (1.0000,1.110) circle[radius=0.032] (1.0550,1.130) circle[radius=0.032] (1.1100,1.150) circle[radius=0.032] (1.1650,1.165) circle[radius=0.032] (1.2200,1.180) circle[radius=0.032] (1.2750,1.195) circle[radius=0.032] (1.3300,1.210) circle[radius=0.032];
@@ -744,13 +742,14 @@
\fi
\fi
%
-%\end{pgfonlayer}
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname duckhookclothing\endcsname
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% hair styles
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\begin{pgfonlayer}{hairlayer}
%
% short hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@shorthair
@@ -828,13 +827,14 @@
\fill[\duck@beard] (1.3,1.3) -- (0.5,1.05) -- (0.65,0.65) -- cycle;
\fi%
%
-%\end{pgfonlayer}
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname duckhookhair\endcsname
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Headgear
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\begin{pgfonlayer}{hatlayer}
%
% alien %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@alien
@@ -846,14 +846,14 @@
%
% hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@hat
- \ifdefined\duck@hair % with hair
- \fill[\duck@hat,rotate=-15] (0.44,2.1) ellipse[x radius=0.7, y radius=0.1];
- \fill[\duck@hat,rotate=-15] (0.0,2.1) rectangle (0.88,2.4);
- \fill[\duck@hat,rotate=-15] (0.44,2.4) ellipse[x radius=0.44, y radius=0.08];
+ \ifdefined\duck@hair % with hair
+ \fill[\duck@hat,rotate=-15] (0.44,2.1) ellipse[x radius=0.7, y radius=0.1];
+ \fill[\duck@hat,rotate=-15] (0.0,2.1) rectangle (0.88,2.4);
+ \fill[\duck@hat,rotate=-15] (0.44,2.4) ellipse[x radius=0.44, y radius=0.08];
\else % without hair
- \fill[\duck@hat,rotate=-15] (0.44,2.1) ellipse[x radius=0.6, y radius=0.1];
- \fill[\duck@hat,rotate=-15] (0.07,2.1) rectangle (0.81,2.4);
- \fill[\duck@hat,rotate=-15] (0.44,2.4) ellipse[x radius=0.37, y radius=0.08];
+ \fill[\duck@hat,rotate=-15] (0.44,2.1) ellipse[x radius=0.6, y radius=0.1];
+ \fill[\duck@hat,rotate=-15] (0.07,2.1) rectangle (0.81,2.4);
+ \fill[\duck@hat,rotate=-15] (0.44,2.4) ellipse[x radius=0.37, y radius=0.08];
\fi
\fi
%
@@ -1023,13 +1023,20 @@
%
% Conical Hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@conicalhat
- \path (0.19,1.4) rectangle (1.68,2.32);
- \begin{pgfinterruptboundingbox}
- \fill[\duck@conicalhat] (1.6722,1.4137) .. controls (1.6722,1.4337) and (1.3592,1.6230) .. (0.9513,1.7735) .. controls (0.5433,1.9239) and (0.1948,1.9784) .. (0.1948,1.9754) .. controls (0.2049,2.0230) and (1.1428,2.36) .. (1.1428,2.3) .. controls (1.1428,2.35) and (1.6821,1.4784) .. (1.6722,1.4137) -- cycle;
- \end{pgfinterruptboundingbox}
+ \path (0.19,1.4) rectangle (1.68,2.32);
+ \begin{pgfinterruptboundingbox}
+ \fill[\duck@conicalhat] (1.6722,1.4137) .. controls (1.6722,1.4337) and (1.3592,1.6230) .. (0.9513,1.7735) .. controls (0.5433,1.9239) and (0.1948,1.9784) .. (0.1948,1.9754) .. controls (0.2049,2.0230) and (1.1428,2.36) .. (1.1428,2.3) .. controls (1.1428,2.35) and (1.6821,1.4784) .. (1.6722,1.4137) -- cycle;
+ \end{pgfinterruptboundingbox}
\fi
%
-%\end{pgfonlayer}
+% Sailor hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@sailor
+ \fill[\duck@sailor] (1.0390,2.2743) .. controls (0.9475,2.2748) and (0.8569,2.2355) .. (0.7943,2.1690) .. controls (0.7147,2.1872) and (0.6335,2.2098) .. (0.5512,2.2029) .. controls (0.5524,2.1164) and (0.5536,2.0299) .. (0.5547,1.9434) .. controls (0.6637,1.9348) and (0.7679,1.8974) .. (0.8716,1.8653) .. controls (1.0321,1.8101) and (1.1932,1.7522) .. (1.3420,1.6697) .. controls (1.3671,1.6622) and (1.3911,1.6147) .. (1.4083,1.6518) .. controls (1.4623,1.7160) and (1.5163,1.7802) .. (1.5702,1.8444) .. controls (1.5154,1.8979) and (1.4433,1.9287) .. (1.3757,1.9624) .. controls (1.3666,2.1156) and (1.2403,2.2511) .. (1.0881,2.2707) .. controls (1.0718,2.2731) and (1.0554,2.2743) .. (1.0390,2.2743) -- cycle;
+\fi
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname duckhookhat\endcsname
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Accessories
@@ -1333,35 +1340,35 @@
%
% shovel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@shovel
- \fill[brown!80!black,rotate around={-23:(0.91, 0.88)}] (0.87, 0.28) rectangle ++(0.1,1.4);
- \fill[\duck@shovel] (0.6133, 0.9536) .. controls (0.8388, 0.8117) and (0.9253, 0.7517) .. (1.1962, 0.6696) -- (0.8332, 0.1263) .. controls (0.6458, 0.11) and (0.5417, 0.1644) .. (0.4517, 0.3034) -- cycle;
+ \fill[brown!80!black,rotate around={-23:(0.91, 0.88)}] (0.87, 0.28) rectangle ++(0.1,1.4);
+ \fill[\duck@shovel] (0.6133, 0.9536) .. controls (0.8388, 0.8117) and (0.9253, 0.7517) .. (1.1962, 0.6696) -- (0.8332, 0.1263) .. controls (0.6458, 0.11) and (0.5417, 0.1644) .. (0.4517, 0.3034) -- cycle;
\fi
%
% pickaxe %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@pickaxe
- \fill[brown!80!black,rotate around={-23:(0.91, 0.88)}] (0.87, 0.28) rectangle ++(0.1,1.4);
- \fill[\duck@pickaxe] (-0.0085, 0.6858) .. controls (0.6422, 0.3523) and (0.7609, 0.3068) .. (1.4114, 0.1108) .. controls (0.6589, 0.1246) and (0.5556, 0.1887) .. (-0.0085, 0.6858) -- cycle;
+ \fill[brown!80!black,rotate around={-23:(0.91, 0.88)}] (0.87, 0.28) rectangle ++(0.1,1.4);
+ \fill[\duck@pickaxe] (-0.0085, 0.6858) .. controls (0.6422, 0.3523) and (0.7609, 0.3068) .. (1.4114, 0.1108) .. controls (0.6589, 0.1246) and (0.5556, 0.1887) .. (-0.0085, 0.6858) -- cycle;
\fi
%
% umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@umbrella
- \path (0.2,0.4) rectangle (2.22,2.7);
+ \path (0.2,0.4) rectangle (2.22,2.7);
\begin{pgfinterruptboundingbox}
- \fill[gray] (0.6922,0.5942) -- (0.7426,0.6103) .. controls (0.8276,0.3884) and (0.8855,0.4523) .. (0.9333,0.6543) -- (0.9334,0.6545) -- (0.9335,0.6547) .. controls (1.0347,1.0671) and (1.2906,1.9565) .. (1.2906,1.9565) -- (1.3415,1.9419) .. controls (1.3415,1.9419) and (1.0855,1.0519) .. (0.9849,0.6423) -- (0.9848,0.6420) .. controls (0.9240,0.3633) and (0.7874,0.3312) .. (0.6922,0.5942) -- cycle;
- \fill[\duck@umbrella] (0.2185,1.9927) .. controls (0.3559,2.1962) and (0.6837,2.0720) .. (0.6761,1.8240) .. controls (0.8398,2.0111) and (1.1891,1.9216) .. (1.1685,1.6915) .. controls (1.3000,1.8765) and (1.6639,1.7626) .. (1.6607,1.5356) .. controls (1.7865,1.7271) and (2.1350,1.6950) .. (2.1626,1.4589) .. controls (2.4996,2.5771) and (0.5644,3.2631) .. (0.2185,1.9927) -- cycle;
+ \fill[gray] (0.6922,0.5942) -- (0.7426,0.6103) .. controls (0.8276,0.3884) and (0.8855,0.4523) .. (0.9333,0.6543) -- (0.9334,0.6545) -- (0.9335,0.6547) .. controls (1.0347,1.0671) and (1.2906,1.9565) .. (1.2906,1.9565) -- (1.3415,1.9419) .. controls (1.3415,1.9419) and (1.0855,1.0519) .. (0.9849,0.6423) -- (0.9848,0.6420) .. controls (0.9240,0.3633) and (0.7874,0.3312) .. (0.6922,0.5942) -- cycle;
+ \fill[\duck@umbrella] (0.2185,1.9927) .. controls (0.3559,2.1962) and (0.6837,2.0720) .. (0.6761,1.8240) .. controls (0.8398,2.0111) and (1.1891,1.9216) .. (1.1685,1.6915) .. controls (1.3000,1.8765) and (1.6639,1.7626) .. (1.6607,1.5356) .. controls (1.7865,1.7271) and (2.1350,1.6950) .. (2.1626,1.4589) .. controls (2.4996,2.5771) and (0.5644,3.2631) .. (0.2185,1.9927) -- cycle;
\end{pgfinterruptboundingbox}
\fi
%
% closed umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@umbrellaclosed
\fill[gray] (1.3401,0.6996) -- (1.2872,0.7019) .. controls (1.2840,0.9395) and (1.2076,0.8995) .. (1.0930,0.7264) -- (1.0929,0.7262) -- (1.0928,0.7261) .. controls (0.8555,0.3739) and (0.9223,0.4608) .. (0.9223,0.4608) -- (0.8795,0.4920) .. controls (0.8795,0.4920) and (0.8131,0.4057) .. (1.0488,0.7554) -- (1.0489,0.7556) .. controls (1.2022,0.9963) and (1.3414,0.9793) .. (1.3401,0.6996) -- cycle;
- \fill[\duck@umbrellaclosed] (0.6827,0.1263) -- (0.8038,0.6188) -- (0.9548,0.6494) -- (0.9520,0.8231) -- (1.1945,0.6529) -- (1.0218,0.5885) -- (1.0465,0.4566) -- cycle;
+ \fill[\duck@umbrellaclosed] (0.6827,0.1263) -- (0.8038,0.6188) -- (0.9548,0.6494) -- (0.9520,0.8231) -- (1.1945,0.6529) -- (1.0218,0.5885) -- (1.0465,0.4566) -- cycle;
\fi
%
% handbag %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@handbag
- \fill[\duck@handbag] (0.7811,0.1751) -- (1.4913,0.3097) -- (1.3315,0.7086) -- (0.7832,0.6152) -- cycle;
- \fill[\duck@handbag!70!black] (0.8857,0.4354) .. controls (0.7861,0.9811) and (1.1796,1.0719) .. (1.2866,0.5155) -- (1.2043,0.4996) .. controls (1.1247,0.8952) and (0.9051,0.8883) .. (0.9676,0.4536) -- cycle;
+ \fill[\duck@handbag] (0.7811,0.1751) -- (1.4913,0.3097) -- (1.3315,0.7086) -- (0.7832,0.6152) -- cycle;
+ \fill[\duck@handbag!70!black] (0.8857,0.4354) .. controls (0.7861,0.9811) and (1.1796,1.0719) .. (1.2866,0.5155) -- (1.2043,0.4996) .. controls (1.1247,0.8952) and (0.9051,0.8883) .. (0.9676,0.4536) -- cycle;
\fi
%
% cocktail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1375,9 +1382,9 @@
\fill[red!80!black] (0.94,0.72) circle[radius=0.01];
\fi
%
-% overleaf duck
+% overleaf duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@overleaf
- \fill[white] \duckpathoverleaf;
+ \fill[white] \duckpathoverleaf;
\fi
%
% wing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1385,6 +1392,8 @@
\fill[\duck@wing] \duckpathwing;
\fi
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname duckhookforeground\endcsname
%
%\draw (current bounding box.north west) rectangle (current bounding box.south east);% For debugging bounding boxes
%
@@ -1399,7 +1408,7 @@
\ifdefined\pdfrandomseed % pdflatex
\else
\ifdefined\randomseed
- \let\pdfrandomseed\randomseed % post TL19 xelatex and lualatex
+ \let\pdfrandomseed\randomseed % post TL19 xelatex and lualatex
\else
\let\pdfrandomseed\time % pre TL19 xelatex
\fi
@@ -1647,7 +1656,7 @@
}
\newcommand{\duckpathoverleaf}{%
- (1.2699,0.6095) .. controls (1.2710,0.5992) and (1.2752,0.5910) .. (1.2822,0.5852) .. controls (1.2892,0.5793) and (1.2983,0.5763) .. (1.3095,0.5763) .. controls (1.3165,0.5762) and (1.3233,0.5778) .. (1.3295,0.5809) .. controls (1.3353,0.5840) and (1.3401,0.5885) .. (1.3436,0.5940) -- (1.3792,0.5940) .. controls (1.3731,0.5785) and (1.3640,0.5664) .. (1.3521,0.5578) .. controls (1.3398,0.5492) and (1.3252,0.5447) .. (1.3103,0.5449) .. controls (1.3002,0.5448) and (1.2902,0.5467) .. (1.2808,0.5505) .. controls (1.2718,0.5544) and (1.2636,0.5601) .. (1.2567,0.5672) .. controls (1.2500,0.5742) and (1.2446,0.5825) .. (1.2410,0.5915) .. controls (1.2372,0.6005) and (1.2353,0.6101) .. (1.2353,0.6198) .. controls (1.2352,0.6294) and (1.2370,0.6389) .. (1.2404,0.6479) .. controls (1.2438,0.6567) and (1.2489,0.6647) .. (1.2554,0.6715) .. controls (1.2625,0.6790) and (1.2709,0.6850) .. (1.2802,0.6892) .. controls (1.2891,0.6933) and (1.2988,0.6954) .. (1.3086,0.6955) .. controls (1.3207,0.6955) and (1.3325,0.6926) .. (1.3432,0.6871) .. controls (1.3540,0.6813) and (1.3633,0.6732) .. (1.3705,0.6634) .. controls (1.3751,0.6571) and (1.3786,0.6501) .. (1.3807,0.6427) .. controls (1.3831,0.6341) and (1.3842,0.6253) .. (1.3841,0.6164) .. controls (1.3840,0.6139) and (1.3839,0.6119) .. (1.3837,0.6092) .. controls (1.3458,0.6093) and (1.3079,0.6094) .. (1.2699,0.6095) -- cycle(1.3486,0.6358) .. controls (1.3458,0.6453) and (1.3410,0.6525) .. (1.3343,0.6575) .. controls (1.3276,0.6625) and (1.3192,0.6650) .. (1.3090,0.6650) .. controls (1.3004,0.6651) and (1.2920,0.6622) .. (1.2852,0.6570) .. controls (1.2783,0.6517) and (1.2733,0.6443) .. (1.2711,0.6359) .. controls (1.2969,0.6359) and (1.3228,0.6358) .. (1.3486,0.6358) -- cycle(1.5160,0.5487) -- (1.5160,0.5662) .. controls (1.5122,0.5593) and (1.5064,0.5538) .. (1.4992,0.5505) .. controls (1.4920,0.5471) and (1.4828,0.5455) .. (1.4715,0.5455) .. controls (1.4505,0.5455) and (1.4329,0.5527) .. (1.4187,0.5670) .. controls (1.4046,0.5814) and (1.3976,0.5993) .. (1.3975,0.6206) .. controls (1.3975,0.6303) and (1.3993,0.6401) .. (1.4029,0.6492) .. controls (1.4063,0.6580) and (1.4114,0.6661) .. (1.4180,0.6729) .. controls (1.4246,0.6801) and (1.4327,0.6857) .. (1.4416,0.6895) .. controls (1.4509,0.6932) and (1.4608,0.6950) .. (1.4708,0.6949) .. controls (1.4800,0.6951) and (1.4891,0.6933) .. (1.4976,0.6896) .. controls (1.5050,0.6862) and (1.5112,0.6807) .. (1.5156,0.6739) -- (1.5156,0.6911) -- (1.5480,0.6911) -- (1.5480,0.5485) -- (1.5160,0.5485) -- (1.5160,0.5487) -- cycle(1.4436,0.5910) .. controls (1.4513,0.5831) and (1.4619,0.5787) .. (1.4729,0.5789) .. controls (1.4833,0.5789) and (1.4926,0.5829) .. (1.5006,0.5911) .. controls (1.5083,0.5986) and (1.5126,0.6088) .. (1.5126,0.6196) .. controls (1.5127,0.6307) and (1.5084,0.6414) .. (1.5006,0.6494) .. controls (1.4926,0.6577) and (1.4833,0.6619) .. (1.4727,0.6619) .. controls (1.4618,0.6621) and (1.4514,0.6577) .. (1.4439,0.6499) .. controls (1.4361,0.6423) and (1.4318,0.6318) .. (1.4317,0.6205) .. controls (1.4315,0.6092) and (1.4355,0.5991) .. (1.4436,0.5910) -- cycle(1.6366,0.6913) -- (1.6366,0.6617) -- (1.6127,0.6617) -- (1.6127,0.5487) -- (1.5806,0.5487) -- (1.5806,0.6617) -- (1.5637,0.6617) -- (1.5637,0.6913) -- (1.5796,0.6913) -- (1.5796,0.6952) .. controls (1.5796,0.7102) and (1.5838,0.7214) .. (1.5922,0.7288) .. controls (1.6005,0.7362) and (1.6131,0.7399) .. (1.6300,0.7399) .. controls (1.6324,0.7398) and (1.6347,0.7396) .. (1.6370,0.7395) -- (1.6370,0.7097) -- (1.6347,0.7097) .. controls (1.6272,0.7097) and (1.6218,0.7084) .. (1.6186,0.7059) .. controls (1.6154,0.7034) and (1.6138,0.6993) .. (1.6138,0.6936) -- (1.6138,0.6910) .. controls (1.6214,0.6913) and (1.6290,0.6912) .. (1.6366,0.6913) -- cycle(1.1906,0.5487) -- (1.2231,0.5487) -- (1.2231,0.7374) -- (1.1906,0.7374) -- cycle(0.9820,0.6095) .. controls (0.9831,0.5992) and (0.9872,0.5910) .. (0.9943,0.5852) .. controls (1.0013,0.5793) and (1.0104,0.5763) .. (1.0216,0.5763) .. controls (1.0285,0.5762) and (1.0354,0.5778) .. (1.0416,0.5809) .. controls (1.0474,0.5839) and (1.0522,0.5885) .. (1.0556,0.5940) -- (1.0914,0.5940) .. controls (1.0854,0.5785) and (1.0763,0.5664) .. (1.0643,0.5578) .. controls (1.0522,0.5492) and (1.0382,0.5449) .. (1.0225,0.5449) .. controls (1.0124,0.5448) and (1.0024,0.5467) .. (0.9931,0.5505) .. controls (0.9840,0.5544) and (0.9758,0.5601) .. (0.9690,0.5672) .. controls (0.9622,0.5742) and (0.9569,0.5825) .. (0.9532,0.5915) .. controls (0.9495,0.6005) and (0.9475,0.6101) .. (0.9475,0.6198) .. controls (0.9475,0.6294) and (0.9492,0.6389) .. (0.9527,0.6479) .. controls (0.9560,0.6567) and (0.9611,0.6647) .. (0.9677,0.6715) .. controls (0.9747,0.6790) and (0.9830,0.6850) .. (0.9924,0.6892) .. controls (1.0012,0.6933) and (1.0109,0.6955) .. (1.0207,0.6955) .. controls (1.0327,0.6955) and (1.0446,0.6927) .. (1.0552,0.6871) .. controls (1.0660,0.6813) and (1.0753,0.6732) .. (1.0826,0.6634) .. controls (1.0871,0.6571) and (1.0906,0.6501) .. (1.0926,0.6427) .. controls (1.0949,0.6341) and (1.0960,0.6253) .. (1.0959,0.6164) .. controls (1.0959,0.6139) and (1.0957,0.6119) .. (1.0956,0.6092) .. controls (1.0577,0.6100) and (1.0199,0.6095) .. (0.9820,0.6095) -- cycle(1.0606,0.6358) .. controls (1.0578,0.6453) and (1.0531,0.6526) .. (1.0463,0.6575) .. controls (1.0397,0.6625) and (1.0312,0.6650) .. (1.0210,0.6650) .. controls (1.0124,0.6651) and (1.0041,0.6622) .. (0.9973,0.6570) .. controls (0.9903,0.6517) and (0.9853,0.6443) .. (0.9830,0.6359) .. controls (1.0089,0.6359) and (1.0348,0.6358) .. (1.0606,0.6358) -- cycle(1.1761,0.6624) .. controls (1.1632,0.6614) and (1.1542,0.6580) .. (1.1492,0.6523) .. controls (1.1441,0.6465) and (1.1415,0.6363) .. (1.1415,0.6214) -- (1.1415,0.5487) -- (1.1083,0.5487) -- (1.1083,0.6913) -- (1.1394,0.6913) -- (1.1394,0.6748) .. controls (1.1438,0.6808) and (1.1494,0.6856) .. (1.1559,0.6891) .. controls (1.1621,0.6923) and (1.1690,0.6938) .. (1.1760,0.6937) .. controls (1.1760,0.6833) and (1.1761,0.6728) .. (1.1761,0.6624) -- cycle(0.8646,0.8092) .. controls (0.8244,0.8248) and (0.6787,0.8306) .. (0.6784,0.7437) .. controls (0.6359,0.7165) and (0.6078,0.6721) .. (0.6078,0.6246) .. controls (0.6077,0.5410) and (0.7016,0.4916) .. (0.7705,0.5391) .. controls (0.8394,0.5866) and (0.8268,0.6919) .. (0.7486,0.7217) .. controls (0.7411,0.7246) and (0.7248,0.7297) .. (0.7117,0.7286) .. controls (0.6931,0.7168) and (0.6704,0.6924) .. (0.6597,0.6682) .. controls (0.6918,0.7064) and (0.7528,0.6983) .. (0.7737,0.6530) .. controls (0.7947,0.6076) and (0.7614,0.5559) .. (0.7115,0.5562) .. controls (0.6914,0.5562) and (0.6724,0.5649) .. (0.6594,0.5802) .. controls (0.6410,0.6019) and (0.6363,0.6254) .. (0.6400,0.6484) .. controls (0.6532,0.7289) and (0.7487,0.7748) .. (0.8197,0.7924) .. controls (0.7966,0.7801) and (0.7548,0.7600) .. (0.7255,0.7380) .. controls (0.8108,0.7051) and (0.8246,0.7770) .. (0.8646,0.8092) -- cycle(0.8731,0.5487) -- (0.8189,0.6913) -- (0.8542,0.6913) -- (0.8874,0.5965) -- (0.9217,0.6913) -- (0.9561,0.6913) -- (0.8991,0.5487) -- cycle
+ (1.2699,0.6095) .. controls (1.2710,0.5992) and (1.2752,0.5910) .. (1.2822,0.5852) .. controls (1.2892,0.5793) and (1.2983,0.5763) .. (1.3095,0.5763) .. controls (1.3165,0.5762) and (1.3233,0.5778) .. (1.3295,0.5809) .. controls (1.3353,0.5840) and (1.3401,0.5885) .. (1.3436,0.5940) -- (1.3792,0.5940) .. controls (1.3731,0.5785) and (1.3640,0.5664) .. (1.3521,0.5578) .. controls (1.3398,0.5492) and (1.3252,0.5447) .. (1.3103,0.5449) .. controls (1.3002,0.5448) and (1.2902,0.5467) .. (1.2808,0.5505) .. controls (1.2718,0.5544) and (1.2636,0.5601) .. (1.2567,0.5672) .. controls (1.2500,0.5742) and (1.2446,0.5825) .. (1.2410,0.5915) .. controls (1.2372,0.6005) and (1.2353,0.6101) .. (1.2353,0.6198) .. controls (1.2352,0.6294) and (1.2370,0.6389) .. (1.2404,0.6479) .. controls (1.2438,0.6567) and (1.2489,0.6647) .. (1.2554,0.6715) .. controls (1.2625,0.6790) and (1.2709,0.6850) .. (1.2802,0.6892) .. controls (1.2891,0.6933) and (1.2988,0.6954) .. (1.3086,0.6955) .. controls (1.3207,0.6955) and (1.3325,0.6926) .. (1.3432,0.6871) .. controls (1.3540,0.6813) and (1.3633,0.6732) .. (1.3705,0.6634) .. controls (1.3751,0.6571) and (1.3786,0.6501) .. (1.3807,0.6427) .. controls (1.3831,0.6341) and (1.3842,0.6253) .. (1.3841,0.6164) .. controls (1.3840,0.6139) and (1.3839,0.6119) .. (1.3837,0.6092) .. controls (1.3458,0.6093) and (1.3079,0.6094) .. (1.2699,0.6095) -- cycle(1.3486,0.6358) .. controls (1.3458,0.6453) and (1.3410,0.6525) .. (1.3343,0.6575) .. controls (1.3276,0.6625) and (1.3192,0.6650) .. (1.3090,0.6650) .. controls (1.3004,0.6651) and (1.2920,0.6622) .. (1.2852,0.6570) .. controls (1.2783,0.6517) and (1.2733,0.6443) .. (1.2711,0.6359) .. controls (1.2969,0.6359) and (1.3228,0.6358) .. (1.3486,0.6358) -- cycle(1.5160,0.5487) -- (1.5160,0.5662) .. controls (1.5122,0.5593) and (1.5064,0.5538) .. (1.4992,0.5505) .. controls (1.4920,0.5471) and (1.4828,0.5455) .. (1.4715,0.5455) .. controls (1.4505,0.5455) and (1.4329,0.5527) .. (1.4187,0.5670) .. controls (1.4046,0.5814) and (1.3976,0.5993) .. (1.3975,0.6206) .. controls (1.3975,0.6303) and (1.3993,0.6401) .. (1.4029,0.6492) .. controls (1.4063,0.6580) and (1.4114,0.6661) .. (1.4180,0.6729) .. controls (1.4246,0.6801) and (1.4327,0.6857) .. (1.4416,0.6895) .. controls (1.4509,0.6932) and (1.4608,0.6950) .. (1.4708,0.6949) .. controls (1.4800,0.6951) and (1.4891,0.6933) .. (1.4976,0.6896) .. controls (1.5050,0.6862) and (1.5112,0.6807) .. (1.5156,0.6739) -- (1.5156,0.6911) -- (1.5480,0.6911) -- (1.5480,0.5485) -- (1.5160,0.5485) -- (1.5160,0.5487) -- cycle(1.4436,0.5910) .. controls (1.4513,0.5831) and (1.4619,0.5787) .. (1.4729,0.5789) .. controls (1.4833,0.5789) and (1.4926,0.5829) .. (1.5006,0.5911) .. controls (1.5083,0.5986) and (1.5126,0.6088) .. (1.5126,0.6196) .. controls (1.5127,0.6307) and (1.5084,0.6414) .. (1.5006,0.6494) .. controls (1.4926,0.6577) and (1.4833,0.6619) .. (1.4727,0.6619) .. controls (1.4618,0.6621) and (1.4514,0.6577) .. (1.4439,0.6499) .. controls (1.4361,0.6423) and (1.4318,0.6318) .. (1.4317,0.6205) .. controls (1.4315,0.6092) and (1.4355,0.5991) .. (1.4436,0.5910) -- cycle(1.6366,0.6913) -- (1.6366,0.6617) -- (1.6127,0.6617) -- (1.6127,0.5487) -- (1.5806,0.5487) -- (1.5806,0.6617) -- (1.5637,0.6617) -- (1.5637,0.6913) -- (1.5796,0.6913) -- (1.5796,0.6952) .. controls (1.5796,0.7102) and (1.5838,0.7214) .. (1.5922,0.7288) .. controls (1.6005,0.7362) and (1.6131,0.7399) .. (1.6300,0.7399) .. controls (1.6324,0.7398) and (1.6347,0.7396) .. (1.6370,0.7395) -- (1.6370,0.7097) -- (1.6347,0.7097) .. controls (1.6272,0.7097) and (1.6218,0.7084) .. (1.6186,0.7059) .. controls (1.6154,0.7034) and (1.6138,0.6993) .. (1.6138,0.6936) -- (1.6138,0.6910) .. controls (1.6214,0.6913) and (1.6290,0.6912) .. (1.6366,0.6913) -- cycle(1.1906,0.5487) -- (1.2231,0.5487) -- (1.2231,0.7374) -- (1.1906,0.7374) -- cycle(0.9820,0.6095) .. controls (0.9831,0.5992) and (0.9872,0.5910) .. (0.9943,0.5852) .. controls (1.0013,0.5793) and (1.0104,0.5763) .. (1.0216,0.5763) .. controls (1.0285,0.5762) and (1.0354,0.5778) .. (1.0416,0.5809) .. controls (1.0474,0.5839) and (1.0522,0.5885) .. (1.0556,0.5940) -- (1.0914,0.5940) .. controls (1.0854,0.5785) and (1.0763,0.5664) .. (1.0643,0.5578) .. controls (1.0522,0.5492) and (1.0382,0.5449) .. (1.0225,0.5449) .. controls (1.0124,0.5448) and (1.0024,0.5467) .. (0.9931,0.5505) .. controls (0.9840,0.5544) and (0.9758,0.5601) .. (0.9690,0.5672) .. controls (0.9622,0.5742) and (0.9569,0.5825) .. (0.9532,0.5915) .. controls (0.9495,0.6005) and (0.9475,0.6101) .. (0.9475,0.6198) .. controls (0.9475,0.6294) and (0.9492,0.6389) .. (0.9527,0.6479) .. controls (0.9560,0.6567) and (0.9611,0.6647) .. (0.9677,0.6715) .. controls (0.9747,0.6790) and (0.9830,0.6850) .. (0.9924,0.6892) .. controls (1.0012,0.6933) and (1.0109,0.6955) .. (1.0207,0.6955) .. controls (1.0327,0.6955) and (1.0446,0.6927) .. (1.0552,0.6871) .. controls (1.0660,0.6813) and (1.0753,0.6732) .. (1.0826,0.6634) .. controls (1.0871,0.6571) and (1.0906,0.6501) .. (1.0926,0.6427) .. controls (1.0949,0.6341) and (1.0960,0.6253) .. (1.0959,0.6164) .. controls (1.0959,0.6139) and (1.0957,0.6119) .. (1.0956,0.6092) .. controls (1.0577,0.6100) and (1.0199,0.6095) .. (0.9820,0.6095) -- cycle(1.0606,0.6358) .. controls (1.0578,0.6453) and (1.0531,0.6526) .. (1.0463,0.6575) .. controls (1.0397,0.6625) and (1.0312,0.6650) .. (1.0210,0.6650) .. controls (1.0124,0.6651) and (1.0041,0.6622) .. (0.9973,0.6570) .. controls (0.9903,0.6517) and (0.9853,0.6443) .. (0.9830,0.6359) .. controls (1.0089,0.6359) and (1.0348,0.6358) .. (1.0606,0.6358) -- cycle(1.1761,0.6624) .. controls (1.1632,0.6614) and (1.1542,0.6580) .. (1.1492,0.6523) .. controls (1.1441,0.6465) and (1.1415,0.6363) .. (1.1415,0.6214) -- (1.1415,0.5487) -- (1.1083,0.5487) -- (1.1083,0.6913) -- (1.1394,0.6913) -- (1.1394,0.6748) .. controls (1.1438,0.6808) and (1.1494,0.6856) .. (1.1559,0.6891) .. controls (1.1621,0.6923) and (1.1690,0.6938) .. (1.1760,0.6937) .. controls (1.1760,0.6833) and (1.1761,0.6728) .. (1.1761,0.6624) -- cycle(0.8646,0.8092) .. controls (0.8244,0.8248) and (0.6787,0.8306) .. (0.6784,0.7437) .. controls (0.6359,0.7165) and (0.6078,0.6721) .. (0.6078,0.6246) .. controls (0.6077,0.5410) and (0.7016,0.4916) .. (0.7705,0.5391) .. controls (0.8394,0.5866) and (0.8268,0.6919) .. (0.7486,0.7217) .. controls (0.7411,0.7246) and (0.7248,0.7297) .. (0.7117,0.7286) .. controls (0.6931,0.7168) and (0.6704,0.6924) .. (0.6597,0.6682) .. controls (0.6918,0.7064) and (0.7528,0.6983) .. (0.7737,0.6530) .. controls (0.7947,0.6076) and (0.7614,0.5559) .. (0.7115,0.5562) .. controls (0.6914,0.5562) and (0.6724,0.5649) .. (0.6594,0.5802) .. controls (0.6410,0.6019) and (0.6363,0.6254) .. (0.6400,0.6484) .. controls (0.6532,0.7289) and (0.7487,0.7748) .. (0.8197,0.7924) .. controls (0.7966,0.7801) and (0.7548,0.7600) .. (0.7255,0.7380) .. controls (0.8108,0.7051) and (0.8246,0.7770) .. (0.8646,0.8092) -- cycle(0.8731,0.5487) -- (0.8189,0.6913) -- (0.8542,0.6913) -- (0.8874,0.5965) -- (0.9217,0.6913) -- (0.9561,0.6913) -- (0.8991,0.5487) -- cycle
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1657,31 +1666,31 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\picduck}{%
- % bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(6.5,29.5)(-1,17.5)(16.8,27.3)
- \qbezier(6.5,29.5)(9,30.5)(11.4,28.0)
- \qbezier(11.4,28.0)(13.5,26.5)(16.8,27.3)
- % head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(06.5,29.5)(6,41.5)(16.8,42.4)
- \qbezier(16.8,42.4)(29,41)(25.3,24)
- % body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(7.8,23.2)(8,22.8)(8,22.5)
- \qbezier(8,22.5)(-5,9)(8,3)
- \qbezier(8,3)(22,-2)(35,6.5)
- \qbezier(35,6.5)(46,15)(35,28.3)
- \qbezier(35,28.3)(30,25)(25.3,24)
- % right eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(13,32)(13.8,34.5)(16,34)
- \qbezier(16,34)(17.3,33.2)(16.7,31)
- \qbezier(16.7,31)(16,29.1)(14.5,29.3)
- \qbezier(14.5,29.3)(12.7,29.5)(13,32)
- \put(15.3,31.3){\circle*{1.8}}
- % left eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(7.7,33.2)(8.4,35.7)(10.3,35)
- \qbezier(10.3,35)(11.2,34)(10.4,32.2)
- \qbezier(10.4,32.2)(9.7,30.7)(8.7,30.7)
- \qbezier(8.7,30.7)(7.2,30.9)(7.7,33.2)
- \put(9.5,32.7){\circle*{1.5}}
+ % bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(6.5,29.5)(-1,17.5)(16.8,27.3)
+ \qbezier(6.5,29.5)(9,30.5)(11.4,28.0)
+ \qbezier(11.4,28.0)(13.5,26.5)(16.8,27.3)
+ % head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(06.5,29.5)(6,41.5)(16.8,42.4)
+ \qbezier(16.8,42.4)(29,41)(25.3,24)
+ % body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(7.8,23.2)(8,22.8)(8,22.5)
+ \qbezier(8,22.5)(-5,9)(8,3)
+ \qbezier(8,3)(22,-2)(35,6.5)
+ \qbezier(35,6.5)(46,15)(35,28.3)
+ \qbezier(35,28.3)(30,25)(25.3,24)
+ % right eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(13,32)(13.8,34.5)(16,34)
+ \qbezier(16,34)(17.3,33.2)(16.7,31)
+ \qbezier(16.7,31)(16,29.1)(14.5,29.3)
+ \qbezier(14.5,29.3)(12.7,29.5)(13,32)
+ \put(15.3,31.3){\circle*{1.8}}
+ % left eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(7.7,33.2)(8.4,35.7)(10.3,35)
+ \qbezier(10.3,35)(11.2,34)(10.4,32.2)
+ \qbezier(10.4,32.2)(9.7,30.7)(8.7,30.7)
+ \qbezier(8.7,30.7)(7.2,30.9)(7.7,33.2)
+ \put(9.5,32.7){\circle*{1.5}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/graphics/pgf/contrib/tikzlings/README.md b/graphics/pgf/contrib/tikzlings/README.md
index 0c93eac163..074c1dea29 100644
--- a/graphics/pgf/contrib/tikzlings/README.md
+++ b/graphics/pgf/contrib/tikzlings/README.md
@@ -1,19 +1,20 @@
# TikZlings
A collection of animals and other beings from the tikz world
-Current version: 2019/04/07 v0.2
+Current version: 2020/04/22 version v0.3
This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
-![tikzlings](https://github.com/samcarter/tikzlings/blob/master/Examples/tikzlings.png)
+![tikzlings](https://raw.githubusercontent.com/samcarter/tikzlings/master/Examples/tikzlings.png)
### TikZlings in action
-Several TikZlings are featured in the following video:
+Several TikZlings are featured in the following videos:
-[![The great TikZlings Christmas Extravaganza 2018](https://user-images.githubusercontent.com/43832342/49704004-3cd27500-fc0d-11e8-9002-319a8e71aca7.png)](https://vimeo.com/305374856)
+<a href="https://vimeo.com/305374856"><img src="https://user-images.githubusercontent.com/43832342/49704004-3cd27500-fc0d-11e8-9002-319a8e71aca7.png" alt="The great TikZlings Christmas Extravaganza 2018" title="The great TikZlings Christmas Extravaganza 2018" height="128"></a>
+<a href="https://vimeo.com/380684973"><img src="https://user-images.githubusercontent.com/43832342/71256276-8382a100-2330-11ea-8996-e87132c6ad29.png" alt="The great TikZlings Christmas Extravaganza 2019" title="The great TikZlings Christmas Extravaganza 2019" height="128"></a>
-The source code for the "The great TikZlings Christmas Extravaganza 2018" can be found at https://github.com/samcarter/Extravanganza2018 .
+The source code of the movies is available from [The great TikZlings Christmas Extravaganza 2018](https://github.com/samcarter/Extravaganza2018) and [The great TikZlings Christmas Extravaganza 2019](https://github.com/samcarter/Extravaganza2019).
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty b/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
index fb15b68719..0ea9bbe9f1 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
@@ -1,8 +1,8 @@
% !TeX root = ./testing/test.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-addons package (part of the tikzlings collection)
-% A package to draw litlle things with tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-addons}
- [2019/04/07 v0.2 Draw additional items for the tikzlings]
+\ProvidesPackage{tikzlings-addons}[2020/04/22 version v0.3 Draw additional items for the tikzlings]
\RequirePackage{tikz}
\usetikzlibrary{patterns} % for the wizard hat
@@ -85,7 +81,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/thing/.search also={%
/tikz,/pgf,
- /bear,/coati,/koala,/marmot,/mouse,/owl,/penguin,/snowman,/mole,/sloth,/pig,/cat,/hippo,/rhino,/panda,
+ /bear,/coati,/koala,/marmot,/mouse,/owl,/penguin,/snowman,/mole,/sloth,/pig,/cat,/hippo,/rhino,/panda,/bee,/anteater,/squirrel,
},
%/thing/.unknown/.code=\relax, % bad idea, prevents tikz/pgf keys
/thing/.cd,
@@ -220,7 +216,7 @@
wine/.code = \thing@winetrue
\def\thing@wine{#1},
wine/.default = red!70!black,
- cocktail/.code = \thing@cocktailtrue,
+ cocktail/.code = \thing@cocktailtrue,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Sport
@@ -285,13 +281,13 @@
umbrella/.code = \thing@umbrellatrue
\def\thing@umbrella{#1},
umbrella/.default = cyan,
- umbrellaclosed/.code = \thing@umbrellaclosedtrue
- \def\thing@umbrellaclosed{#1},
- umbrellaclosed/.default = cyan,
- umbrella closed/.forward to = /thing/umbrellaclosed,
- handbag/.code = \thing@handbagtrue
+ umbrellaclosed/.code = \thing@umbrellaclosedtrue
+ \def\thing@umbrellaclosed{#1},
+ umbrellaclosed/.default = cyan,
+ umbrella closed/.forward to = /thing/umbrellaclosed,
+ handbag/.code = \thing@handbagtrue
\def\thing@handbag{#1},
- handbag/.default = red!70!black,
+ handbag/.default = red!70!black,
}
\def\thing@draw{%
@@ -303,7 +299,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -316,36 +312,36 @@
% Hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@hat
\fill[\thing@hat,rotate around={-15:(-0.3,2.01)}] (-0.3,2.01) rectangle (0.46,2.31);
- \fill[\thing@hat,rotate around={-15:(0.05,1.92)}] (0.05,1.92) ellipse (0.6 and 0.1);
- \fill[\thing@hat,rotate around={-15:(0.14,2.2)}] (0.14,2.2) ellipse (0.37 and 0.08);
+ \fill[\thing@hat] (0.05,1.92) ellipse[x radius=0.6, y radius=0.1, rotate=-15];
+ \fill[\thing@hat] (0.14,2.2) ellipse[x radius=0.37, y radius=0.08, rotate=-15];
\fi
%
% Tophat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@tophat
- \fill[\thing@tophat,rotate around={-15:(0.1,1.94)}] (0.1,1.94) ellipse (0.48 and 0.1);
+ \fill[\thing@tophat] (0.1,1.94) ellipse[x radius=0.48, y radius=0.1, rotate=-15];
\fill[\thing@tophat,rotate around={-15:(0.15,2.165)}] (-0.17, 1.94) -- (0.46, 1.94) -- (0.52, 2.39) -- (-0.22, 2.39) -- cycle;
- \fill[\thing@tophat,rotate around={-15:(0.21,2.385)}] (0.21,2.385) ellipse (0.37 and 0.08);
+ \fill[\thing@tophat] (0.21,2.385) ellipse[x radius=0.37, y radius=0.08, rotate=-15];
\fi
%
% Beret %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@beret
\begin{scope}[xshift=-19,yshift=-2,rotate=10]
- \fill[\thing@beret,rotate=-25] (0.13,2.15) ellipse (0.5 and 0.17);
- \fill[\thing@beret,rotate=-25] (0.13,2.25) ellipse (0.55 and 0.17);
- \fill[\thing@beret,rotate=-25] (0.13,2.4) circle (0.08);
+ \fill[\thing@beret,rotate=-25] (0.13,2.15) ellipse[x radius=0.5, y radius=0.17];
+ \fill[\thing@beret,rotate=-25] (0.13,2.25) ellipse[x radius=0.55, y radius=0.17];
+ \fill[\thing@beret,rotate=-25] (0.13,2.4) circle[radius=0.08];
\end{scope}
\fi
%
% Straw hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@strawhat
\begin{scope}[xshift=-16,rotate=12,yshift=-1]
- \fill[\thing@strawhat,rotate=-15] (0.44,2.0) ellipse (0.75 and 0.1);
+ \fill[\thing@strawhat,rotate=-15] (0.44,2.0) ellipse[x radius=0.75, y radius=0.1];
\fill[\thing@strawhat,rotate=-15] (0.1,2.05) rectangle (0.78,2.5);
- \fill[\thing@strawhat,rotate=-15] (0.44,2.5) ellipse (0.34 and 0.08);
+ \fill[\thing@strawhat,rotate=-15] (0.44,2.5) ellipse[x radius=0.34, y radius=0.08];
\fill[\thing@strawhat,rotate=-15] (-0.3,2.02) -- (1.18,2.02) -- (0.78,2.2) -- (0.1,2.2) -- cycle;
- \fill[\thing@ribbon,rotate=-15] (0.44,2.2) ellipse (0.34 and 0.08);
+ \fill[\thing@ribbon,rotate=-15] (0.44,2.2) ellipse[x radius=0.34, y radius=0.08];
\fill[\thing@ribbon,rotate=-15] (0.1,2.2) rectangle (0.78,2.3);
- \fill[\thing@strawhat,rotate=-15] (0.44,2.3) ellipse (0.34 and 0.08);
+ \fill[\thing@strawhat,rotate=-15] (0.44,2.3) ellipse[x radius=0.34, y radius=0.08];
\end{scope}
\fi
%
@@ -357,15 +353,15 @@
\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] (1.7,2.07) circle (0.1);
- \fill[\thing@niuqelrah] (0.3,2.23) circle (0.1);
+ \fill[\thing@harlequin] (1.7,2.07) circle[radius=0.1];
+ \fill[\thing@niuqelrah] (0.3,2.23) circle[radius=0.1];
\end{scope}
\fi
%
% witch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@witch
\begin{scope}[xshift=-26]
- \fill[\thing@witch,rotate=-15] (0.44,2.13) ellipse (0.75 and 0.17);
+ \fill[\thing@witch,rotate=-15] (0.44,2.13) ellipse[x radius=0.75, y radius=0.17];
\fill[\thing@witch,rotate=-15] (0.05,2.2)--(0.45,3.2)--(0.82,2.2);
\end{scope}
\fi
@@ -453,30 +449,30 @@
(1.456,1.759) .. controls (1.534,1.637) and (1.480,1.545) ..
(1.400,1.566) .. controls (1.265,1.714) and (0.577,2.267) ..
(0.44,1.733) -- cycle;
- \fill[white!80!brown] (1.6,1.0) circle (0.17);
+ \fill[white!80!brown] (1.6,1.0) circle[radius=0.17];
\end{scope}
\fi
%
% Chef hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@chef
\begin{scope}[xshift=-26]
- \fill[\thing@chef,rotate=-15] (0.44,2.1) ellipse (0.37 and 0.08);
+ \fill[\thing@chef,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.08];
\fill[\thing@chef,rotate=-15] (0.07,2.1) rectangle (0.81,2.55);
- \fill[\thing@chef] (1.01,2.47) circle (0.17);
- \fill[\thing@chef] (1.24,2.35) circle (0.15);
- \fill[\thing@chef] (0.77,2.40) circle (0.12);
- \fill[\thing@chef] (1.39,2.20) circle (0.12);
+ \fill[\thing@chef] (1.01,2.47) circle[radius=0.17];
+ \fill[\thing@chef] (1.24,2.35) circle[radius=0.15];
+ \fill[\thing@chef] (0.77,2.40) circle[radius=0.12];
+ \fill[\thing@chef] (1.39,2.20) circle[radius=0.12];
\end{scope}
\fi
%
% graduate hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@graduate
\begin{scope}[xshift=-26]
- \fill[\thing@graduate,rotate=-15] (0.44,2.1) ellipse (0.37 and 0.1);
+ \fill[\thing@graduate,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.1];
\fill[\thing@graduate,rotate=-15] (0.07,2.1) rectangle (0.81,2.3);
\fill[\thing@graduate] (0.3,2.25) -- (1.05,2.35) -- (1.7,1.95) -- (0.92,1.85) -- cycle;
\fill[\thing@tassel,rounded corners=\scalingfactor*1] (1.12,1.89) -- (1.01,2.1) -- (1.09,2.11) -- (1.2,1.9) -- (1.2,1.3) -- (1.12,1.3) -- cycle;
- \fill[\thing@tassel] (1.16,1.3) ellipse (0.06 and 0.12);
+ \fill[\thing@tassel] (1.16,1.3) ellipse[x radius=0.06, y radius=0.12];
\end{scope}
\fi
%
@@ -484,8 +480,8 @@
\ifthing@alien
\fill[\thing@alien,rotate around={15:(-0.175,2.115)}] (-0.2,1.93) rectangle (-0.15,2.3);
\fill[\thing@alien,rotate around={-15:(0.175,2.115)}] (0.2,1.93) rectangle (0.15,2.3);
- \fill[\thing@alien] (-0.22,2.30) circle (0.07);
- \fill[\thing@alien] (0.22,2.30) circle (0.07);
+ \fill[\thing@alien] (-0.22,2.30) circle[radius=0.07];
+ \fill[\thing@alien] (0.22,2.30) circle[radius=0.07];
\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -516,7 +512,7 @@
% speech bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@speech
\begin{scope}[xshift=-26]
- \fill[\thing@bubblecolour] (-0.5,1.8) ellipse (0.7 and 0.3);
+ \fill[\thing@bubblecolour] (-0.5,1.8) ellipse[x radius=0.7, y radius=0.3];
\fill[\thing@bubblecolour] (-0.2,1.54) -- (0.2,1.35) -- (0.0,1.6) -- cycle;
\node at (-0.5,1.8) {\thing@speech};
\end{scope}
@@ -525,8 +521,8 @@
% think bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@think
\begin{scope}[xshift=-26]
- \fill[\thing@bubblecolour] (2,2.4) ellipse (0.7 and 0.35);
- \fill[\thing@bubblecolour] (1.55,2.35) circle (0.25) (2.0,2.15) circle (0.25) (2.4,2.25) circle (0.25) (1.6,2.55) circle (0.25) (2.0,2.6) circle (0.25) (2.35,2.5) circle (0.25) (1.65,1.95) circle (0.1) (1.55,1.80) circle (0.06) (1.47,1.70) circle (0.03);
+ \fill[\thing@bubblecolour] (2,2.4) ellipse[x radius=0.7, y radius=0.35];
+ \fill[\thing@bubblecolour] (1.55,2.35) circle[radius=0.25] (2.0,2.15) circle[radius=0.25] (2.4,2.25) circle[radius=0.25] (1.6,2.55) circle[radius=0.25] (2.0,2.6) circle[radius=0.25] (2.35,2.5) circle[radius=0.25] (1.65,1.95) circle[radius=0.1] (1.55,1.80) circle[radius=0.06] (1.47,1.70) circle[radius=0.03];
\node at (2,2.4) {\thing@think};
\end{scope}
\fi
@@ -540,35 +536,35 @@
% pizza %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@pizza
\begin{scope}[xshift=-28,yshift=2]
- \fill[brown] (1.00,0.60) ellipse (0.4 and 0.2);
- \fill[red!70!black] (1.00,0.60) ellipse (0.34 and 0.16);
- \fill[white!85!yellow] (1.15,0.65) ellipse (0.065 and 0.04);
- \fill[white!85!yellow] (0.81,0.57) ellipse (0.065 and 0.04);
- \fill[white!85!yellow] (0.95,0.68) ellipse (0.065 and 0.04);
- \fill[white!85!yellow] (1.02,0.54) ellipse (0.065 and 0.04);
- \fill[green!40!brown] (1.09,0.54) ellipse (0.07 and 0.02);
- \fill[green!40!brown,rotate=20] (1.0,0.34) ellipse (0.07 and 0.02);
- \fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse (0.07 and 0.02);
- \fill[green!40!brown] (1.00,0.60) ellipse (0.03 and 0.06);
+ \fill[brown] (1.00,0.60) ellipse[x radius=0.4, y radius=0.2];
+ \fill[red!70!black] (1.00,0.60) ellipse[x radius=0.34, y radius=0.16];
+ \fill[white!85!yellow] (1.15,0.65) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (0.81,0.57) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (0.95,0.68) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (1.02,0.54) ellipse[x radius=0.065, y radius=0.04];
+ \fill[green!40!brown] (1.09,0.54) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown,rotate=20] (1.0,0.34) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
\end{scope}
\fi
% no pizza %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@davidlikespineapplepizza
\begin{scope}[xshift=-28,yshift=2]
- \fill[brown] (1.00,0.60) ellipse (0.4 and 0.2);
- \fill[red!70!black] (1.00,0.60) ellipse (0.34 and 0.16);
- \fill[yellow!70!brown] (1.15,0.65) ellipse (0.08 and 0.06);
- \fill[red!70!black] (1.15,0.65) ellipse (0.04 and 0.03);
- \fill[yellow!70!brown] (0.81,0.57) ellipse (0.08 and 0.06);
- \fill[red!70!black] (0.81,0.57) ellipse (0.04 and 0.03);
- \fill[yellow!70!brown] (0.95,0.68) ellipse (0.08 and 0.06);
- \fill[red!70!black] (0.95,0.68) ellipse (0.04 and 0.03);
- \fill[yellow!70!brown] (1.02,0.54) ellipse (0.08 and 0.06);
- \fill[red!70!black] (1.02,0.54) ellipse (0.04 and 0.03);
- \fill[green!40!brown] (1.09,0.54) ellipse (0.07 and 0.02);
- \fill[green!40!brown,rotate=20] (1.0,0.34) ellipse (0.07 and 0.02);
- \fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse (0.07 and 0.02);
- \fill[green!40!brown] (1.00,0.60) ellipse (0.03 and 0.06);
+ \fill[brown] (1.00,0.60) ellipse[x radius=0.4, y radius=0.2];
+ \fill[red!70!black] (1.00,0.60) ellipse[x radius=0.34, y radius=0.16];
+ \fill[yellow!70!brown] (1.15,0.65) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (1.15,0.65) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (0.81,0.57) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (0.81,0.57) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (0.95,0.68) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (0.95,0.68) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (1.02,0.54) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (1.02,0.54) ellipse[x radius=0.04, y radius=0.03];
+ \fill[green!40!brown] (1.09,0.54) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown,rotate=20] (1.0,0.34) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
\end{scope}
\fi
%
@@ -576,29 +572,29 @@
\ifthing@cheese
\fill[\thing@cheese] (-0.3200,0.8058) -- (0.0608,0.7220) -- (0.0608,0.6366) -- (-0.3200,0.5410) -- (0.2143,0.4236) .. controls (0.3395,0.4810) and (0.4241,0.5627) .. (0.4117,0.6253) -- (0.4117,0.7634) .. controls (0.4261,0.8618) and (0.2607,0.8954) .. (0.1907,0.8962) -- cycle;
\fill[\thing@cheese!35!white] (-0.3200,0.8057) -- (-0.3200,0.5410) -- (0.2143,0.4236) -- (0.2143,0.7381) -- cycle;
- \fill[\thing@cheese] (-0.23,0.71) circle (0.04) (0.0,0.55) circle (0.04) (-0.23,0.58) circle (0.02) (-0.15,0.6) circle (0.02) (-0.1,0.7) circle (0.02) (0.1,0.65) circle (0.02) (0,0.65) circle (0.02) (0.1,0.5) circle (0.02) (0.07,0.55) circle (0.01) (0.12,0.6) circle (0.01) (-0.08,0.54) circle (0.01);
+ \fill[\thing@cheese] (-0.23,0.71) circle[radius=0.04] (0.0,0.55) circle[radius=0.04] (-0.23,0.58) circle[radius=0.02] (-0.15,0.6) circle[radius=0.02] (-0.1,0.7) circle[radius=0.02] (0.1,0.65) circle[radius=0.02] (0,0.65) circle[radius=0.02] (0.1,0.5) circle[radius=0.02] (0.07,0.55) circle[radius=0.01] (0.12,0.6) circle[radius=0.01] (-0.08,0.54) circle[radius=0.01];
\fi
%
% baguette %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@baguette
\begin{scope}[xshift=-38,yshift=7,rotate=-20]
\fill[\thing@baguette!70!white, rounded corners=\scalingfactor*4, rotate=-30] (0.4,0.72) rectangle (0.7,2.0);
- \fill[\thing@baguette!80!black, rotate=5] (1.44,1.1) ellipse (0.1 and 0.03) (1.30,0.9) ellipse (0.1 and 0.03) (1.16,0.7) ellipse (0.1 and 0.03) (1.02,0.5) ellipse (0.1 and 0.03);
+ \fill[\thing@baguette!80!black, rotate=5] (1.44,1.1) ellipse[x radius=0.1, y radius=0.03] (1.30,0.9) ellipse[x radius=0.1, y radius=0.03] (1.16,0.7) ellipse[x radius=0.1, y radius=0.03] (1.02,0.5) ellipse[x radius=0.1, y radius=0.03];
\end{scope}
\fi
%
% cake %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@cake
\begin{scope}[xshift=-28]
- \fill[\thing@cake] (1.00,0.50) ellipse (0.4 and 0.2);
+ \fill[\thing@cake] (1.00,0.50) ellipse[x radius=0.4, y radius=0.2];
\fill[\thing@cake] (0.6,0.5) rectangle (1.4,0.7);
- \fill[\thing@cake] (1.00,0.70) ellipse (0.4 and 0.2);
+ \fill[\thing@cake] (1.00,0.70) ellipse[x radius=0.4, y radius=0.2];
\fill[\thing@cake!50!white] (0.75,0.75) rectangle (0.8,0.95);
\fill[\thing@cake!50!white] (1.2,0.75) rectangle (1.25,0.95);
\fill[\thing@cake!50!white] (0.975,0.65) rectangle (1.025,0.85);
- \fill[white!85!yellow] (1.0,0.93) ellipse (0.03 and 0.06);
- \fill[white!85!yellow] (1.225,1.03) ellipse (0.03 and 0.06);
- \fill[white!85!yellow] (0.775,1.03) ellipse (0.03 and 0.06);
+ \fill[white!85!yellow] (1.0,0.93) ellipse[x radius=0.03, y radius=0.06];
+ \fill[white!85!yellow] (1.225,1.03) ellipse[x radius=0.03, y radius=0.06];
+ \fill[white!85!yellow] (0.775,1.03) ellipse[x radius=0.03, y radius=0.06];
\end{scope}
\fi
%
@@ -606,26 +602,26 @@
\ifthing@icecream
\begin{scope}[xshift=-26]
\fill[\thing@cone,rotate=-20] (0.35,1.20)--(0.50,0.60)--(0.75,1.20);
- \fill[\thing@flavoura] (0.85,1.03) circle (0.12);
- \fill[\thing@flavourb] (1.05,0.95) circle (0.12);
- \fill[\thing@flavourc] (0.95,1.1) circle (0.12);
+ \fill[\thing@flavoura] (0.85,1.03) circle[radius=0.12];
+ \fill[\thing@flavourb] (1.05,0.95) circle[radius=0.12];
+ \fill[\thing@flavourc] (0.95,1.1) circle[radius=0.12];
\end{scope}
\fi
%
% milkshake %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@milkshake
\begin{scope}[xshift=-26]
- \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse (0.17 and 0.05);
- \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse (0.12 and 0.03);
+ \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
\begin{scope}
\clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
- \fill[cyan!10!white, rotate=-10] (0.8,0.94) ellipse (0.18 and 0.4);
- \fill[\thing@milkshake, rotate=-10] (0.8,0.94) ellipse (0.15 and 0.36);
+ \fill[cyan!10!white, rotate=-10] (0.8,0.94) ellipse[x radius=0.18, y radius=0.4];
+ \fill[\thing@milkshake, rotate=-10] (0.8,0.94) ellipse[x radius=0.15, y radius=0.36];
\end{scope}
- \fill[white!85!yellow] (0.83,0.92) circle (0.05) (0.88,0.9) circle (0.05) (0.93,0.92) circle (0.05) (0.99,0.91) circle (0.05) (1.06,0.86) circle (0.05) (1.13,0.87) circle (0.05) (0.85,0.99) circle (0.05) (0.9,0.98) circle (0.07) (1.0,0.98) circle (0.07) (1.1,0.95) circle (0.07);
- \fill[red!90!black] (1.0,1.1) circle (0.05);
- \fill[white!85!yellow] (0.94,1.05) circle (0.05) (1.03,1.03) circle (0.05);
- \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse (0.17 and 0.05);
+ \fill[white!85!yellow] (0.83,0.92) circle[radius=0.05] (0.88,0.9) circle[radius=0.05] (0.93,0.92) circle[radius=0.05] (0.99,0.91) circle[radius=0.05] (1.06,0.86) circle[radius=0.05] (1.13,0.87) circle[radius=0.05] (0.85,0.99) circle[radius=0.05] (0.9,0.98) circle[radius=0.07] (1.0,0.98) circle[radius=0.07] (1.1,0.95) circle[radius=0.07];
+ \fill[red!90!black] (1.0,1.1) circle[radius=0.05];
+ \fill[white!85!yellow] (0.94,1.05) circle[radius=0.05] (1.03,1.03) circle[radius=0.05];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
\fill[red!90!black,rotate=20] (1.2,0.58) rectangle (1.22,0.85);
\end{scope}
\fi
@@ -633,16 +629,16 @@
% wine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@wine
\begin{scope}[xshift=-26,yshift=2]
- \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse (0.17 and 0.05);
- \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse (0.12 and 0.03);
- \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse (0.03 and 0.2);
+ \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse[x radius=0.03, y radius=0.2];
\begin{scope}
\clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
- \fill[cyan!10!white, rotate=-10] (0.8,1.1) ellipse (0.18 and 0.4);
+ \fill[cyan!10!white, rotate=-10] (0.8,1.1) ellipse[x radius=0.18, y radius=0.4];
\end{scope}
\begin{scope}
\clip[rotate=-10] (0.58,0.5) rectangle (1.02,0.87);
- \fill[\thing@wine, rotate=-10] (0.8,1.1) ellipse (0.15 and 0.36);
+ \fill[\thing@wine, rotate=-10] (0.8,1.1) ellipse[x radius=0.15, y radius=0.36];
\end{scope}
\end{scope}
\fi
@@ -650,13 +646,13 @@
% cocktail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@cocktail
\begin{scope}[xshift=-26,yshift=3]
- \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse (0.17 and 0.05);
- \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse (0.12 and 0.03);
- \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse (0.03 and 0.2);
+ \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse[x radius=0.03, y radius=0.2];
\fill[cyan!10!white] (0.92,0.6) -- (0.75,0.9) -- (1.18,0.83) -- cycle;
\fill[gray!60!white] (0.928,0.64) -- (0.85,0.77) -- (1.08,0.77) -- cycle;
- \fill[green!40!brown!60!white] (0.94,0.71) circle (0.04);
- \fill[red!80!black] (0.94,0.72) circle (0.01);
+ \fill[green!40!brown!60!white] (0.94,0.71) circle[radius=0.04];
+ \fill[red!80!black] (0.94,0.72) circle[radius=0.01];
\end{scope}
\fi
%
@@ -685,9 +681,9 @@
% football %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@football
\begin{scope}[xshift=-26]
- \fill[\thing@football] (1.2,0.33) circle (0.32);
+ \fill[\thing@football] (1.2,0.33) circle[radius=0.32];
\begin{scope}
- \clip (1.2,0.33) circle (0.32);
+ \clip (1.2,0.33) circle[radius=0.32];
\fill[black] (1.06,0.30) -- (1.01,0.17) -- (1.14,0.08) -- (1.26,0.14) -- (1.20,0.28) -- cycle (1.37,0.14) -- (1.46,0.27) -- (1.59,0.27) -- (1.41,0.04) -- cycle (1.28,0.38) -- (1.22,0.52) -- (1.33,0.61) -- (1.45,0.51) -- (1.43,0.37) -- cycle (0.87,0.44) -- (1.02,0.40) -- (1.10,0.53) -- (1.07,0.62) -- (0.94,0.57) -- cycle;
\end{scope}
\end{scope}
@@ -701,7 +697,7 @@
%
% crystal ball %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@crystalball
- \shade[ball color=\thing@crystalball,opacity=0.7] (0,0.8) circle (0.33);
+ \shade[ball color=\thing@crystalball,opacity=0.7] (0,0.8) circle[radius=0.33];
\fi
%
% magic wand %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -751,7 +747,7 @@
(1.4338,1.025) -- cycle;
\fill[\thing@torch,rounded corners=\scalingfactor*1]
(1.1,0.96) -- (0.77,0.25) -- (0.83,0.25) -- (1.3,0.86) -- cycle;
- \fill[\thing@torch,rotate=-28] (0.62,1.32) ellipse (0.2 and 0.08);
+ \fill[\thing@torch,rotate=-28] (0.62,1.32) ellipse[x radius=0.2, y radius=0.08];
\end{scope}
\fi%
%
@@ -760,8 +756,8 @@
\begin{scope}[xshift=-28.5]
\fill[\thing@basket, start angle=180, end angle=360, x radius=0.35, y radius=0.35] (0.65,0.61) arc -- cycle;
\fill[\thing@basket, start angle=180, end angle=0, even odd rule] [x radius=0.35, y radius=0.5] (0.65,0.6) arc -- cycle [x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle;
- \fill[\thing@basket, even odd rule] (1,0.6) ellipse (0.35 and 0.1) (1,0.6) ellipse (0.3 and 0.07);
- \fill[\thing@basket!75!black] (1,0.6) ellipse (0.3 and 0.07);
+ \fill[\thing@basket, even odd rule] (1,0.6) ellipse[x radius=0.35, y radius=0.1] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
+ \fill[\thing@basket!75!black] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
\end{scope}
\fi%
%
@@ -770,9 +766,9 @@
\begin{scope}[xshift=-28.5]
\begin{scope}
\clip [start angle=180, end angle=0, x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle [start angle=180, end angle=360, x radius=0.3, y radius=0.07] (0.7,0.6) arc -- cycle;
- \fill[\thing@eggb, rotate=-5] (0.95,0.72) ellipse (0.09 and 0.13);
- \fill[\thing@egga, rotate=10] (0.94,0.42) ellipse (0.09 and 0.13);
- \fill[\thing@eggc, rotate=-30] (0.7,1.08) ellipse (0.09 and 0.13);
+ \fill[\thing@eggb, rotate=-5] (0.95,0.72) ellipse[x radius=0.09, y radius=0.13];
+ \fill[\thing@egga, rotate=10] (0.94,0.42) ellipse[x radius=0.09, y radius=0.13];
+ \fill[\thing@eggc, rotate=-30] (0.7,1.08) ellipse[x radius=0.09, y radius=0.13];
\end{scope}
\end{scope}
\fi%
@@ -782,7 +778,7 @@
\begin{scope}[xshift=-20]
\begin{scope}
\clip [rotate=-20] (0.6,2.3) rectangle (1.1,1.999);
- \fill[even odd rule,\thing@crozier] (1.5,1.6) circle (0.2) (1.5,1.6) circle (0.1);
+ \fill[even odd rule,\thing@crozier] (1.5,1.6) circle[radius=0.2] (1.5,1.6) circle[radius=0.1];
\end{scope}
\fill[\thing@crozier,rotate=-20] (0.663,0.5) rectangle (0.763,2.0);
\end{scope}
@@ -790,35 +786,35 @@
%
% shovel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@shovel
- \fill[brown!80!black,rotate around={-23:(0.11, 0.8)}] (0.07,0.2) rectangle ++(0.1,1.4);
- \fill[\thing@shovel] (-0.21, 0.86) .. controls (0.02, 0.72) and (0.11, 0.66) .. (0.38, 0.58) -- (0.01, 0.04) .. controls (-0.17, 0.02) and (-0.28, 0.07) .. (-0.37, 0.21) -- cycle;
+ \fill[brown!80!black,rotate around={-23:(0.11, 0.8)}] (0.07,0.2) rectangle ++(0.1,1.4);
+ \fill[\thing@shovel] (-0.21, 0.86) .. controls (0.02, 0.72) and (0.11, 0.66) .. (0.38, 0.58) -- (0.01, 0.04) .. controls (-0.17, 0.02) and (-0.28, 0.07) .. (-0.37, 0.21) -- cycle;
\fi
%
% pickaxe %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@pickaxe
- \fill[brown!80!black,rotate around={-23:(0.11, 0.8)}] (0.07,0.2) rectangle ++(0.1,1.4);
- \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;
+ \fill[brown!80!black,rotate around={-23:(0.11, 0.8)}] (0.07,0.2) rectangle ++(0.1,1.4);
+ \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
%
% umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@umbrella
- \path (-0.8, 0.4) rectangle (1.2200000000000002, 2.7);
- \begin{pgfinterruptboundingbox}
- \fill[gray] (-0.3078, 0.5942) -- (-0.2574, 0.6103) .. controls (-0.1724, 0.3884) and (-0.1145, 0.4523) .. (-0.0667, 0.6543) -- (-0.0666, 0.6545) -- (-0.0665, 0.6547) .. controls (0.0347, 1.0671) and (0.2906, 1.9565) .. (0.2906, 1.9565) -- (0.3415, 1.9419) .. controls (0.3415, 1.9419) and (0.0855, 1.0519) .. (-0.0151, 0.6423) -- (-0.0152, 0.642) .. controls (-0.076, 0.3633) and (-0.2126, 0.3312) .. (-0.3078, 0.5942) -- cycle;
- \fill[\thing@umbrella] (-0.7815, 1.9927) .. controls (-0.6441, 2.1962) and (-0.3163, 2.072) .. (-0.3239, 1.824) .. controls (-0.1602, 2.0111) and (0.1891, 1.9216) .. (0.1685, 1.6915) .. controls (0.3000, 1.8765) and (0.6639, 1.7626) .. (0.6607, 1.5356) .. controls (0.7865, 1.7271) and (1.135, 1.695) .. (1.1626, 1.4589) .. controls (1.4996, 2.5771) and (-0.4356, 3.2631) .. (-0.7815, 1.9927) -- cycle;
- \end{pgfinterruptboundingbox}
+ \path (-0.8, 0.4) rectangle (1.2200000000000002, 2.7);
+ \begin{pgfinterruptboundingbox}
+ \fill[gray] (-0.3078, 0.5942) -- (-0.2574, 0.6103) .. controls (-0.1724, 0.3884) and (-0.1145, 0.4523) .. (-0.0667, 0.6543) -- (-0.0666, 0.6545) -- (-0.0665, 0.6547) .. controls (0.0347, 1.0671) and (0.2906, 1.9565) .. (0.2906, 1.9565) -- (0.3415, 1.9419) .. controls (0.3415, 1.9419) and (0.0855, 1.0519) .. (-0.0151, 0.6423) -- (-0.0152, 0.642) .. controls (-0.076, 0.3633) and (-0.2126, 0.3312) .. (-0.3078, 0.5942) -- cycle;
+ \fill[\thing@umbrella] (-0.7815, 1.9927) .. controls (-0.6441, 2.1962) and (-0.3163, 2.072) .. (-0.3239, 1.824) .. controls (-0.1602, 2.0111) and (0.1891, 1.9216) .. (0.1685, 1.6915) .. controls (0.3000, 1.8765) and (0.6639, 1.7626) .. (0.6607, 1.5356) .. controls (0.7865, 1.7271) and (1.135, 1.695) .. (1.1626, 1.4589) .. controls (1.4996, 2.5771) and (-0.4356, 3.2631) .. (-0.7815, 1.9927) -- cycle;
+ \end{pgfinterruptboundingbox}
\fi
%
% closed umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@umbrellaclosed
\fill[gray] (0.5401, 0.7996) -- (0.4872, 0.8019) .. controls (0.484, 1.0395) and (0.4076, 0.9995) .. (0.293, 0.8264) -- (0.2929, 0.8262) -- (0.2928, 0.8261) .. controls (0.0555, 0.4739) and (0.1223, 0.5608) .. (0.1223, 0.5608) -- (0.0795, 0.592) .. controls (0.0795, 0.592) and (0.0131, 0.5057) .. (0.2488, 0.8554) -- (0.2489, 0.8556) .. controls (0.4022, 1.0963) and (0.5414, 1.0793) .. (0.5401, 0.7996) -- cycle;
- \fill[\thing@umbrellaclosed] (-0.1173, 0.2263) -- (0.0038, 0.7188) -- (0.1548, 0.7494) -- (0.152, 0.9231) -- (0.3945, 0.7529) -- (0.2218, 0.6885) -- (0.2465, 0.5566) -- cycle;
+ \fill[\thing@umbrellaclosed] (-0.1173, 0.2263) -- (0.0038, 0.7188) -- (0.1548, 0.7494) -- (0.152, 0.9231) -- (0.3945, 0.7529) -- (0.2218, 0.6885) -- (0.2465, 0.5566) -- cycle;
\fi
%
% handbag %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@handbag
- \fill[\thing@handbag] (0.5189, 0.1751) -- (-0.1913, 0.3097) -- (-0.0315, 0.7086) -- (0.5168, 0.6152) -- cycle;
- \fill[\thing@handbag!70!black] (0.4143, 0.4354) .. controls (0.5139, 0.9811) and (0.1204, 1.0719) .. (0.0134, 0.5155) -- (0.0957, 0.4996) .. controls (0.1753, 0.8952) and (0.3949, 0.8883) .. (0.3324, 0.4536) -- cycle;
+ \fill[\thing@handbag] (0.5189, 0.1751) -- (-0.1913, 0.3097) -- (-0.0315, 0.7086) -- (0.5168, 0.6152) -- cycle;
+ \fill[\thing@handbag!70!black] (0.4143, 0.4354) .. controls (0.5139, 0.9811) and (0.1204, 1.0719) .. (0.0134, 0.5155) -- (0.0957, 0.4996) .. controls (0.1753, 0.8952) and (0.3949, 0.8883) .. (0.3324, 0.4536) -- cycle;
\fi
%
-} \ No newline at end of file
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty b/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty
new file mode 100644
index 0000000000..00bc42d2ab
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty
@@ -0,0 +1,168 @@
+% !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
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{tikzlings-anteaters}[2020/04/22 version v0.3 Drawing anteaters in TikZ]
+
+\RequirePackage{tikz}
+\RequirePackage{tikzlings-addons}
+
+\newcommand*{\anteater}[1][]{%
+ \begin{scope}%
+ \tikzset{/anteater/.cd,#1}%
+ \anteater@draw%
+ \end{scope}%
+ \thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname anteaterhookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+}
+
+\newif\ifanteater@threeD
+\newif\ifanteater@back
+
+\tikzset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Pass unknown keys on to tikz
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ /anteater/.search also={/tikz,/pgf,/thing},
+ /anteater/.cd,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % body
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ body/.code = \def\anteater@body{#1},
+ body = red!55!green!75!blue!66!white,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % options
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ 3D/.code = \anteater@threeDtrue,
+ back/.code = \anteater@backtrue,
+}
+
+\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 and 3D, from
+% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifanteater@threeD
+ \def\anteater@part@draw[##1]{\shade[ball color=##1]}
+\else
+ \def\anteater@part@draw[##1]{\fill[##1]}
+\fi
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Body parts (center: x=0)
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifanteater@back\else
+ \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
+%
+% 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
+ % 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@body!70!brown!50!darkgray] (0.23, 1.7) circle[radius=0.05];
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-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
+%
+}
+
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
index c84c0a2b0a..1af0927ebf 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/bear.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-bears package (part of the tikzlings collection)
-% A package to bring little teddy bears into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-bears}
- [2019/04/07 v0.2 Draw teddy bears in TikZ]
+\ProvidesPackage{tikzlings-bears}[2020/04/22 version v0.3 Draw teddy bears in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,9 +23,13 @@
\bear@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname bearhookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
}
\newif\ifbear@threeD
+\newif\ifbear@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -52,6 +52,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \bear@threeDtrue,
+ back/.code = \bear@backtrue,
}
\def\bear@draw{%
@@ -69,7 +70,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -91,38 +92,67 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname bearhookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!70!black,rotate around={-50:(0.525,0.9)}] (0.525,0.9) ellipse (0.35 and 0.15);
-\bear@part@draw[\bear@body!70!black,rotate around={50:(-0.525,0.9)}] (-0.525,0.9) ellipse (0.35 and 0.15);
+\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 (0.55 and 0.65);
-\bear@part@draw[\bear@body!50!white] (0,0.7) ellipse (0.35 and 0.4);
+\bear@part@draw[\bear@body!70!black] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
+\ifbear@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!70!black] (0.425, 0.3) circle (0.28);
-\bear@part@draw[\bear@body!70!black] (-0.425, 0.3) circle (0.28);
-\bear@part@draw[\bear@body!50!white] (0.425, 0.3) circle (0.17);
-\bear@part@draw[\bear@body!50!white] (-0.425, 0.3) circle (0.17);
+\ifbear@back\else
+ \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 (0.15);
-\bear@part@draw[\bear@body!70!black] (-0.375, 1.95) circle (0.15);
-\bear@part@draw[\bear@body!50!white] (0.375, 1.95) circle (0.1);
-\bear@part@draw[\bear@body!50!white] (-0.375, 1.95) circle (0.1);
+\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];
+\ifbear@back\else
+ \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 (0.5);
+\bear@part@draw[\bear@body!70!black] (0, 1.55) circle[radius=0.5];
+%
+% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifbear@back\else
%
% Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!50!white] (0, 1.4) ellipse (0.28 and 0.2);
-\bear@part@draw[\bear@body!70!white!80!red] (0, 1.5) ellipse (0.15 and 0.08);
+\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@body!30!black] (-0.155, 1.7) circle (0.05);
-\bear@part@draw[\bear@body!30!black] (0.155, 1.7) circle (0.05);
+\bear@part@draw[\bear@body!30!black] (-0.155, 1.7) circle[radius=0.05];
+\bear@part@draw[\bear@body!30!black] (0.155, 1.7) circle[radius=0.05];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[\bear@body!30!black,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
%
-} \ No newline at end of file
+\fi
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname bearhookbody\endcsname
+\csname tikzlinghookbody\endcsname
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty
new file mode 100644
index 0000000000..b8ba8a4552
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty
@@ -0,0 +1,169 @@
+% !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
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{tikzlings-bees}[2020/04/22 version v0.3 Drawing bees in TikZ]
+
+\RequirePackage{tikz}
+\RequirePackage{tikzlings-addons}
+
+\newcommand*{\bee}[1][]{%
+ \begin{scope}%
+ \tikzset{/bee/.cd,#1}%
+ \bee@draw%
+ \end{scope}%
+ \thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname beehookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
+}
+
+\newif\ifbee@threeD
+\newif\ifbee@back
+
+\tikzset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Pass unknown keys on to tikz
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ /bee/.search also={/tikz,/pgf,/thing},
+ /bee/.cd,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % body
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ body/.code = \def\bee@body{#1},
+ body = yellow!70!orange,
+ hands/.code = \def\bee@hands{#1},
+ hands = black,
+ wings/.code = \def\bee@wings{#1},
+ wings = blue!20!cyan!30!white,
+ stripes/.code = \def\bee@stripes{#1},
+ stripes = black,
+ antennas/.code = \def\bee@antennas{#1},
+ antennas = black,
+ eye/.code = \def\bee@eye{#1},
+ eye = black,
+ mouth/.code = \def\bee@mouth{#1},
+ mouth = black,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % options
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ 3D/.code = \bee@threeDtrue,
+ back/.code = \bee@backtrue,
+}
+
+\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 and 3D, from
+% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifbee@threeD
+ \def\bee@part@draw[##1]{\shade[ball color=##1]}
+\else
+ \def\bee@part@draw[##1]{\fill[##1]}
+\fi
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Body parts (center: x=0)
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% 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
+ % Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \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
+%
+% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{scope}
+ \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;
+ \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;
+ % 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \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];
+\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
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty b/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
index 40787eabe5..9ece08d4f2 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/cat.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-cats package (part of the tikzlings collection)
-% A package to bring little cats into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-cats}
- [2019/04/07 v0.2 Drawing cats in TikZ]
+\ProvidesPackage{tikzlings-cats}[2020/04/22 version v0.3 Drawing cats in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -41,19 +37,23 @@
\pgfmathparse{int(random(0,1))}
\let\cat@random=\pgfmathresult
\ifnum\cat@random=1
- \cat@tombstone%
+ \cat@tombstone%
\else
- \cat@draw%
+ \cat@draw%
\fi
\else
- \cat@draw%
+ \cat@draw%
\fi
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname cathookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
}
\newif\ifcat@threeD
\newif\ifcat@schroedinger
+\newif\ifcat@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -94,6 +94,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \cat@threeDtrue,
schroedinger/.code = \cat@schroedingertrue,
+ back/.code = \cat@backtrue,
}
\def\cat@draw{%
@@ -112,7 +113,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -134,14 +135,28 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% 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;
@@ -149,7 +164,10 @@
(-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 (0.44);
+\cat@part@draw[\cat@body] (0,1.64) circle[radius=0.44];
+%
+% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifcat@back\else
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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;
@@ -182,9 +200,14 @@
\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 (0.18);
-\cat@part@draw[\cat@paws] (0.255,0.3) circle (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
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname cathookbody\endcsname
+\csname tikzlinghookbody\endcsname
}
\def\cat@tombstone{%
@@ -213,11 +236,19 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname cathookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
% Stone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fill[gray] (-0.55,0.4) rectangle (0.55,1.5);
-\fill[gray] (0,1.5) circle (0.55);
+\fill[gray] (0,1.5) circle[radius=0.55];
\node[scale=\scalingfactor] at (0,1.3) {R.I.P.};
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname cathookbelly\endcsname
+\csname tikzlinghookbelly\endcsname
+%
% soil %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fill[brown!65!black] (1,0.15) arc [start angle=50, end angle=130, radius=1.56] -- cycle;
%
@@ -226,7 +257,11 @@
\fill[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;
\fill[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}{
- \fill[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;
+ \fill[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
+%
}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty b/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
index 1a262ca947..2550e6e9d8 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/coati.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-coatis package (part of the tikzlings collection)
-% A package to bring little coatis into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-coatis}
- [2019/04/07 v0.2 Drawing coatis in TikZ]
+\ProvidesPackage{tikzlings-coatis}[2020/04/22 version v0.3 Drawing coatis in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,10 +23,14 @@
\coati@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname coatihookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
}
\newif\ifcoati@threeD
\newif\ifcoati@sideward
+\newif\ifcoati@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -57,6 +57,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \coati@threeDtrue,
sideward/.code = \coati@sidewardtrue,
+ back/.code = \coati@backtrue,
}
\def\coati@draw{%
@@ -74,7 +75,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -96,29 +97,42 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% 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 (0.23 and 0.09);
-\coati@part@draw[\coati@body!80!white] (-0.255,0.2) ellipse (0.23 and 0.09);
+\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\coati@part@draw[\coati@body!50!darkgray] (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;
-\begin{scope}
- \clip (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;
- \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);
-\end{scope}
+\ifcoati@back\else
+ \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
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\coati@part@draw[\coati@body!80!white,rotate around={70:(-0.625,1)}] (-0.625,1) ellipse (0.42 and 0.13);
-\coati@part@draw[\coati@body!80!white,rotate around={-70:(0.625,1)}] (0.625,1) ellipse (0.42 and 0.13);
+\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)}]
%
@@ -126,51 +140,96 @@
\ifcoati@sideward
%
% Left Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-16:(-0.212, 2.135)}] (-0.212, 2.135) ellipse (0.09 and 0.12);
- \coati@part@draw[\coati@body!80!white,rotate around={-16:(-0.212, 2.135)}] (-0.212, 2.135) ellipse (0.065 and 0.09);
+ \coati@part@draw[\coati@body!45!white!95!orange] (-0.212, 2.135) ellipse[x radius=0.09, y radius=0.12, rotate=-16];
+ \ifcoati@back\else
+ \coati@part@draw[\coati@body!80!white] (-0.212, 2.135) ellipse[x radius=0.065, y radius=0.09, rotate=-16];
+ \fi
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \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;
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \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;
- \coati@part@draw[\coati@body!80!white] (-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;
+ \ifcoati@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!50!black] (-0.605, 1.453) circle (0.09);
+ \ifcoati@back\else
+ \coati@part@draw[\coati@body!50!black] (-0.605, 1.453) circle[radius=0.09];
+ \fi
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!50!black] (0.007, 1.624) ellipse (0.04 and 0.06);
- \coati@part@draw[\coati@body!50!black] (-0.38, 1.865) ellipse (0.035 and 0.055);
+ \ifcoati@back\else
+ \coati@part@draw[\coati@body!50!black] (0.007, 1.624) ellipse[x radius=0.04, y radius=0.06];
+ \coati@part@draw[\coati@body!50!black] (-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,rotate around={-16:(0.417, 1.875)}] (0.417, 1.875) ellipse (0.1 and 0.14);
- \coati@part@draw[\coati@body!80!white,rotate around={-16:(0.417, 1.875)}] (0.417, 1.875) ellipse (0.07 and 0.10);
+ \coati@part@draw[\coati@body!45!white!95!orange] (0.417, 1.875) ellipse[x radius=0.1, y radius=0.14, rotate=-16];
+ \ifcoati@back\else
+ \coati@part@draw[\coati@body!80!white] (0.417, 1.875) ellipse[x radius=0.07, y radius=0.10, rotate=-16];
+ \fi
%
% Normal Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \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;
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \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;
- \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;
+ \ifcoati@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!50!black] (0, 1.248) circle (0.09);
+ \ifcoati@back\else
+ \coati@part@draw[\coati@body!50!black] (0, 1.248) circle[radius=0.09];
+ \fi
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!50!black] (0.23, 1.62) circle (0.05);
- \coati@part@draw[\coati@body!50!black] (-0.23, 1.62) circle (0.05);
+ \ifcoati@back\else
+ \coati@part@draw[\coati@body!50!black] (0.23, 1.62) circle[radius=0.05];
+ \coati@part@draw[\coati@body!50!black] (-0.23, 1.62) circle[radius=0.05];
+ \fi
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!45!white!95!orange] (0.44, 2.02) circle (0.12);
- \coati@part@draw[\coati@body!80!white] (0.44, 2.02) circle (0.09);
- \coati@part@draw[\coati@body!45!white!95!orange] (-0.44, 2.02) circle (0.12);
- \coati@part@draw[\coati@body!80!white] (-0.44, 2.02) circle (0.09);
+ \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];
+ \ifcoati@back\else
+ \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}
%
+% 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
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname coatihookbody\endcsname
+\csname tikzlinghookbody\endcsname
+%
}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf b/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf
index 394f05561a..ba74c024db 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 11b06c3f7d..f2c9191a6e 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Documentation for the tikzlings package
-% A collection of packages to draw animals in tikz
+% A package to bring cute little animals and other beings into tikz
% Maintained by samcarter
%
% Project repository and bug tracker:
@@ -10,30 +10,29 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[parskip=half]{scrartcl}
% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[svgnames]{xcolor}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{tikzlings}
\usepackage[most]{tcolorbox}
+\usepackage{bearwear}
\usepackage[paper=a4paper,margin=3cm]{geometry}
\usepackage{url}
\usepackage{xspace}
\usepackage{scrlayer-scrpage}
\usepackage[hang,flushmargin,bottom]{footmisc}
\usepackage[%
- colorlinks=true,
- breaklinks=true,
- allcolors=SteelBlue!50!black
+ colorlinks=true,
+ breaklinks=true,
+ allcolors=SteelBlue!50!black
]{hyperref}
+\usetikzlibrary{3d}
% macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\CTAN}{\textsc{CTAN}\xspace}
@@ -66,7 +65,7 @@
\makeatletter
\renewcommand{\sectionlinesformat}[4]{%
-\ifstr{#1}{section}{%
+\Ifstr{#1}{section}{%
\parbox[t]{\linewidth}{%
\raggedsection\@hangfrom{\hskip #2#3}{#4}\par%
\kern-.75\ht\strutbox\rule{\linewidth}{.8pt}%
@@ -84,46 +83,46 @@
\colorlet{blue}{SteelBlue}
\lstdefinestyle{duckstyle}{%
- language={[latex]TeX},
- tabsize=2,
- breaklines,
- basicstyle=\ttfamily,
- commentstyle={\color{green!50!black}\slshape},
- columns=fullflexible,
- alsodigit={-},
- 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-snowmans, tikzlings-mice, tikzlings-moles, tikzlings-sloths, tikzlings-pigs, tikzlings-cats, tikzlings-hippos, tikzlings-rhinos, tikzlings-pandas,
- body, 3D, rotatehead, sideward, blush, sleeping, whiskers, teeth, shadow, askphil, leftstep, rightstep, eye, nose, pupil, bill, feet, belly, ask, phil, mouth, buttons, rotatearms, eyes, paws,
- 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, pupilwidth,
- },
- 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,
- },
- delim ={[s][\ttfamily\color{green!50!black}]{$}{$}},
- moredelim=[is][\footnotesize\ttfamily\color{orange!70!black}]{|}{|},
- index=[1][emph]
+ language={[latex]TeX},
+ tabsize=2,
+ breaklines,
+ basicstyle=\ttfamily,
+ commentstyle={\color{green!50!black}\slshape},
+ columns=fullflexible,
+ alsodigit={-},
+ 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-snowmans, tikzlings-mice, tikzlings-moles, tikzlings-sloths, tikzlings-pigs, tikzlings-cats, tikzlings-hippos, tikzlings-rhinos, tikzlings-pandas, tikzlings-bees, tikzlings-anteaters, tikzlings-squirrels,
+ body, 3D, rotatehead, sideward, blush, sleeping, whiskers, teeth, shadow, askphil, leftstep, rightstep, eye, nose, pupil, bill, feet, belly, ask, phil, mouth, buttons, rotatearms, eyes, 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,
+ },
+ 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, tikzlinghookbackground, tikzlinghookbelly, tikzlinghookbody, tikzlinghookforeground, mousehookbelly
+ },
+ delim ={[s][\ttfamily\color{green!50!black}]{$}{$}},
+ moredelim=[is][\footnotesize\ttfamily\color{orange!70!black}]{|}{|},
+ index=[1][emph]
}
\tcbset{%
- colframe=SteelBlue!50!black,
- arc=0mm,
- fonttitle=\bfseries,
- sidebyside,
- listing options={style=duckstyle},
- center lower,
- righthand width=6.5cm,
- bottom=0pt,
- top=0pt,
- tikz lower,
- height plus=3cm,
- colback=SteelBlue!30!white
+ colframe=SteelBlue!50!black,
+ arc=0mm,
+ fonttitle=\bfseries,
+ sidebyside,
+ listing options={style=duckstyle},
+ center lower,
+ righthand width=6.5cm,
+ bottom=0pt,
+ top=0pt,
+ tikz lower,
+ height plus=3cm,
+ colback=SteelBlue!30!white
}
\lstset{style=duckstyle}
@@ -134,61 +133,25 @@
\cfoot{\thepage}
\pagestyle{scrheadings}
-\makeatletter
-\renewcommand*{\coati}[1][]{%
- \begin{scope}%
- \path (-1.63,0.1) rectangle (1.63,2.26);
- \tikzset{/coati/.cd,#1}%
- \coati@draw%
- \end{scope}%
- \thing[#1]%
-}
-
-\renewcommand*{\mouse}[1][]{%
- \begin{scope}%
- \path (-1.6,0.1) rectangle (0.905, 2.17);
- \tikzset{/mouse/.cd,#1}%
- \mouse@draw%
- \end{scope}%
- \thing[#1]%
-}
-
-\renewcommand*{\cat}[1][]{%
- \begin{scope}%
- \tikzset{/cat/.cd,#1}%
- \ifcat@schroedinger
- \pgfmathparse{int(random(0,1))}
- \let\cat@random=\pgfmathresult
- \ifnum\cat@random=1
- \cat@tombstone%
- \else%
- \path (-1.6,0.1) rectangle (0.905, 2.17);
- \cat@draw%
- \fi%
- \else%
- \path (-1.6,0.1) rectangle (0.905, 2.17);
- \cat@draw%
- \fi
- \end{scope}%
- \thing[#1]%
-}
-\makeatother
+\newcommand{\coatihookbackground}{\path (-1.63,0.1) rectangle (1.63,2.26);}
+\newcommand{\mousehookbackground}{\path (-1.6,0.1) rectangle (0.905, 2.17);}
+\newcommand{\cathookbackground}{\path (-1.6,0.1) rectangle (0.905, 2.17);}
\cfoot{%
- \begin{tikzpicture}[scale=0.5]
- \tikzling[signpost={\thepage}]
- \end{tikzpicture}
+ \begin{tikzpicture}[scale=0.5]
+ \tikzling[signpost={\thepage}]
+ \end{tikzpicture}
}
% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{The \texorpdfstring{\tikzlings}{tikzlings} package}
\subtitle{drawing animals and beings in \TikZ}
\author{%
- \texorpdfstring{\texttt{samcarter}\\[0.8em]
- \url{https://github.com/samcarter/tikzlings}\\
- \url{https://www.ctan.org/pkg/tikzlings}
- }{samcarter}}
-\date{Version 0.2 -- \today}
+ \texorpdfstring{\texttt{samcarter}\\[0.8em]
+ \url{https://github.com/samcarter/tikzlings}\\
+ \url{https://www.ctan.org/pkg/tikzlings}
+ }{samcarter}}
+\date{Version v0.3 \textendash{} 2020/04/22}
\begin{document}
\maketitle
@@ -201,11 +164,12 @@ The \tikzlings are a collection of little animals (and beings) drawn in \TikZ. I
This package is work in progress, therefore I would be happy to hear your feedback and ideas how to improve the package.
The head version of the source code can be found on \url{github.com/samcarter/tikzlings}, including a bug tracker -- please make constructive use of it!
+If you seek any other assistance (not bug reports/feature requests), I suggest asking a question at \url{topanswers.xyz/tex}.
A more stable package version can be found on \CTAN (\url{https://www.ctan.org/pkg/tikzlings}) and is included in both \miktex and \texlive as \tikzlings.
\subsection*{Acknowledgements}
-I'd like to thank the friendly and helpful community of \href{https://tex.stackexchange.com/}{TeX.Stackexchange} for their suggestions, feedback and help to create this package and find a suitable name for it. As a thank you all the \tikzlings have a name which is in some way or another connected to the users of TeX.SE.
+I'd like to thank the friendly and helpful community of \TeX{} users for their suggestions, feedback and help to create this package and find a suitable name for it. As a thank you all the \tikzlings have a name which is in some way or another connected to the users of \TeX{}.
\subsection*{License}
@@ -231,15 +195,133 @@ will produce a marmot. All usual \TikZ and \lstinline|pgf| keys can be passed as
In addition to the standard options provided by \TikZ each \tikzlings also comes with some additional options which are listed in the following sections. If these additional options consist of multiple words they are available both with and without spaces, for example \lstinline|askphil| and \lstinline|ask phil| will be treated as the same.
+To make customisation of the \tikzlings easier, some hooks are provided, which can be redefined by the user in order to add commands at specific layers:
+\begin{itemize}
+ \color{SteelBlue!50!black}
+ \item \lstinline|\<name_of_the_tikzling>hookbackground|
+ \item \lstinline|\<name_of_the_tikzling>hookbelly|
+ \item \lstinline|\<name_of_the_tikzling>hookbody|
+ \item \lstinline|\<name_of_the_tikzling>hookforeground|
+\end{itemize}
+
+With regard to the individual components of the \tikzlings, they are located in the following z order:
+\begin{center}
+\begin{tikzpicture}
+ \newcommand{\planes}{\fill[SteelBlue!30!white,opacity=0.9] (-1.9,-0.1) rectangle (1.9,2.4);}
+ \newcommand{\hooks}{\draw[SteelBlue!50!black, rounded corners=3pt, line width=1pt] (-1.9,-0.1) rectangle (1.9,2.4);}
+ \newcounter{layer}
+ \setcounter{layer}{0}
+ \begin{scope}[canvas is zy plane at x=\thelayer*1.8]
+ \hooks
+ \node[font=\footnotesize\ttfamily,rotate=45] at (0,0.1) {background};
+ \end{scope}
+ \addtocounter{layer}{1}
+ \begin{scope}[canvas is zy plane at x=\thelayer*1.8]
+ \planes
+ \newcommand{\rhinohookbelly}{
+ \pgfsetfillopacity{0}
+ \pgfsetstrokeopacity{0}
+ }
+ \rhino
+ \end{scope}
+ \addtocounter{layer}{1}
+ \begin{scope}[canvas is zy plane at x=\thelayer*1.8]
+ \hooks
+ \node[font=\footnotesize\ttfamily,rotate=45] at (0,0.1) {belly};
+ \end{scope}
+ \addtocounter{layer}{1}
+ \begin{scope}[canvas is zy plane at x=\thelayer*1.8]
+ \planes
+ \newcommand{\rhinohookbackground}{
+ \pgfsetfillopacity{0}
+ \pgfsetstrokeopacity{0}
+ }
+ \newcommand{\rhinohookbelly}{
+ \pgfsetfillopacity{1}
+ \pgfsetstrokeopacity{1}
+ }
+ \rhino
+ \end{scope}
+ \addtocounter{layer}{1}
+ \begin{scope}[canvas is zy plane at x=\thelayer*1.8]
+ \hooks
+ \node[font=\footnotesize\ttfamily,rotate=45] at (0,0.1) {body};
+ \end{scope}
+ \addtocounter{layer}{1}
+ \begin{scope}[canvas is zy plane at x=\thelayer*1.8]
+ \planes
+ \thing[magichat,magicwand]
+ \end{scope}
+ \addtocounter{layer}{1}
+ \begin{scope}[canvas is zy plane at x=\thelayer*1.8]
+ \hooks
+ \node[font=\footnotesize\ttfamily,rotate=45] at (0,0.1) {foreground};
+ \end{scope}
+ \end{tikzpicture}
+\end{center}
+
+In addition the hooks \lstinline|\tikzlinghookbackground|, \lstinline|\tikzlinghookbelly|, \lstinline|\tikzlinghookbody| and \lstinline|\tikzlinghookforeground| are available and will effect all \tikzlings.
+
+A short example how the hooks can be used:
+
+\begin{tcblisting}{}
+\newcommand{\mousehookbelly}{%
+ \fill[red!80!black]
+(0.55, 1.35) -- (0.65, 0.3) --
+(-0.65, 0.3) -- (-0.55, 1.35)
+-- (0.0, 0.9) -- cycle;
+}
+\mouse
+\end{tcblisting}
+
\subsection*{List of all \tikzlings:}
\begingroup
- \hypersetup{hidelinks}
- \tableofcontents
+ \hypersetup{hidelinks}
+ \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}
+
+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}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
% Bear
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -269,11 +351,96 @@ The basic teddy bear can be modified by changing its colour:
\bear[body=blue]
\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}
+\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}
+
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Cat
@@ -348,12 +515,25 @@ Additionally several predefined widths exist:
\end{tikzpicture}
\end{tcolorbox}
-
-There is also the special option \lstinline|schroedinger|. This cat is both alive and death as long as you did not compile your document.
+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}
Finally the key \lstinline|3D| will make the cat 3-dimensional:
\begin{tcblisting}{}
@@ -401,6 +581,11 @@ For the head an alternative sidewards facing head is available. It can be combin
\coati[sideward]
\end{tcblisting}
+To view the coati from behind:
+\begin{tcblisting}{}
+\coati[back]
+\end{tcblisting}
+
Finally the key \lstinline|3D| will make the coati 3-dimensional:
\begin{tcblisting}{}
\coati[3D]
@@ -442,6 +627,11 @@ The hippo can also do its nails:
\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]
@@ -455,7 +645,7 @@ The key \lstinline|3D| will make the hippo 3-dimensional:
\clearpage
\section[Koala]{Will, the koala}
-\emph{The koala was generously contributed by the TeX.Stackexchange user marmot and is named in honour of a \LaTeX{} developer from Down Under}
+\emph{The koala was generously contributed by @marmot and is named in honour of a \LaTeX{} developer from Down Under}
\subsection{Package name}
@@ -488,6 +678,11 @@ and if tired, it is going to take a nap:
\koala[sleeping]
\end{tcblisting}
+To view the koala from behind:
+\begin{tcblisting}{}
+\koala[back]
+\end{tcblisting}
+
Finally the key \lstinline|3D| will make the koala 3-dimensional:
\begin{tcblisting}{}
\koala[3D]
@@ -555,6 +750,11 @@ If a good weather prognosis is derived, the happy marmot can dance by lifting up
\marmot[rightstep,xshift=2cm]
\end{tcblisting}
+To view the marmot from behind:
+\begin{tcblisting}{}
+\marmot[back]
+\end{tcblisting}
+
Finally the key \lstinline|3D| will make the marmot 3-dimensional:
\begin{tcblisting}{}
\marmot[3D]
@@ -587,7 +787,7 @@ Finally the key \lstinline|3D| will make the marmot 3-dimensional:
\subsection{Options}
-The basic mouse can be modified by changing its colour:
+The basic mole can be modified by changing its colour:
\begin{tcblisting}{}
\moles[body=blue]
\end{tcblisting}
@@ -605,6 +805,11 @@ In addition to the colour of the body, the colour of various body parts can be a
\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]
@@ -618,7 +823,7 @@ The key \lstinline|3D| will make the mole 3-dimensional:
\clearpage
\section[Mouse]{Tokz, the mouse}
-\emph{The idea for the mouse came from an Italian TeX.Stackexchange user -- Tokz is a combination of the Italian word for mouse and \TikZ}
+\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}
@@ -646,6 +851,17 @@ The rotation angle of its arms can be adjusted:
\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]
@@ -659,7 +875,7 @@ The key \lstinline|3D| will make the mouse 3-dimensional:
\clearpage
\section[Owl]{Jake, the owl}
-\emph{The owl Jake was inspired by the avatar of one of the top users of TeX.Stackexchange}
+\emph{The owl Jake was inspired by the avatar of one of the world's top TikZperts}
\subsection{Package name}
@@ -696,6 +912,11 @@ In addition to the colour of the body, the colour of various body parts can be a
\owl[feet=red]
\end{tcblisting}
+To view the owl from behind:
+\begin{tcblisting}{}
+\owl[back]
+\end{tcblisting}
+
Finally the key \lstinline|3D| will make the owl 3-dimensional:
\begin{tcblisting}{}
\owl[3D]
@@ -732,6 +953,11 @@ The basic panda can be modified by changing its colour:
\panda[body=blue]
\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]
@@ -786,6 +1012,11 @@ In addition to the colour of the body, the colour of various body parts can be a
\penguin[feet=red]
\end{tcblisting}
+To view the penguin from behind:
+\begin{tcblisting}{}
+\penguin[back]
+\end{tcblisting}
+
Finally the key \lstinline|3D| will make the penguin 3-dimensional:
\begin{tcblisting}{}
\penguin[3D]
@@ -822,6 +1053,11 @@ The basic pig can be modified by changing its colour:
\pig[body=blue]
\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]
@@ -863,12 +1099,16 @@ The hippo can also do its nails:
\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}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Sloth
@@ -877,7 +1117,7 @@ The key \lstinline|3D| will make the rhino 3-dimensional:
\clearpage
\section[Sloth]{Riley, the sloth}
-\emph{One of the regulars in the TeX.Stackexchange chat once met a sloth called Riley}
+\emph{One of good souls behind the TugBoat once met a sloth called Riley}
\subsection{Package name}
@@ -905,6 +1145,11 @@ If tired, the sloth can take a nap:
\sloth[sleeping]
\end{tcblisting}
+To view the sloth from behind:
+\begin{tcblisting}{}
+\sloth[back]
+\end{tcblisting}
+
Finally the key \lstinline|3D| will make the sloth 3-dimensional:
\begin{tcblisting}{}
@@ -913,6 +1158,47 @@ Finally the key \lstinline|3D| will make the sloth 3-dimensional:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% 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}
+
+To view the squirrel from behind:
+\begin{tcblisting}{}
+\squirrel[back]
+\end{tcblisting}
+
+Finally the key \lstinline|3D| will make the squirrel 3-dimensional:
+\begin{tcblisting}{}
+\squirrel[3D]
+\end{tcblisting}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
% Snowman
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -956,6 +1242,16 @@ In addition to the colour of the body, the colour of various body parts can be a
\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}
+
Finally the key \lstinline|3D| will make the snowman 3-dimensional:
\begin{tcblisting}{}
@@ -968,7 +1264,7 @@ Finally the key \lstinline|3D| will make the snowman 3-dimensional:
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
-\section[Ti\emph{k}Zlings]{... , the Ti\emph{k}Zling}
+\section[Ti\emph{k}Zling]{... , the Ti\emph{k}Zling}
\emph{The inventor of the word \tikzlings has yet to come up with a name for the Ti\emph{k}Zling}
@@ -993,12 +1289,17 @@ Only options common for all \tikzlings are supported for the \lstinline|\tikzlin
\tikzling[body=blue]
\end{tcblisting}
+to view the \tikzlings from behind
+\begin{tcblisting}{}
+\tikzling[back]
+\end{tcblisting}
+
and the \lstinline|3D| key, which will make the Ti\emph{k}Zlings 3-dimensional:
\begin{tcblisting}{}
\tikzling[3D]
\end{tcblisting}
-If an option of a specific tikzlings is used (for example \lstinline|sleeping| which only the koala can do) this only works if your are lucky and the koala is drawn, in all other cases it will result in an error.
+If an option of a specific tikzlings is used (for example \lstinline|sleeping| which only the koala can do) this only works if you are lucky and the koala is drawn, in all other cases it will result in an error.
In addition all usual \TikZ and \lstinline|pgf| keys can be used in the optional argument as well as the accessories presented in the following section.
@@ -1035,89 +1336,89 @@ A list of all available accessories is given below. For completeness the default
\begin{tcblisting}{}
\penguin[
- hat=blue!40!black
+ hat=blue!40!black
]
\end{tcblisting}
\begin{tcblisting}{}
\snowman[
- tophat=black!90!white
+ tophat=black!90!white
]
\end{tcblisting}
\begin{tcblisting}{}
\mouse[
- beret=black
+ beret=black
]
\end{tcblisting}
\begin{tcblisting}{}
-\owl[
- strawhat=gray!30!white,
- ribbon=black
+\anteater[
+ strawhat=blue,
+ ribbon=black
]
\end{tcblisting}
\begin{tcblisting}{}
\coati[
- harlequin=blue,
- niuqelrah=red
+ harlequin=blue,
+ niuqelrah=red
]
\end{tcblisting}
\begin{tcblisting}{}
\cat[
- witch=gray
+ witch=gray
]
\end{tcblisting}
\begin{tcblisting}{}
\bear[
- magichat=violet,
- magicstars=yellow!80!brown
+ magichat=violet,
+ magicstars=yellow!80!brown
]
\end{tcblisting}
\begin{tcblisting}{}
\penguin[
- crown=yellow!90!orange
+ crown=yellow!90!orange
]
\end{tcblisting}
\begin{tcblisting}{}
\koala[
- queencrown=yellow
+ queencrown=yellow
]
\end{tcblisting}
\begin{tcblisting}{}
\marmot[
- kingcrown=gray
+ kingcrown=gray
]
\end{tcblisting}
\begin{tcblisting}{}
\mouse[
- santa=red!80!black
+ santa=red!80!black
]
\end{tcblisting}
\begin{tcblisting}{}
\bear[
- chef=gray!20!white
+ chef=gray!20!white
]
\end{tcblisting}
\begin{tcblisting}{}
\snowman[
- graduate=black,
- tassel=red
+ graduate=black,
+ tassel=red
]
\end{tcblisting}
\begin{tcblisting}{}
\penguin[
- alien=green
+ alien=green
]
\end{tcblisting}
@@ -1125,30 +1426,30 @@ A list of all available accessories is given below. For completeness the default
\begin{tcblisting}{}
\coati[
- book={\tiny\TeX},
- bookcolour=brown
+ book={\tiny\TeX},
+ bookcolour=brown
]
\end{tcblisting}
\begin{tcblisting}{}
\pig[
- signpost={\TeX},
- signcolour= brown!50!black,
- signback=green!40!black
+ signpost={\TeX},
+ signcolour= brown!50!black,
+ signback=green!40!black
]
\end{tcblisting}
\begin{tcblisting}{}
\bear[
- speech={\TeX},
- bubblecolour=gray!30!white
+ speech={\TeX},
+ bubblecolour=gray!30!white
]
\end{tcblisting}
\begin{tcblisting}{}
\penguin[
- think={\TeX},
- bubblecolour=gray!30!white
+ think={\TeX},
+ bubblecolour=gray!30!white
]
\end{tcblisting}
@@ -1156,46 +1457,46 @@ A list of all available accessories is given below. For completeness the default
\begin{tcblisting}{}
\koala[
- pizza
+ pizza
]
\end{tcblisting}
\begin{tcblisting}{}
\mouse[
- cheese=yellow!30!orange!60!white
+ cheese=yellow!30!orange!60!white
]
\end{tcblisting}
\begin{tcblisting}{}
\coati[
- baguette=brown
+ baguette=brown
]
\end{tcblisting}
\begin{tcblisting}{}
\moles[
- cake=violet
+ cake=violet
]
\end{tcblisting}
\begin{tcblisting}{}
\marmot[
- icecream=brown!60!gray,
- flavoura=brown!50!black,
- flavourb=white!70!brown,
- flavourc=red!50!white
+ icecream=brown!60!gray,
+ flavoura=brown!50!black,
+ flavourb=white!70!brown,
+ flavourc=red!50!white
]
\end{tcblisting}
\begin{tcblisting}{}
\penguin[
- milkshake=red!20!white
+ milkshake=red!20!white
]
\end{tcblisting}
\begin{tcblisting}{}
\owl[
- wine=red!70!black
+ wine=red!70!black
]
\end{tcblisting}
@@ -1203,19 +1504,19 @@ A list of all available accessories is given below. For completeness the default
\begin{tcblisting}{}
\coati[
- cricket=brown
+ cricket=brown
]
\end{tcblisting}
\begin{tcblisting}{}
-\hippo[
- hockey=brown
+\bee[
+ hockey=brown
]
\end{tcblisting}
\begin{tcblisting}{}
-\koala[
- football=white
+\squirrel[
+ football=white
]
\end{tcblisting}
@@ -1223,88 +1524,88 @@ A list of all available accessories is given below. For completeness the default
\begin{tcblisting}{}
\marmot[
- crystalball=cyan
+ crystalball=cyan
]
\end{tcblisting}
\begin{tcblisting}{}
\bear[
- magicwand
+ magicwand
]
\end{tcblisting}
\begin{tcblisting}{}
\coati[
- rollingpin=brown
+ rollingpin=brown
]
\end{tcblisting}
\begin{tcblisting}{}
\penguin[
- lightsaber=green
+ lightsaber=green
]
\end{tcblisting}
\begin{tcblisting}{}
\snowman[
- torch=gray
+ torch=gray
]
\end{tcblisting}
\begin{tcblisting}{}
\mouse[
- basket=brown!70!gray
+ basket=brown!70!gray
]
\end{tcblisting}
\begin{tcblisting}{}
\sloth[
- easter=brown!70!gray,
- egga=blue,
- eggb=green,
- eggc=red
+ easter=brown!70!gray,
+ egga=blue,
+ eggb=green,
+ eggc=red
]
\end{tcblisting}
\begin{tcblisting}{}
\koala[
- crozier=brown
+ crozier=brown
]
\end{tcblisting}
\begin{tcblisting}{}
\snowman[
- shovel=gray
+ shovel=gray
]
\end{tcblisting}
\begin{tcblisting}{}
\penguin[
- pickaxe=gray
+ pickaxe=gray
]
\end{tcblisting}
\begin{tcblisting}{}
\rhino[
- umbrella=cyan
+ umbrella=cyan
]
\end{tcblisting}
\begin{tcblisting}{}
\marmot[
- umbrellaclosed=cyan
+ umbrellaclosed=cyan
]
\end{tcblisting}
\begin{tcblisting}{}
\mouse[
- handbag=red!70!black
+ handbag=red!70!black
]
\end{tcblisting}
\begin{tcblisting}{}
\bear[
- cocktail
+ cocktail
]
\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty b/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
index 61d7eb7aeb..8f42d1196a 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/hippo.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-hippos package (part of the tikzlings collection)
-% A package to bring little hippos into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-hippos}
- [2019/04/07 v0.2 Drawing hippos in TikZ]
+\ProvidesPackage{tikzlings-hippos}[2020/04/22 version v0.3 Drawing hippos in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,9 +23,13 @@
\hippo@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname hippohookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
}
\newif\ifhippo@threeD
+\newif\ifhippo@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -54,6 +54,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \hippo@threeDtrue,
+ back/.code = \hippo@backtrue,
}
\def\hippo@draw{%
@@ -71,7 +72,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -93,49 +94,82 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname hippohookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hippo@part@draw[\hippo@body,rotate around={-30:(0.23,2.03)}] (0.23,2.03) ellipse (0.09 and 0.13);
-\hippo@part@draw[\hippo@body,rotate around={30:(-0.23,2.03)}] (-0.23,2.03) ellipse (0.09 and 0.13);
+\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
+%
+% 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
%
% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hippo@part@draw[\hippo@body,rotate around={90:(0.35,1.0)}] (0.35,1.0) ellipse (0.24 and 0.13);
-\hippo@part@draw[\hippo@body,rotate around={-90:(-0.35,1.0)}] (-0.35,1.0) ellipse (0.24 and 0.13);
+\ifhippo@back\else
+ \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
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hippo@part@draw[\hippo@body!55!white] (0, 1.76) circle (0.36);
+\hippo@part@draw[\hippo@body!55!white] (0, 1.76) circle[radius=0.36];
+%
+% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifhippo@back\else
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[white] (-0.11, 1.83) ellipse (0.08 and 0.12);
-\fill[white] (0.11, 1.83) ellipse (0.08 and 0.12);
-\fill[black] (-0.105, 1.78) ellipse (0.04 and 0.07);
-\fill[black] (0.105, 1.78) ellipse (0.04 and 0.07);
+\fill[white] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+\fill[white] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+\fill[black] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+\fill[black] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hippo@part@draw[\hippo@body!80!white] (0, 1.55) ellipse (0.42 and 0.2);
-\hippo@part@draw[\hippo@body!70!black] (-0.07, 1.63) circle (0.035);
-\hippo@part@draw[\hippo@body!70!black] (0.07, 1.63) circle (0.035);
+\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
- \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
- %
+ \draw[black,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
+%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \hippo@part@draw[\hippo@body] (-0.25,0.15) ellipse (0.16 and 0.17);
- \hippo@part@draw[\hippo@body] (0.25,0.15) ellipse (0.16 and 0.17);
- \hippo@part@draw[\hippo@toes] (0.25,0.13) ellipse (0.05 and 0.1);
- \hippo@part@draw[\hippo@toes] (0.13,0.11) ellipse (0.05 and 0.1);
- \hippo@part@draw[\hippo@toes] (0.37,0.11) ellipse (0.05 and 0.1);
- \hippo@part@draw[\hippo@toes] (-0.25,0.13) ellipse (0.05 and 0.1);
- \hippo@part@draw[\hippo@toes] (-0.13,0.11) ellipse (0.05 and 0.1);
- \hippo@part@draw[\hippo@toes] (-0.37,0.11) ellipse (0.05 and 0.1);
+ \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}
%
-} \ No newline at end of file
+\fi
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname hippohookbody\endcsname
+\csname tikzlinghookbody\endcsname
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty b/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
index 206a291895..e4bbb3e515 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
@@ -1,9 +1,8 @@
% !TeX root = ./examples/koala.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-koalas package (part of the tikzlings collection)
-% A package to bring little koalas into tikz
-% Created by @marmot (https://tex.stackexchange.com/a/448397/36296)
+% 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:
@@ -12,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-koalas}
- [2019/04/07 v0.2 Drawing koalas in TikZ]
+\ProvidesPackage{tikzlings-koalas}[2020/04/22 version v0.3 Drawing koalas in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -32,11 +27,16 @@
\koala@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname koalahookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifkoala@blush
\newif\ifkoala@sleeping
\newif\ifkoala@threeD
+\newif\ifkoala@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -61,6 +61,7 @@
blush/.code = \koala@blushtrue,
sleeping/.code = \koala@sleepingtrue,
3D/.code = \koala@threeDtrue,
+ back/.code = \koala@backtrue,
}
\def\koala@draw{%
@@ -78,7 +79,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -100,30 +101,45 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% 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 (0.23 and 0.09);
-\koala@part@draw[\koala@body!50!black] (-0.255,0.2) ellipse (0.23 and 0.09);
+\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 (0.3 and 0.23);
-\koala@part@draw[\koala@body!40!white] (0.405, 2.1) ellipse (0.15 and 0.12);
-\koala@part@draw[\koala@body] (-0.405, 2.1) ellipse (0.3 and 0.23);
-\koala@part@draw[\koala@body!40!white] (-0.405, 2.1) ellipse (0.15 and 0.12);
+\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];
+\ifkoala@back\else
+ \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
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body,rotate around={70:(-0.625,1)}] (-0.625,1) ellipse (0.42 and 0.13);
-\koala@part@draw[\koala@body!50!black,rotate around={-20:(-0.745,0.65)}] (-0.745,0.65) ellipse (0.12 and 0.08);
-\koala@part@draw[\koala@body,rotate around={-70:(0.625,1)}] (0.625,1) ellipse (0.42 and 0.13);
-\koala@part@draw[\koala@body!50!black,rotate around={20:(0.745,0.65)}] (0.745,0.65) ellipse (0.12 and 0.08);
+\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\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;
+\ifkoala@back\else
+ \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
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname koalahookbelly\endcsname
+\csname tikzlinghookbelly\endcsname
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (0,1.67) ellipse (0.55 and 0.45);
+\koala@part@draw[\koala@body] (0,1.67) ellipse[x radius=0.55, y radius=0.45];
+%
+% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifkoala@back\else
%
% 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;
@@ -143,15 +159,15 @@
\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[black] (-0.255, 1.74) circle (0.08);
- \koala@part@draw[black] (0.255, 1.74) circle (0.08);
- \fill[white] (-0.27, 1.76) circle (0.015);
- \fill[white] (0.24, 1.76) circle (0.015);
+ \koala@part@draw[black] (-0.255, 1.74) circle[radius=0.08];
+ \koala@part@draw[black] (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
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifkoala@threeD
- \draw[black,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
+ \draw[black,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
@@ -164,9 +180,14 @@
%
% Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifkoala@blush
- \fill[red,path fading=koala@blush] (-0.3, 1.52) circle (0.1);
- \fill[red,path fading=koala@blush] (0.3, 1.52) circle (0.1);
+ \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
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname koalahookbody\endcsname
+\csname tikzlinghookbody\endcsname
%
}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty b/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
index abbeb4a1fb..2e2fd19808 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/marmot.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-marmots package (part of the tikzlings collection)
-% A package to bring little marmots into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-marmots}
- [2019/04/07 v0.2 Drawing marmots in TikZ]
+\ProvidesPackage{tikzlings-marmots}[2020/04/22 version v0.3 Drawing marmots in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -44,6 +40,10 @@
\marmot@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname marmothookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifmarmot@blush
@@ -54,6 +54,7 @@
\newif\ifmarmot@askphil
\newif\ifmarmot@leftstep
\newif\ifmarmot@rightstep
+\newif\ifmarmot@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -90,6 +91,7 @@
left step/.forward to = /marmot/leftstep,
rightstep/.code = \marmot@rightsteptrue,
right step/.forward to = /marmot/rightstep,
+ back/.code = \marmot@backtrue,
}
\def\marmot@draw{%
@@ -107,7 +109,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -129,6 +131,10 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname marmothookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
\ifmarmot@askphil
\pgfmathparse{int(random(1,120))}
\let\marmot@random=\pgfmathresult
@@ -138,7 +144,7 @@
\fi
%
\ifmarmot@shadow
- \fill[opacity=0,blur shadow,rotate around={-80:(0.3,0.5)}] (0.3,0.5) ellipse (0.28 and 0.8);
+ \fill[opacity=0,blur shadow,] (0.3,0.5) ellipse[x radius=0.28, y radius=0.8, rotate=-80];
\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -149,43 +155,59 @@
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmarmot@leftstep
- \marmot@part@draw[\marmot@body!50!black] (-0.255,0.25) ellipse (0.23 and 0.09);
+ \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 (0.23 and 0.09);
+ \marmot@part@draw[\marmot@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
\fi
\ifmarmot@rightstep
- \marmot@part@draw[\marmot@body!50!black] (0.255,0.25) ellipse (0.23 and 0.09);
+ \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 (0.23 and 0.09);
+ \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 (0.09 and 0.13);
-\marmot@part@draw[\marmot@body!50!black] (-0.255,2.03) ellipse (0.09 and 0.13);
+\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body!50!black] (0.885, 0.67) .. controls (0.865, 0.4) and (0.345, 0.24) .. (0.335, 0.44) .. controls (0.315, 0.56) and (0.445, 0.51) .. (0.575, 0.53) .. controls (0.695, 0.54) and (0.885, 0.72) .. (0.885, 0.67) -- cycle;
+\ifmarmot@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\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;
+\ifmarmot@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifmarmot@back\else
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body!50!black,rotate around={70:(0.385,0.93)}] (0.385,0.93) ellipse (0.24 and 0.13);
-\marmot@part@draw[\marmot@body!50!black,rotate around={-70:(-0.385,0.93)}] (-0.385,0.93) ellipse (0.24 and 0.13);
+\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 (0.23 and 0.13);
+\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 (0.08);
+\marmot@part@draw[\marmot@body!50!black] (0,1.6) circle[radius=0.08];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body!50!black] (-0.155,1.77) circle (0.05);
-\marmot@part@draw[\marmot@body!50!black] (0.155,1.77) circle (0.05);
+\marmot@part@draw[\marmot@body!50!black] (-0.155,1.77) circle[radius=0.05];
+\marmot@part@draw[\marmot@body!50!black] (0.155,1.77) circle[radius=0.05];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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 ;
@@ -198,8 +220,8 @@
%
% Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmarmot@blush
- \fill[red,path fading=marmot@blush] (-0.295,1.6) circle (0.1);
- \fill[red,path fading=marmot@blush] (0.295,1.6) circle (0.1);
+ \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
%
% Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -219,5 +241,10 @@
\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
+%
}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty b/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
index f7fa99eb88..abb7b4111a 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/mouse.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-mice package (part of the tikzlings collection)
-% A package to bring little mice into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-mice}
- [2019/04/07 v0.2 Drawing mice in TikZ]
+\ProvidesPackage{tikzlings-mice}[2020/04/22 version v0.3 Drawing mice in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,10 +23,17 @@
\mouse@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname mousehookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifmouse@threeD
\newif\ifmouse@rotatearms
+\newif\ifmouse@leftstep
+\newif\ifmouse@rightstep
+\newif\ifmouse@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -57,6 +60,11 @@
\def\mouse@rotatearms{#1},
rotate arms/.forward to = /mouse/rotatearms,
rotatearms = 20,
+ leftstep/.code = \mouse@leftsteptrue,
+ left step/.forward to = /mouse/leftstep,
+ rightstep/.code = \mouse@rightsteptrue,
+ right step/.forward to = /mouse/rightstep,
+ back/.code = \mouse@backtrue,
}
\def\mouse@draw{%
@@ -74,7 +82,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -96,28 +104,65 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname mousehookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!65!white] (-0.255,0.2) ellipse (0.23 and 0.09);
-\mouse@part@draw[\mouse@body!65!white] (0.255,0.2) ellipse (0.23 and 0.09);
+\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
+%
+\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
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!65!white] (0.36, 2.17) circle (0.28);
-\mouse@part@draw[\mouse@body] (0.36, 2.17) circle (0.15);
-\mouse@part@draw[\mouse@body!65!white] (-0.36, 2.17) circle (0.28);
-\mouse@part@draw[\mouse@body] (-0.36, 2.17) circle (0.15);
+\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];
+\ifmouse@back\else
+ \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
%
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!65!white] (0.348, 0.475) .. controls (0.598, 0.844) and (0.778, 1.475) .. (1.099, 1.625) .. controls (1.369, 1.745) and (1.677, 1.309) .. (1.609, 1.305) .. controls (0.933, 2.178) and (0.771, 0.676) .. (0.411, 0.446) -- cycle;
+\ifmouse@back\else
+ \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
%
% 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
+%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\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;
+\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
+%
+% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifmouse@back\else
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!65!white,rotate around={-\mouse@rotatearms:(0.47,1.15)}] (0.47,0.93) ellipse (0.13 and 0.24);
-\mouse@part@draw[\mouse@body!65!white,rotate around={\mouse@rotatearms:(-0.47,1.15)}] (-0.47,0.93) ellipse (0.13 and 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];
+\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@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;
@@ -128,11 +173,16 @@
\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;
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!50!black] (0, 1.248) circle (0.09);
+\mouse@part@draw[\mouse@body!50!black] (0, 1.248) circle[radius=0.09];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mouse@part@draw[\mouse@body!50!black] (0.23, 1.68) circle (0.05);
-\mouse@part@draw[\mouse@body!50!black] (-0.23, 1.68) circle (0.05);
+\mouse@part@draw[\mouse@body!50!black] (0.23, 1.68) circle[radius=0.05];
+\mouse@part@draw[\mouse@body!50!black] (-0.23, 1.68) circle[radius=0.05];
%
+\fi
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname mousehookbody\endcsname
+\csname tikzlinghookbody\endcsname
+%
}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty b/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
index b59e022fd5..392de7a763 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/mole.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-moles package (part of the tikzlings collection)
-% A package to bring little moles into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-moles}
- [2019/04/07 v0.2 Drawing moles in TikZ]
+\ProvidesPackage{tikzlings-moles}[2020/04/22 version v0.3 Drawing moles in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,9 +23,14 @@
\mole@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname moleshookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifmole@threeD
+\newif\ifmole@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -57,7 +58,8 @@
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \mole@threeDtrue,
+ 3D/.code = \mole@threeDtrue,
+ back/.code = \mole@backtrue,
}
\def\mole@draw{%
@@ -75,7 +77,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -97,12 +99,18 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname moleshookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mole@part@draw[\mole@feet] (-0.255,0.2) ellipse (0.23 and 0.09);
-\mole@part@draw[\mole@feet] (0.255,0.2) ellipse (0.23 and 0.09);
+\mole@part@draw[\mole@feet] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+\mole@part@draw[\mole@feet] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
%
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mole@part@draw[\mole@body] (0.885, 0.67) .. controls (0.865, 0.4) and (0.345, 0.24) .. (0.335, 0.44) .. controls (0.315, 0.56) and (0.445, 0.51) .. (0.575, 0.53) .. controls (0.695, 0.54) and (0.885, 0.72) .. (0.885, 0.67) -- cycle;
+\ifmole@back\else
+ \mole@part@draw[\mole@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
%
% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mole@part@draw[\mole@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;
@@ -110,35 +118,54 @@
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mole@part@draw[\mole@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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifmole@back
+ \mole@part@draw[\mole@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
+%
% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mole@part@draw[\mole@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;
+\ifmole@back\else
+ \mole@part@draw[\mole@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 moleshookbelly\endcsname
+\csname tikzlinghookbelly\endcsname
+%
+% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifmole@back\else
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mole@part@draw[\mole@body,rotate around={70:(0.37,0.86)}] (0.37,0.86) ellipse (0.27 and 0.13);
-\mole@part@draw[\mole@body,rotate around={-70:(-0.37,0.86)}] (-0.37,0.86) ellipse (0.27 and 0.13);
+\mole@part@draw[\mole@body] (0.37,0.86) ellipse[x radius=0.27, y radius=0.13, rotate=70];
+\mole@part@draw[\mole@body] (-0.37,0.86) ellipse[x radius=0.27, y radius=0.13, rotate=-70];
%
% Hands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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;
-\mole@part@draw[\mole@hands,rotate around={70:(0.285,0.65)}] (0.285,0.65) ellipse (0.08 and 0.13);
-\mole@part@draw[\mole@hands,rotate around={-70:(-0.285,0.65)}] (-0.285,0.65) ellipse (0.08 and 0.13);
+\mole@part@draw[\mole@hands] (0.285,0.65) ellipse[x radius=0.08, y radius=0.13, rotate=70];
+\mole@part@draw[\mole@hands] (-0.285,0.65) ellipse[x radius=0.08, y radius=0.13, rotate=-70];
%
% Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mole@part@draw[\mole@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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mole@part@draw[\mole@body!60!black] (0,1.67) circle (0.055);
+\mole@part@draw[\mole@body!60!black] (0,1.67) circle[radius=0.055];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmole@threeD
- \fill[\mole@body!60!black,rotate around={-15:(-0.165,1.79)}] (-0.165,1.79) ellipse (0.055 and 0.015);
- \fill[\mole@body!30!black,rotate around={15:(0.165,1.79)}] (0.165,1.79) ellipse (0.055 and 0.015);
+ \fill[\mole@body!60!black] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
+ \fill[\mole@body!30!black] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
\else
- \fill[\mole@body!60!black,rotate around={-15:(-0.165,1.79)}] (-0.165,1.79) ellipse (0.055 and 0.015);
- \fill[\mole@body!60!black,rotate around={15:(0.165,1.79)}] (0.165,1.79) ellipse (0.055 and 0.015);
+ \fill[\mole@body!60!black] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
+ \fill[\mole@body!60!black] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
\fi
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[\mole@body!60!black, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] ;
%
-} \ No newline at end of file
+\fi
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname moleshookbody\endcsname
+\csname tikzlinghookbody\endcsname
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty b/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
index b54f37f88a..ec25a80198 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/owl.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-owls package (part of the tikzlings collection)
-% A package to draw litlle owls with tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-owls}
- [2019/04/07 v0.2 Draw owls in TikZ]
+\ProvidesPackage{tikzlings-owls}[2020/04/22 version v0.3 Draw owls in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,9 +23,14 @@
\owl@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname owlhookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifowl@threeD
+\newif\ifowl@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -60,6 +61,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \owl@threeDtrue,
+ back/.code = \owl@backtrue,
}
\def\owl@draw{%
@@ -77,7 +79,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -99,9 +101,23 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname owlhookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\owl@part@draw[\owl@body,rotate around={-80:(0.575,0.8)}] (0.575,0.8) ellipse (0.38 and 0.1);
-\owl@part@draw[\owl@body,rotate around={80:(-0.575,0.8)}] (-0.575,0.8) ellipse (0.38 and 0.1);
+\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;
@@ -110,27 +126,43 @@
\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\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;
+\ifowl@back\else
+ \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 (0.7 and 0.55);
+\owl@part@draw[\owl@body] (0,1.55) ellipse[x radius=0.7, y radius=0.55];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\owl@eye] (-0.28, 1.6) circle (0.22);
-\owl@part@draw[\owl@pupil] (-0.28, 1.6) circle (0.15);
-\fill[\owl@eye] (0.28, 1.6) circle (0.22);
-\owl@part@draw[\owl@pupil] (0.28, 1.6) circle (0.15);
-\owl@part@draw[white] (0.25, 1.64) circle (0.03);
-\owl@part@draw[white] (-0.31, 1.64) circle (0.03);
+\ifowl@back\else
+ \fill[\owl@eye] (-0.28, 1.6) circle[radius=0.22];
+ \owl@part@draw[\owl@pupil] (-0.28, 1.6) circle[radius=0.15];
+ \fill[\owl@eye] (0.28, 1.6) circle[radius=0.22];
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\owl@part@draw[\owl@bill] (0, 1.4) -- (-0.1, 1.3) -- (0, 1.15) -- (0.1, 1.3) -- cycle;
+\ifowl@back\else
+ \owl@part@draw[\owl@bill] (0, 1.4) -- (-0.1, 1.3) -- (0, 1.15) -- (0.1, 1.3) -- cycle;
+\fi
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\owl@part@draw[\owl@feet] (0.175,0.2) ellipse (0.03 and 0.1);
-\owl@part@draw[\owl@feet,rotate around={20:(0.225,0.21)}] (0.225,0.21) ellipse (0.03 and 0.1);
-\owl@part@draw[\owl@feet,rotate around={40:(0.275,0.23)}] (0.275,0.23) ellipse (0.03 and 0.1);
-\owl@part@draw[\owl@feet] (-0.175,0.2) ellipse (0.03 and 0.1);
-\owl@part@draw[\owl@feet,rotate around={-20:(-0.225,0.21)}] (-0.225,0.21) ellipse (0.03 and 0.1);
-\owl@part@draw[\owl@feet,rotate around={-40:(-0.275,0.23)}] (-0.275,0.23) ellipse (0.03 and 0.1);
-} \ No newline at end of file
+\ifowl@back\else
+ \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
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty b/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
index 1361cd2df7..97f8959abb 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/panda.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-pandas package (part of the tikzlings collection)
-% A package to bring little pandas into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-pandas}
- [2019/04/07 v0.2 Drawing pandas in TikZ]
+\ProvidesPackage{tikzlings-pandas}[2020/04/22 version v0.3 Drawing pandas in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,9 +23,14 @@
\panda@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname pandahookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifpanda@threeD
+\newif\ifpanda@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -52,6 +53,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \panda@threeDtrue,
+ back/.code = \panda@backtrue,
}
\def\panda@draw{%
@@ -69,7 +71,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -91,38 +93,64 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% 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 (0.57 and 0.65);
+\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{scope}[yshift=-0.08cm]
-\panda@part@draw[black,rotate around={70:(0.28,0.93)}] (0.28,0.93) ellipse (0.24 and 0.13);
-\panda@part@draw[black,rotate around={-70:(-0.28,0.93)}] (-0.28,0.93) ellipse (0.24 and 0.13);
-\end{scope}
+\ifpanda@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\panda@part@draw[black] (0.32, 0.27) circle (0.2);
-\panda@part@draw[black] (-0.32, 0.27) circle (0.2);
+\ifpanda@back\else
+ \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 (0.15);
-\panda@part@draw[black] (-0.32, 2) circle (0.15);
+\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifpanda@back\else
+%
% 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[white] (-0.18, 1.7) circle (0.05);
-\panda@part@draw[white] (0.18, 1.7) circle (0.05);
-\panda@part@draw[black] (0.17, 1.695) circle (0.02);
-\panda@part@draw[black] (-0.17, 1.695) circle (0.02);
+\panda@part@draw[white] (-0.18, 1.7) circle[radius=0.05];
+\panda@part@draw[white] (0.18, 1.7) circle[radius=0.05];
+\panda@part@draw[black] (0.17, 1.695) circle[radius=0.02];
+\panda@part@draw[black] (-0.17, 1.695) circle[radius=0.02];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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);
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\panda@part@draw[black] (0,1.55) ellipse (0.07 and 0.04);
+\panda@part@draw[black] (0,1.55) ellipse[x radius=0.07, y radius=0.04];
%
-} \ No newline at end of file
+\fi
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname pandahookbody\endcsname
+\csname tikzlinghookbody\endcsname
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty b/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
index 70d90092fa..022d2a1d97 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/pingu.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-penguins package (part of the tikzlings collection)
-% A package to bring penguins into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-penguins}
- [2019/04/07 v0.2 Draw penguins in TikZ]
+\ProvidesPackage{tikzlings-penguins}[2020/04/22 version v0.3 Draw penguins in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,9 +23,14 @@
\penguin@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname penguinhookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifpenguin@threeD
+\newif\ifpenguin@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -62,6 +63,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \penguin@threeDtrue,
+ back/.code = \penguin@backtrue,
}
\def\penguin@draw{%
@@ -79,7 +81,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -101,28 +103,56 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname penguinhookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\penguin@part@draw[\penguin@body,rotate around={-50:(0.575,1.2)}] (0.575,1.2) ellipse (0.38 and 0.1);
-\penguin@part@draw[\penguin@body,rotate around={50:(-0.575,1.2)}] (-0.575,1.2) ellipse (0.38 and 0.1);
+\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\penguin@part@draw[\penguin@belly] (0, 0.6) ellipse (0.48 and 0.35);
+\ifpenguin@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\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;
+\ifpenguin@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\penguin@eye,rotate around={-10:(-0.175,1.64)}] (-0.175,1.64) ellipse (0.1 and 0.15);
-\fill[\penguin@pupil,rotate around={-3:(-0.145,1.625)}] (-0.145,1.625) ellipse (0.0357 and 0.0714);
-\fill[\penguin@eye,rotate around={10:(0.175,1.64)}] (0.175,1.64) ellipse (0.1 and 0.15);
-\fill[\penguin@pupil,rotate around={3:(0.145,1.625)}] (0.145,1.625) ellipse (0.0357 and 0.0714);
+\ifpenguin@back\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
%
% Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\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;
-} \ No newline at end of file
+\ifpenguin@back\else
+ \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
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty b/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
index 8ebc701955..09e4ccf0c8 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/pig.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-pigs package (part of the tikzlings collection)
-% A package to bring little pigs into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-pigs}
- [2019/04/07 v0.2 Drawing pigs in TikZ]
+\ProvidesPackage{tikzlings-pigs}[2020/04/22 version v0.3 Drawing pigs in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -28,9 +24,14 @@
\pig@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname pighookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifpig@threeD
+\newif\ifpig@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -53,6 +54,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \pig@threeDtrue,
+ back/.code = \pig@backtrue,
}
\def\pig@draw{%
@@ -70,7 +72,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -92,43 +94,73 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname pighookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\draw[\pig@body,line width=\scalingfactor*0.8pt] (0.8471, 0.5927) .. controls (0.8549, 0.4832) and (0.8046, 0.4105) .. (0.7319, 0.4079) .. controls (0.6592, 0.4052) and (0.6142, 0.4365) .. (0.5964, 0.5024) .. controls (0.5786, 0.5682) and (0.6252, 0.6291) .. (0.6794, 0.6342) .. controls (0.7335, 0.6394) and (0.7561, 0.6114) .. (0.7663, 0.5661) .. controls (0.7765, 0.5208) and (0.746, 0.458) .. (0.7192, 0.4319) .. controls (0.6924, 0.4058) and (0.7073, 0.4182) .. (0.6604, 0.3859) .. controls (0.6134, 0.3536) and (0.4367, 0.3643) .. (0.3877, 0.5055);
+\ifpig@back\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
%
+% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\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;
+\ifpig@back\else
+ \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 (.5 and .5);
+\pig@part@draw[\pig@body!55!white] (0,1.64) ellipse[x radius=.5, y radius=.5];
+%
+% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifpig@back\else
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pig@part@draw[gray] (-0.09, 1.82) circle (0.02);
-\pig@part@draw[gray] ( 0.09, 1.82) circle (0.02);
+\pig@part@draw[gray] (-0.09, 1.82) circle[radius=0.02];
+\pig@part@draw[gray] ( 0.09, 1.82) circle[radius=0.02];
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pig@part@draw[\pig@body] (0, 1.62) ellipse (0.18 and 0.14);
-\pig@part@draw[gray] (-0.06, 1.62) circle (0.035);
-\pig@part@draw[gray] ( 0.06, 1.62) circle (0.035);
+\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] ;
+ \draw[gray!70!black,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] ;
+ \draw[gray,line width=\scalingfactor*0.4pt] (0.105, 1.46) arc [start angle=-50, end angle=-130, radius=0.16] ;
\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;
-%
% 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;
%
-} \ No newline at end of file
+\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
+ \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
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname pighookbody\endcsname
+\csname tikzlinghookbody\endcsname
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty b/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
index dabbd15f17..af4c14603d 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/rhino.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-rhinos package (part of the tikzlings collection)
-% A package to bring little rhinos into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-rhinos}
- [2019/04/07 v0.2 Drawing rhinos in TikZ]
+\ProvidesPackage{tikzlings-rhinos}[2020/04/22 version v0.3 Drawing rhinos in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,9 +23,14 @@
\rhino@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname rhinohookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifrhino@threeD
+\newif\ifrhino@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -54,6 +55,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \rhino@threeDtrue,
+ back/.code = \rhino@backtrue,
}
\def\rhino@draw{%
@@ -71,7 +73,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -93,50 +95,82 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% 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
+%
+% 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
+%
% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\rhino@part@draw[\rhino@body,rotate around={90:(0.3,1.0)}] (0.3,1.0) ellipse (0.24 and 0.13);
-\rhino@part@draw[\rhino@body,rotate around={-90:(-0.3,1.0)}] (-0.3,1.0) ellipse (0.24 and 0.13);
+\ifrhino@back\else
+ \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
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\rhino@part@draw[\rhino@body!55!white] (0, 1.76) circle (0.36);
+\rhino@part@draw[\rhino@body!55!white] (0, 1.76) circle[radius=0.36];
+%
+% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifrhino@back\else
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[white] (-0.11, 1.83) ellipse (0.08 and 0.12);
-\fill[white] (0.11, 1.83) ellipse (0.08 and 0.12);
-\fill[black] (-0.105, 1.78) ellipse (0.04 and 0.07);
-\fill[black] (0.105, 1.78) ellipse (0.04 and 0.07);
+\fill[white] (-0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+\fill[white] (0.11, 1.83) ellipse[x radius=0.08, y radius=0.12];
+\fill[black] (-0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
+\fill[black] (0.105, 1.78) ellipse[x radius=0.04, y radius=0.07];
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\rhino@part@draw[\rhino@body!80!white] (0, 1.55) ellipse (0.36 and 0.2);
+\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifrhino@threeD
- \draw[black,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
- %
+ \draw[black,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
+%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \rhino@part@draw[\rhino@body] (-0.25,0.15) ellipse (0.16 and 0.17);
- \rhino@part@draw[\rhino@body] (0.25,0.15) ellipse (0.16 and 0.17);
- \rhino@part@draw[\rhino@toes] (0.25,0.13) ellipse (0.05 and 0.1);
- \rhino@part@draw[\rhino@toes] (0.13,0.11) ellipse (0.05 and 0.1);
- \rhino@part@draw[\rhino@toes] (0.37,0.11) ellipse (0.05 and 0.1);
- \rhino@part@draw[\rhino@toes] (-0.25,0.13) ellipse (0.05 and 0.1);
- \rhino@part@draw[\rhino@toes] (-0.13,0.11) ellipse (0.05 and 0.1);
- \rhino@part@draw[\rhino@toes] (-0.37,0.11) ellipse (0.05 and 0.1);
+ \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}
%
-} \ No newline at end of file
+\fi
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname rhinohookbody\endcsname
+\csname tikzlinghookbody\endcsname
+%
+}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty b/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
index 7d774bec90..bdc62e573a 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/sloth.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-sloths package (part of the tikzlings collection)
-% A package to bring little sloths into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-sloths}
- [2019/04/07 v0.2 Drawing sloths in TikZ]
+\ProvidesPackage{tikzlings-sloths}[2020/04/22 version v0.3 Drawing sloths in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -29,10 +25,15 @@
\sloth@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname slothhookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifsloth@sleeping
\newif\ifsloth@threeD
+\newif\ifsloth@back
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -56,6 +57,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sleeping/.code = \sloth@sleepingtrue,
3D/.code = \sloth@threeDtrue,
+ back/.code = \sloth@backtrue,
}
\def\sloth@draw{%
@@ -73,7 +75,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -95,16 +97,54 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifsloth@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifsloth@back\else
+%
\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -113,59 +153,58 @@
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsloth@sleeping
- \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;
- %
- \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);
- %
- \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);
+ \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;
+ %
+ \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);
+ %
+ \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);
\else
- \sloth@part@draw[black] (0.193,1.75) circle (0.04);
- \sloth@part@draw[black] (-0.193,1.75) circle (0.04);
- \fill[white] (-0.2 ,1.765) circle (0.006);
- \fill[white] ( 0.186,1.765) circle (0.006);
+ \sloth@part@draw[black] (0.193,1.75) circle[radius=0.04];
+ \sloth@part@draw[black] (-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 (0.078 and 0.048);
+\sloth@part@draw[\sloth@body!40!black] (0,1.665) ellipse[x radius=0.078, y radius=0.048];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[\sloth@body!40!black,line width=\scalingfactor*0.4pt] (0.115, 1.55) arc [start angle=-40, end angle=-140, radius=0.16];
%
-% 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;
-%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\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;
-%
% 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;
%
-\fill[\sloth@body!50!black,rotate around={110:(0.15, 0.61)}] (0.15, 0.61) ellipse (0.017 and 0.07);
-\fill[\sloth@body!50!black,rotate around={117:(0.17, 0.57)}] (0.17, 0.57) ellipse (0.015 and 0.07);
-\fill[\sloth@body!50!black,rotate around={125:(0.19, 0.53)}] (0.19, 0.53) ellipse (0.012 and 0.062);
+\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,rotate around={-110:(-0.15, 0.61)}] (-0.15, 0.61) ellipse (0.017 and 0.07);
-\fill[\sloth@body!50!black,rotate around={-117:(-0.17, 0.57)}] (-0.17, 0.57) ellipse (0.015 and 0.07);
-\fill[\sloth@body!50!black,rotate around={-125:(-0.19, 0.53)}] (-0.19, 0.53) ellipse (0.012 and 0.062);
+\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];
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sloth@part@draw[\sloth@body,rotate around={25:(0.33,0.31)}] (0.33,0.31) ellipse (0.25 and 0.13);
-\sloth@part@draw[\sloth@body,rotate around={-25:(-0.33,0.31)}] (-0.33,0.31) ellipse (0.25 and 0.13);
-\fill[\sloth@body!50!black,rotate around={-10:(-0.125,0.265)}] (-0.125,0.265) ellipse (0.07 and 0.019);
-\fill[\sloth@body!50!black,rotate around={-16:(-0.14,0.21)}] (-0.14,0.21) ellipse (0.07 and 0.017);
-\fill[\sloth@body!50!black,rotate around={-22:(-0.16,0.165)}] (-0.16,0.165) ellipse (0.07 and 0.015);
-\fill[\sloth@body!50!black,rotate around={10:(0.125,0.265)}] (0.125,0.265) ellipse (0.07 and 0.019);
-\fill[\sloth@body!50!black,rotate around={16:(0.14,0.21)}] (0.14,0.21) ellipse (0.07 and 0.017);
-\fill[\sloth@body!50!black,rotate around={22:(0.16,0.165)}] (0.16,0.165) ellipse (0.07 and 0.015);
+\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];
+\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
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname slothhookbody\endcsname
+\csname tikzlinghookbody\endcsname
%
}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-snowmans.sty b/graphics/pgf/contrib/tikzlings/tikzlings-snowmans.sty
index c084e99bcb..7e72e3bb2c 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-snowmans.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-snowmans.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/snowman.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings-snowmans package (part of the tikzlings collection)
-% A package to bring snowmans into tikz
+% 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-snowmans}
- [2019/04/07 v0.2 Draw snowmans in TikZ]
+\ProvidesPackage{tikzlings-snowmans}[2020/04/22 version v0.3 Draw snowmans in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,9 +23,15 @@
\snowman@draw%
\end{scope}%
\thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname snowmanhookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
}
\newif\ifsnowman@threeD
+\newif\ifsnowman@back
+\newif\ifsnowman@globalwarming
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -60,6 +62,11 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \snowman@threeDtrue,
+ back/.code = \snowman@backtrue,
+ globalwarming/.code= \snowman@globalwarmingtrue
+ \def\snowman@globalwarming{#1},
+ globalwarming/.default = blue!10!white,
+ global warming/.forward to = /snowman/globalwarming,
}
\def\snowman@draw{%
@@ -77,7 +84,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\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}
%
@@ -95,38 +102,89 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Body parts (center: x=0.925)
+% Body parts
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\snowman@part@draw[\snowman@body,rotate around={-50:(0.5,1.1)}] (0.5,1.1) ellipse (0.3 and 0.12);
-\snowman@part@draw[\snowman@body,rotate around={50:(-0.5,1.1)}] (-0.5,1.1) ellipse (0.3 and 0.12);
-%
-% Body + Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\snowman@part@draw[\snowman@body] (0,0.5) ellipse (0.6 and 0.5);
-\snowman@part@draw[\snowman@body] (0,1.1) ellipse (0.5 and 0.4);
-\snowman@part@draw[\snowman@body] (0,1.7) circle (0.4);
-%
-% Mouth% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\snowman@mouth] (0,1.5) circle (0.016);
-\fill[\snowman@mouth] (0.04,1.507) circle (0.016);
-\fill[\snowman@mouth] (-0.04,1.507) circle (0.016);
-\fill[\snowman@mouth] (0.08,1.522) circle (0.016);
-\fill[\snowman@mouth] (-0.08,1.522) circle (0.016);
-\fill[\snowman@mouth] (0.12,1.543) circle (0.016);
-\fill[\snowman@mouth] (-0.12,1.543) circle (0.016);
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\snowman@part@draw[\snowman@eye] (-0.155,1.8) circle (0.04);
-\snowman@part@draw[\snowman@eye] (0.155,1.8) circle (0.04);
-%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\snowman@part@draw[\snowman@nose] (0,1.67) circle (0.05) (0,1.72) -- (0,1.62) -- (0.15,1.64) -- cycle;
-%
-% buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\snowman@part@draw[\snowman@buttons] (0,1.15) circle (0.04);
-\snowman@part@draw[\snowman@buttons] (0,0.95) circle (0.04);
-\snowman@part@draw[\snowman@buttons] (0,0.75) circle (0.04);
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\csname snowmanhookbackground\endcsname
+\csname tikzlinghookbackground\endcsname
+%
+% Global warming %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifsnowman@globalwarming
+ %
+ % Puddle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \fill[\snowman@globalwarming] (0,1.15) ellipse[x radius=1.6,y radius=1.15];
+ %
+ % 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.54) -- (-0.6,1.4) -- (-0.8,1.42) -- cycle;
+ \snowman@part@draw[\snowman@nose] (-0.6,1.47) circle[radius=0.07];
+ %
+ % 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
+ %
+ % 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsnowman@back\else
+ %
+ % 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.67) circle[radius=0.05] (0,1.72) -- (0,1.62) -- (0.15,1.64) -- cycle;
+ %
+ % 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
%
}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty b/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty
new file mode 100644
index 0000000000..59eb70428b
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty
@@ -0,0 +1,162 @@
+% !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
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{tikzlings-squirrels}[2020/04/22 version v0.3 Drawing squirrels in TikZ]
+
+\RequirePackage{tikz}
+\RequirePackage{tikzlings-addons}
+
+\newcommand*{\squirrel}[1][]{%
+ \begin{scope}%
+ \tikzset{/squirrel/.cd,#1}%
+ \squirrel@draw%
+ \end{scope}%
+ \thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname squirrelhookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+}
+
+\newif\ifsquirrel@threeD
+\newif\ifsquirrel@back
+
+\tikzset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Pass unknown keys on to tikz
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ /squirrel/.search also={/tikz,/pgf,/thing},
+ /squirrel/.cd,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % body
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ body/.code = \def\squirrel@body{#1},
+ body = brown!40!gray!90!red,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % options
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ 3D/.code = \squirrel@threeDtrue,
+ back/.code = \squirrel@backtrue,
+}
+
+\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 and 3D, from
+% https://chat.stackexchange.com/transcript/message/45991801#45991801
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifsquirrel@threeD
+ \def\squirrel@part@draw[##1]{\shade[ball color=##1]}
+\else
+ \def\squirrel@part@draw[##1]{\fill[##1]}
+\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifsquirrel@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifsquirrel@back\else
+ \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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\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];
+%
+\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[white] (0.07,1.78) ellipse[x radius=0.05, y radius=0.07];
+\squirrel@part@draw[white] (-0.07,1.78) ellipse[x radius=0.05, y radius=0.07];
+\squirrel@part@draw[black] (0.07,1.76) ellipse[x radius=0.017, y radius=0.027];
+\squirrel@part@draw[black] (-0.07,1.76) ellipse[x radius=0.017, y radius=0.027];
+%
+% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\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);
+%
+% 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
+%
+}
+
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings.sty b/graphics/pgf/contrib/tikzlings/tikzlings.sty
index 5a4499a590..1ae5e70edb 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings.sty
@@ -1,8 +1,8 @@
% !TeX root = ./examples/tikzlings.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The tikzlings
-% A collection of packages to draw animals in tikz
+% This is the main 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:
@@ -11,12 +11,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% April 7, 2019
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings}
- [2019/04/07 v0.2 Collection of packages to draw animals and other beings in TikZ]
+\ProvidesPackage{tikzlings}[2020/04/22 version v0.3 Collection of packages to draw animals and other beings in TikZ]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -39,6 +35,9 @@
\RequirePackage{tikzlings-hippos}
\RequirePackage{tikzlings-rhinos}
\RequirePackage{tikzlings-pandas}
+\RequirePackage{tikzlings-bees}
+\RequirePackage{tikzlings-anteaters}
+\RequirePackage{tikzlings-squirrels}
\RequirePackage{tikzlings-addons}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,9 +58,9 @@
\pgfmathsetseed{\number\pdfrandomseed}
\fi
-\pgfmathdeclarerandomlist{tikzlings}{{\bear}{\penguin}{\marmot}{\owl}{\koala}{\coati}{\snowman}{\mouse}{\moles}{\sloth}{\pig}{\cat}{\hippo}{\rhino}}
+\pgfmathdeclarerandomlist{tikzlings}{{\bear}{\penguin}{\marmot}{\owl}{\koala}{\coati}{\snowman}{\mouse}{\moles}{\sloth}{\pig}{\cat}{\hippo}{\rhino}{\bee}{\anteater}}
\newcommand{\tikzling}[1][]{%
- \pgfmathrandomitem{\tikzling@random}{tikzlings}%
- \tikzling@random[#1]
+ \pgfmathrandomitem{\tikzling@random}{tikzlings}%
+ \tikzling@random[#1]
}
diff --git a/graphics/tpic2pdftex/Makefile.in b/graphics/tpic2pdftex/Makefile.in
index b544e5e4ae..c0ea18711b 100644
--- a/graphics/tpic2pdftex/Makefile.in
+++ b/graphics/tpic2pdftex/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -788,6 +788,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@@ -830,6 +834,8 @@ distcheck: dist
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@@ -1016,9 +1022,9 @@ uninstall-man: uninstall-man1
.PHONY: all all-am am--refresh check check-TESTS check-am clean \
clean-generic cscopelist-am ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-generic distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-binSCRIPTS install-data \
+ dist-zstd distcheck distclean distclean-generic distcleancheck \
+ distdir distuninstallcheck dvi dvi-am html html-am info \
+ info-am install install-am install-binSCRIPTS install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-man1 install-pdf \
diff --git a/graphics/tpic2pdftex/aclocal.m4 b/graphics/tpic2pdftex/aclocal.m4
index 0b438a0a53..d4679745d7 100644
--- a/graphics/tpic2pdftex/aclocal.m4
+++ b/graphics/tpic2pdftex/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.16.1], [],
+m4_if([$1], [1.16.2], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.2])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -371,7 +371,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. Try re-running configure with the
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
@@ -398,7 +400,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -595,7 +597,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -616,7 +618,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -638,7 +640,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -673,7 +675,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -716,7 +718,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -755,7 +757,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -784,7 +786,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -831,7 +833,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -850,7 +852,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -931,7 +933,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -991,7 +993,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1019,7 +1021,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1038,7 +1040,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/graphics/tpic2pdftex/configure.texk b/graphics/tpic2pdftex/configure.texk
index 2830c49048..d3c8f8ccc3 100755
--- a/graphics/tpic2pdftex/configure.texk
+++ b/graphics/tpic2pdftex/configure.texk
@@ -4943,7 +4943,9 @@ $as_echo X/"$am_mf" |
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. Try re-running configure with the
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See \`config.log' for more details" "$LINENO" 5; }