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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
%%
%% This is file `smartdiagramlibraryadditions.code.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% smartdiagram.dtx (with options: `additions')
%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
%% smartdiagram --- Automatic creation of smart diagrams from lists of items.
%%
%% E-mail: claudio <dot> fiandrino <at> gmail <dot> com
%%
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
%%
\usetikzlibrary{positioning}
\pgfkeys{/smart diagram/additions/.cd,
additional item shape/.initial=\pgfkeysvalueof{/smart diagram/module shape},
additional item shape/.get=\sm@additions@additionalitemshape,
additional item shape/.store in=\sm@additions@additionalitemshape,
additional item border color/.initial=none,
additional item border color/.get=\sm@additions@additionalitembordercolor,
additional item border color/.store in=\sm@additions@additionalitembordercolor,
additional item bottom color/.initial=white,
additional item bottom color/.get=\sm@additions@additionalitembottomcolor,
additional item bottom color/.store in=\sm@additions@additionalitembottomcolor,
additional item fill color/.initial=none,
additional item fill color/.get=\sm@additions@additionalitemfillcolor,
additional item fill color/.store in=\sm@additions@additionalitemfillcolor,
additional item text width/.initial=1.75cm,
additional item text width/.get=\sm@additions@additionalitemtextwidth,
additional item text width/.store in=\sm@additions@additionalitemtextwidth,
additional item width/.initial=2cm,
additional item width/.get=\sm@additions@additionalitemwidth,
additional item width/.store in=\sm@additions@additionalitemwidth,
additional item height/.initial=1cm,
additional item height/.get=\sm@additions@additionalitemheight,
additional item height/.store in=\sm@additions@additionalitemheight,
additional item font/.initial=\normalfont,
additional item font/.get=\sm@additions@additionalitemfont,
additional item font/.store in=\sm@additions@additionalitemfont,
additional item border decoration/.initial={},
additional item border decoration/.get=\sm@additions@additionalitemdecoration,
additional item border decoration/.store in=\sm@additions@additionalitemdecoration,
additional item offset/.initial={0.25cm},
additional item offset/.get=\sm@additions@additionalitemoffset,
additional item offset/.store in=\sm@additions@additionalitemoffset,
additional item fill opacity/.initial={1},
additional item fill opacity/.get=\sm@additions@additionalitemfillopacity,
additional item fill opacity/.store in=\sm@additions@additionalitemfillopacity,
additional item text opacity/.initial={1},
additional item text opacity/.get=\sm@additions@additionalitemtextopacity,
additional item text opacity/.store in=\sm@additions@additionalitemtextopacity,
additional arrow tip/.initial={stealth},
additional arrow tip/.get=\sm@additions@additionalarrowtip,
additional arrow tip/.store in=\sm@additions@additionalarrowtip,
additional arrow line width/.initial={0.1cm},
additional arrow line width/.get=\sm@additions@additionalarrowlinewidth,
additional arrow line width/.store in=\sm@additions@additionalarrowlinewidth,
additional arrow color/.initial={gray},
additional arrow color/.get=\sm@additions@additionalarrowcolor,
additional arrow color/.store in=\sm@additions@additionalarrowcolor,
additional arrow style/.initial={->},
additional arrow style/.get=\sm@additions@additionalarrowstyle,
additional arrow style/.store in=\sm@additions@additionalarrowstyle,
additional item shadow/.initial={},
additional item shadow/.get=\sm@additions@additionalitemshadow,
additional item shadow/.store in=\sm@additions@additionalitemshadow,
}
\newif\ifconnectionsdisabled
\pgfkeys{/smart diagram/additions/.cd,
additional connections disabled/.is if=connectionsdisabled,
additional connections disabled=true,
}
\pgfkeys{/smart diagram/.cd,
additions/.style={/smart diagram/additions/.cd,#1}%
}
\tikzset{additional item/.style={
align=center,
\sm@additions@additionalitemshape,
thick,
draw=\sm@additions@additionalitembordercolor,
top color=white,
bottom color=\sm@additions@additionalitembottomcolor,
postaction={fill=\sm@additions@additionalitemfillcolor},
text width=\sm@additions@additionalitemtextwidth,
minimum width=\sm@additions@additionalitemwidth,
minimum height=\sm@additions@additionalitemheight,
font=\sm@additions@additionalitemfont,
fill opacity=\sm@additions@additionalitemfillopacity,
text opacity=\sm@additions@additionalitemtextopacity,
\sm@additions@additionalitemshadow,
\sm@additions@additionalitemdecoration
},
additional item arrow type/.style={
\sm@additions@additionalarrowstyle,
>=\sm@additions@additionalarrowtip,
line width=\sm@additions@additionalarrowlinewidth,
\sm@additions@additionalarrowcolor
},
}
\NewDocumentCommand{\smartdiagramadd}{r[] m m}{
\tikzstyle{every picture}+=[remember picture]
\smartdiagram[#1]{#2}
\begin{tikzpicture}[remember picture,overlay,
every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2} {\global\let\numitems\xi}
\foreach \smitem[count=\xi] in {#3}{
\StrCut{\smitem}{/}\pos\textitem
\StrCut{\pos}{\space of\space}\point\modulenum
\node[additional item,
\point=\sm@additions@additionalitemoffset of \modulenum]
(additional-module\xi) {\textitem};
\ifconnectionsdisabled
\relax
\else
\begin{pgfonlayer}{smart diagram arrow back}
\draw[additional item arrow type]
(additional-module\xi) -- (\modulenum);
\end{pgfonlayer}
\fi
}
\end{tikzpicture}
}
\NewDocumentCommand{\smartdiagramconnect}{m m}{%
\begin{tikzpicture}[remember picture,overlay]
\foreach \start/\end in {#2}
\draw[additional item arrow type,#1]
(\start) -- (\end);
\end{tikzpicture}
}
%%
%% Copyright (C) 2012-2013 by Claudio Fiandrino
%% E-mail: <claudio <dot> fiandrino <at> gmail <dot> com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in the file:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% This work is "maintained" (as per LPPL maintenance status) by
%% Claudio Fiandrino.
%%
%% This work consists of the file smartdiagram.dtx
%% and the derived files smartdiagram.ins,
%% smartdiagram.pdf,
%% smartdiagramlibrarycore.definitions.code.tex,
%% smartdiagramlibrarycore.styles.code.tex,
%% smartdiagramlibrarycore.commands.code.tex
%% smartdiagramlibraryadditions.code.tex and
%% smartdiagram.sty.
%%
%%
%% End of file `smartdiagramlibraryadditions.code.tex'.
|