summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-15 20:44:52 +0000
committerKarl Berry <karl@freefriends.org>2017-08-15 20:44:52 +0000
commitd02867cc9ea208a26444af0c12e3ca87083ee177 (patch)
tree640da2ec27184a7ea50d0f43eddba7e588676749
parentca2b0093893ee418e30136f6ea68a38b6df363a7 (diff)
tikzducks (15aug17)
git-svn-id: svn://tug.org/texlive/trunk@45048 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/tikzducks/README.md8
-rw-r--r--Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdfbin202973 -> 293686 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex408
-rw-r--r--Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty297
4 files changed, 501 insertions, 212 deletions
diff --git a/Master/texmf-dist/doc/latex/tikzducks/README.md b/Master/texmf-dist/doc/latex/tikzducks/README.md
index cb0ce8573bc..3d6371a71fd 100644
--- a/Master/texmf-dist/doc/latex/tikzducks/README.md
+++ b/Master/texmf-dist/doc/latex/tikzducks/README.md
@@ -1,11 +1,11 @@
-# tikzducks
+# Tikzducks
-This is a little LaTeX package for ducks to be used in *TikZ* pictures. The project is a continuation of https://tex.stackexchange.com/a/347458/36296
+This is a little LaTeX package for ducks to be used in TikZ pictures. The project is a continuation of https://tex.stackexchange.com/a/347458/36296
-This project is licensed under the LaTeX Project Public License (LPPL), see http://www.latex-project.org/lppl.txt
+This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
The project repository, including a bug tracker, can be found at https://github.com/samcarter8/tikzducks/issues
### A few examples:
-![tikz ducks](https://user-images.githubusercontent.com/8226363/28897479-36cb96ac-77e1-11e7-865f-2fcdd262ad03.png)
+![tikz ducks](https://user-images.githubusercontent.com/8226363/29253620-1c4ea2de-8082-11e7-800b-64df42ce6a66.png)
diff --git a/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf b/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf
index 98aa200f4a5..690141c3b00 100644
--- a/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf
+++ b/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex b/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex
index 6bf75c71c02..4eebe12d24a 100644
--- a/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex
+++ b/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex
@@ -1,107 +1,175 @@
-\documentclass{ltxdockit}
-\usepackage{btxdockit}
-
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Documentation for the tikzducks package
+% A package to bring rubber ducks into tikz
+% Maintained by samcarter
+%
+% Project repository and bug tracker:
+% https://github.com/samcarter8/tikzducks
+%
+% Released under the LaTeX Project Public License v1.3c or later
+% See http://www.latex-project.org/lppl.txt
+%
+% Version 0.3
+% Aug 15, 2017
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[parskip=half]{scrartcl}
+
+% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{tikzducks}
-\usepackage{xspace}
\usepackage[most]{tcolorbox}
-
-\KOMAoptions{numbers=noenddot}
-\addtokomafont{title}{\sffamily}
-\addtokomafont{paragraph}{\spotcolor}
-\addtokomafont{section}{\spotcolor}
-\addtokomafont{subsection}{\spotcolor}
-\addtokomafont{subsubsection}{\spotcolor}
-\addtokomafont{descriptionlabel}{\spotcolor}
-\setkomafont{caption}{\bfseries\sffamily\spotcolor}
-\setkomafont{captionlabel}{\bfseries\sffamily\spotcolor}
-
-\makeatletter
-\patchcmd{\paragraph}
- {3.25ex \@plus1ex \@minus.2ex}{-3.25ex\@plus -1ex \@minus -.2ex}{}{}
-\patchcmd{\paragraph}{-1em}{1.5ex \@plus .2ex}{}{}
-\makeatother
-
-\title{The tikzducks package}
-\subtitle{using ducks in tikz}
-\author{samcarter}
-
-\newcommand{\tikzducks}{\texttt{tikzducks}\xspace}
-\definecolor{duckblue}{rgb}{0.0,0.2,0.4}
-\lstloadlanguages{[LaTeX]Tex}
+\usepackage[paper=a4paper,margin=3cm]{geometry}
+\usepackage[colorlinks=true,breaklinks=true,urlcolor=duckblue,linkcolor=duckblue,citecolor=duckblue,filecolor=duckblue]{hyperref}
+\usepackage{xspace}
+\usepackage{scrlayer-scrpage}
+\usepackage{marvosym}
+
+% 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}
\tcbset{%
colframe=duckblue,
arc=2mm,
fonttitle=\bfseries,
sidebyside,
- listing options={language={[latex]TeX}, tabsize=2,breaklines}, righthand width=6.5cm
+ listing options={%
+ language={[latex]TeX},
+ tabsize=2,
+ breaklines,
+ basicstyle=\footnotesize\ttfamily,
+ commentstyle={\color{green!50!black}\slshape},
+ columns=fullflexible,
+ texcsstyle=*\color{duckblue}\bfseries,
+ keywordstyle=\color{red!60!black}\bfseries,
+ morekeywords={tikzpicture,scope,patterns},
+ moretexcs={duck,path,definecolor,duckpathjacket,duckpathbody,duckpathgrumpybill,duckpathbill,duckpathtshirt,duckpathshorthair,duckpathlonghair,duckpathcrazyhair,duckpathrecedinghair,scalebox,foreach,node,PassOptionsToPackage,usetikzlibrary,selectcolormodel,colorlet},
+ delim ={[s][\ttfamily\color{green!50!black}]{$}{$}}
+ },
+ righthand width=6.5cm
}
-\begin{document}
+\lstset{%
+ language={[latex]TeX},
+ tabsize=2,
+ breaklines,
+ basicstyle=\footnotesize\ttfamily,
+ commentstyle={\color{green!50!black}\slshape},
+ columns=fullflexible,
+ texcsstyle=*\color{duckblue}\bfseries,
+ keywordstyle=\color{red!60!black}\bfseries,
+ morekeywords={tikzpicture,scope,patterns},
+ moretexcs={duck,path,definecolor,duckpathjacket,duckpathbody,duckpathgrumpybill,duckpathbill,duckpathtshirt,duckpathshorthair,duckpathlonghair,duckpathcrazyhair,duckpathrecedinghair,scalebox,foreach,node,PassOptionsToPackage,usetikzlibrary,selectcolormodel,colorlet},
+ delim ={[s][\ttfamily\color{green!50!black}]{$}{$}}
+}
-\begin{center}
- {\LARGE \textbf{The \texttt{tikzducks} Package (version 0.2)}}
-
- \large using ducks in \texttt{tikz}
-
- samcarter (alias
- \begin{tikzpicture}[scale=0.3,baseline=5pt]
- \duck[body=yellow!50!brown!50!white,
+\setlength{\footheight}{27.21881pt}
+\cfoot{%
+ \begin{tikzpicture}[scale=0.3,baseline=-5pt]
+ \duck
+ \end{tikzpicture}%
+ \ifnum\thepage>1%
+ \foreach \x in{2,...,\thepage}{%
+ \ifodd\x
+ \begin{tikzpicture}[scale=0.15,baseline=-12pt]
+ \duck
+ \end{tikzpicture}
+ \else%
+ \begin{tikzpicture}[scale=0.15,baseline=-5pt]
+ \duck
+ \end{tikzpicture}
+ \fi%
+ }%
+ \fi%
+}
+\pagestyle{scrheadings}
+
+% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\title{The \texorpdfstring{\tikzducks}{tikzducks} package}
+\subtitle{using ducks in \TikZ}
+\author{%
+ \texorpdfstring{\texttt{samcarter} (alias
+ \begin{tikzpicture}[scale=0.3,baseline=5pt]
+ \duck[body=yellow!50!brown!50!white,
longhair=red!50!brown,
jacket=blue!50!black]
- \end{tikzpicture}%
- )
-
- \url{https://github.com/samcarter8/tikzducks}
+ \end{tikzpicture})\\[0.8em]
+ \url{https://github.com/samcarter8/tikzducks}\\
+ \url{https://www.ctan.org/pkg/tikzducks}
+ }{samcarter}}
+\date{Version 0.3 -- \today}
- \today
-\end{center}
+\begin{document}
+\maketitle
+\thispagestyle{scrheadings}
-\section{Introduction}
+\section{Introduc(k)tion}
\label{intro}
-The \tikzducks package is a latex package for ducks to be used in \texttt{tikz} pictures. This project is a continuation of an answer at TeX.Stackexchange (\url{https://tex.stackexchange.com/a/347458/36296}).
+The \tikzducks package is a latex package for 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 source code can be found on \url{https://github.com/samcarter8/tikzducks}, including a bug tracker, please make constructive use of it!
+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/samcarter8/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.
-\subsection{License}
+\subsection{Acknowledgements}
-Copyright \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 \url{http://www.latex-project.org/lppl.txt}
+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:
-The shown example ducks are purely fictional characters, any resemblance to real persons is purely coincidental and no copyright infringement is intended.
+First of all \href{https://tex.stackexchange.com/users/101651/carlatex}{CarLaTeX} for pointing out the overwhelming need of having a \tikzducks package and \href{https://tex.stackexchange.com/users/3094/paulo-cereda}{Paulo Cereda} for his contagious enthusiasm for ducks (\emph{Quack!}). Many other users contributed to this package (in random order): \href{https://tex.stackexchange.com/users/4427/egreg}{egreg} helped to implement the \lstinline|\tikzset{}| interface which makes it much easier to adjust the properties of the ducks to fit the user needs, \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/2388/ulrike-fischer}{Ulrike Fischer} gave valuable \TikZ advices 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.
-\subsection{Acknowledgements}
+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}\footnote{\url{inkscape.org}} and then exported to \TikZ paths using the \texttt{SVG to TikZ/PGF} extension\footnote{\url{github.com/kjellmf/svg2tikz}}
+
+\subsection{Dependencies}
+
+The \tikzducks package loads the packages \lstinline|xcolor| and \TikZ, both without any options. 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.
+
+\vskip0.5em
+\begin{lstlisting}[morekeywords={xcolor,svgnames}]
+ \PassOptionsToPackage{svgnames}{xcolor}
+\end{lstlisting}
+It also uses the \lstinline|\usetikzlibrary{patterns}|.
-I would like to thank a few fellow user from \href{https://tex.stackexchange.com/}{TeX.Stackexchange}: \href{https://tex.stackexchange.com/users/101651/carlatex}{CarLaTeX} for pointing out the overwhelming need of having a \tikzducks package,
-\href{https://tex.stackexchange.com/users/3094/paulo-cereda}{Paulo Cereda} for his contagious enthusiasm for ducks (\emph{Quack!}),
-\href{https://tex.stackexchange.com/users/4427/egreg}{egreg} for his help to implement the \texttt{\tikzset{}} interface which makes it much easier to adjust the properties of the ducks to fit the user needs and last but not least \href{https://tex.stackexchange.com/users/5763/martin-schr%c3%b6der}{Martin Schr\"oder} for his feedback to the code review
+\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}.
-\bigskip\noindent
-Without them, this package would not exist!
+The shown example ducks are purely fictional characters, any resemblance to real ducks or persons is purely coincidental and no copyright infringement is intended.
-\newpage
\section{Usage}
-The basic usage is fairly simple, to draw a duck
-\begin{tcblisting}{title={basic duck}}
+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 \texttt{pgf} keys. For almost all parts the colour can be changed using \verb|<shape name>=<colour name>|. For example to change the colour of the duck:
-\begin{tcblisting}{title={blue duck}}
+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 size of the ducks should be changed:
-\begin{tcblisting}{title={scaled duck}, righthand width=3cm}
+\clearpage
+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
\begin{scope}[xshift=90pt, scale=.3, yshift=150pt]
@@ -111,15 +179,15 @@ If the size of the ducks should be changed:
\duck
\end{scope}
\begin{scope}[xshift=80pt, scale=.3, yshift=50pt]
- \duck
+ \duck[body=gray!50!white,head=gray!50!white]
\end{scope}
\end{tikzpicture}
\end{tcblisting}
\subsection{Body parts}
-The various parts of the duck body can also be coloured independently, i.e. \texttt{body}, \texttt{head} and \texttt{bill}
-\begin{tcblisting}{title={harlequin duck}}
+The various parts of the duck body 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,
@@ -127,17 +195,21 @@ The various parts of the duck body can also be coloured independently, i.e. \tex
\end{tikzpicture}
\end{tcblisting}
-Furthermore using the keyword \texttt{grumpy} the shape of the bill can be changed:
-\begin{tcblisting}{title={grumpy duck}}
+Furthermore using the keyword \lstinline|grumpy| 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}
+\clearpage
\subsection{Hair styles}
Some duck also like to have nice hair cuts, several different hair styles are available:
-\begin{tcblisting}{title={hairy duck}}
+\begin{tcblisting}{title={Hairy duck}}
\begin{tikzpicture}
\duck[longhair]
\end{tikzpicture}
@@ -153,15 +225,15 @@ Some duck also like to have nice hair cuts, several different hair styles are av
\end{tikzpicture}
\end{tcblisting}
-And of course the colour of each hair styles can be adjusted:
-\begin{tcblisting}{title={coloured hair duck}}
+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 are also part of the package. The colour choice is a bit complicate for them - if a colour is explicitly specified \verb|eyebrow=<colour name>| this colour is of coursed used. But if no colour is given, it falls first 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}}
+Eyebrows are also part of the package. The colour choice is more tricky for them -- if a colour is explicitly specified \lstinline|eyebrow=<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}}
\begin{tikzpicture}
\duck[eyebrow]
\end{tikzpicture}
@@ -176,12 +248,10 @@ Eyebrows are also part of the package. The colour choice is a bit complicate for
\end{tikzpicture}
\end{tcblisting}
-\newpage
\subsection{Clothing}
-A respectable duck needs a suitable wardrobe. It can choose from a \texttt{tshirt}, a \texttt{jacket} and a \texttt{tie}.
-
-\begin{tcblisting}{title={dressed duck}}
+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}
@@ -200,49 +270,63 @@ A respectable duck needs a suitable wardrobe. It can choose from a \texttt{tshir
\end{tikzpicture}
\end{tcblisting}
-\subsection{Accessoire}
+\subsection{Accessoires}
+
+There is a multitude of things a duck might need.
-There is a multitude of things a duck might need. All these examples also work without specifying a colour, but giving both examples with and without explicit colour just makes this overview unnecessary long.
+The following examples all also work without specifying a colour, but giving an examples with and one without explicit colour just makes this overview unnecessary long, so only one is given.
-\begin{tcblisting}{title={swimming duck}}
+\begin{tcblisting}{title={Swimming duck}}
\begin{tikzpicture}
\duck[water=cyan!50!blue]
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={alien duck}}
+\begin{tcblisting}{title={Alien duck}}
\begin{tikzpicture}
\duck[alien=green!50!brown]
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={hat duck}}
+\begin{tcblisting}{title={Hat duck}}
\begin{tikzpicture}
\duck[hat=red!50!black]
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={unicorn duck}}
+\begin{tcblisting}{title={Basecap duck}}
+\begin{tikzpicture}
+ \duck[cap=red!80!black]
+\end{tikzpicture}
+\end{tcblisting}
+
+\begin{tcblisting}{title={Santa Clause}}
+\begin{tikzpicture}
+ \duck[santa=red!80!black]
+\end{tikzpicture}
+\end{tcblisting}
+
+\begin{tcblisting}{title={Unicorn duck}}
\begin{tikzpicture}
\duck[body=pink,
- unicorn=magenta!60!violet,
- longhair=magenta!60!violet]
+ unicorn=magenta!60!violet,
+ longhair=magenta!60!violet]
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={glasses duck}}
+\begin{tcblisting}{title={Glasses duck}}
\begin{tikzpicture}
\duck[glasses=red!50!black]
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={sunglasses duck}}
+\begin{tcblisting}{title={Sunglasses duck}}
\begin{tikzpicture}
- \duck[sunglasses]
+ \duck[sunglasses=blue]
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={book duck}}
+\begin{tcblisting}{title={Book duck}}
\begin{tikzpicture}
\duck[book=\scalebox{0.5}{\TeX}]
\end{tikzpicture}
@@ -251,31 +335,94 @@ There is a multitude of things a duck might need. All these examples also work w
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={magic duck}}
+\begin{tcblisting}{title={Magic duck}}
\begin{tikzpicture}
\duck[magichat,
magicwand]
\end{tikzpicture}
\begin{tikzpicture}
\duck[magichat=teal,
- magicstars=cyan,
+ magicstars=blue!30!cyan,
magicwand]
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={icecream duck}}
+\begin{tcblisting}{title={Cricket duck}}
+\begin{tikzpicture}
+ \duck[cricket=red!50!black]
+\end{tikzpicture}
+\end{tcblisting}
+
+\begin{tcblisting}{title={Icecream duck}}
\begin{tikzpicture}
\duck[icecream]
\end{tikzpicture}
\begin{tikzpicture}
- \duck[icecream=brown, flavoura=brown, flavourb=white, flavourc=red]
+ \duck[icecream=brown,
+ flavoura=brown,
+ flavourb=white,
+ flavourc=red]
\end{tikzpicture}
\end{tcblisting}
-\section{Examples}
+\clearpage
+\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}
-Some examples how the \tikzducks can be customised:
-\begin{tcblisting}{title={samcarter duck}, righthand width=3cm}
+\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:
+
+\vskip0.5em
+\begin{lstlisting}[breakindent=0pt]
+\duckpathbody, \duckpathgrumpybill, \duckpathbill, \duckpathtshirt, \duckpathjacket,
+\duckpathshorthair, \duckpathlonghair, \duckpathcrazyhair, \duckpathrecedinghair
+\end{lstlisting}
+
+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 accessoires, some particular spots of the duck are marked with \TikZ coordinates, namely the \lstinline|wing|, \lstinline|head| and \lstinline|bill|.
+
+{
+\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);
+ \node[xshift=15] at (wing) {wing};
+ \node[xshift=15] at (head) {head};
+ \node[xshift=18] at (bill) {bill};
+\end{tikzpicture}
+\end{tcblisting}
+}
+
+\section{Showcase}
+
+\begin{tcblisting}{title={\texttt{samcarter} duck}, righthand width=3cm}
\begin{tikzpicture}
\duck[body=yellow!50!brown!50!white,
longhair=red!50!brown,
@@ -283,28 +430,31 @@ Some examples how the \tikzducks can be customised:
\end{tikzpicture}
\end{tcblisting}
+\begin{tcblisting}{title={Paulo duck}, righthand width=3cm}
+\begin{tikzpicture}
+ \duck[cap,cricket]
+\end{tikzpicture}
+\end{tcblisting}
+
\begin{tcblisting}{title={Brazil duck}, righthand width=3cm}
\begin{tikzpicture}
-\definecolor{brazilgreen}{RGB}{0,155,58}
-\definecolor{brazilyellow}{RGB}{254,223,0}
-\definecolor{brazilblue}{RGB}{0,39,118}
+ \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]
- (0.500,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
- (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
- (1.818,1.419) .. controls (0.938, 0.946) and ( 1.240,1.378) ..
- (0.513,0.700) -- cycle;
+ \duckpathjacket;
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={duck in black}, righthand width=3cm}
+\begin{tcblisting}{title={Duck in black}, righthand width=3cm}
\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}, righthand width=3cm}
+\begin{tcblisting}{title={Prof.\ van Duck}, righthand width=3cm}
\begin{tikzpicture}
\duck[body=yellow!50!brown!40!white,
crazyhair=gray!50!white,
@@ -315,7 +465,7 @@ Some examples how the \tikzducks can be customised:
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{title={DEK}, righthand width=3cm}
+\begin{tcblisting}{title={Knuth duck}, righthand width=3cm}
\begin{tikzpicture}
\duck[body=yellow!50!red!20!white,
recedinghair=gray!50!white,
@@ -328,5 +478,49 @@ Some examples how the \tikzducks can be customised:
\end{tikzpicture}
\end{tcblisting}
-\end{document}
+\addtocounter{footnote}{1}
+\begin{tcblisting}{title={67P/Churyumov-Gerasimenko duck$^\thefootnote$}, righthand width=3cm}
+\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 [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);
+\fill[black, rotate=-20]
+ (0.26,1.7575) ellipse (0.0357 and 0.0714);
+\fill[white!70!gray, rotate=-20]
+ (-0.06,1.74) ellipse (0.0786 and 0.1143);
+\fill[black, rotate=-20]
+ (-0.03,1.73) ellipse (0.0286 and 0.0643);
+\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{arxiv.org/abs/1707.02945}}
+
+\begin{tcblisting}{title={With my username I had to...}, righthand width=3cm}
+\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,shorthair=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}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty b/Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty
index 5ddf01db5da..d549ac66320 100644
--- a/Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty
+++ b/Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty
@@ -10,8 +10,8 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.2
-% Aug 2, 2017
+% Version 0.3
+% Aug 15, 2017
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -20,28 +20,39 @@
\RequirePackage{xcolor}
\RequirePackage{tikz}
\usetikzlibrary{patterns} % for the wizard hat
+%\usetikzlibrary{intersections} % for named paths
-\newcommand*{\duck}[1][]{\tikzset{/duck/.cd,#1}\duck@draw}
+\newcommand*{\duck}[1][]{\tikzset{%
+ /duck/.cd,#1}\duck@draw%
+}
+% Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newif\ifduck@water
+% body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifduck@grumpy
+% hair styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifduck@shorthair
\newif\ifduck@longhair
\newif\ifduck@crazyhair
\newif\ifduck@recedinghair
\newif\ifduck@eyebrow
+% clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifduck@tshirt
\newif\ifduck@jacket
\newif\ifduck@tie
+% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifduck@glasses
\newif\ifduck@sunglasses
\newif\ifduck@alien
\newif\ifduck@hat
+\newif\ifduck@cap
+\newif\ifduck@santa
\newif\ifduck@unicorn
-\newif\ifduck@water
\newif\ifduck@icecream
\newif\ifduck@book
\newif\ifduck@magichat
\newif\ifduck@magicwand
+\newif\ifduck@cricket
\tikzset{
/duck/.cd,
@@ -106,6 +117,8 @@
sunglasses/.code = \duck@sunglassestrue \def\duck@sunglasses{#1},
alien/.code = \duck@alientrue \def\duck@alien{#1},
hat/.code = \duck@hattrue \def\duck@hat{#1},
+ cap/.code = \duck@captrue \def\duck@cap{#1},
+ santa/.code = \duck@santatrue \def\duck@santa{#1},
unicorn/.code = \duck@unicorntrue \def\duck@unicorn{#1},
icecream/.code = \duck@icecreamtrue \def\duck@cone{#1},
flavoura/.code = \def\duck@flavoura{#1},
@@ -116,11 +129,14 @@
magichat/.code = \duck@magichattrue \def\duck@magichat{#1},
magicstars/.code = \def\duck@magicstars{#1},
magicwand/.code = \duck@magicwandtrue,
+ cricket/.code = \duck@crickettrue \def\duck@cricket{#1},
% setting defaults %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
glasses/.default = black,
sunglasses/.default = black,
alien/.default = green,
hat/.default = brown,
+ cap/.default = blue,
+ santa/.default = red!80!black,
unicorn/.default = pink,
icecream/.default = brown!70!black,
flavoura = brown!50!black,
@@ -129,24 +145,34 @@
bookcolour = brown,
magichat/.default = violet,
magicstars = yellow!80!brown,
+ cricket/.default = brown,
}
\def\duck@draw{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% defining some coordinates
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\coordinate (wing) at (0.8,0.7);
+\coordinate (head) at (0.9,2);
+\coordinate (bill) at (0.5,1.3);
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
% Environment
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% water %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@water
- \path[draw=\duck@water, line width=5]
+ \draw[\duck@water, line width=5]
(1.00,0.40) ellipse (0.80 and 0.28);
- \path[draw=\duck@water, line width=3]
+ \draw[\duck@water, line width=3]
(1.00,0.40) ellipse (1.00 and 0.45);
- \path[draw=\duck@water, line width=2]
+ \draw[\duck@water, line width=2]
(1.00,0.40) ellipse (1.20 and 0.60);
- \path[draw=\duck@water, line width=1]
+ \draw[\duck@water, line width=1]
(1.00,0.40) ellipse (1.40 and 0.75);
\fi
%
@@ -157,40 +183,30 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path[fill=\duck@body]
- (0.513,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
- (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
- (1.818,1.419) .. controls (0.938, 0.946) and ( 1.240,1.379) ..
- (0.513,1.145) -- cycle;
+\fill[\duck@body] \duckpathbody;
%
% head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifdefined\duck@head\else\let\duck@head=\duck@body\fi
-\path[fill=\duck@head]
+\fill[\duck@head]
(0.90,1.50) ellipse (0.50 and 0.625);
%
% bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@grumpy
- \path[fill=\duck@bill]
- (0.406,1.472) .. controls (0.643,1.530) and (0.643,1.530) ..
- (0.800,1.300) .. controls (0.083,0.850) and (0.269,1.369) ..
- (0.406,1.472) -- cycle;
+ \fill[\duck@bill] \duckpathgrumpybill;
\else
- \path[fill=\duck@bill]
- (0.406,1.472) .. controls (0.643,1.530) and (0.541,1.303) ..
- (0.910,1.370) .. controls (0.083,0.850) and (0.269,1.369) ..
- (0.406,1.472) -- cycle;
+ \fill[\duck@bill] \duckpathbill;
\fi
%
% right eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path[fill=\duck@eye, rotate=-20]
+\fill[\duck@eye, rotate=-20]
(0.23,1.7675) ellipse (0.0893 and 0.125);
-\path[fill=\duck@pupil, rotate=-20]
+\fill[\duck@pupil, rotate=-20]
(0.26,1.7575) ellipse (0.0357 and 0.0714);
%
% left eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path[fill=\duck@eye, rotate=-20]
+\fill[\duck@eye, rotate=-20]
(-0.06,1.74) ellipse (0.0786 and 0.1143);
-\path[fill=\duck@pupil, rotate=-20]
+\fill[\duck@pupil, rotate=-20]
(-0.03,1.73) ellipse (0.0286 and 0.0643);
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -201,11 +217,7 @@
%
% tshirt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@tshirt
- \path[fill=\duck@tshirt]
- (0.490,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
- (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
- (1.818,1.419) .. controls (0.938, 0.976) and ( 1.240,1.279) ..
- (0.590,1.000) -- cycle;
+ \fill[\duck@tshirt] \duckpathtshirt;
\fi
%
% tie %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -215,11 +227,7 @@
%
% jacket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@jacket
- \path[fill=\duck@jacket]
- (0.500,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
- (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
- (1.818,1.419) .. controls (0.938, 0.946) and ( 1.240,1.378) ..
- (0.513,0.700) -- cycle;
+ \fill[\duck@jacket] \duckpathjacket;
\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -230,65 +238,26 @@
%
% short hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@shorthair
- \path[fill=\duck@hair]
- (1.3947,1.4175) .. controls (1.4546,1.4518) and (1.4699,1.6566) ..
- (1.4343,1.7992) .. controls (1.2528,2.5033) and (0.2339,2.2710) ..
- (0.4151,1.5907) .. controls (0.4345,1.8709) and (0.7421,2.0999) ..
- (0.9494,1.9054) .. controls (1.2241,1.6476) and (1.3316,1.3814) ..
- (1.3947,1.4175) -- cycle;
+ \fill[\duck@hair] \duckpathshorthair;
\fi
%
% long hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@longhair
- \path[fill=\duck@hair]
- (1.4508,0.7565) .. controls (1.5146,0.7888) and (1.5854,0.8216) ..
- (1.6247,0.8831) .. controls (1.5859,0.8847) and (1.4726,0.9457) ..
- (1.5587,0.9706) .. controls (1.6317,0.9685) and (1.7016,1.0046) ..
- (1.7314,1.0734) .. controls (1.7931,1.1660) and (1.6616,1.1176) ..
- (1.6277,1.1566) .. controls (1.6853,1.1741) and (1.7840,1.1829) ..
- (1.8123,1.2244) .. controls (1.7022,1.2488) and (1.5688,1.2663) ..
- (1.5063,1.3739) .. controls (1.4619,1.5143) and (1.4696,1.6649) ..
- (1.4340,1.8076) .. controls (1.2524,2.5117) and (0.2335,2.2794) ..
- (0.4148,1.5991) .. controls (0.4341,1.8793) and (0.6629,2.1130) ..
- (0.9011,1.9578) .. controls (1.2427,1.7382) and (1.3350,1.4214) ..
- (1.0905,1.0610) .. controls (1.0897,1.0109) and (1.1103,0.9166) ..
- (1.1805,0.8670) .. controls (1.2507,0.8174) and (1.3503,0.7853) ..
- (1.4508,0.7565) -- cycle;
+ \fill[\duck@hair] \duckpathlonghair;
\fi
%
% crazy hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@crazyhair
- \path[fill=\duck@hair]
- (0.1977,1.9023) .. controls (0.2633,2.0599) and (0.4819,2.0547) ..
- (0.4713,2.0879) .. controls (0.4647,2.2106) and (0.2516,2.2392) ..
- (0.2516,2.2392) .. controls (0.4352,2.2933) and (0.7427,1.9304) ..
- (0.5743,2.3885) .. controls (0.6017,2.3633) and (0.8307,2.1739) ..
- (0.8082,2.4245) .. controls (0.8271,2.2885) and (0.9195,2.0400) ..
- (0.9933,2.2673) .. controls (1.0814,2.6593) and (0.9688,2.0034) ..
- (1.3350,2.3615) .. controls (1.3657,2.3292) and (1.1627,2.1043) ..
- (1.3424,2.1387) .. controls (1.3102,1.8312) and (1.5049,2.2623) ..
- (1.5049,2.2623) .. controls (1.5049,2.2623) and (1.4675,2.0493) ..
- (1.4287,1.9560) .. controls (1.4287,1.9560) and (1.6830,1.9470) ..
- (1.7178,1.8823) .. controls (1.1926,1.8054) and (2.0160,1.7277) ..
- (1.4923,1.7275) .. controls (1.5366,1.6685) and (1.3013,1.6009) ..
- (1.6500,1.5946) .. controls (0.8836,1.5797) and (1.2764,1.9221) ..
- (0.8957,2.0442) .. controls (0.5516,2.0958) and (0.5228,1.8527) ..
- (0.4695,1.7963) .. controls (0.4825,1.9607) and (0.3601,1.9095) ..
- (0.1977,1.9023) -- cycle;%
+ \fill[\duck@hair] \duckpathcrazyhair;
\fi
%
% receding hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@recedinghair
- \path[fill=\duck@hair]
- (1.3385,1.4841) .. controls (1.4243,1.4529) and (1.4877,1.7127) ..
- (1.3964,1.8658) .. controls (1.1071,2.3511) and (0.5189,2.1609) ..
- (0.4381,1.6816) .. controls (0.4575,1.9618) and (0.9007,2.2059) ..
- (1.1308,2.0390) .. controls (1.4703,1.7469) and (1.0343,1.5949) ..
- (1.3385,1.4841) -- cycle;%
+ \fill[\duck@hair] \duckpathrecedinghair;
\fi
%
% eye brow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\duck@test{brown}
+\pgfkeys{/duck/eyebrow/.@def/.get=\duck@test}
\ifx\duck@eyebrow\duck@test
\ifdefined\duck@hair\let\duck@eyebrow=\duck@hair\fi
\fi%
@@ -307,25 +276,25 @@
%
% sunglasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@sunglasses
- \path[draw=\duck@sunglasses,line width=1]
+ \draw[\duck@sunglasses,line width=1]
(0.93,1.62) -- (1.30,1.50);
\draw[line width=1,color=\duck@sunglasses]
(0.73,1.67) arc (65:92:0.20);
- \path[fill=\duck@sunglasses, line width=1,rotate=-20]
+ \fill[\duck@sunglasses, line width=1,rotate=-20]
(0.23,1.7675) circle (0.125);
- \path[fill=\duck@sunglasses,line width=1,rotate=-20]
+ \fill[\duck@sunglasses,line width=1,rotate=-20]
(-0.06,1.74) circle (0.1143);
\fi
%
% glasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@glasses
- \path[draw=\duck@glasses,line width=1]
+ \draw[\duck@glasses,line width=1]
(0.93,1.62) -- (1.30,1.50);
\draw[line width=1,color=\duck@glasses]
(0.73,1.67) arc (65:92:0.20);
- \path[draw=\duck@glasses, line width=1,rotate=-20]
+ \draw[\duck@glasses, line width=1,rotate=-20]
(0.23,1.7675) circle (0.125);
- \path[draw=\duck@glasses,line width=1,rotate=-20]
+ \draw[\duck@glasses,line width=1,rotate=-20]
(-0.06,1.74) circle (0.1143);
\fi
%
@@ -333,47 +302,69 @@
\ifduck@alien
\draw[line width=2,color=\duck@alien] (1.00,1.83) -- (1.20,2.30);
\draw[line width=2,color=\duck@alien] (0.65,1.92) -- (0.60,2.35);
- \path[fill=\duck@alien] (1.20,2.30) circle (0.07);
- \path[fill=\duck@alien] (0.60,2.35) circle (0.07);
+ \fill[\duck@alien] (1.20,2.30) circle (0.07);
+ \fill[\duck@alien] (0.60,2.35) circle (0.07);
\fi
%
% hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@hat
- \path[fill=\duck@hat] (0.90,1.95) ellipse (0.46 and 0.0893);%
- \path[fill=\duck@hat] (0.90,2.20) ellipse (0.25 and 0.0714);%
- \path[fill=\duck@hat] (1.15,2.20) rectangle (0.65,1.95);%
+ \fill[\duck@hat] (0.90,1.95) ellipse (0.46 and 0.0893);
+ \fill[\duck@hat] (0.90,2.20) ellipse (0.25 and 0.0714);
+ \fill[\duck@hat] (1.15,2.20) rectangle (0.65,1.95);
+\fi
+%
+% cap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@cap
+ \fill[\duck@cap, start angle=0, end angle=150, radius=0.5] (1.4,1.75) arc;
+ \fill[\duck@cap,rotate=-15] (0.3,2.05) ellipse (0.6 and 0.15);
+\fi
+%
+% Santa %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@santa
+ \fill[\duck@santa]
+ (0.430,1.803) .. controls (0.590,2.174) and (0.837,2.065) ..
+ (1.118,1.954) .. controls (1.679,1.731) and (1.328,1.193) ..
+ (1.647,1.057) .. controls (1.638,1.255) and (1.745,2.104) ..
+ (1.168,2.270) .. controls (0.867,2.356) and (0.536,2.280) ..
+ (0.430,1.803) -- cycle;
+ \fill[white!80!brown]
+ (0.44,1.733) .. controls (0.211,2.299) and (1.082,2.188) ..
+ (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);
\fi
%
% unicorn %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@unicorn
- \path[draw=\duck@unicorn,fill=\duck@body,line width=1,rotate=25]
- (1.50,1.4375)--(1.60,1.8375)--(1.70,1.4375);%
+ \draw[\duck@unicorn,fill=\duck@body!100,line width=1,rotate=25]
+ (1.50,1.4375)--(1.60,1.8375)--(1.70,1.4375);
\fi
%
% icecream %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@icecream
- \path[draw=\duck@cone,fill=\duck@cone!50!white,
+ \draw[\duck@cone,fill=\duck@cone!50!white,
line width=0.5,rotate=-20]
(0.35,1.20)--(0.50,0.60)--(0.75,1.20);
- \path[draw=\duck@cone,fill=\duck@cone!50!white,
+ \draw[\duck@cone,fill=\duck@cone!50!white,
rotate=-20,line width=0.5]
(0.55,1.20) ellipse (0.20 and 0.09);
- \path[fill=\duck@flavoura] (0.82,1.03) circle (0.12);
- \path[fill=\duck@flavourb] (1.02,0.95) circle (0.12);
- \path[fill=\duck@flavourc] (0.95,1.06) circle (0.12);
+ \fill[\duck@flavoura] (0.82,1.03) circle (0.12);
+ \fill[\duck@flavourb] (1.02,0.95) circle (0.12);
+ \fill[\duck@flavourc] (0.95,1.06) circle (0.12);
\fi
%
% book %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@book
- \path[fill=\duck@bookcolour,rotate=-20]
+ \fill[\duck@bookcolour,rotate=-20]
(0.40,1.20) rectangle (0.80,0.60);
\node[rotate=-20, color=white] at (0.88,0.70) {\duck@book};%
\fi
%
% magic hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifduck@magichat
- \path[preaction={fill, \duck@magichat},rotate=-5,
- pattern=fivepointed stars, pattern color=\duck@magicstars]
+ \path[preaction={fill, \duck@magichat!100},rotate=-5,
+ pattern=fivepointed stars, pattern color=\duck@magicstars!100]
(0.36,1.95)--(0.86,2.95)--(1.20,1.85);
\fi
%
@@ -383,9 +374,113 @@
\draw[line width=2.5,color=white] (0.85,0.8167) -- (0.80,0.7333);
\fi
%
+% cricket bat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@cricket
+ \fill[\duck@cricket, rounded corners=2, rotate=-30] (0.4,1.2) rectangle (0.7,2.2);
+ \fill[\duck@cricket, rounded corners=1, rotate=-30] (0.5,0.8) rectangle (0.6,1.3);
+\fi
+%
}% from `\def\duck@draw{` at the very beginning
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Defining some of the more complicate paths for easy reuse
+%
+% naming scheme is \duckpath<name>
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\duckpathbody}{%
+ (0.513,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
+ (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
+ (1.818,1.419) .. controls (0.938, 0.946) and ( 1.240,1.379) ..
+ (0.513,1.145) -- cycle
+}
+
+\newcommand{\duckpathgrumpybill}{%
+ (0.406,1.472) .. controls (0.643,1.530) and (0.643,1.530) ..
+ (0.800,1.300) .. controls (0.083,0.850) and (0.269,1.369) ..
+ (0.406,1.472) -- cycle
+}
+
+\newcommand{\duckpathbill}{%
+ (0.406,1.472) .. controls (0.643,1.530) and (0.541,1.303) ..
+ (0.910,1.370) .. controls (0.083,0.850) and (0.269,1.369) ..
+ (0.406,1.472) -- cycle
+}
+
+% clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\duckpathtshirt}{%
+ (0.490,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
+ (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
+ (1.818,1.419) .. controls (0.938, 0.976) and ( 1.240,1.279) ..
+ (0.590,1.000) -- cycle
+}
+
+\newcommand{\duckpathjacket}{%
+ (0.500,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
+ (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
+ (1.818,1.419) .. controls (0.938, 0.946) and ( 1.240,1.378) ..
+ (0.513,0.700) -- cycle
+}
+
+% hair styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\duckpathshorthair}{%
+ (1.3947,1.4175) .. controls (1.4546,1.4518) and (1.4699,1.6566) ..
+ (1.4343,1.7992) .. controls (1.2528,2.5033) and (0.2339,2.2710) ..
+ (0.4151,1.5907) .. controls (0.4345,1.8709) and (0.7421,2.0999) ..
+ (0.9494,1.9054) .. controls (1.2241,1.6476) and (1.3316,1.3814) ..
+ (1.3947,1.4175) -- cycle
+}
+
+\newcommand{\duckpathlonghair}{%
+ (1.4508,0.7565) .. controls (1.5146,0.7888) and (1.5854,0.8216) ..
+ (1.6247,0.8831) .. controls (1.5859,0.8847) and (1.4726,0.9457) ..
+ (1.5587,0.9706) .. controls (1.6317,0.9685) and (1.7016,1.0046) ..
+ (1.7314,1.0734) .. controls (1.7931,1.1660) and (1.6616,1.1176) ..
+ (1.6277,1.1566) .. controls (1.6853,1.1741) and (1.7840,1.1829) ..
+ (1.8123,1.2244) .. controls (1.7022,1.2488) and (1.5688,1.2663) ..
+ (1.5063,1.3739) .. controls (1.4619,1.5143) and (1.4696,1.6649) ..
+ (1.4340,1.8076) .. controls (1.2524,2.5117) and (0.2335,2.2794) ..
+ (0.4148,1.5991) .. controls (0.4341,1.8793) and (0.6629,2.1130) ..
+ (0.9011,1.9578) .. controls (1.2427,1.7382) and (1.3350,1.4214) ..
+ (1.0905,1.0610) .. controls (1.0897,1.0109) and (1.1103,0.9166) ..
+ (1.1805,0.8670) .. controls (1.2507,0.8174) and (1.3503,0.7853) ..
+ (1.4508,0.7565) -- cycle
+}
+
+\newcommand{\duckpathcrazyhair}{%
+ (0.1977,1.9023) .. controls (0.2633,2.0599) and (0.4819,2.0547) ..
+ (0.4713,2.0879) .. controls (0.4647,2.2106) and (0.2516,2.2392) ..
+ (0.2516,2.2392) .. controls (0.4352,2.2933) and (0.7427,1.9304) ..
+ (0.5743,2.3885) .. controls (0.6017,2.3633) and (0.8307,2.1739) ..
+ (0.8082,2.4245) .. controls (0.8271,2.2885) and (0.9195,2.2400) ..
+ (0.9933,2.2673) .. controls (1.0814,2.6593) and (0.9688,2.0034) ..
+ (1.3350,2.3615) .. controls (1.3657,2.3292) and (1.1627,2.1043) ..
+ (1.3424,2.1387) .. controls (1.3102,1.8312) and (1.5049,2.2623) ..
+ (1.5049,2.2623) .. controls (1.5049,2.2623) and (1.4675,2.0493) ..
+ (1.4287,1.9560) .. controls (1.4287,1.9560) and (1.6830,1.9470) ..
+ (1.7178,1.8823) .. controls (1.1926,1.8054) and (2.0160,1.7277) ..
+ (1.4923,1.7275) .. controls (1.5366,1.6685) and (1.3013,1.6009) ..
+ (1.6500,1.5946) .. controls (0.8836,1.5797) and (1.2764,1.9221) ..
+ (0.8957,2.0442) .. controls (0.5516,2.0958) and (0.5228,1.8527) ..
+ (0.4695,1.7963) .. controls (0.4825,1.9607) and (0.3601,1.9095) ..
+ (0.1977,1.9023) -- cycle
+}
+
+\newcommand{\duckpathrecedinghair}{%
+ (1.3385,1.4841) .. controls (1.4243,1.4529) and (1.4877,1.7127) ..
+ (1.3964,1.8658) .. controls (1.1071,2.3511) and (0.5189,2.1609) ..
+ (0.4381,1.6816) .. controls (0.4575,1.9618) and (0.9007,2.2059) ..
+ (1.1308,2.0390) .. controls (1.4703,1.7469) and (1.0343,1.5949) ..
+ (1.3385,1.4841) -- cycle;
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 32237378723223
% 23737232212232237822
% 3282232232232232232<3723