-
Notifications
You must be signed in to change notification settings - Fork 0
/
groove2tikz.sty
executable file
·94 lines (65 loc) · 5.74 KB
/
groove2tikz.sty
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
89
90
91
92
93
94
% Package that defines the styles used in Tikz figures exported in GROOVE.
% This file was automatically generated by the TikzStylesExtraction utility.
\ProvidesPackage{groove2tikz}
\RequirePackage{tikz}
\usepackage[T1]{fontenc}
\usepackage{amssymb}
% Includes for Tikz.
\usetikzlibrary{arrows,automata,positioning,er}
% Dimension styles.
\newcommand{\tikzfontsize}{\footnotesize}
\newcommand{\tikzscale}{2}
\tikzstyle every node=[font=\tikzfontsize\sffamily, inner sep=2.5pt, minimum size=9pt]
% Extra style for edge labels.
\tikzstyle{lab}=[fill=white, inner sep=1pt]
% Extra style for parameter adornments.
\tikzstyle{par_node}=[draw=black, fill=black, text=white, shape=rectangle, font=\scriptsize\sffamily, inner sep=1pt, minimum size=4pt, anchor=east]
% Default colors for TeX strings.
\definecolor{eraser_c}{RGB}{0,0,255}
\definecolor{creator_c}{RGB}{0,178,0}
\definecolor{embargo_c}{RGB}{255,0,0}
\definecolor{remark_c}{RGB}{255,140,0}
% Main styles. (Should be used first in a node and edge definition.)
\tikzstyle{basic_node}=[shape=rectangle, rounded corners=1pt, draw={rgb,255:red,0;green,0;blue,0}, text={rgb,255:red,0;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{basic_edge}=[draw, -stealth', color={rgb,255:red,0;green,0;blue,0}]
\tikzstyle{type_node}=[shape=rectangle, rounded corners=0pt, draw={rgb,255:red,0;green,0;blue,0}, text={rgb,255:red,0;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{type_edge}=[draw, -stealth', color={rgb,255:red,0;green,0;blue,0}]
\tikzstyle{subtype_edge}=[draw, -open triangle 60, color={rgb,255:red,0;green,0;blue,0}]
\tikzstyle{abstract_node}=[shape=rectangle, rounded corners=0pt, densely dashed, draw={rgb,255:red,0;green,0;blue,0}, text={rgb,255:red,0;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{abstract_edge}=[draw, -stealth', densely dashed, color={rgb,255:red,0;green,0;blue,0}]
\tikzstyle{remark_node}=[shape=rectangle, rounded corners=1pt, draw={rgb,255:red,255;green,140;blue,0}, text={rgb,255:red,255;green,140;blue,0}, fill={rgb,255:red,255;green,255;blue,180}]
\tikzstyle{remark_edge}=[draw, -stealth', color={rgb,255:red,255;green,140;blue,0}]
\tikzstyle{embargo_node}=[shape=rectangle, rounded corners=1pt, densely dashed, line width=2pt, draw={rgb,255:red,255;green,0;blue,0}, text={rgb,255:red,255;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{embargo_edge}=[draw, -stealth', densely dashed, line width=2pt, color={rgb,255:red,255;green,0;blue,0}]
\tikzstyle{connect_edge}=[draw, -, densely dashed, line width=2pt, color={rgb,255:red,255;green,0;blue,0}]
\tikzstyle{eraser_node}=[shape=rectangle, rounded corners=1pt, densely dashed, draw={rgb,255:red,0;green,0;blue,255}, text={rgb,255:red,0;green,0;blue,255}, fill={rgb,255:red,200;green,240;blue,255}]
\tikzstyle{eraser_edge}=[draw, -stealth', densely dashed, color={rgb,255:red,0;green,0;blue,255}]
\tikzstyle{creator_node}=[shape=rectangle, rounded corners=1pt, line width=1pt, draw={rgb,255:red,0;green,178;blue,0}, text={rgb,255:red,0;green,178;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{creator_edge}=[draw, -stealth', line width=1pt, color={rgb,255:red,0;green,178;blue,0}]
\tikzstyle{nesting_node}=[shape=rectangle, rounded corners=1pt, densely dotted, draw={rgb,255:red,165;green,42;blue,42}, text={rgb,255:red,165;green,42;blue,42}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{nesting_edge}=[draw, -to, densely dotted, color={rgb,255:red,165;green,42;blue,42}]
\tikzstyle{product_node}=[shape=diamond, shape aspect=2, draw={rgb,255:red,0;green,0;blue,0}, text={rgb,255:red,0;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{data_node}=[shape=ellipse, draw={rgb,255:red,0;green,0;blue,0}, text={rgb,255:red,0;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{state_node}=[shape=rectangle, rounded corners=4pt, draw={rgb,255:red,0;green,0;blue,0}, text={rgb,255:red,0;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{start_node}=[shape=rectangle, rounded corners=4pt, draw={rgb,255:red,242;green,250;blue,254}, text={rgb,255:red,242;green,250;blue,254}, fill={rgb,255:red,0;green,0;blue,0}]
\tikzstyle{trans_edge}=[draw, -to, color={rgb,255:red,0;green,0;blue,0}]
\tikzstyle{transient_node}=[shape=regular polygon,regular polygon sides=6, draw={rgb,255:red,0;green,0;blue,0}, text={rgb,255:red,0;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{ctrl_transient_state_node}=[shape=regular polygon,regular polygon sides=6, draw={rgb,255:red,0;green,0;blue,0}, text={rgb,255:red,0;green,0;blue,0}, fill={rgb,255:red,243;green,243;blue,243}]
% Modifying styles. (To be used in conjunction - AFTER - a main style.)
\tikzstyle{bidirectional}=[stealth'-stealth']
\tikzstyle{nodified}=[shape=ellipse, minimum size=4pt]
\tikzstyle{no_arrow}=[-]
\tikzstyle{composite}=[diamond-stealth']
\tikzstyle{open}=[fill={rgb,255:red,182;green,182;blue,182}]
\tikzstyle{final}=[fill={rgb,255:red,0;green,200;blue,0}]
\tikzstyle{error}=[fill={rgb,255:red,243;green,243;blue,243}]
\tikzstyle{result}=[fill={rgb,255:red,92;green,125;blue,23}]
\tikzstyle{recipe}=[shape=rectangle, rounded corners=0pt, rounded corners=0pt, draw={rgb,255:red,165;green,42;blue,42}, text={rgb,255:red,165;green,42;blue,42}]
\tikzstyle{absent}=[densely dashed]
\tikzstyle{active}=[draw={rgb,255:red,0;green,0;blue,255}, text={rgb,255:red,0;green,0;blue,255}, line width=1pt]
\tikzstyle{ctrl_verdict}=[densely dashed]
\tikzstyle{grayed_out}=[draw={rgb,255:red,200;green,200;blue,200}, text={rgb,255:red,200;green,200;blue,200}]
% Ugly hack to allow nodes with multiple lines.
\newcommand{\ml}[1]{
\begin{tabular}{@{}c@{}}#1\vspace{-2pt}\end{tabular}
}