-
Notifications
You must be signed in to change notification settings - Fork 3
/
preamble.tex
88 lines (80 loc) · 2.24 KB
/
preamble.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
% packages
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{hobby}
\usetikzlibrary{trees}
\pgfplotsset{compat=1.15}
\usepackage{multirow}
\usepackage{graphics}
\usetikzlibrary{calc}
\usepackage{etoolbox}
\usepackage{tikz-network}
% set up layers
\pgfdeclarelayer{shading}
\pgfdeclarelayer{map}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfdeclarelayer{debug}
\pgfdeclarelayer{annotate}
\pgfsetlayers{shading,map,background,main,foreground,annotate,debug}
%
% map
% key
% strata
% plates
% groups
% flows
% strategy
% -
% annotations
% debug
% Hobby Convex Paths for Groups etc.
% https://tex.stackexchange.com/questions/121286/error-with-hobbyconvexpath
\newcommand{\hobbyconvexpath}[2]{
[
create hobbyhullnodes/.code={
\global\edef\namelist{#1}
\foreach [count=\counter] \nodename in \namelist {
\global\edef\numberofnodes{\counter}
\node at (\nodename)
[draw=none,name=hobbyhullnode\counter] {};
}
\node at (hobbyhullnode\numberofnodes)
[name=hobbyhullnode0,draw=none] {};
\pgfmathtruncatemacro\lastnumber{\numberofnodes+1}
\node at (hobbyhullnode1)
[name=hobbyhullnode\lastnumber,draw=none] {};
},
create hobbyhullnodes
]
($(hobbyhullnode1)!#2!-90:(hobbyhullnode0)$)
\pgfextra{
\gdef\hullpath{}
\foreach [
evaluate=\currentnode as \previousnode using int(\currentnode-1),
evaluate=\currentnode as \nextnode using int(\currentnode+1)
] \currentnode in {1,...,\numberofnodes} {
\ifnum\currentnode=1\relax
\xdef\hullpath{([closed=true]$(hobbyhullnode\currentnode)!#2!180:(hobbyhullnode\previousnode)$)
..($(hobbyhullnode\nextnode)!0.5!(hobbyhullnode\currentnode)$)}
\else
\xdef\hullpath{\hullpath
..($(hobbyhullnode\currentnode)!#2!180:(hobbyhullnode\previousnode)$)
..($(hobbyhullnode\nextnode)!0.5!(hobbyhullnode\currentnode)$)}
\fi
\ifx\currentnode\numberofnodes
\else
\xdef\hullpath{\hullpath
..($(hobbyhullnode\nextnode)!#2!-90:(hobbyhullnode\currentnode)$)}
\fi
}
}
\hullpath
}
% DEFINE COLOURS
\definecolor{layer1}{RGB}{208,217,238}
\definecolor{layer2}{RGB}{164,185,225}
%Flow
\definecolor{flowColour}{RGB}{155,203,248}
\definecolor{climateColour}{RGB}{95,39,127}
\definecolor{typeColour}{RGB}{207,75,22}