summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv')
-rw-r--r--graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv56
1 files changed, 56 insertions, 0 deletions
diff --git a/graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv b/graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv
new file mode 100644
index 0000000000..d9b24b5b05
--- /dev/null
+++ b/graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv
@@ -0,0 +1,56 @@
+% !TeX root = ./testing/context_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
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Code for this ConTeXt User Module kindly provided by @JairoAdelRio https://github.com/samcarter/tikzducks/pull/25
+\writestatus{loading}{ConTeXt User Module / TikZDucks 2020/06/30 version v1.5 Draw rubber ducks in TikZ}
+\setupcolors[state=start]
+\usemodule[tikz]
+\enabledirectives[colors.pgf]
+\usetikzlibrary[patterns] % for the wizard hat
+\usetikzlibrary[calc]
+\definecolor[duck@overleafcol][x=48AC3C]
+%\unprotect does not work here
+\catcode`\@=11
+%So \scalebox and co. works in MkIV too
+\define[2]\scalebox{\scale[factor={\ctxlua{context(3*#1)}}]{#2}}
+\let\tiny\tfxx
+\let\pdfrandomseed\randomseed
+%Duck
+\def\duck{\dosingleempty\doduck}
+\def\doduck[#1]{%
+ \iffirstargument
+ \startscope%
+ \tikzset{/duck/.cd,#1}%
+ \duck@draw%
+ \stopscope%
+ \else
+ \startscope%
+ \tikzset{/duck/.cd}%
+ \duck@draw%
+ \stopscope%
+ \fi%
+}
+%Stripes
+\def\stripes{\dosingleempty\dostripes}
+\def\dostripes[#1]{
+ \iffirstargument
+ \tikzset{/stripes/.cd,#1}\stripes@draw
+ \else
+ \tikzset{/stripes/.cd}\stripes@draw
+ \fi
+}
+\input tikzducks-generic.tex
+\catcode`\@=12
+\endinput