-
Notifications
You must be signed in to change notification settings - Fork 13
/
tikzducks-plain.tex
63 lines (56 loc) · 1.39 KB
/
tikzducks-plain.tex
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
% !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 https://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input miniltx
\input graphicx.sty
\input tikz.tex
\usetikzlibrary{calc}%
\usetikzlibrary{patterns}%
\usetikzlibrary{decorations.shapes}% for sombrero
\usetikzlibrary{decorations.pathmorphing}
\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