summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings.sty
blob: a3c302e1ece9a152c14f6eab01ee08ce845695fd (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
62
% !TeX root = ./examples/tikzlings.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% The tikzlings
% A collection of packages to draw animals in tikz
% Maintained by samcarter
%
% Project repository and bug tracker:
% https://github.com/samcarter/tikzlings
%
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
% Version 0.1
% Nov 9, 2018   
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{tikzlings}
 [2018/11/09 v0.1 Collection of packages to draw animals and other beings in TikZ]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% load sub-packages
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{tikz}
\RequirePackage{tikzlings-bears}
\RequirePackage{tikzlings-penguins}
\RequirePackage{tikzlings-marmots}
\RequirePackage{tikzlings-owls}
\RequirePackage{tikzlings-koalas}
\RequirePackage{tikzlings-coatis}
\RequirePackage{tikzlings-snowmans}
\RequirePackage{tikzlings-mice}
\RequirePackage{tikzlings-moles}
\RequirePackage{tikzlings-sloths}
\RequirePackage{tikzlings-addons}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Drawing a random tikzling
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{ifluatex}
\RequirePackage{ifxetex}

\ifluatex
  \let\pdfrandomseed\randomseed
\fi

\ifxetex
  \pgfmathsetseed{\time}
\else
  \pgfmathsetseed{\number\pdfrandomseed}
\fi

\pgfmathdeclarerandomlist{tikzlings}{{\bear}{\penguin}{\marmot}{\owl}{\koala}{\coati}{\snowman}{\mouse}{\moles}{\sloth}}

\newcommand{\tikzling}[1][]{%
	\pgfmathrandomitem{\tikzling@random}{tikzlings}%
	\tikzling@random[#1]
}