1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% 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 http://www.latex-project.org/lppl.txt
%
% Version 1.0
% Nov 8, 2018
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[parskip=half]{scrartcl}
% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{tikzducks}
\usetikzlibrary{ducks}
\usepackage[most]{tcolorbox}
\usepackage[paper=a4paper,margin=3cm]{geometry}
\usepackage{url}
\usepackage{xspace}
\usepackage{scrlayer-scrpage}
\usepackage{marvosym}
\usepackage{fontawesome}
\usepackage[hang,flushmargin,bottom]{footmisc}
\usepackage{imakeidx}
\usepackage[colorlinks=true,breaklinks=true,urlcolor=duckblue,linkcolor=duckblue,citecolor=duckblue,filecolor=duckblue]{hyperref}
% macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\CTAN}{\textsc{CTAN}\xspace}
\newcommand{\TikZ}{Ti\emph{k}Z\xspace}
\newcommand{\tikzducks}{Ti\emph{k}Zducks\xspace}
\newcommand{\miktex}{MiK\TeX\xspace}
\newcommand{\texlive}{\TeX{}Live\xspace}
% customisation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{duckblue}{RGB}{0,70,140}
\addtokomafont{sectioning}{\color{duckblue}}
\addtokomafont{date}{\normalsize}
\addtokomafont{author}{\normalsize}
\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},
texcsstyle=*\color{duckblue}\bfseries,
keywordstyle=\color{red!60!black}\bfseries,
morekeywords={tikzpicture,scope,patterns,calc,pgfinterruptboundingbox},
moretexcs={duck,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]
}
\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%
},
}
\lstset{style=duckstyle}
\pgfkeys{/duck/|stripes|/.style={stripes={#1}}}
\pgfmathsetseed{2}
\setlength{\footheight}{45pt}
\newlength{\duckoffset}
\cfoot{%
\tikzset{external/export=false}%
\shuffleducks
\begin{tikzpicture}[scale=0.5]
\duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
\end{tikzpicture}
}
\pagestyle{scrheadings}
\indexsetup{firstpagestyle=scrheadings}
\makeindex[columns=3]
\usetikzlibrary{external}
\ifnum\pdfshellescape=1
\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 1.0 -- \today}
\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 an answer at TeX.Stackexchange: \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.
\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:
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},
%
\href{https://tex.stackexchange.com/users/3094/paulo-cereda}{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.
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,
%
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,
%
\href{https://tex.stackexchange.com/users/148434/mihikma}{Mihikma} created the duck's beard,
%
\href{https://github.com/yudai-nkt}{Yudai Nakata} helped with problems of \lstinline|\pdfrandomseed|
%
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.
\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}).
\subsection{Dependencies}
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}[aboveskip=0em,morekeywords={xcolor,svgnames}]
\PassOptionsToPackage{svgnames}{xcolor}
\end{lstlisting}
It also uses the \lstinline|\usetikzlibrary{patterns}| and \lstinline|\usetikzlibrary{calc}|. Furthermore the packages \lstinline|ifpdf| and \lstinline|ifluatex| are necassary starting with version 0.5 of this package.
\subsection{License}
Copyright \raisebox{0.2em}{\tiny\fontfamily{cmr}\selectfont\textcopyright}
\texttt{samcarter}. Permission is granted to copy, distribute and\slash or modify this software under the terms of the LaTeX project public licence, version 1.3c or later \url{http://www.latex-project.org/lppl.txt}.
The shown example ducks are purely fictional characters, any resemblance to real ducks or persons is purely coincidental and no copyright infringement is intended.
\section{Usage}
The basic usage is fairly simple, to draw a duck:
\begin{tcblisting}{title={Basic duck}}
\begin{tikzpicture}
\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]
\end{tikzpicture}
\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.
\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{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]
\end{tikzpicture}
\end{tcblisting}
Please note that a negative \lstinline|yscale| will result in awkward rounded corners and text placements for some of the accessories. If an upside-down duck is necessary, e.g. to illustrate the German nursery rhyme \href{https://de.wikipedia.org/wiki/Alle_meine_Entchen}{``Alle meine Entchen''}, please rotate the duck instead.
To make the usage easier for the \TikZ-savvy users, Andrew Stacey contributed a \TikZ library. It can be loaded with \lstinline|\usetikzlibrary{ducks}|. In addition to the normal functionality of the \tikzducks package, the ducks are now also available as \lstinline|pic|. A short example:
\begin{tcolorbox}[title={\TikZ library ``ducks''}]
\begin{lstlisting}[morekeywords={ducks,duck,standalone,tikz,document}]
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{ducks}
\begin{document}
\begin{tikzpicture}
\draw (0,0) pic[
duck/water=green,
duck/alien,
] {duck};
\draw (4,0) pic[
scale=1.4,
] {duck};
\end{tikzpicture}
\end{document}
\end{lstlisting}
\tcblower
\begin{tikzpicture}
\draw (0,0) pic[
duck/water=green,
duck/alien,
] {duck};
\draw (2,1) pic[
scale=1.4,
] {duck};
\end{tikzpicture}
\end{tcolorbox}
\clearpage
\subsection{Body parts}
The various parts of the duck can also be coloured independently, i.e.\ \lstinline|body|, \lstinline|head| or \lstinline|bill|:
\begin{tcblisting}{title={Harlequin duck}}
\begin{tikzpicture}
\duck[body=yellow,
head=yellow!50!orange,
bill=red,
eye=green]
\end{tikzpicture}
\end{tcblisting}
Furthermore using the keywords \lstinline|grumpy|, \lstinline|laughing| or \lstinline|parrot| the shape of the bill can be changed:
\begin{tcblisting}{title={Grumpy duck}}
\begin{tikzpicture}
\duck[grumpy]
\end{tikzpicture}
\begin{tikzpicture}
\duck[grumpy, bill=cyan]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Laughing duck}}
\begin{tikzpicture}
\duck[laughing]
\end{tikzpicture}
\begin{tikzpicture}
\duck[laughing, bill=red]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Parrot duck}}
\begin{tikzpicture}
\duck[parrot]
\end{tikzpicture}
\begin{tikzpicture}
\duck[parrot, bill=blue]
\end{tikzpicture}
\end{tcblisting}
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]
\end{tikzpicture}
\end{tcblisting}
This can also be useful to recycle some of the accessories presented in \ref{sec:accessories}.
\clearpage
\subsection{Hair styles}
Some duck also like to have nice hair cuts, several different hair styles are available:
\begin{tcblisting}{title={Hairy duck},righthand width=9cm}
\begin{tikzpicture}
\duck[longhair]
\end{tikzpicture}
\begin{tikzpicture}
\duck[shorthair]
\end{tikzpicture}
\begin{tikzpicture}
\duck[crazyhair]
\end{tikzpicture}
\begin{tikzpicture}
\duck[recedinghair]
\end{tikzpicture}
\begin{tikzpicture}
\duck[mohican]
\end{tikzpicture}
\begin{tikzpicture}
\duck[mullet]
\end{tikzpicture}
\begin{tikzpicture}
\duck[parting]
\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]
\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]
\end{tikzpicture}
\begin{tikzpicture}
\duck[longhair=blue,eyebrow]
\end{tikzpicture}
\begin{tikzpicture}
\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]
\end{tikzpicture}
\begin{tikzpicture}
\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}}
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 \lstinline|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 a \lstinline|tshirt|, a \lstinline|jacket| and a \lstinline|tie|. In it's infinite wardrobe these items are available in all colours definable in the current colour model.
\begin{tcblisting}{title={Dressed duck}}
\begin{tikzpicture}
\duck[tshirt]
\end{tikzpicture}
\begin{tikzpicture}
\duck[jacket]
\end{tikzpicture}
\begin{tikzpicture}
\duck[tie]
\end{tikzpicture}
\begin{tikzpicture}
\duck[cape]
\end{tikzpicture}
\begin{tikzpicture}
\duck[tshirt=lightgray,
jacket=blue!50!black,
tie=blue!80!black,
shorthair]
\end{tikzpicture}
\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}}.
\clearpage
\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}}
\begin{tikzpicture}
\duck[water=cyan!50!blue]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Alien duck}}
\begin{tikzpicture}
\duck[alien=green!50!brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Hat duck}}
\begin{tikzpicture}
\duck[hat=red!50!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Tophat duck}}
\begin{tikzpicture}
\duck[tophat=blue!20!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Strawhat duck}}
\begin{tikzpicture}
\duck[strawhat=brown!50!white, ribbon=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Basecap duck}}
\begin{tikzpicture}
\duck[cap=red!80!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Santa Duck}}
\begin{tikzpicture}
\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}
\end{tcblisting}
\begin{tcblisting}{title={Beret duck}}
\begin{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}
\end{tcblisting}
\begin{tcblisting}{title={Harlequin duck}}
\begin{tikzpicture}
\duck[harlequin=blue,
niuqelrah=red]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Crown duck}}
\begin{tikzpicture}
\duck[body=black!75!white,
crown=yellow!70!brown]
\end{tikzpicture}
\begin{tikzpicture}
\duck[queencrown=gray]
\end{tikzpicture}
\begin{tikzpicture}
\duck[kingcrown=brown!70!red]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Knight duck}}
\begin{tikzpicture}
\duck[helmet=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Unicorn duck}}
\begin{tikzpicture}
\duck[body=pink,
unicorn=magenta!60!violet,
longhair=magenta!60!violet]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Bunny duck$^{\thefootnote}$}}
\begin{tikzpicture}
\duck[body=white!80!brown, bill=white!60!brown, bunny]
\end{tikzpicture}
\begin{tikzpicture}
\duck[bunny=red,inear=blue]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{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.}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Sheep duck$^{\thefootnote}$}}
\begin{tikzpicture}
\duck[body=white!80!brown, bill=white!60!brown, sheep]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{The in-ear colour of the sheep chosen to be the same as the bill}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Horse duck$^{\thefootnote}$}}
\begin{tikzpicture}
\duck[body=brown!80!white, longhair=brown!50!black, horsetail]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{If no colour is specified, the horse tail will have the same colour as the hair}
\begin{tcblisting}{title={Witch duck}}
\begin{tikzpicture}
\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]
\end{tikzpicture}
\begin{tikzpicture}
\duck[magichat=teal,
magicstars=blue!30!cyan,
magicwand]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Glasses duck}}
\begin{tikzpicture}
\duck[glasses=red!50!black]
\end{tikzpicture}
\begin{tikzpicture}
\duck[squareglasses=blue!50!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Sunglasses duck}}
\begin{tikzpicture}
\duck[sunglasses=blue]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Superhero duck}}
\begin{tikzpicture}
\duck[mask=teal,cape=teal]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Signpost duck}}
\begin{tikzpicture}
\duck[signpost=42]
\end{tikzpicture}
\begin{tikzpicture}
\duck[signpost=\scalebox{0.4}{
\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]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Thinking duck$^{\thefootnote}$}}
\begin{tikzpicture}
\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}}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Buttons duck$^{\thefootnote}$}}
\begin{tikzpicture}
\duck[buttons=brown!50!black]
\end{tikzpicture}
\begin{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={Book duck}}
\begin{tikzpicture}
\duck[book=\scalebox{0.5}{\TeX}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[book=\scalebox{0.6}{$\pi$}, bookcolour=blue!50!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Cricket duck}}
\begin{tikzpicture}
\duck[cricket=red!50!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Hockey duck}}
\begin{tikzpicture}
\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]
\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}}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Lightsaber duck$^{\thefootnote}$}}
\begin{tikzpicture}
\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]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Prison duck}}
\begin{tikzpicture}
\duck[prison=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Shepherd duck}}
\begin{tikzpicture}
\duck[crozier=brown!80!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Necklace duck}}
\begin{tikzpicture}
\duck[necklace=gray!20!white]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Icecream duck}}
\begin{tikzpicture}
\duck[icecream]
\end{tikzpicture}
\begin{tikzpicture}
\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]
\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}}
\begin{tcblisting}{title={Cake duck}}
\begin{tikzpicture}
\duck[cake=red!50!violet!80!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Pizza duck}}
\begin{tikzpicture}
\duck[pizza]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Baguette duck}}
\begin{tikzpicture}
\duck[baguette=brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Cheese duck}}
\begin{tikzpicture}
\duck[cheese=orange]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Milkshake duck}}
\begin{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]
\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={Wing duck}}
\begin{tikzpicture}
\duck[wing=yellow!90!brown]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Basket duck$^{\thefootnote}$}}
\begin{tikzpicture}
\duck[basket=brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Easter duck$^{\thefootnote}$}}
\begin{tikzpicture}
\duck[bunny,easter]
\end{tikzpicture}
\begin{tikzpicture}
\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]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Neckerchief duck}}
\begin{tikzpicture}
\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]
\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]
\end{tikzpicture}
\begin{tikzpicture}
\duck[laughing, vampire=white]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Fortune Quacker$^{\thefootnote}$}}
\begin{tikzpicture}
\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}}
\begin{tcblisting}{title={Shovelling Duck}}
\begin{tikzpicture}
\duck[shovel=gray]
\end{tikzpicture}
\begin{tikzpicture}
\duck[pickaxe=gray]
\end{tikzpicture}
\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 \lstinline|\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}}
\begin{tikzpicture}
\randuck
\end{tikzpicture}
\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 \lstinline|\randomhead| and \lstinline|\randomaccessories| for a random headpiece and a random accessories, respectively. Small caveat: Before using \lstinline|\randomhead| or \lstinline|\randomaccessories|, \lstinline|\shuffleducks| has to be used to provide the random items (for \lstinline|\randuck| this is done automatically).
\begin{tcblisting}{title={Random head gear and accessories}}
\begin{tikzpicture}
\shuffleducks
\duck[\randomhead, \randomaccessories]
\end{tikzpicture}
\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 \lstinline|tikzpicture|s, all the heavy weapons of the \TikZ package are available for further customisation.
\begin{tcblisting}{title={Adding things to the duck}}
\begin{tikzpicture}
\duck
\fill[blue] (2,0) rectangle (1,1);
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Monochrome duck}}
\begin{tikzpicture}
\selectcolormodel{gray}
\duck
\end{tikzpicture}
\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}}
\begin{tikzpicture}
\duck
\path[preaction={fill, red!50!black},pattern=fivepointed stars, pattern color=yellow]
\duckpathlonghair;
\end{tikzpicture}
\end{tcblisting}
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|.
To ease the placement of further accessories, some particular spots of the duck are marked with \TikZ coordinates, namely the \lstinline|wing|, \lstinline|head|, \lstinline|bill| and \lstinline|tail|.
{
\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};
\end{tikzpicture}
\end{tcblisting}
}
An example making use this option are the \hyperref[starducks]{``Live long and prosper'' ducks}.
To distinguish coordinates from multiple ducks in the same \lstinline|tikzpicture|, one can name the ducks using the option \lstinline[emph={name}]|name|. If this option is used, the coordinates are prefixed with the respective name and a dash: \lstinline|<name>-<coordinate>|.
\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}
\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.
\addtocounter{footnote}{1}
A (non-representative) survey$^{\thefootnote}$\footnotetext[\thefootnote]{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 \lstinline|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}}
\begin{tikzpicture}
\duck
\stripes
\end{tikzpicture}
\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 \lstinline|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}}}
\begin{tikzpicture}
\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\\
\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]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
\stripes[color=blue]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
\stripes[distance=0.6]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
\stripes[width=0.03]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={\stripes[emblem={\includegraphics[width=0.3cm]{example-image-a}}]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
\stripes[height=1.0]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
\stripes[initialx=1]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
\stripes[initialy=0.8]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
\stripes[rotate=45]}]
\end{tikzpicture}
\begin{tikzpicture}
\duck[|stripes|={
\stripes[rotate=-45]}]
\end{tikzpicture}
\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}}}
\begin{tikzpicture}
\duck[tshirt=red, |stripes|={
\stripes[color=yellow, width=0.1]
\stripes[color=orange, width=0.1, initialx=0.0]}]
\end{tikzpicture}
\end{tcblisting}
\tcbset{righthand width=3cm}
A few examples to see \lstinline|stripes| in action:
\begin{tcblisting}{title={Inter duck}}
\definecolor{blueinter}{RGB}{0,102,170}%
\begin{tikzpicture}
\duck[tshirt=black,|stripes|={\stripes[color=blueinter]},football]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Juve duck}}
\begin{tikzpicture}
\duck[tshirt=black,|stripes|={\stripes[color=white]},football]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Milan duck}}
\begin{tikzpicture}
\duck[tshirt=black,|stripes|={\stripes[color=red]},football]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={M\"{o}nchengladbach duck}}
\definecolor{mggreen}{RGB}{37,166,89}%
\begin{tikzpicture}
\duck[tshirt=mggreen,|stripes|={\stripes},football]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Palmeiras duck}}
\definecolor{verdep}{RGB}{0,100,55}%
\begin{tikzpicture}
\duck[tshirt=green,jacket=verdep,football]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Cagliari duck}}
\definecolor{rossocagliari}{RGB}{149,20,38}%
\definecolor{blucagliari}{RGB}{23,52,84}%
\begin{tikzpicture}
\duck[tshirt=white, jacket=blucagliari,|stripes|={
\stripes[color=rossocagliari, width=0.46, distance=3]},football]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Sampdoria duck}}
\begin{tikzpicture}
\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{tikzpicture}
\end{tcblisting}
\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]
},football]
\end{tikzpicture}
\end{tcblisting}
In case your favourite team is missing from the above examples, feel free to create an example and share it with the community in \href{https://tex.stackexchange.com/q/387047/36296}{The Duck Pond}.
\clearpage
\section{Showcase}
\addtocounter{footnote}{1}
In the following a few examples of possible duck customisations, some of which will require additional packages (which are stated as a comment at the start of the code). For more examples (or to show your own creations) please visit \href{https://tex.stackexchange.com/q/387047/36296}{The Duck Pond} or have a look at \href{https://vimeo.com/246256860}{The Great Christmas Extravaganza}$^{\thefootnote}$\footnotetext[\thefootnote]{the source code is available at \url{https://github.com/cereda/duck-extravaganza}}.
\begin{tcblisting}{title={\texttt{samcarter} duck}}
\begin{tikzpicture}
\duck[body=yellow!50!brown!50!white,
longhair=red!50!brown,
jacket=blue!50!black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Paulo duck}}
\begin{tikzpicture}
\duck[cap,cricket]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Party duck}}
\begin{tikzpicture}
\duck[cake=violet,
magichat=violet,
magicstars=white!85!yellow]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Brazil duck}}
\begin{tikzpicture}
\definecolor{brazilgreen}{RGB}{0,155,58}%
\definecolor{brazilyellow}{RGB}{254,223,0}%
\definecolor{brazilblue}{RGB}{0,39,118}%
\duck[body=brazilyellow,
shorthair=brazilgreen]
\path[preaction={fill, brazilblue},pattern=fivepointed stars, pattern color=white]
\duckpathjacket;
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Duck in black}}
\begin{tikzpicture}
\duck[grumpy, body=yellow!50!brown!50!white, tshirt=white, jacket=black, tie=black, hat=black, sunglasses=black]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Prof.\ van Duck}}
\begin{tikzpicture}
\duck[body=yellow!50!brown!40!white,
crazyhair=gray!50!white,
eyebrow,
glasses=brown!70!black,
book=\scalebox{0.2}{$E=mc^2$},
bookcolour=red!20!brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Knuth duck}}
\begin{tikzpicture}
\duck[body=yellow!50!red!20!white,
recedinghair=gray!50!white,
eyebrow,
tshirt=white!93!black,
jacket=red!50!black,
glasses=brown!70!lightgray,
book=\scalebox{0.5}{\TeX},
bookcolour=black!20!brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={May the Quack be with you}}
\begin{tikzpicture}
\colorlet{skin}{white!45!gray!80!green}
\duck[lightsaber, body=skin, bill=gray!80!green,
tshirt=brown!50!black, jacket=brown!30!gray]
\fill[skin,rounded corners=3] (0.44,1.70) -- (0.25,2) -- (0.6,1.95);
\fill[skin,rounded corners=3] (1.34,1.60) -- (1.53,1.9) -- (1.16,1.85);
\end{tikzpicture}
\begin{tikzpicture}
\duck[grumpy,lightsaber=red,cape=black!85!white,
body=black!70!white,darthvader=black!85!white]
\end{tikzpicture}
\begin{tikzpicture}
\fill[brown!70!black] (0.5,1.65) circle (0.25);
\duck[jacket=white!95!brown, body=brown!50!white,
shorthair=brown!70!black, lightsaber=cyan]
\fill[brown!70!black] (1.3,1.6) circle (0.25);
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Ghost duck}}
\colorlet{ghost}{white!98!gray}%
\begin{tikzpicture}
\duck[body=ghost,bill=ghost,prison=gray]
\fill[ghost,rotate=-17](-0.1,0.7) rectangle (0.15,1.3);
\fill[ghost,rotate=17] (1.6,0.7) rectangle (1.81,1.3);
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={67P/Churyumov-Gerasimenko duck$^{\thefootnote}$}}
\begin{tikzpicture}[path image/.style={path picture={\foreach \j in {0,...,2}{\node at (0,\j) {\foreach \i in {1,...,5}{\includegraphics[height=1cm]{#1}}};}}}]
\path (0.1,0.1) rectangle (2.1,2.12);
\begin{pgfinterruptboundingbox}
\path[path image=crinklepaper]
(0.90,1.50) ellipse (0.50 and 0.625);
\path[path image=crinklepaper] \duckpathbody;
\fill[gray!80!white] \duckpathbill;
\fill[white!70!gray, rotate=-20]
(0.23,1.7675) ellipse (0.0893 and 0.125)
(-0.06,1.74) ellipse (0.0786 and 0.1143);
\fill[black, rotate=-20]
(0.26,1.7575) ellipse (0.0357 and 0.0714)
(-0.03,1.73) ellipse (0.0286 and 0.0643);
\end{pgfinterruptboundingbox}
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{If you try this at home, replace the \texttt{crinklepaper} with an image of the comet's surface, e.g. \url{https://arxiv.org/abs/1707.02945}}
\begin{tcblisting}{title={With my username I had to...}}
%\usepackage{marvosym}
\definecolor{sgskin}{RGB}{222,197,159}%
\definecolor{sgblond}{RGB}{238,203,96}%
\colorlet{sggreen}{olive!50!black}
\colorlet{sgbill}{sgskin!85!black}
\colorlet{sgshirt}{sggreen!50!black}
\begin{tikzpicture}
\duck[body=sgskin,bill=sgbill,tshirt=sgshirt,jacket=sggreen,cap=sggreen]
\end{tikzpicture}
\begin{tikzpicture}
\duck[body=sgskin,bill=sgbill,tshirt=sgshirt,jacket=sggreen,shorthair=sgblond]
\end{tikzpicture}
\begin{tikzpicture}
\duck[body=sgskin,bill=sgbill,tshirt=sgshirt,jacket=sggreen,parting=brown!70!black,glasses=brown!30!gray, book={\AA}, bookcolour=brown!50!black]
\end{tikzpicture}
\begin{tikzpicture}
\duck[body=brown!80!black,bill=brown!65!black,tshirt=sgshirt,jacket=sggreen,grumpy]
\fill[sgblond, rotate=-10] (0.45,2.0) ellipse (0.12 and 0.05);
\node[rotate=170] at (0.8,1.89) {\scalebox{0.35}{\Leo}};
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Live long and prosper},label=starducks}
%\usepackage{fontawesome}
\definecolor{unigold}{RGB}{203,157,52}%
\definecolor{uniblue}{RGB}{46,114,167}%
\definecolor{unired}{RGB}{177,49,34}%
\definecolor{skink}{RGB}{245,206,193}%
\definecolor{skins}{RGB}{255,222,151}%
\definecolor{skinu}{RGB}{146,113,96}%
\newcommand*{\insignia}{\node[rotate=15] at (wing) {\color{yellow!80!brown}\faLocationArrow};}
\begin{tikzpicture}
\duck[tshirt=black!60!gray, jacket=unigold, body=skink, shorthair=brown!80!black, bill=skink!60!gray]
\insignia
\end{tikzpicture}
\begin{tikzpicture}
\duck[tshirt=black!60!gray, jacket=uniblue, body=skins, mullet=black!60!brown, bill=skins!60!gray]
\fill[skins,rotate=175, xshift=-46, yshift=-74] (0.45,1.20)--(0.50,0.80)--(0.65,1.20);
\fill[black!60!brown, rounded corners=1, rotate=70] (1.85,0.13) rectangle (1.91,-0.05);
\fill[black!60!brown, rounded corners=1, rotate=90] (1.7,-0.75) rectangle (1.76,-0.97);
\insignia
\end{tikzpicture}
\begin{tikzpicture}
\duck[tshirt=black!60!gray, jacket=unired, body=skinu, longhair=black!60!brown, bill=skinu!70!black]
\insignia
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={French duck}}
\begin{tikzpicture}
\duck[body=yellow!60!red!30!white,tshirt=white!90!yellow,|stripes|={\stripes[color=blue!70!black,rotate=-87,width=0.07,distance=0.12]},beret=blue!30!black,baguette=brown]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Bee duck}}
\begin{tikzpicture}
\duck[|stripes|={\stripes[distance=0.4,width=0.2,rotate=0,initialx=0.15]},alien=black,laughing]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Jailbird duck}}
\begin{tikzpicture}
\duck[peakedcap=gray!40!black,tshirt=white,stripes={
\stripes[rotate=100,color=gray!40!black]},prison=gray]
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Super duck brothers}}
\newcommand{\superstripes}{\stripes[color=blue!80!black,width=3,height=1.0,rotate=5] \stripes[color=blue!80!black,width=0.1,rotate=0,distance=0.7,initialx=-1.1,height=2]}
\begin{tikzpicture}
\duck[tshirt=red!80!black,peakedcap=red!80!black,|stripes|={\superstripes}]
\fill[white] (0.8,2) circle (0.13);
\node[red!80!black,rotate=-25] at (0.8,2) {\scalebox{0.6}{\textsf{M}}};
\end{tikzpicture}
\begin{tikzpicture}
\duck[tshirt=green!70!black,peakedcap=green!70!black, |stripes|={\superstripes}]
\fill[white] (0.8,2) circle (0.13);
\node[green!70!black,rotate=-25] at (0.8,2) {\scalebox{0.6}{\textsf{L}}};
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Princess duck}}
\definecolor{pskin}{RGB}{255,200,184}%
\definecolor{phair}{RGB}{249,249,139}%
\begin{tikzpicture}
\duck[body=pskin!80!white,longhair=phair,tshirt=magenta!60!white,jacket=magenta!40!white,necklace=white!85!yellow]
\path (0.7,2) rectangle (1.4,2.55);
\fill[yellow!80!orange,rotate=-10,xshift=-11,yshift=5] \duckpathcrown;
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={ZZZoro duck}}
\begin{tikzpicture}
\duck[cape=black,hat=black,mask=black]
\node[rotate=-5] at (0.4,0.7) {\tiny\fontfamily{pzc}\selectfont \textbackslash ZZZ};
\fill[black,rotate=24] (0.1,0.21) rectangle (1.1,0.23) (1.2,0.22) ellipse (0.15 and 0.03) (1.08,0.22) ellipse (0.03 and 0.15);
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Farm animals}}
\definecolor{fskin}{RGB}{161,140,126}%
\definecolor{fbill}{RGB}{238,212,191}%
\definecolor{fhair}{RGB}{89,72,72}%
\begin{tikzpicture}
\duck[body=fskin,bill=fbill,shorthair=fhair,bunny,inear=fbill]
\node[fskin,rotate=45,scale=3] at (1.7,1.55) {\textsf{s}};
\fill[fhair,rotate=45] (2.4,0.13) ellipse (0.15 and 0.07);
\end{tikzpicture}
\begin{tikzpicture}
\duck[body=white!80!brown, bill=white!60!brown, bunny, longhair=white!60!brown]
\fill[white!60!brown] (tail) circle (0.2);
\end{tikzpicture}
\begin{tikzpicture}
\duck[body=red!20!white,bill=red!30!white,shorthair=red!30!white,bunny=red!30!white,inear=red!30!white]
\node[red!20!white,rotate=25,scale=3] at (1.7,1.51) {\textsf{s}};
\end{tikzpicture}
\begin{tikzpicture}
\duck[body=white!80!brown, bill=white!60!brown, sheep]
\end{tikzpicture}
\begin{tikzpicture}
\begin{scope}[yshift=-6]
\clip[rotate=-5] (0.68,2.38) ellipse (0.3 and 0.4);
\fill[brown,rotate=-5](0.28,2.26)ellipse (0.3 and 0.4);
\end{scope}
\duck[body=brown,mohican=brown!50!black,horsetail]
\begin{scope}[yshift=-5,xshift=1]
\clip[rotate=-5] (0.68,2.38) ellipse (0.3 and 0.4);
\fill[brown,rotate=-5](1.06,2.2) ellipse (0.3 and 0.4);
\end{scope}
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Arara duck$^{\thefootnote}$}}
\begin{tikzpicture}
\duck[parrot,bill=gray!80!black]
\shade[left color=cyan!90!blue,right color=blue!70!black] \duckpathwing;
\shade[bottom color=yellow!70!brown, top color=green!40!teal] \duckpathcrazyhair;
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{In honour of the cool TeX automation tool arara, \url{https://github.com/cereda/arara}}
\begin{tcblisting}{title={Duck Queen}}
\definecolor{qskin}{RGB}{225,219,206}%
\definecolor{qbill}{RGB}{170,123,154}%
\definecolor{qdress}{RGB}{184,209,206}%
\definecolor{qcrown}{RGB}{90,76,183}%
\begin{tikzpicture}
\duck[body=qskin,bill=qbill,jacket=qdress,tshirt=teal!30!qdress,shorthair=gray!60!white,necklace=gray!10!white]
\fill[gray!60!white,rotate=-30] (0.27,1.23) rectangle (0.37,0.65);
\fill[qcrown,scale=0.23,rotate=-20,yshift=82,xshift=38] \duckpathqueencrown;
\fill[qcrown,yshift=3] \duckpathkingcrown;
\end{tikzpicture}
\end{tcblisting}
\begin{tcblisting}{title={Duck, MD}}
\begin{tikzpicture}
\duck[parting=brown!70!black, squareglasses,
tshirt=teal!50!white, jacket=white,
buttons=gray!50!white, stethoscope]
\end{tikzpicture}
\end{tcblisting}
\addtocounter{footnote}{1}
\begin{tcblisting}{title={Duck scout with ``šátek'' and ``turbánek''$^{\thefootnote}$}}
\begin{tikzpicture}
\duck[head=yellow!60!brown!50!white,
tshirt=brown!80!gray!40!white,
cap=orange!50!yellow,
neckerchief=orange!50!yellow,
woggle=brown, bookcolour=brown!80!black,
book={\tiny\sffamily\scalebox{0.3}{\parbox{1.1cm}{\centering Scouting\\for\\Ducklings}}}]
\end{tikzpicture}
\end{tcblisting}
\footnotetext[\thefootnote]{This is a very special duck, because yo' won the scout duck in the contest \href{https://tex.meta.stackexchange.com/q/7493/36296}{When will @egreg reach 654321}. In Czech, the neckerchief is called ``šátek'' and the woggle ``turbánek'', which means ``little turban''.}
\clearpage
\printindex
\end{document}
|