%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Documentation for the tikzducks package
% A package to bring rubber ducks into tikz
% Maintained by samcarter
%
% Project repository and bug tracker:
% https://github.com/samcarter/tikzducks
%
% Released under the LaTeX Project Public License v1.3c or later
% See https://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arara: latexmk
\documentclass{scrartcl}

\usepackage[
  themecolor=samlblue
]{\jobname-settings}

% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{The \texorpdfstring{\tikzducks}{tikzducks} package}
\subtitle{using ducks in \TikZ}
\author{%
  \texorpdfstring{
    \begin{tikzpicture}
      \duck
    \end{tikzpicture}\\[0.8em]
    \texttt{samcarter}\\
    \url{https://github.com/samcarter/tikzducks}\\
    \url{https://ctan.org/pkg/tikzducks}
  }{samcarter}}
\date{Version v2.2 \textendash{} 2025/12/11}
\packagename{tikzducks}

\colorlet{blue}{samlblue}
\colorlet{red}{samred}

% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tikzducks}
\usetikzlibrary{ducks,3d}
\usepackage{marvosym}
\usepackage{fontawesome}

% customisation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfmathsetseed{2}
\setlength{\footheight}{45pt}
\newlength{\duckoffset}

\cfoot{%
  \begin{tikzpicture}[scale=0.5]
      \duck[signpost=\scalebox{0.6}{\thepage},randomhead]
  \end{tikzpicture}
}
\pagestyle{scrheadings}

\tcbset{%
  tikz lower,
  height plus=3cm,
}

\begin{document}
\maketitle
\thispagestyle{scrheadings}

\section{Introduc(k)tion}
\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 \href{https://tex.stackexchange.com/a/347458/36296}{How can we draw a duck?}.

Without the friendly and helpful community of \TeX{} users this package would not exist. A big thanks to all the users and contributors of this package!

\blurb

The shown example ducks are purely fictional characters, any resemblance to real ducks or persons is purely coincidental and no copyright infringement is intended.

\clearpage
\section{Usage}

The basic usage is fairly simple. Inside of a \saminline|tikzpicture|, one can draw a duck like this:
\begin{tcblisting}{title={Basic duck}}
\duck
\end{tcblisting}

To customise this basic duck, the package uses \saminline|pgf| keys. For almost all parts the colour can be changed using \saminline|<shape name>=<colour name>|. For example to change the colour of the duck:
\begin{tcblisting}{title={Blue duck}}
\duck[
  body=blue
]
\end{tcblisting}

If the keyword consists of multiples words, it works both with and without spaces. In the following usually the version without spaces is given.

In addition to the keys defined in this package, all usual \TikZ and \saminline|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=4cm}
\duck

\duck[
  shift={(2.5,1)},
  scale=.3,
]

\duck[
  shift={(3.3,1.5)},
  scale=.3,
]

\duck[
  body=lightgray,
  shift={(3,0.5)},
  scale=.3,
]
\end{tcblisting}

To make the usage easier for the \TikZ-savvy users, Andrew Stacey contributed a \TikZ library. It can be loaded with \saminline|\usetikzlibrary{ducks}|. In addition to the normal functionality of the \tikzducks package, the ducks are now also available as \saminline|pic|. A short example:
\begin{tcolorbox}[title={\TikZ library ``ducks''}]
\begin{samcode}
\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{ducks}

\begin{document}

\begin{tikzpicture}
\draw (0,0) pic[
    duck/water=blue,
    duck/alien,
  ] {duck};
\draw (4,0) pic[
    scale=1.4,
  ] {duck};
\end{tikzpicture}

\end{document}
\end{samcode}

\tcblower
\begin{tikzpicture}
\draw (0,0) pic[
    duck/water=blue,
    duck/alien=samdgreen,
  ] {duck};
\draw (2,1) pic[
    scale=1.4,
  ] {duck};
\end{tikzpicture}
\end{tcolorbox}

For everybody suffering from anatidaephobia, there is also a special option to not draw the duck:
\begin{tcblisting}{title={Invisible duck}}
\duck[
  invisible
]
\end{tcblisting}

This can also be useful to recycle some of the accessories presented in \ref{sec:accessories}.

For the purists, there is also a picture mode variant:
{
\setlength{\unitlength}{0.6mm}
\begin{tcolorbox}[title={\texttt{picture} mode duck},height=3.5cm,valign=center]
\begin{samcode}
\begin{picture}(42,44)
  \picduck
\end{picture}
\end{samcode}
\tcblower
\raisebox{-1.3cm}{%
  \begin{picture}(42,44)
    \picduck
  \end{picture}
}
\end{tcolorbox}
}

\subsection{Body parts}

The various parts of the duck can also be coloured independently, i.e.\ \saminline|body|, \saminline|head| or \saminline|bill|:

\begin{tcblisting}{title={Crazy colour duck}}
\duck[
  body=yellow,
  head=yellow!50!orange,
  bill=red,
  eye=green
]
\end{tcblisting}

Furthermore using the keywords \saminline|grumpy|, \saminline|laughing| or \saminline|parrot| the shape of the bill can be changed:

\begin{tcblisting}{title={Grumpy duck}}
\duck[
  grumpy
]

\duck[
  grumpy,
  bill=cyan,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Laughing duck}}
