summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tikzducks/tikzducks-plain.tex
blob: 9b01fb4d6264ac7f5718875159972c1a3617de8e (plain)
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
% !TeX root = ./testing/plain_duck.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% 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
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\input miniltx
\input graphicx.sty
\input tikz.tex
\usetikzlibrary{calc}%
\usetikzlibrary{patterns}%

\catcode`\@=11

\let\pdfrandomseed\randomseed
\font\tiny=cmr5

% Duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\duck{\futurelet\next\doduck}
\def\doduck{%
  \ifx[\next %]
    \expandafter\doduckopt
  \else
    \scope%%
        \tikzset{/duck/.cd}%
        \duck@draw%
    \endscope%%
  \fi
}
\def\doduckopt[#1]{%
  \scope%%
      \tikzset{/duck/.cd,#1}%
      \duck@draw%
  \endscope%%
}

% Stripes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\stripes{\futurelet\next\dostripes}
\def\dostripes{
  \ifx[\next %]
    \expandafter\dostripesopt
  \else
    \tikzset{/stripes/.cd}\stripes@draw
	\fi
}
\def\dostripesopt[#1]{%
  \tikzset{/stripes/.cd,#1}\stripes@draw
}

\input tikzducks-generic.tex

\catcode`\@=12