summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzpeople/tikzpeople.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzpeople/tikzpeople.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzpeople/tikzpeople.sty447
1 files changed, 348 insertions, 99 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzpeople/tikzpeople.sty b/Master/texmf-dist/tex/latex/tikzpeople/tikzpeople.sty
index 15bb6fff098..2be974ed749 100644
--- a/Master/texmf-dist/tex/latex/tikzpeople/tikzpeople.sty
+++ b/Master/texmf-dist/tex/latex/tikzpeople/tikzpeople.sty
@@ -15,21 +15,23 @@
%% The Current Maintainer of this work is Nils Fleischhacker.
%%
%% This work consists of the files tikzpeople.tex, tikzpeople.sty,
-%% tikzpeople.shape.alice.sty, tikzpeople.shape.bob.sty,
+%% tikzpeople.shape.alice.sty, tikzpeople.shape.bob.sty,
%% tikzpeople.shape.bride.sty, tikzpeople.shape.builder.sty,
%% tikzpeople.shape.businessman.sty, tikzpeople.shape.charlie.sty,
%% tikzpeople.shape.chef.sty, tikzpeople.shape.conductor.sty,
%% tikzpeople.shape.cowboy.sty, tikzpeople.shape.criminal.sty,
-%% tikzpeople.shape.dave.sty, tikzpeople.shape.graduate.sty,
-%% tikzpeople.shape.groom.sty, tikzpeople.shape.guard.sty,
+%% tikzpeople.shape.dave.sty, tikzpeople.shape.devil.sty,
+%% tikzpeople.shape.duck.sty, tikzpeople.shape.graduate.sty,
+%% tikzpeople.shape.groom.sty, tikzpeople.shape.guard.sty,
%% tikzpeople.shape.jester.sty, tikzpeople.shape.judge.sty,
-%% tikzpeople.shape.mexican.sty, tikzpeople.shape.nun.sty,
-%% tikzpeople.shape.nurse.sty, tikzpeople.shape.physician.sty,
-%% tikzpeople.shape.pilot.sty, tikzpeople.shape.police.sty,
-%% tikzpeople.shape.priest.sty, tikzpeople.shape.sailor.sty,
-%% tikzpeople.shape.santa.sty and tikzpeople.shape.surgeon.sty
+%% tikzpeople.shape.maninblack.sty, tikzpeople.shape.mexican.sty,
+%% tikzpeople.shape.nun.sty, tikzpeople.shape.nurse.sty,
+%% tikzpeople.shape.physician.sty, tikzpeople.shape.pilot.sty,
+%% tikzpeople.shape.police.sty, tikzpeople.shape.priest.sty,
+%% tikzpeople.shape.sailor.sty, tikzpeople.shape.santa.sty,
+%% tikzpeople.shape.surgeon.sty
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tikzpeople}[2016/11/03 v0.2 People shaped nodes for Tikz]
+\ProvidesPackage{tikzpeople}[2016/11/28 v0.3 People shaped nodes for Tikz]
\RequirePackage{tikz}
\RequirePackage{calc}
@@ -47,9 +49,13 @@
\DeclareOption{nobeards}{
\@tikzpeople@nobeardstrue
}
+\newif\if@tikzpeople@saturated\@tikzpeople@saturatedfalse
+\DeclareOption{saturated}{
+ \@tikzpeople@saturatedtrue
+}
\ProcessOptions\relax
\usepgflibrary{intersections}
-\usetikzlibrary{decorations.markings,decorations.pathmorphing,calc,positioning}
+\usetikzlibrary{decorations.markings,decorations.pathmorphing,calc,positioning,arrows.meta}
\newif\if@tikzpeople@mirrored
\pgfkeys{/tikz/mirrored/.is if=@tikzpeople@mirrored}
@@ -61,16 +67,37 @@
\pgfkeys{/tikz/good/.is if=@tikzpeople@good}
\newif\if@tikzpeople@monitor
\pgfkeys{/tikz/monitor/.is if=@tikzpeople@monitor}
+\newif\if@tikzpeople@shield
+\pgfkeys{/tikz/shield/.is if=@tikzpeople@shield}
+\newif\if@tikzpeople@sword
+\pgfkeys{/tikz/sword/.is if=@tikzpeople@sword}
+\pgfkeys{/tikz/saturated/.is if=@tikzpeople@saturated}
\newcommand{\tikzpeople@addcolorkey}[1]{
\expandafter\def\csname tikzpeople@#1\endcsname{#1}
\pgfkeys{/tikz/#1/.code=\expandafter\def\csname tikzpeople@#1\endcsname{##1}}
}
+\newcommand{\tikzpeople@addtextkey}[2]{
+ \expandafter\def\csname tikzpeople@#1\endcsname{#2}
+ \pgfkeys{/tikz/#1/.code=\expandafter\def\csname tikzpeople@#1\endcsname{##1}}
+}
+
+\tikzpeople@addcolorkey{horns}
+\tikzpeople@addcolorkey{halo}
\tikzpeople@addcolorkey{shirt}
+\tikzpeople@addcolorkey{undershirt}
\tikzpeople@addcolorkey{skin}
\tikzpeople@addcolorkey{hair}
+\tikzpeople@addcolorkey{hat}
\tikzpeople@addcolorkey{pc}
+\tikzpeople@addcolorkey{shieldmid}
+\tikzpeople@addcolorkey{shieldedge}
+\tikzpeople@addcolorkey{shieldrivets}
+\tikzpeople@addcolorkey{swordblade}
+\tikzpeople@addcolorkey{swordgrip}
+\tikzpeople@addcolorkey{swordguard}
+\tikzpeople@addcolorkey{swordpommel}
\pgfdeclareshape{person}{
\saveddimen{\scalingfactor}{
@@ -188,12 +215,18 @@
\tikzpeople@person@paintgoatee
\tikzpeople@person@paintlefthorn
\tikzpeople@person@painthalo
+ \if@tikzpeople@shield
+ \tikzpeople@person@paintshield
+ \fi
+ \if@tikzpeople@sword
+ \tikzpeople@person@paintsword
+ \fi
\if@tikzpeople@monitor
\tikzpeople@person@paintmonitor
\fi
\else
- \tikzpeople@person@definecolors
- \tikzpeople@person@definestyles
+ \tikzpeople@definecommoncolors
+ \tikzpeople@definecommonstyles
\tikzpeople@person@paintshirt
\tikzpeople@person@paintrighthorn
\tikzpeople@person@painthead
@@ -201,6 +234,12 @@
\tikzpeople@person@paintlefthorn
\tikzpeople@person@paintgoatee
\tikzpeople@person@painthalo
+ \if@tikzpeople@shield
+ \tikzpeople@person@paintshield
+ \fi
+ \if@tikzpeople@sword
+ \tikzpeople@person@paintsword
+ \fi
\if@tikzpeople@monitor
\tikzpeople@person@paintmonitor
\fi
@@ -208,35 +247,89 @@
}
}
-\newcommand{\tikzpeople@person@definestyles}{
- \tikzstyle{shirt}=[color=\tikzpeople@shirt!80,top color=\tikzpeople@shirt!20, bottom color=\tikzpeople@shirt!80,shading angle=45]
- \tikzstyle{skin}=[color=\tikzpeople@skin!80,top color=\tikzpeople@skin!40, bottom color=\tikzpeople@skin!80,shading angle=45]
- \tikzstyle{hair}=[color=\tikzpeople@hair!80,top color=\tikzpeople@hair!40, bottom color=\tikzpeople@hair!80,shading angle=45];
- \tikzstyle{goatee}=[color=\tikzpeople@hair!80,top color=\tikzpeople@hair!40, bottom color=\tikzpeople@hair!80,shading angle=45];
- \tikzstyle{horns}=[color=red!80,top color=red!40, bottom color=red!80,shading angle=45];
- \tikzstyle{halo}=[color=yellow!80,top color=yellow!40, bottom color=yellow!80,shading angle=45];
+\newcommand{\tikzpeople@definecommonstyles}{
+ \if@tikzpeople@saturated
+ \tikzset{
+ shirt/.style= {color=\tikzpeople@shirt,top color=\tikzpeople@shirt!70, bottom color=\tikzpeople@shirt,shading angle=45},
+ hat/.style= {color=\tikzpeople@hat,top color=\tikzpeople@hat!70, bottom color=\tikzpeople@hat,shading angle=45},
+ undershirt/.style= {color=\tikzpeople@undershirt,top color=\tikzpeople@undershirt!70, bottom color=\tikzpeople@undershirt,shading angle=45},
+ skin/.style= {color=\tikzpeople@skin,top color=\tikzpeople@skin!70, bottom color=\tikzpeople@skin,shading angle=45},
+ hair/.style= {color=\tikzpeople@hair,top color=\tikzpeople@hair!70, bottom color=\tikzpeople@hair,shading angle=45},
+ goatee/.style= {color=\tikzpeople@hair,top color=\tikzpeople@hair!70, bottom color=\tikzpeople@hair,shading angle=45},
+ horns/.style= {color=\tikzpeople@horns,top color=\tikzpeople@horns!70, bottom color=\tikzpeople@horns,shading angle=45},
+ halo/.style= {color=\tikzpeople@halo,top color=\tikzpeople@halo!70, bottom color=\tikzpeople@halo,shading angle=45},
+ shieldmid/.style= {color=\tikzpeople@shieldmid,top color=\tikzpeople@shieldmid!70, bottom color=\tikzpeople@shieldmid,shading angle=45,line join=bevel},
+ shieldedge/.style= {color=\tikzpeople@shieldedge,top color=\tikzpeople@shieldedge!70, bottom color=\tikzpeople@shieldedge,shading angle=45,line join=bevel},
+ shieldrivets/.style={color=\tikzpeople@shieldrivets,top color=\tikzpeople@shieldrivets!70, bottom color=\tikzpeople@shieldrivets,shading angle=45},
+ swordblade/.style= {color=\tikzpeople@swordblade,top color=\tikzpeople@swordblade!70, bottom color=\tikzpeople@swordblade,shading angle=45},
+ swordguard/.style= {color=\tikzpeople@swordguard,top color=\tikzpeople@swordguard!70, bottom color=\tikzpeople@swordguard,shading angle=45},
+ swordpommel/.style= {color=\tikzpeople@swordpommel,top color=\tikzpeople@swordpommel!70, bottom color=\tikzpeople@swordpommel,shading angle=45},
+ swordgrip/.style= {color=\tikzpeople@swordgrip,top color=\tikzpeople@swordgrip!70, bottom color=\tikzpeople@swordgrip,shading angle=45},
+ monitor1/.style= {color=\tikzpeople@pc, top color=\tikzpeople@pc, bottom color=\tikzpeople@pc!70,shading angle=90},
+ monitor2/.style= {color=\tikzpeople@pc, top color=\tikzpeople@pc, bottom color=\tikzpeople@pc!90,shading angle=90},
+ monitor3/.style= {color=\tikzpeople@pc, top color=\tikzpeople@pc!80, bottom color=\tikzpeople@pc!70,shading angle=90},
+ monitor4/.style= {color=\tikzpeople@pc, top color=\tikzpeople@pc!60, bottom color=\tikzpeople@pc!50,shading angle=90},
+ }
+ \else
+ \tikzset{
+ shirt/.style= {color=\tikzpeople@shirt!80,top color=\tikzpeople@shirt!40, bottom color=\tikzpeople@shirt!80,shading angle=45},
+ hat/.style= {color=\tikzpeople@hat!80,top color=\tikzpeople@hat!40, bottom color=\tikzpeople@hat!80,shading angle=45},
+ undershirt/.style= {color=\tikzpeople@undershirt!80,top color=\tikzpeople@undershirt!40, bottom color=\tikzpeople@undershirt!80,shading angle=45},
+ skin/.style= {color=\tikzpeople@skin!80,top color=\tikzpeople@skin!40, bottom color=\tikzpeople@skin!80,shading angle=45},
+ hair/.style= {color=\tikzpeople@hair!80,top color=\tikzpeople@hair!40, bottom color=\tikzpeople@hair!80,shading angle=45},
+ goatee/.style= {color=\tikzpeople@hair!80,top color=\tikzpeople@hair!40, bottom color=\tikzpeople@hair!80,shading angle=45},
+ horns/.style= {color=\tikzpeople@horns!80,top color=\tikzpeople@horns!40, bottom color=\tikzpeople@horns!80,shading angle=45},
+ halo/.style= {color=\tikzpeople@halo!80,top color=\tikzpeople@halo!40, bottom color=\tikzpeople@halo!80,shading angle=45},
+ shieldmid/.style= {color=\tikzpeople@shieldmid!80,top color=\tikzpeople@shieldmid!40, bottom color=\tikzpeople@shieldmid!80,shading angle=45,line join=bevel},
+ shieldedge/.style= {color=\tikzpeople@shieldedge!80,top color=\tikzpeople@shieldedge!40, bottom color=\tikzpeople@shieldedge!80,shading angle=45,line join=bevel},
+ shieldrivets/.style={color=\tikzpeople@shieldrivets!80,top color=\tikzpeople@shieldrivets!40, bottom color=\tikzpeople@shieldrivets!80,shading angle=45},
+ swordblade/.style= {color=\tikzpeople@swordblade!80,top color=\tikzpeople@swordblade!40, bottom color=\tikzpeople@swordblade!80,shading angle=45},
+ swordguard/.style= {color=\tikzpeople@swordguard!80,top color=\tikzpeople@swordguard!40, bottom color=\tikzpeople@swordguard!80,shading angle=45},
+ swordpommel/.style= {color=\tikzpeople@swordpommel!80,top color=\tikzpeople@swordpommel!40, bottom color=\tikzpeople@swordpommel!80,shading angle=45},
+ swordgrip/.style= {color=\tikzpeople@swordgrip!80,top color=\tikzpeople@swordgrip!40, bottom color=\tikzpeople@swordgrip!80,shading angle=45},
+ monitor1/.style= {color=\tikzpeople@pc!80, top color=\tikzpeople@pc!80, bottom color=\tikzpeople@pc!40,shading angle=90},
+ monitor2/.style= {color=\tikzpeople@pc!80, top color=\tikzpeople@pc!80, bottom color=\tikzpeople@pc!70,shading angle=90},
+ monitor3/.style= {color=\tikzpeople@pc!80, top color=\tikzpeople@pc!60, bottom color=\tikzpeople@pc!50,shading angle=90},
+ monitor4/.style= {color=\tikzpeople@pc!80, top color=\tikzpeople@pc!40, bottom color=\tikzpeople@pc!30,shading angle=90},
+ }
+ \fi
}
\newcommand{\tikzpeople@person@draftstyles}{
- \tikzstyle{shirt}=[color=black,fill=white];
- \tikzstyle{skin}=[color=black,fill=white];
- \tikzstyle{hair}=[color=black,fill=white];
- \tikzstyle{goatee}=[color=black,fill=white];
- \tikzstyle{horns}=[color=black,fill=white];
- \tikzstyle{halo}=[color=black,fill=white];
+ \tikzset{
+ shirt/.style= {color=black,fill=white},
+ skin/.style= {color=black,fill=white},
+ goatee/.style= {color=black,fill=white},
+ horns/.style= {color=black,fill=white},
+ halo/.style= {color=black,fill=white},
+ shieldedge/.style= {color=black,fill=white},
+ swordblade/.style= {color=black,fill=white},
+ swordguard/.style= {color=black,fill=white},
+ swordpommel/.style= {color=black,fill=white},
+ swordgrip/.style= {color=black,fill=white},
+ }
}
-\newcommand{\tikzpeople@person@definecolors}{
+\newcommand{\tikzpeople@definecommoncolors}{
+ \definecolor{horns}{named}{red}
+ \definecolor{halo}{named}{yellow}
\definecolor{skin}{rgb}{0.84,0.58,0.24}
\definecolor{shirt}{rgb}{0.34,0.56,0.22}
\definecolor{hair}{rgb}{0.45,0.24,0}
- \definecolor{pc}{rgb}{0,0,0}
+ \definecolor{pc}{rgb}{.2,.2,.2}
+ \definecolor{shieldedge}{RGB}{83,84,85}
+ \definecolor{shieldrivets}{RGB}{25,25,26}
+ \definecolor{shieldmid}{RGB}{197,22,9}
+ \definecolor{swordblade}{RGB}{83,84,85}
+ \definecolor{swordguard}{RGB}{147,131,104}
+ \definecolor{swordpommel}{RGB}{147,131,104}
+ \definecolor{swordgrip}{RGB}{81,57,48}
}
\newcommand{\tikzpeople@person@paintshirt}{
\draw[shirt]
(-4.0pt,-8.0pt) .. controls (-2pt,-10pt) and ( 3pt,-9pt) ..
- ( 5.0pt,-7.0pt) .. controls ( 5pt, 0pt) and (-5pt, 0pt) ..
+ ( 5.0pt,-7.0pt) .. controls ( 5pt, 0pt) and (-5pt, 0pt) ..
(-4.0pt,-8.0pt) -- cycle;
}
@@ -260,8 +353,8 @@
\else
\draw[hair]
(15:3pt) arc (15:210:3pt) -- ++(0.3pt,0pt) -- ++(0.1pt,0.5pt)
- .. controls +(310:.2pt) .. ++(0.2pt,-0.6pt) -- ++(0.4pt,0pt)
- .. controls +(90:1pt) .. (-1.7pt,0.4pt) to[out=350,in=210]
+ .. controls +(310:.2pt) .. ++(0.2pt,-0.6pt) -- ++(0.4pt,0pt)
+ .. controls +(90:1pt) .. (-1.7pt,0.4pt) to[out=350,in=210]
(15:3pt) -- cycle;
\fi
}
@@ -275,8 +368,8 @@
\newcommand{\tikzpeople@person@paintfemalehairstylethree}{
\draw[hair]
- (15:3pt) arc (15:180:3.3pt) .. controls +(269:3pt) and +(190:1.5pt)
- .. (250:3.4pt) .. controls +(118:1.2pt) .. (-1.6pt,0pt) to [out=350,in=210]
+ (15:3pt) arc (15:180:3.3pt) .. controls +(269:3pt) and +(190:1.5pt)
+ .. (250:3.4pt) .. controls +(118:1.2pt) .. (-1.6pt,0pt) to [out=350,in=210]
(15:3pt)-- cycle;
}
@@ -286,11 +379,11 @@
\if@tikzpeople@evil
{
\pgftransformrotate{5}
- \draw[goatee] (285:1.75pt)
- -- ++(0:1pt) arc[start angle=90, end angle=0, x radius=.55pt, y radius=.5pt]
- -- ++(270:.5pt) arc[start angle=0, end angle=-90, x radius=.55pt, y radius=.5pt]
- -- ++(180:1pt) arc[start angle=-90, end angle=-180, x radius=.55pt, y radius=.5pt]
- -- ++(90:.5pt) arc[start angle=180, end angle=90, x radius=.55pt, y radius=.5pt]
+ \draw[goatee] (285:1.75pt)
+ -- ++(0:1pt) arc[start angle=90, end angle=0, x radius=.55pt, y radius=.5pt]
+ -- ++(270:.5pt) arc[start angle=0, end angle=-90, x radius=.55pt, y radius=.5pt]
+ -- ++(180:1pt) arc[start angle=-90, end angle=-180, x radius=.55pt, y radius=.5pt]
+ -- ++(90:.5pt) arc[start angle=180, end angle=90, x radius=.55pt, y radius=.5pt]
(285:1.75pt) ++(.1875pt,-.3pt)
arc[start angle=90,end angle=270,x radius=.45pt, y radius=.3pt]
-- ++(0:.6pt) arc[start angle=-90,end angle=90,x radius=.45pt, y radius=.3pt]
@@ -302,59 +395,198 @@
\newcommand{\tikzpeople@person@paintlefthorn}{
\if@tikzpeople@evil
- \draw[horns] (140:2.5pt) arc (-90:-170:2pt) arc (0:180:0.04pt) arc (190:240:4pt) to[out=70,in=290] (140:2.5pt) -- cycle;
+ \draw[horns]
+ (140:2.5pt) arc (-90:-170:2pt) arc (0:180:0.04pt) arc (190:240:4pt)
+ to[out=70,in=290] (140:2.5pt) -- cycle;
\fi
}
\newcommand{\tikzpeople@person@paintrighthorn}{
\if@tikzpeople@evil
- \draw[horns] (40:2.5pt) arc (-90:-10:2pt) arc (180:0:0.04pt) arc (-10:-60:4pt) to[out=110,in=250] (40:2.5pt) -- cycle;
+ \draw[horns]
+ (40:2.5pt) arc (-90:-10:2pt) arc (180:0:0.04pt) arc (-10:-60:4pt)
+ to[out=110,in=250] (40:2.5pt) -- cycle;
\fi
}
\newcommand{\tikzpeople@person@painthalo}{
\if@tikzpeople@good
\draw[fill,halo,even odd rule]
- (0.1pt,4.5pt) ellipse (2.8pt and 0.8pt) ++(0pt,.1pt) ellipse (2pt and 0.5pt);
+ (0.1pt,4.5pt) ellipse (2.8pt and 0.8pt) ++(0pt,.1pt) ellipse
+ (2pt and 0.5pt);
\fi
}
\newcommand{\tikzpeople@person@paintfemalehair}{
\draw[hair]
- (15:3pt) arc (15:180:3pt) .. controls +(273:2pt) and +(190:2pt) .. (260:3.3pt) .. controls +(140:1pt) ..
- (-1.6pt,0pt) to [out=350,in=210]
+ (15:3pt) arc (15:180:3pt) .. controls +(273:2pt) and +(190:2pt) ..
+ (260:3.3pt) .. controls +(140:1pt) .. (-1.6pt,0pt) to [out=350,in=210]
(15:3pt) -- cycle;
}
+\newcommand{\tikzpeople@person@paintshield}{
+ \path
+ (1pt,-3.7pt) coordinate (tikzpeople@shield1) +(-.2pt,.1pt) coordinate
+ (tikzpeople@shield6) ++(1.2pt,1.2pt) coordinate (tikzpeople@shield2)
+ ++(3.5pt,1.3pt) coordinate (tikzpeople@shield3) ++(.8pt,-.75pt) coordinate
+ (tikzpeople@shield4) ++(-2pt,-6.5pt) coordinate (tikzpeople@shield5)
+ --cycle;
+ \draw[shieldedge]
+ (tikzpeople@shield1) -- (tikzpeople@shield6) to[out=0,in=270]
+ ++(1.2pt,1.2pt) -- (tikzpeople@shield2) to[out=270,in=0]
+ (tikzpeople@shield1) --cycle;
+ \draw[shieldedge]
+ (tikzpeople@shield3) -- ++(-.2pt,.1pt) to[out=265,in=220]
+ ++(.8pt,-.75pt) -- (tikzpeople@shield4) to[out=220,in=265]
+ (tikzpeople@shield3) --cycle;
+ \draw[shieldedge]
+ (tikzpeople@shield2) -- ++(-.2pt,.1pt) .. controls +(5:1.5pt) and
+ +(220:1.5pt) .. ++(3.5pt,1.3pt) -- (tikzpeople@shield3) .. controls
+ +(220:1.5pt) and +(5:1.5pt) .. (tikzpeople@shield2) --cycle;
+ \draw[shieldedge]
+ (tikzpeople@shield5) -- ++(-.2pt,.1pt) .. controls +(170:1.5pt) and
+ +(270:3pt) .. (tikzpeople@shield6) -- (tikzpeople@shield1) .. controls
+ +(270:3pt) and +(170:1.5pt) .. (tikzpeople@shield5) --cycle;
+ \draw[shieldedge]
+ (tikzpeople@shield1) to[out=0,in=270] (tikzpeople@shield2) .. controls
+ +(5:1.5pt) and +(220:1.5pt) .. (tikzpeople@shield3) to[out=265,in=220]
+ (tikzpeople@shield4) .. controls +(270:3pt) and +(30:1.5pt) ..
+ (tikzpeople@shield5) .. controls +(170:1.5pt) and +(270:3pt) ..
+ (tikzpeople@shield1) --cycle;
+ \if@tikzpeople@draft\else
+ \draw[shieldmid]
+ ($(tikzpeople@shield1)+(315:.5pt)$) to[out=10,in=260]
+ ($(tikzpeople@shield2)+(315:.5pt)$) .. controls +(7:1.2pt) and
+ +(215:1.2pt) .. ($(tikzpeople@shield3)+(250:.75pt)$) to[out=280,in=180]
+ ($(tikzpeople@shield4)+(235:.625pt)$) .. controls +(270:2.2pt) and
+ +(30:1.1pt) .. ($(tikzpeople@shield5)+(90:.5pt)$) .. controls
+ +(172:1.1pt) and +(271:2.2pt) .. ($(tikzpeople@shield1)+(315:.5pt)$)
+ --cycle;
+ \begin{scope}
+ \clip
+ ($(tikzpeople@shield1)+(315:.3pt)$) coordinate (tikzpeople@rivet1) circle (.05pt)
+ ($(tikzpeople@shield2)+(315:.3pt)$) coordinate (tikzpeople@rivet2) circle (.05pt)
+ ($(tikzpeople@shield3)+(250:.45pt)$) coordinate (tikzpeople@rivet3) circle (.05pt)
+ ($(tikzpeople@shield4)+(235:.4pt)$) coordinate (tikzpeople@rivet4) circle (.05pt)
+ ($(tikzpeople@shield5)+(90:.3pt)$) coordinate (tikzpeople@rivet5) circle (.05pt);
+ \path[shieldrivets] (tikzpeople@rivet1) ++(-.025pt,.025pt) circle (.12pt);
+ \path[shieldrivets] (tikzpeople@rivet2) ++(-.025pt,.025pt) circle (.12pt);
+ \path[shieldrivets] (tikzpeople@rivet3) ++(-.025pt,.025pt) circle (.12pt);
+ \path[shieldrivets] (tikzpeople@rivet4) ++(-.025pt,.025pt) circle (.12pt);
+ \path[shieldrivets] (tikzpeople@rivet5) ++(-.025pt,.025pt) circle (.12pt);
+ \end{scope}
+ \fi
+}
+
+\newcommand{\tikzpeople@person@paintsword}{
+ \begin{scope}
+ \pgftransformrotate{-30}
+ \pgftransformshift{\pgfpoint{1.7pt}{-.2pt}}
+ \draw[swordpommel]
+ (-.4pt,-8.9pt) -- ++(0pt,-.1pt) arc (180:360:.4pt and .15pt) --
+ ++(0pt,.1pt); ellipse (.4pt and .15pt);
+ \draw[swordpommel] (0pt,-8.9pt) ellipse (.4pt and .15pt);
+ \draw[swordgrip]
+ (-.2pt,-7.1pt) to[out=265,in=95] (-.2pt,-8.9pt) to[out=345,in=195]
+ (.2pt,-8.9pt) to[out=85,in=275] (.2pt,-7.1pt);
+ \draw[skin] (0pt,-8.1pt) ellipse (.6pt and .7pt);
+ \draw[swordguard]
+ (0pt,-7.45pt) to[out=0,in=270] (1.4pt,-6.5pt) -- ++(-.1pt,-.1pt)
+ to[out=270,in=0] (0pt,-7.45pt); to[out=0,in=270] (1.2pt,-6.6pt) --
+ ++(.1pt,.1pt) to[out=270,in=0] (0pt,-6.8pt);
+ \draw[swordguard]
+ (0pt,-6.8pt) to[out=180,in=270] (-1.1pt,-6.5pt) -- ++(-.1pt,-.1pt)
+ to[out=270,in=180] (0pt,-7.2pt) to[out=0,in=270] (1.2pt,-6.6pt) --
+ ++(.1pt,.1pt) to[out=270,in=0] (0pt,-6.8pt);
+ \draw[swordguard]
+ (-1.2pt,-6.6pt) -- ++(0.1pt,0.1pt) -- ++(-0.1pt,0pt) -- ++(-0.1pt,-0.1pt)
+ --cycle;
+ \draw[swordguard]
+ (1.2pt,-6.6pt) -- ++(0.1pt,0.1pt) -- ++(0.1pt,0pt) -- ++(-0.1pt,-0.1pt)
+ --cycle;
+ \draw[swordguard]
+ (0pt,-7.2pt) to[out=180,in=270] (-1.2pt,-6.6pt) -- ++(-.1pt,0pt)
+ to[out=270,in=180] (0pt,-7.45pt) to[out=0,in=270] (1.3pt,-6.6pt) --
+ ++(-.1pt,0pt) to[out=270,in=0] (0pt,-7.2pt);
+ \draw[swordblade]
+ (-.4pt,-7pt) -- (-.4pt,-1.5pt) to[out=90,in=240] (0pt,2pt)
+ to[out=300,in=90] (.4pt,-1.5pt) -- (.4pt,-7pt) to[out=190,in=350]
+ (-.4pt,-7pt);
+ {
+ \clip
+ (-.4pt,-7pt) -- (-.4pt,-1.5pt) to[out=90,in=240] (0pt,1pt)
+ to[out=300,in=90] (.4pt,-1.5pt) -- (.4pt,-7pt) to[out=190,in=350]
+ (-.4pt,-7pt);
+ \draw[swordblade, line width=.05*\scalingfactor,cap=round]
+ (0pt,-7.04pt) -- (0pt,.7pt);
+ }
+ \end{scope}
+}
+
\newcommand{\tikzpeople@person@paintmonitor}{
\if@tikzpeople@draft
- \path[draw=black,fill=white] (2.3pt,-2.3pt) -- ++(14:7.3pt) -- ++(340:.27pt) coordinate (tmp) -- ++(264:6.2pt) -- ++(195.5:7.35pt) coordinate (tmp2) -- ++(135:.3pt) --cycle;
- \path[draw=black] (2.3pt,-2.3pt) ++(330:.28pt) coordinate (tmp3) (tmp2) -- (tmp3) -- (tmp);
- \path[draw=black] (3pt,-3pt) -- ++(14.5:6.4pt) -- ++(264:5.3pt) -- ++(195.5:6.35pt) coordinate (tmp) --cycle;
- \path[draw=black,line width=.15*\scalingfactor,cap=butt] (tmp) -- (3pt,-3pt) -- ++(14.5:6.4pt);
- \path[draw=black,fill=white] (6.1pt,-4.8pt) ++(190:.6pt) ++(280:4pt) ++(-1.5pt,.2pt) coordinate (tmp) -- ++(325:1.6pt) -- ++(15:3.7pt) -- ++(145:1.6pt) --cycle;
- \path[draw=black] (tmp) -- ++(0,-.2pt) -- ++(325:1.6pt) -- ++(15:3.7pt) -- ++(0,.2pt);
- \path (6.1pt,-4.8pt) ++(17:.8pt) coordinate (tmp);
- \path[draw=black,fill=white] (tmp) ++(0,.01pt) -- ++(194:1.5pt) -- ++(280:4pt) -- ++(0:.07pt) -- ++(17:.5pt) --cycle;
- \path[draw=black,fill=white] (6.1pt,-4.8pt) ++(190:.6pt) -- ++(280:4pt) coordinate (tmp2) -- ++(15:2pt) -- (tmp) --cycle;
+ \path[draw=black,fill=white]
+ (2.3pt,-2.3pt) -- ++(14:7.3pt) -- ++(340:.27pt) coordinate (tikzpeople@tmp) --
+ ++(264:6.2pt) -- ++(195.5:7.35pt) coordinate (tikzpeople@tmp2) -- ++(135:.3pt)
+ --cycle;
+ \path[draw=black]
+ (2.3pt,-2.3pt) ++(330:.28pt) coordinate (tikzpeople@tmp3)
+ (tikzpeople@tmp2) -- (tikzpeople@tmp3) -- (tikzpeople@tmp);
+ \path[draw=black]
+ (3pt,-3pt) -- ++(14.5:6.4pt) -- ++(264:5.3pt) -- ++(195.5:6.35pt)
+ coordinate (tikzpeople@tmp) --cycle;
+ \path[draw=black,line width=.15*\scalingfactor,cap=butt]
+ (tikzpeople@tmp) -- (3pt,-3pt) -- ++(14.5:6.4pt);
+ \path[draw=black,fill=white]
+ (6.1pt,-4.8pt) ++(190:.6pt) ++(280:4pt) ++(-1.5pt,.2pt) coordinate (tikzpeople@tmp)
+ -- ++(325:1.6pt) -- ++(15:3.7pt) -- ++(145:1.6pt) --cycle;
+ \path[draw=black]
+ (tikzpeople@tmp) -- ++(0,-.2pt) -- ++(325:1.6pt) -- ++(15:3.7pt) -- ++(0,.2pt);
+ \path (6.1pt,-4.8pt) ++(17:.8pt) coordinate (tikzpeople@tmp);
+ \path[draw=black,fill=white]
+ (tikzpeople@tmp) ++(0,.01pt) -- ++(194:1.5pt) -- ++(280:4pt) -- ++(0:.07pt) --
+ ++(17:.5pt) --cycle;
+ \path[draw=black,fill=white]
+ (6.1pt,-4.8pt) ++(190:.6pt) -- ++(280:4pt) coordinate (tikzpeople@tmp2) -- ++(15:2pt)
+ -- (tikzpeople@tmp) --cycle;
\else
- \path[top color=\tikzpeople@pc, bottom color=\tikzpeople@pc!60,shading angle=135] (2.3pt,-2.3pt) -- ++(14:7.3pt) -- ++(340:.27pt) coordinate (tmp) -- ++(264:6.2pt) -- ++(195.5:7.35pt) coordinate (tmp2) -- ++(135:.3pt) --cycle;
- \path[top color=\tikzpeople@pc!60, bottom color=\tikzpeople@pc!50,shading angle=135] (2.3pt,-2.3pt) ++(330:.28pt) -- (tmp) -- ++(264:6.2pt) -- (tmp2) --cycle;
- \path[top color=\tikzpeople@pc!40, bottom color=\tikzpeople@pc!30,shading angle=45] (3pt,-3pt) -- ++(14.5:6.4pt) -- ++(264:5.3pt) -- ++(195.5:6.35pt) coordinate (tmp) --cycle;
- \path[draw,color=black!20,line width=.15*\scalingfactor,cap=butt] (tmp) -- (3pt,-3pt) -- ++(14.5:6.4pt);
+ \path[monitor1]
+ (2.3pt,-2.3pt) -- ++(14:7.3pt) -- ++(340:.27pt) coordinate (tikzpeople@tmp) --
+ ++(195:7.3pt) -- ++(264:6.2pt) coordinate (tikzpeople@tmp2) -- ++(150:.27pt) --cycle;
+ \path[monitor3]
+ (2.3pt,-2.3pt) ++(330:.28pt) -- (tikzpeople@tmp) -- ++(264:6.2pt) -- (tikzpeople@tmp2) --cycle;
+ \path[monitor4]
+ (3pt,-3pt) -- ++(14.5:6.4pt) -- ++(264:5pt) -- ++(195:6.35pt)
+ coordinate (tikzpeople@tmp) --cycle;
+ \path[draw,color=\tikzpeople@pc\if@tikzpeople@saturated\else!80\fi,line width=.15*\scalingfactor,cap=butt]
+ (tikzpeople@tmp) -- (3pt,-3pt) -- ++(14.5:6.4pt);
\begin{scope}
\pgftransformshift{\pgfpoint{6pt}{-4.7pt}}
\pgftransformxslant{0.15}
- \path[top color=\tikzpeople@pc, bottom color=\tikzpeople@pc!60,shading angle=90] (0,0) ellipse (1.3pt and 2pt);
- \path[top color=\tikzpeople@pc!55, bottom color=\tikzpeople@pc!50,shading angle=135] (.1pt,-.1pt) ellipse (1.3pt and 2pt);
+ \path[monitor1]
+ (0,0) ellipse (1.3pt and 2pt);
+ \path[monitor3]
+ (.1pt,-.1pt) ellipse (1.3pt and 2pt);
\end{scope}
- \path[top color=\tikzpeople@pc!75, bottom color=\tikzpeople@pc!70,shading angle=135] (6.1pt,-4.8pt) ++(160:.9pt) -- ++(15:2pt) -- ++(265:1pt) -- ++(195:2pt) --cycle;
- \path (6.1pt,-4.8pt) ++(17:.8pt) coordinate (tmp);
- \path[top color=\tikzpeople@pc, bottom color=\tikzpeople@pc!40,shading angle=90] (6.1pt,-4.8pt) ++(190:.6pt) ++(280:4pt) ++(-1.5pt,.2pt) -- ++(0,-.2pt) -- ++(325:1.6pt) -- ++(15:3.7pt) -- ++(0,.2pt) -- cycle;
- \path[top color=\tikzpeople@pc!60, bottom color=\tikzpeople@pc!45,shading angle=90] (6.1pt,-4.8pt) ++(190:.6pt) ++(280:4pt) ++(-1.5pt,.2pt) -- ++(325:1.6pt) -- ++(15:3.7pt) -- ++(145:1.6pt) --cycle;
- \path[top color=\tikzpeople@pc, bottom color=\tikzpeople@pc!90,shading angle=80] (6.1pt,-4.8pt) ++(190:.6pt) ++(280:4pt) ++(-.6pt,.2pt) -- ++(325:.8pt) -- ++(15:2.5pt) -- ++(145:.8pt) --cycle;
- \path[top color=\tikzpeople@pc!70, bottom color=\tikzpeople@pc] (tmp) ++(0,.01pt) -- ++(194:1.5pt) -- ++(280:4pt) -- ++(0:.07pt) -- ++(17:.5pt) --cycle;
- \path[top color=\tikzpeople@pc!60, bottom color=\tikzpeople@pc!45,shading angle=90] (6.1pt,-4.8pt) ++(190:.6pt) -- ++(280:4pt) coordinate (tmp2) -- ++(15:2pt) -- (tmp) --cycle;
+ \path[monitor2]
+ (6.05pt,-4.8pt) ++(160:.9pt) -- ++(15:2pt) -- ++(265:1pt) -- ++(195:2pt)
+ --cycle;
+ \path (6.1pt,-4.8pt) ++(17:.8pt) coordinate (tikzpeople@tmp);
+ \path[monitor1]
+ (6.1pt,-4.8pt) ++(190:.6pt) ++(280:4pt) ++(-1.5pt,.2pt) -- ++(0,-.2pt) --
+ ++(325:1.6pt) -- ++(15:3.7pt) -- ++(0,.2pt) -- cycle;
+ \path[monitor3]
+ (6.1pt,-4.8pt) ++(190:.6pt) ++(280:4pt) ++(-1.5pt,.2pt) -- ++(325:1.6pt)
+ -- ++(15:3.7pt) -- ++(145:1.6pt) --cycle;
+ \path[monitor2]
+ (6.1pt,-4.8pt) ++(190:.6pt) ++(280:4pt) ++(-.6pt,.2pt) -- ++(325:.8pt) --
+ ++(15:2.5pt) -- ++(145:.8pt) --cycle;
+ \path[monitor2]
+ (tikzpeople@tmp) ++(0,.01pt) -- ++(194:1.5pt) -- ++(280:4pt) -- ++(0:.07pt) --
+ ++(17:.5pt) --cycle;
+ \path[monitor3]
+ (6.1pt,-4.8pt) ++(190:.6pt) -- ++(280:4pt) coordinate (tikzpeople@tmp2) -- ++(15:2pt)
+ -- (tikzpeople@tmp) --cycle;
\fi
}
@@ -396,6 +628,12 @@
\tikzpeople@person@paintgoatee
\tikzpeople@person@paintlefthorn
\tikzpeople@person@painthalo
+ \if@tikzpeople@shield
+ \tikzpeople@person@paintshield
+ \fi
+ \if@tikzpeople@sword
+ \tikzpeople@person@paintsword
+ \fi
\if@tikzpeople@monitor
\tikzpeople@person@paintmonitor
\fi
@@ -431,12 +669,19 @@
\pgftransformxshift{-0.325}
\fi
\pgftransformshift{\pgfpoint{-0.3}{3.3}}
- \tikzpeople@person@definecolors
+ \tikzpeople@definecommoncolors
\csname tikzpeople@#1@definecolors\endcsname
+ \tikzpeople@definecommonstyles
\csname tikzpeople@#1@definestyles\endcsname
\begin{scope}
\csname tikzpeople@#1@paint\endcsname
\end{scope}
+ \if@tikzpeople@shield
+ \tikzpeople@person@paintshield
+ \fi
+ \if@tikzpeople@sword
+ \tikzpeople@person@paintsword
+ \fi
\if@tikzpeople@monitor
\tikzpeople@person@paintmonitor
\fi
@@ -453,8 +698,8 @@
\fi
}
-\newif\ifalltikzpeople@star
\if@tikzpeople@demo
+ \RequirePackage{xparse}
\RequirePackage{capt-of}
\RequirePackage{xifthen}
\newcounter{tikzpeople@shaperow}
@@ -465,24 +710,24 @@
\newlength{\tikzpeople@captionht}
\newcommand{\tikzpeople@horizontalseparation}[1]{
- \draw ($#1*(-1,1.25) + {2.5*#1}*(0,-\value{tikzpeople@shaperow})$)--+(${2*#1}*(\value{tikzpeople@shapecolumn},0)$);
+ \draw
+ ($#1*(-1,1.25) + {2.5*#1}*(0,-\value{tikzpeople@shaperow})$) --
+ +(${2*#1}*(\value{tikzpeople@shapecolumn},0)$);
}
\newcommand{\tikzpeople@verticalseparation}[1]{
- \draw ($#1*(-1,1.25) + {2*#1}*(\value{tikzpeople@shapecolumn},0) + {2.5*#1}*(0,-\value{tikzpeople@shaperow})$)--+($2.5*(0,-#1)$);
- }
-
- \newcommand{\alltikzpeople}{%
- \@ifstar{\alltikzpeople@startrue\alltikzpeople@i*}{\alltikzpeople@starfalse\alltikzpeople@i*}%
+ \draw
+ ($#1*(-1,1.25) + {2*#1}*(\value{tikzpeople@shapecolumn},0) + {2.5*#1}*(0,-\value{tikzpeople@shaperow})$)
+ -- +($2.5*(0,-#1)$);
}
- \def\alltikzpeople@i*#1#2{%
- \setlength{\tikzpeople@figwidth}{#1cm}
+ \NewDocumentCommand\alltikzpeople{smm}{%
+ \setlength{\tikzpeople@figwidth}{#2cm}
\edef\tikzpeople@foreachshape{\noexpand\foreach \noexpand\tikzpeople@shape in {\tikzpeople@shapelist}}
\edef\tikzpeople@numcols{\the\numexpr(\textwidth-(\tikzpeople@figwidth))/(2*\tikzpeople@figwidth)\relax}
\addtocounter{figure}{10}
\settototalheight{\tikzpeople@captionht}{%
- \vbox{\captionof{figure}{All available characters with \texttt{minimum width=#1cm} and no additional options.}}
+ \vbox{\captionof{figure}{All available characters with \texttt{minimum width=#2cm} and no additional options.}}
}%
\addtocounter{figure}{-11}
\edef\tikzpeople@numrows{\the\numexpr(2*(\textheight-\tikzpeople@captionht)-(5*\tikzpeople@figwidth/2))/(5*\tikzpeople@figwidth)\relax}
@@ -500,30 +745,30 @@
\begin{tikzpicture}
\tikzpeople@foreachshape{
\stepcounter{tikzpeople@shapenum}
- \ifthenelse{\value{tikzpeople@shapenum} > \numexpr(\tikzpeople@fignum-1)*\tikzpeople@numshapes\relax}{
+ \ifthenelse{\value{tikzpeople@shapenum} > \numexpr(\tikzpeople@fignum-1)*\tikzpeople@numshapes\relax}{
\ifthenelse{\value{tikzpeople@shapenum} < \numexpr\tikzpeople@fignum*\tikzpeople@numshapes+1\relax}{
- \coordinate (\tikzpeople@shape) at (${2*#1}*(\value{tikzpeople@shapecolumn},0) + {2.5*#1}*(0,-\value{tikzpeople@shaperow})$);
- \node[minimum width=#1cm,\tikzpeople@shape,#2] at (\tikzpeople@shape) {\texttt{\ifalltikzpeople@star\else\tikzpeople@shape\fi}};
- \tikzpeople@verticalseparation{#1}
+ \coordinate (\tikzpeople@shape) at (${2*#2}*(\value{tikzpeople@shapecolumn},0) + {2.5*#2}*(0,-\value{tikzpeople@shaperow})$);
+ \node[minimum width=#2cm,\tikzpeople@shape,#3] at (\tikzpeople@shape) {\texttt{\IfBooleanTF#1{}{\tikzpeople@shape}}};
+ \tikzpeople@verticalseparation{#2}
\stepcounter{tikzpeople@shapecolumn}
\ifthenelse{\value{tikzpeople@shapecolumn}=\tikzpeople@numcols}{
- \tikzpeople@verticalseparation{#1}
- \ifthenelse{\value{tikzpeople@shaperow}=0}{\tikzpeople@horizontalseparation{#1}}{}
+ \tikzpeople@verticalseparation{#2}
+ \ifthenelse{\value{tikzpeople@shaperow}=0}{\tikzpeople@horizontalseparation{#2}}{}
\stepcounter{tikzpeople@shaperow}
- \tikzpeople@horizontalseparation{#1}
+ \tikzpeople@horizontalseparation{#2}
\setcounter{tikzpeople@shapecolumn}{0}
}{}
}{}
}{}
}
\ifthenelse{\value{tikzpeople@shapecolumn}=0}{}{
- \tikzpeople@verticalseparation{#1}
- \ifthenelse{\value{tikzpeople@shaperow}=0}{\tikzpeople@horizontalseparation{#1}}{}
+ \tikzpeople@verticalseparation{#2}
+ \ifthenelse{\value{tikzpeople@shaperow}=0}{\tikzpeople@horizontalseparation{#2}}{}
\stepcounter{tikzpeople@shaperow}
- \tikzpeople@horizontalseparation{#1}
+ \tikzpeople@horizontalseparation{#2}
}
\end{tikzpicture}
- \caption{\tikzpeople@captiontext{#1}{#2}}
+ \caption{\tikzpeople@captiontext{#2}{#3}}
\label{fig:tikzpeoplefigure\tikzpeople@fignum}
\end{figure}
}
@@ -542,22 +787,23 @@
\newcommand{\tikzpeoplecolors}[1]{
\begin{minipage}{.95\textwidth}
- \begin{center}
- \centering
- \expandafter\let\expandafter\tikzpeople@peoplecolors\csname tikzpeople@#1@colors\endcsname
- \begin{tikzpicture}
- \node[minimum width=2.5cm,#1] {};
- \foreach \tikzpeople@name/\tikzpeople@angle/\tikzpeople@coords in \tikzpeople@peoplecolors{
- \node (label) at (\tikzpeople@angle:2.5) {\tikzpeople@name};
- \foreach \x/\y in \tikzpeople@coords{
- \draw (label) edge (\x,\y);
+ \begin{center}
+ \centering
+ \expandafter\let\expandafter\tikzpeople@peoplecolors\csname tikzpeople@#1@colors\endcsname
+ \begin{tikzpicture}
+ \node[minimum width=2.5cm,#1] {};
+ \foreach \tikzpeople@name/\tikzpeople@angle/\tikzpeople@coords in \tikzpeople@peoplecolors{
+ \node (label) at (\tikzpeople@angle:2.5) {\tikzpeople@name};
+ \foreach \x/\y in \tikzpeople@coords{
+ \draw (label) edge (\x,\y);
+ }
}
- }
- \end{tikzpicture}
- \captionof{figure}{The available color-keys for \texttt{#1} tikzpeople.}
- \end{center}
+ \end{tikzpicture}
+ \captionof{figure}{The available color-keys for \texttt{#1} tikzpeople.}
+ \end{center}
\end{minipage}
}
+
\fi
\tikzpeople@declareshape{alice}
@@ -571,11 +817,14 @@
\tikzpeople@declareshape{cowboy}
\tikzpeople@declareshape{criminal}
\tikzpeople@declareshape{dave}
+\tikzpeople@declareshape{devil}
+\tikzpeople@declareshape{duck}
\tikzpeople@declareshape{graduate}
\tikzpeople@declareshape{groom}
\tikzpeople@declareshape{guard}
\tikzpeople@declareshape{jester}
\tikzpeople@declareshape{judge}
+\tikzpeople@declareshape{maninblack}
\tikzpeople@declareshape{mexican}
\tikzpeople@declareshape{nun}
\tikzpeople@declareshape{nurse}