\duck[
  laughing
]

\duck[
  laughing,
  bill=red,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Parrot duck}}
\duck[
  parrot
]

\duck[
  parrot,
  bill=blue,
  shift={(2.5,0)}
]
\end{tcblisting}

\subsection{Hair styles}

Some duck also like to have nice hair cuts, several different hair styles are available:

\begin{tcblisting}{title={Long hair duck}}
\duck[
  longhair
]
\end{tcblisting}

\begin{tcblisting}{title={Short hair duck}}
\duck[
  shorthair
]
\end{tcblisting}

\begin{tcblisting}{title={Parting hair duck}}
\duck[
  parting
]
\end{tcblisting}

\begin{tcblisting}{title={Crazy hair duck}}
\duck[
  crazyhair
]
\end{tcblisting}

\begin{tcblisting}{title={Receding hair duck}}
\duck[
  recedinghair
]
\end{tcblisting}

\begin{tcblisting}{title={Mohican duck}}
\duck[
  mohican
]
\end{tcblisting}

\begin{tcblisting}{title={Mullet duck}}
\duck[
  mullet
]
\end{tcblisting}

And of course the colour of each hair style can be adjusted:
\begin{tcblisting}{title={Coloured hair duck}}
\duck[
  longhair=teal
]
\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 (\saminline|eyebrow=<colour name>| or \saminline|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.

\begin{tcblisting}{title={Eye brow duck}}
\duck[
  eyebrow
]

\duck[
  longhair=blue,
  eyebrow,
  shift={(2.5,0)}
]

\duck[
  crazyhair=red,
  eyebrow=blue,
  shift={(1.25,-2.5)}
]
\end{tcblisting}

\begin{tcblisting}{title={Beard duck\footnote{The beard is based on an answer by Mihikma, see \url{https://tex.stackexchange.com/a/401777/36296}}}}
\duck[
  beard=white!80!brown
]

\duck[
  recedinghair=white,
  beard,
  shift={(2.5,0)}
]
\end{tcblisting}

Please note that not all of the accessories, especially hats, shown in the following sections, will suite every hairstyle. In case the desired combination of hair style and hat does not work well, there is always the possibility to look up the original definition of the hat in the \saminline|tikzducks| source code and recreate it with a more suitable position or size.

\subsection{Clothing}

A respectable duck needs a suitable wardrobe. It can choose from several different garments. In it's infinite wardrobe these items are available in all colours definable in the current colour model.

\begin{tcblisting}{title={T-shirt duck}}
\duck[
  tshirt=red
]
\end{tcblisting}

\begin{tcblisting}{title={Jacket duck}}
\duck[
  jacket=blue
]
\end{tcblisting}

\begin{tcblisting}{title={Tie duck}}
\duck[
  tshirt,
  jacket=gray,
  tie
]
\end{tcblisting}

\begin{tcblisting}{title={Bowtie duck}}
\duck[
  tshirt,
  jacket=gray,
  bowtie
]
\end{tcblisting}

\begin{tcblisting}{title={Áo dài duck}}
\duck[
  tshirt=cyan,
  aodai=blue!65!black
]
\end{tcblisting}

\begin{tcblisting}{title={Cape duck}}
\duck[
  cape
]
\end{tcblisting}

For more ways to customise the clothing also have a look at the \hyperref[sec:footballducks]{football ducks in Section \ref{sec:footballducks}}.

\subsection{Accessories}
\label{sec:accessories}

There is a multitude of things a duck might need. The following examples all also work without specifying a colour, but giving both an example with and one without explicit colour just makes this overview unnecessary long, so only one is given.

\begin{tcblisting}{title={Swimming duck}}
\duck[
  water=cyan!50!blue
]
\end{tcblisting}

\begin{tcblisting}{title={Alien duck}}
\duck[
  alien=green!50!brown
]
\end{tcblisting}

\begin{tcblisting}{title={Hat duck}}
\duck[
  hat=red!50!black
]
\end{tcblisting}

\begin{tcblisting}{title={Tophat duck}}
\duck[
  tophat=blue!20!black
]
\end{tcblisting}

\begin{tcblisting}{title={Strawhat duck}}
\duck[
  strawhat=brown!50!white,
  ribbon=gray
]
\end{tcblisting}

\begin{tcblisting}{title={Basecap duck}}
\duck[
  cap=red!80!black
]
\end{tcblisting}

\begin{tcblisting}{title={Conical hat duck}}
\duck[
  conicalhat=brown
]
\end{tcblisting}

\begin{tcblisting}{title={Santa duck}}
\duck[
  santa=red!80!black,
  beard=white!80!brown
]
\end{tcblisting}

\begin{tcblisting}{title={Graduate duck}}
\duck[
  graduate=gray!20!black,
  tassel=red!70!black
]
\end{tcblisting}

\begin{tcblisting}{title={Beret duck}}
\duck[
  beret=red!70!black
]
\end{tcblisting}

\begin{tcblisting}{title={Peaked cap duck}}
\duck[
  peakedcap=blue!50!black
]
\end{tcblisting}

\begin{tcblisting}{title={Harlequin duck}}
\duck[
  harlequin=blue,
  niuqelrah=red
]
\end{tcblisting}

\begin{tcblisting}{title={Sailor duck}}
\duck[
  sailor=white
]
\end{tcblisting}

\begin{tcblisting}{title={Bobble hat duck}}
\duck[
  bobblehat=red!70!red
]
\end{tcblisting}

\begin{tcblisting}{title={Crown duck}}
\duck[
  body=black!75!white,
  crown=yellow!70!brown
]

\duck[
  queencrown=gray,
  shift={(2.5,0)}
]

\duck[
  kingcrown=brown!70!red,
  shift={(1.25,2.5)}
]
\end{tcblisting}

\begin{tcblisting}{title={Knight duck}}
\duck[
  helmet=gray
]
\end{tcblisting}

\begin{tcblisting}{title={Viking duck}}
\duck[
  viking=gray
]
\end{tcblisting}

\begin{tcblisting}{title={Devil duck}}
\duck[
  devil=red
]
\end{tcblisting}

\begin{tcblisting}{title={Unicorn duck}}
\duck[
  body=pink,
  unicorn=magenta!60!violet,
  longhair=magenta!60!violet
]
\end{tcblisting}

\begin{tcblisting}{title={Bunny duck\footnote{Unless an explicit colour is specified, the bunny ears will take the body colour as default colour, the inner parts will be drawn in a lighter shade.}}}
\duck[
  body=white!80!brown,
  bill=white!60!brown,
  bunny
]

\duck[
  bunny=red,
  inear=blue,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Sheep duck\footnote{The in-ear colour of the sheep is chosen to be the same as the bill}}}
\duck[
  body=white!80!brown,
  bill=white!60!brown,
  sheep
]
\end{tcblisting}

\begin{tcblisting}{title={Horse duck\footnote{If no colour is specified, the horse tail will have the same colour as the hair}}}
\duck[
  body=brown!80!white,
  longhair=brown!50!black,
  horsetail
]
\end{tcblisting}

\begin{tcblisting}{title={Witch duck}}
\duck[
  witch=black!50!gray,
  longhair=red!80!black,
  jacket=black!50!gray,
  magicwand
]
\end{tcblisting}

\begin{tcblisting}{title={Magic duck}}
\duck[
  magichat,
  magicwand
]

\duck[
  magichat=teal,
  magicstars=blue!30!cyan,
  magicwand,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Sombrero duck\footnote{The sombrero was kindly contributed by Carla Maggi}}}
\duck[
  sombrero=orange!70!yellow,
  sombreroa=green!70!blue,
  sombrerob=red,
  sombreroc=blue
]
\end{tcblisting}

\begin{tcblisting}{title={Glasses duck}}
\duck[
  glasses=red!50!black
]

\duck[
  squareglasses=blue!50!black,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Sunglasses duck}}
\duck[
  sunglasses=blue
]
\end{tcblisting}

\begin{tcblisting}{title={Superhero duck}}
\duck[
  mask=teal,
  cape=teal
]
\end{tcblisting}

\begin{tcblisting}{title={Signpost duck}}
\duck[
  signpost=42
]

\duck[
  signpost=\parbox{2cm}{\tiny\color{black}
    \centering Science\\ first},
  signcolour=brown!70!gray,
  signback=white!80!brown,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Speaking duck\footnote{Both the speech and thought bubble are inspired by the wonderful \href{https://www.ctan.org/pkg/ducksay}{ducksay package}}}}
\duck[
  speech={Bla},
  bubblecolour=cyan!20!white,
  laughing
]
\end{tcblisting}

\begin{tcblisting}{title={Thinking duck\footnotemark[\thefootnote]}}
\duck[
  think={Blub},
  bubblecolour=white!95!yellow
]
\end{tcblisting}

\begin{tcblisting}{title={Buttons duck\footnote{In case the duck is wearing a jacket, the buttons are positioned a bit lower}}}
\duck[
  buttons=brown!50!black
]

\duck[
  jacket=red,
  buttons,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Dinner jacket duck}}
\duck[
  jacket=gray,
  lapel=black,
  buttons
]
\end{tcblisting}

\begin{tcblisting}{title={Book duck}}
\duck[
  book=\scalebox{0.5}{\TeX}
]

\duck[
  book=\scalebox{0.6}{$\pi$},
  bookcolour=blue!50!black,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Cricket duck}}
\duck[
  cricket=red!50!black
]
\end{tcblisting}

\begin{tcblisting}{title={Football duck\footnote{The football duck is simplified version from an answer by Carla Maggi, \url{https://tex.stackexchange.com/a/387126/36296}}}}
\duck[
  football=white!85!yellow
]
\end{tcblisting}

\begin{tcblisting}{title={Hockey duck}}
\duck[
  hockey=brown!70!black
]
\end{tcblisting}

\begin{tcblisting}{title={Lightsaber duck\footnote{Dedicated to the Counter Wizard (aka Christian Hupfer)}}}
\duck[
  lightsaber=red,
  darthvader=black!30!gray
]
\end{tcblisting}

\begin{tcblisting}{title={Torch duck}}
\duck[
  torch=black!30!gray
]
\end{tcblisting}

\begin{tcblisting}{title={Prison duck}}
\duck[
  prison=gray
]
\end{tcblisting}

\begin{tcblisting}{title={Shepherd duck}}
\duck[
  crozier=brown!80!black
]
\end{tcblisting}

\begin{tcblisting}{title={Necklace duck}}
\duck[
  necklace=gray!20!white
]
\end{tcblisting}

\begin{tcblisting}{title={Icecream duck}}
\duck[
  icecream
]

\duck[
  icecream=brown,
  flavoura=green!50!brown,
  flavourb=white,
  flavourc=red,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Chef duck\footnote{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}}}}
\duck[
  chef=white!95!yellow,
  rollingpin=brown!80!black
]
\end{tcblisting}

\begin{tcblisting}{title={Cake duck}}
\duck[
  cake=red!50!violet!80!black
]
\end{tcblisting}

\begin{tcblisting}{title={Pizza duck}}
\duck[
  pizza
]
\end{tcblisting}

\begin{tcblisting}{title={Baguette duck}}
\duck[
  baguette=brown
]
\end{tcblisting}

\begin{tcblisting}{title={Cheese duck}}
\duck[
  cheese=orange
]
\end{tcblisting}

\begin{tcblisting}{title={Milkshake duck}}
\duck[
  milkshake=red!20!white
]
\end{tcblisting}

\begin{tcblisting}{title={Wine duck\footnote{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}}}
\duck[
  wine=red!70!black
]
\end{tcblisting}

\begin{tcblisting}{title={Cocktail duck}}
\duck[
  cocktail
]
\end{tcblisting}

\begin{tcblisting}{title={Banana duck\footnote{The banana and the stick were kindly contributed by @NuzzleTOO}}}
\duck[
  banana=yellow!80!orange
]
\end{tcblisting}

\begin{tcblisting}{title={Stick duck\footnotemark[\thefootnote]}}
\duck[
  stick=red!60!green,
  leaf=green!70!red
]
\end{tcblisting}

\begin{tcblisting}{title={Basket duck\footnote{The basket and Easter basket was kindly contributed by Benito van der Zander}}}
\duck[
  basket=brown
]
\end{tcblisting}

\begin{tcblisting}{title={Easter duck\footnotemark[\thefootnote]}}
\duck[
  bunny,
  easter
]

\duck[
  bunny,
  easter=brown,
  egga=cyan,
  eggb=orange,
  eggc=teal,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Wing duck}}
\duck[
  wing=yellow!90!brown
]
\end{tcblisting}

\begin{tcblisting}{title={Doctor duck}}
\duck[
  stethoscope=gray!80!black
]
\end{tcblisting}

\begin{tcblisting}{title={Neckerchief duck}}
\duck[
  neckerchief=red!70!black,
  woggle=blue!60!black
]
\end{tcblisting}

\begin{tcblisting}{title={Winter duck}}
\duck[
  bobblehat=red!70!black,
  scarf=red!70!black
]
\end{tcblisting}

\begin{tcblisting}{title={Snow duck\footnote{The snowduck is dedicated to all Japanese \TeX\ users}}}
\duck[
  snowduck=white
]
\end{tcblisting}

\begin{tcblisting}{title={Shovelling duck}}
\duck[
  shovel=gray
]
\end{tcblisting}

\begin{tcblisting}{title={Pickaxe duck}}
\duck[
  pickaxe=gray
]
\end{tcblisting}

\begin{tcblisting}{title={Sweeping duck}}
\duck[
  strawbroom=brown!50!white,
  strawbroomstick=brown,
  strawbroomribbon=red!50!black
]

\duck[
  broom=brown,
  broomstick=gray!50!black,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Umbrella duck}}
\duck[
  umbrella=cyan
]

\duck[
  umbrellaclosed=cyan,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Fortune Quacker\footnote{The crystal ball is kindly contributed by @marmot}}}
\duck[
  crystalball=cyan
]
\end{tcblisting}

\begin{tcblisting}{title={Handbag duck}}
\duck[
  handbag=red!70!black
]
\end{tcblisting}

\begin{tcblisting}{title={Vampire duck}}
\duck[
  vampire=white
]

\duck[
  laughing,
  vampire=white,
  shift={(2.5,0)}
]
\end{tcblisting}

\begin{tcblisting}{title={Overleaf duck\footnote{added to celebrate that \tikzducks are now also available on overleaf, see \url{https://www.overleaf.com/blog/tex-live-upgrade-september-2019}}}}
\duck[
  overleaf
]
\end{tcblisting}

\begin{tcblisting}{title={Megaphone duck}}
\duck[
  megaphone=lightgray
]
\end{tcblisting}

\begin{tcblisting}{title={Towel duck}}
\duck[
  towel=violet
]
\end{tcblisting}

\begin{tcblisting}{title={Present duck\footnote{The present was kindly contributed by Carla Maggi}}}
\duck[
  present=violet
]

\duck[
  present,
  present top=cyan,
  present bottom=blue,
  present ribbon=teal,
  shift={(2.5,0)}
]
\end{tcblisting}

\clearpage
\section{Random ducks}
With all these available accessories it might be hard to decide which one to choose, but don't worry the \tikzducks provide a solution for this dilemma, the random duck, or short \saminline|\randuck|, which automatically creates a duck with a randomly chosen accessories and something on top of the head (hair, a hat, ears, alien antenna ...)

\begin{tcblisting}{title={Random duck}}
  \randuck

  \randuck[
    shift={(2.5,0)},
    scale=0.7
  ]
\end{tcblisting}

In case the duck should not be completely random, but only some of the random elements are desired, these can be accessed independently by using the \saminline|randomhead| and \saminline|randomaccessories| options for a random headpiece and a random accessories, respectively.

\begin{tcblisting}{title={Random head gear and accessories}}
\duck[
  randomhead,
  randomaccessories
]
\end{tcblisting}

\section{Further customisation}

This package will never be able to do everything every potential user might want to do, as this number quickly approaches $\infty$ -- but as the ducks are simply things inside \saminline|tikzpicture|s, all the heavy weapons of the \TikZ package are available for further customisation.

\begin{tcblisting}{title={Adding things to the duck}}
\duck
\fill[blue] (2,0) rectangle (1,1);
\end{tcblisting}

\begin{tcblisting}{title={Monochrome duck}}
\selectcolormodel{gray}
\duck
\end{tcblisting}

For convenience the more complex paths of this package are stored in macros, which can easily be reused:

\begin{tcblisting}{title={Redraw parts}}
\duck
\path[
  preaction={fill, red!50!black},
  pattern={Stars[distance=1.7mm,
  radius=0.5mm,angle=32]},
  pattern color=yellow
] \duckpathlonghair;
\end{tcblisting}

In detail, the following paths are available:

\begin{samcode}
\duckpathbody, \duckpathgrumpybill, \duckpathbill, \duckpathtshirt,
\duckpathjacket,\duckpathcape, \duckpathshorthair, \duckpathlonghair,
\duckpathcrazyhair, \duckpathrecedinghair, \duckpathcrown,
\duckpathmohican,  \duckpathmullet,  \duckpathqueencrown,
\duckpathkingcrown,  \duckpathdarthvader,  \duckpathhorsetail,
\duckpathtowel
\end{samcode}

In case one of the other shapes is needed, please have a look at the package source code, which can be found in \saminline|tikzducks.sty|.

To ease the placement of further accessories, some particular spots of the duck are marked with \TikZ coordinates, namely the \saminline|wing|, \saminline|head|, \saminline|bill| and \saminline|tail|.

{
\footnotesize\ttfamily
\begin{tcblisting}{title={\normalfont\normalsize\bfseries Coordinates}}
\duck[scale=2]

\begin{scope}[
  every node/.style={fill,circle,inner sep=1pt}
]
  \node[label=0:wing] at (wing) {};
  \node[label=0:head] at (head) {};
  \node[label=0:bill] at (bill) {};
  \node[label=0:tail] at (tail) {};
\end{scope}
\end{tcblisting}
}

To distinguish coordinates from multiple ducks in the same \saminline|tikzpicture|, one can name the ducks using the option \saminline|name|. If this option is used, the coordinates are prefixed with the respective name and a dash: \saminline|<name>-<coordinate>|.

\begin{tcblisting}{title={Named coordinates},listing options={style={duckstyle}, emph={name,wing}}}
\duck[
  name=foo
]

\duck[
  name=bar,
  shift={(3,1)},
  scale=.3
]

\draw (foo-wing) -- (bar-wing);
\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:

\begin{itemize}
\item \saminline|\NewHook{tikzducks/background}|
\item \saminline|\NewHook{tikzducks/body}|
\item \saminline|\NewHook{tikzducks/clothing}|
\item \saminline|\NewHook{tikzducks/hair}|
\item \saminline|\NewHook{tikzducks/hat}|
\item \saminline|\NewHook{tikzducks/foreground}|
\end{itemize}

\begin{center}
  \saminline|\NewHook{tikzducks/...}|
  \begin{tikzpicture}[scale=1.59]
    \newcommand{\planes}{\fill[gray!20!white,opacity=0.9] (-0.1,-0.1) rectangle (2.4,2.4);}
    \newcommand{\hooks}{\draw[themecolor, rounded corners=3pt, line width=1pt] (-0.1,-0.1) rectangle (2.4,2.4);}
    \node[font=\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=\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=\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=\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=\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=\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 utilised by the user as needed:

\begin{tcblisting}{title={Hooks}}
  \AddToHook{tikzducks/clothing}{
    \path[
      pattern={Stars[distance=1.7mm,
      radius=0.5mm,angle=32]},
      pattern color=yellow
    ] \duckpathjacket;
  }

  \duck[
    witch=black!50!gray,
    longhair=red!80!black,
    jacket=black!50!gray,
    magicwand
  ]

  % optionally
  \RemoveFromHook{tikzducks/clothing}
\end{tcblisting}

\clearpage
\section{Football ducks -- contributed by Carla Maggi}
\label{sec:footballducks}

\tikzducks are huge sports fans! They do a lot of different sports themselves (see all the piece of sports equipment amongst the accessories), but to cheer their favourite teams, they need suitable fan clothing. In \href{https://tex.stackexchange.com/a/387126/36296}{The Duck Pond} Carla Maggi was so kind to contribute the necessary code to dress the ducks in their team's colours.

A (non-representative) survey\footnote{see the selection of jerseys in \url{https://tex.stackexchange.com/a/387126/36296}} showed that most sports jerseys can be emulated by drawing stripes of various colours, sizes and orientations -- and this is exactly what the \saminline|stripes| macro does, drawing stripes across the shape of the duck's jacket. In order to preserve the whole flexibility of this powerful macro, it was integrated as an independent command into the \tikzducks package, this means it can simply be used on top of a drawn duck:

\begin{tcblisting}{title={\texttt{stripes} macro}}
\duck
\stripes
\end{tcblisting}

This may be impractical as the stripes are drawn on top of any accessories or hair the duck may have. Therefore the option \saminline|stripes| let's you inject any code you would normally use to draw the stripes at the correct layer above the duck's clothing but beneath the hair and accessories:

\begin{tcblisting}{title={Using \texttt{stripes} for \texttt{tikzducks}}}
\duck[
  longhair,
  stripes={\stripes}
]
\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:

\nopagebreak[4]
\begin{tabular}{@{}ll@{}}
  \saminline|color|    & colour of the stripes, default:
                         \saminline|black| \\
  \saminline|distance| & periodicity length of the stripes, default:
                         \saminline|0.3| \\
  \saminline|width|    & stripe width, default: \saminline|0.15| \\
  \saminline|height|   & length of the stripes, default:
                         \saminline|2.7| \\
  \saminline|initialx| & x coordinate of staring point, default:
                         \saminline|0.1| \\
  \saminline|initialy| & y coordinate of staring point, default:
                         \saminline|-0.3| \\
  \saminline|rotate|   & rotation angle in degree, default:
                         \saminline|-10|\\
  \saminline|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 \saminline|tshirt| or \saminline|jacket| of the desired colour underneath the stripes.

\begin{tcblisting}{title={\texttt{stripes} options}}
\duck[
  stripes
]
\duck[
  stripes={\stripes[color=blue]},
  shift={(2.5,0)}
]

\duck[
  stripes={\stripes[distance=0.6]},
  shift={(0,-3.6)}
]
\duck[
  stripes={\stripes[width=0.03]},
  shift={(2.5,-3.6)}
]

\duck[
  stripes={\stripes[emblem={
    \includegraphics[width=.3cm]{example-image-a}
  }]},
  shift={(0,-7.3)}
]
\duck[
  stripes={\stripes[height=1.0]},
  shift={(2.5,-7.3)}
]

\duck[
  stripes={\stripes[initialx=1]},
  shift={(0,-11.5)}
]
\duck[
  stripes={\stripes[initialy=0.8]},
  shift={(2.5,-11.5)}
]

\duck[
  stripes={\stripes[rotate=45]},
  shift={(0,-15.5)}
]
\duck[
  stripes={\stripes[rotate=-45]},
  shift={(2.5,-15.5)}
]
\end{tcblisting}

For more complex or multicoloured designs the stripes can easily be stacked on top of each other:
\begin{tcblisting}{title={multicoloured \texttt{stripes}}}
\duck[
  tshirt=red,
  stripes={
    \stripes[color=yellow, width=0.1]
    \stripes[color=orange, width=0.1,
    initialx=0.0]
  }
]
\end{tcblisting}

A few examples to see \saminline|stripes| in action:
\begin{tcblisting}{title={Inter duck}}
\definecolor{blueinter}{RGB}{0,102,170}%
\duck[
  tshirt=black,
  stripes={\stripes[color=blueinter]},
  football
]
\end{tcblisting}

\begin{tcblisting}{title={Juve duck}}
\duck[
  tshirt=black,
  stripes={\stripes[color=white]},
  football
]
\end{tcblisting}

\begin{tcblisting}{title={Milan duck}}
\duck[
  tshirt=black,
  stripes={\stripes[color=red]},
  football
]
\end{tcblisting}

\begin{tcblisting}{title={M\"{o}nchengladbach duck}}
\definecolor{mggreen}{RGB}{37,166,89}%
\duck[
  tshirt=mggreen,
  stripes={\stripes},
  football
]
\end{tcblisting}

\begin{tcblisting}{title={Palmeiras duck}}
\definecolor{verdep}{RGB}{0,100,55}%
\duck[
  tshirt=green,
  jacket=verdep,
  football
]
\end{tcblisting}

\begin{tcblisting}{title={Cagliari duck}}
\definecolor{rossocagliari}{RGB}{149,20,38}%
\definecolor{blucagliari}{RGB}{23,52,84}%
\duck[
  tshirt=white,
  jacket=blucagliari,
  stripes={
    \stripes[
      color=rossocagliari,
      width=0.46,
      distance=3
    ]
  },
  football
]
\end{tcblisting}

\begin{tcblisting}{title={Sampdoria duck}}
\duck[
  tshirt=blue,
  jacket=blue,
  stripes={
    \stripes[color=white,rotate=-90,
             width=0.6,distance=1]
    \stripes[color=red,rotate=-90,
             width=0.2,distance=1.2]
    \stripes[color=black,rotate=-90,
             width=0.1,distance=1.3]
  },
  football
]
\end{tcblisting}

\begin{tcblisting}{title={Brescia duck}}
\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]
  },
  football
]
\end{tcblisting}

\section{Examples}

To see more examples of what can be done with the \tikzducks, you are invited to visit \url{https://github.com/samcarter/tikzducks}.

If you have created a duck you would like to share with the community, I would be happy to add it to this collection, just make a pull request or open an issue in the bug tracking system.

\end{document}
