Debian Codegraph @

texmf-dist/tex/latex/smartdiagram/smartdiagramlibrarycore.commands.code.tex

raw
1 %%
2 %% This is file `smartdiagramlibrarycore.commands.code.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% smartdiagram.dtx (with options: `commands')
8 %% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
9 %% smartdiagram --- Automatic creation of smart diagrams from lists of items.
10 %%
11 %% E-mail: claudio <dot> fiandrino <at> gmail <dot> com
12 %%
13 %% Released under the LaTeX Project Public License v1.3c or later
14 %% See http://www.latex-project.org/lppl.txt
15 %% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
16 %%
17
18 \NewDocumentCommand{\smartdiagram}{r[] m}{%
19 \StrCut{#1}{:}\diagramtype\option
20 \IfNoValueTF{#1}{% true-no value 1
21 \PackageError{smartdiagram}%
22 {Type of the diagram not inserted. Please insert it}%
23 {Example: \protect\smartdiagram[flow diagram]}}
24 {%false-no value 1
25 \IfStrEq{\diagramtype}{}{%
26 \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
27 {Example: \protect\smartdiagram[flow diagram]}
28 }{}
29 \IfStrEq{\diagramtype}{circular diagram}{% true-circular diagram
30 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
31
32 \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
33
34 \foreach \smitem [count=\xi] in {#2}{%
35 \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
36 \pgfmathtruncatemacro{\angle}{180+360/\maxsmitem*\xi}
37 }{% false-clockwise-circular diagram
38 \pgfmathtruncatemacro{\angle}{360/\maxsmitem*\xi}
39 }
40 \edef\col{\@nameuse{color@\xi}}
41 \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
42 \node[module,drop shadow] (module\xi)
43 at (-\angle:\sm@core@circulardistance) {\smitem };
44 }{% false-clockwise-circular diagram
45 \node[module,drop shadow] (module\xi)
46 at (\angle:\sm@core@circulardistance) {\smitem };
47 }
48 }%
49 \foreach \smitem [count=\xi] in {#2}{%
50 \ifnum\xi=\maxsmitem
51 \ifcircularfinalarrowdisabled
52 \relax
53 \else
54 \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
55 \edef\col{\@nameuse{color@\xj}}
56 \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
57 \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
58 (module\xj) to[bend right] (module\xi);
59 }{% false-clockwise-circular diagram
60 \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
61 (module\xj) to[bend left] (module\xi);
62 }
63 \fi
64 \else
65 \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
66 \edef\col{\@nameuse{color@\xj}}
67 \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
68 \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
69 (module\xj) to[bend right] (module\xi);
70 }{% false-clockwise-circular diagram
71 \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
72 (module\xj) to[bend left] (module\xi);
73 }
74
75 \fi
76 }%
77 \end{tikzpicture}
78 }{}% end-circular diagram
79 \IfStrEq{\diagramtype}{flow diagram}{% true-flow diagram
80 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
81
82 \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
83
84 \foreach \smitem [count=\xi] in {#2}{%
85 \edef\col{\@nameuse{color@\xi}}
86 \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
87 \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\sm@core@modulexsep} in
88 node[module,drop shadow] (module\xi) at +(\n2,0) {\smitem};
89 }{% false-horizontal-flow diagram
90 \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\sm@core@moduleysep} in
91 node[module,drop shadow] (module\xi) at +(0,\n2) {\smitem};
92 }
93 }%
94
95 \foreach \smitem [count=\xi] in {#2}{%
96 \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
97 \edef\col{\@nameuse{color@\xj}}
98 \ifnum\xi<\maxsmitem
99 \begin{pgfonlayer}{smart diagram arrow back}
100 \draw[diagram arrow type] (module\xj) -- (module\xi);
101 \end{pgfonlayer}
102 \fi
103 % last arrow - not display it in background - check if disabled
104 \ifbackarrowdisabled
105 \relax
106 \else
107 \ifnum\xi=\maxsmitem
108 \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
109 \tikzset{square arrow/.style={%
110 to path={-- ++(0,\sm@core@backarrowdistance) -| (\tikztotarget)}
111 }%
112 }%
113 \draw[diagram arrow type, square arrow]
114 (module\xj.north) to (module\xi.north);
115 }{% false-horizontal-flow diagram
116 \tikzset{square arrow/.style={%
117 to path={-- ++(\sm@core@backarrowdistance,0) |- (\tikztotarget)}
118 }%
119 }%
120 \draw[diagram arrow type,square arrow]
121 (module\xj.east) to (module\xi);
122 }%
123 \fi
124 \fi
125 }%
126 \end{tikzpicture}
127 }{}% end-flow diagram
128 \IfStrEq{\diagramtype}{descriptive diagram}{% true-descr. diagram
129 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
130 \foreach \smitem [count=\xi] in {#2}{%
131 \edef\col{\@nameuse{color@\xi}}
132 \foreach \subitem [count=\xii] in \smitem{%
133 \ifnumequal{\xii}{1}{% true
134 \node[description title,drop shadow]
135 (module-title\xi) at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};
136 }{}
137 \ifnumequal{\xii}{2}{% true
138 \node[description,drop shadow](module\xi)
139 at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};
140 }{}
141 }%
142 }%
143 \end{tikzpicture}
144 }{}% end-descr. diagram
145 \IfStrEq{\diagramtype}{bubble diagram}{% true-bubble diagram
146 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
147 \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
148 \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
149 \foreach \smitem [count=\xi] in {#2}{%
150 \ifnumequal{\xi}{1}{ %true
151 \node[bubble center node](center bubble){\smitem};
152 }{%false
153 \pgfmathtruncatemacro{\xj}{\xi-1}
154 \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
155 \edef\col{\@nameuse{color@\xj}}
156 \node[bubble node] (module\xi)
157 at (center bubble.\angle) {\smitem };
158 }%
159 }%
160 \end{tikzpicture}
161 }{}%end-bubble diagram
162 \IfStrEq{\diagramtype}{constellation diagram}{% true-const diagram
163 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
164 \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
165 \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
166 \foreach \smitem [count=\xi] in {#2}{%
167 \ifnumequal{\xi}{1}{ %true
168 \node[planet](planet){\smitem};
169 }{%false
170 \pgfmathtruncatemacro{\xj}{\xi-1}
171 \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
172 \edef\col{\@nameuse{color@\xj}}
173 \node[satellite] (satellite\xi)
174 at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
175 \draw[connection planet satellite] (planet) -- (satellite\xi);
176 }%
177 }%
178 \end{tikzpicture}
179 }{}%end-const diagram
180 \IfStrEq{\diagramtype}{connected constellation diagram}{% true-conn const diagram
181 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
182 \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
183 \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
184 \foreach \smitem [count=\xi] in {#2}{%
185 \ifnumequal{\xi}{1}{ %true
186 \node[planet](planet){\smitem};
187 }{%false
188 \pgfmathtruncatemacro{\xj}{\xi-1}
189 \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
190 \edef\col{\@nameuse{color@\xj}}
191 \node[satellite] (satellite\xj)
192 at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
193 }%
194 }%
195 \foreach \smitem [count=\xi] in {#2}{%
196 \ifnumgreater{\xi}{1}{ %true
197 \pgfmathtruncatemacro{\xj}{\xi-1}
198 \edef\col{\@nameuse{color@\xj}}
199 \pgfmathtruncatemacro{\xk}{mod(\xj,\actualnumitem) +1}
200 \path[connection planet satellite,-]
201 (satellite\xj) edge[bend right] (satellite\xk);
202 }{}
203 }%
204 \end{tikzpicture}
205 }{}%end-connected constellation diagram
206 \IfStrEq{\diagramtype}{priority descriptive diagram}{% true-priority descriptive diagram
207 \pgfmathparse{subtract(\sm@core@priorityarrowwidth,\sm@core@priorityarrowheadextend)}
208 \pgfmathsetmacro\sm@core@priorityticksize{\pgfmathresult/2}
209 \pgfmathsetmacro\arrowtickxshift{(\sm@core@priorityarrowwidth-\sm@core@priorityticksize)/2}
210 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
211 \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
212 \foreach \smitem [count=\xi] in {#2}{%
213 \edef\col{\@nameuse{color@\xi}}
214 \node[description,drop shadow](module\xi)
215 at (0,0+\xi*\sm@core@descriptiveitemsysep) {\smitem};
216 \draw[line width=\sm@core@prioritytick,\col]
217 ([xshift=-\arrowtickxshift pt]module\xi.base west)--
218 ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\sm@core@priorityticksize pt,0)$);
219 }%
220 \coordinate (A) at (module1);
221 \coordinate (B) at (module\maxsmitem);
222 \CalcHeight(A,B){heightmodules}
223 \pgfmathadd{\heightmodules}{\sm@core@priorityarrowheightadvance}
224 \pgfmathsetmacro{\distancemodules}{\pgfmathresult}
225 \pgfmathsetmacro\arrowxshift{\sm@core@priorityarrowwidth/2}
226 \begin{pgfonlayer}{background}
227 \node[priority arrow] at ([xshift=-\arrowxshift pt]module1.south west){};
228 \end{pgfonlayer}
229 \end{tikzpicture}
230 }{}% end-priority descriptive diagram
231 \IfStrEq{\diagramtype}{sequence diagram}{% true-sequence diagram
232 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
233 \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
234 \edef\col{\@nameuse{color@\xi}}
235 \ifnum\xi=1
236 \node[sequence item] (sequence-item\xi) {\x};
237 \else
238 \node[sequence item,anchor=west] (sequence-item\xi) at (sequence-item\prevx.east) {\x};
239 \fi
240 }
241 \end{tikzpicture}
242 }{}% end-sequence diagram
243 }% end-no value 1
244 }% end-command
245 \NewDocumentCommand{\smartdiagramanimated}{r[] m}{%
246 \StrCut{#1}{:}\diagramtype\option
247 \IfNoValueTF{#1}{% true-no value 1
248 \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
249 {Example: \protect\smartdiagram[flow diagram]}}
250 {%false-no value 1
251 \IfStrEq{\diagramtype}{}{%
252 \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
253 {Example: \protect\smartdiagram[flow diagram]}
254 }{}
255 \IfStrEq{\diagramtype}{circular diagram}{% true-circular diagram
256 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
257 \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
258 \foreach \smitem [count=\xi] in {#2}{%
259 \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
260 \pgfmathtruncatemacro{\angle}{180+360/\maxsmitem*\xi}
261 }{% false-clockwise-circular diagram
262 \pgfmathtruncatemacro{\angle}{360/\maxsmitem*\xi}
263 }
264 \edef\col{\@nameuse{color@\xi}}
265 \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
266 \node[module,
267 drop shadow={smvisible on=<\xi->},
268 smvisible on=<\xi->] (module\xi)
269 at (-\angle:\sm@core@circulardistance) {\smitem};
270 }{% false-clockwise-circular diagram
271 \node[module,
272 drop shadow={smvisible on=<\xi->},
273 smvisible on=<\xi->] (module\xi)
274 at (\angle:\sm@core@circulardistance) {\smitem};
275 }
276 }%
277 \foreach \smitem [count=\xi] in {#2}{%
278 \ifnum\xi=\maxsmitem
279 \ifcircularfinalarrowdisabled
280 \relax
281 \else
282 \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
283 \pgfmathtruncatemacro{\adv}{\xi + 1)}
284 \edef\col{\@nameuse{color@\xj}}
285 \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
286 \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
287 smvisible on=<\adv->]
288 (module\xj) to[bend right] (module\xi);
289 }{% false-clockwise-circular diagram
290 \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
291 smvisible on=<\adv->]
292 (module\xj) to[bend left] (module\xi);
293 }
294 \fi
295 \else
296 \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
297 \pgfmathtruncatemacro{\adv}{\xi + 1)}
298 \edef\col{\@nameuse{color@\xj}}
299 \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
300 \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
301 smvisible on=<\adv->]
302 (module\xj) to[bend right] (module\xi);
303 }{% false-clockwise-circular diagram
304 \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
305 smvisible on=<\adv->]
306 (module\xj) to[bend left] (module\xi);
307 }
308
309 \fi
310 }%
311 \end{tikzpicture}
312 }{}% end-circular diagram
313 \IfStrEq{\diagramtype}{flow diagram}{% true-flow diagram
314 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
315
316 \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
317
318 \foreach \smitem [count=\xi] in {#2}{%
319 \edef\col{\@nameuse{color@\xi}}
320 \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
321 \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\sm@core@modulexsep}
322 in node[module,drop shadow={smvisible on=<\xi->},
323 smvisible on=<\xi->] (module\xi) at +(\n2,0) {\smitem};
324 }{% false-horizontal-flow diagram
325 \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\sm@core@moduleysep}
326 in node[module,drop shadow={smvisible on=<\xi->},
327 smvisible on=<\xi->] (module\xi) at +(0,\n2) {\smitem};
328 }
329 }%
330
331 \foreach \smitem [count=\xi] in {#2}{%
332 \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
333 \edef\col{\@nameuse{color@\xj}}
334 \ifnum\xi<\maxsmitem
335 \begin{pgfonlayer}{smart diagram arrow back}
336 \draw[diagram arrow type,smvisible on=<\xi->]
337 (module\xj) -- (module\xi);
338 \end{pgfonlayer}
339 \fi
340 % last arrow - not display it in background - check if disabled
341 \ifbackarrowdisabled
342 \relax
343 \else
344 \ifnum\xi=\maxsmitem
345 \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
346 \tikzset{square arrow/.style={
347 to path={-- ++(0,\sm@core@backarrowdistance) -| (\tikztotarget)}
348 }
349 }
350 \draw[diagram arrow type, square arrow,smvisible on=<\xi->]
351 (module\xj.north) to (module\xi.north);
352 }{% false-horizontal-flow diagram
353 \tikzset{square arrow/.style={
354 to path={-- ++(\sm@core@backarrowdistance,0) |- (\tikztotarget)}
355 }
356 }
357 \draw[diagram arrow type,square arrow,smvisible on=<\xi->]
358 (module\xj.east) to (module\xi);
359 }
360 \fi
361 \fi
362 }%
363 \end{tikzpicture}
364 }{}% end-flow diagram
365 \IfStrEq{\diagramtype}{descriptive diagram}{% true-descriptive diagram
366 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
367 \foreach \smitem [count=\xi] in {#2}{%
368 \edef\col{\@nameuse{color@\xi}}
369
370 \foreach \subitem [count=\xii] in \smitem{%
371 \pgfmathtruncatemacro\subitemvisible{\xi}
372 \ifnumequal{\xii}{1}{% true
373 \node[description title,drop shadow, smvisible on=<\subitemvisible->]
374 (module-title\xi) at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};\pause
375 }{}
376 \ifnumequal{\xii}{2}{% true
377 \node[description,drop shadow,smvisible on=<\subitemvisible->]
378 (module\xi)at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};\pause
379 }{}
380 }%
381 }%
382 \end{tikzpicture}
383 }{}% end-descriptive diagram
384 \IfStrEq{\diagramtype}{bubble diagram}{% true-bubble diagram
385 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
386 \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
387 \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
388 \foreach \smitem [count=\xi] in {#2}{%
389 \ifnumequal{\xi}{1}{ %true
390 \node[bubble center node, smvisible on=<\xi->](center bubble){\smitem};
391 }{%false
392 \pgfmathtruncatemacro{\xj}{\xi-1}
393 \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
394 \edef\col{\@nameuse{color@\xj}}
395 \node[bubble node, smvisible on=<\xi->](module\xi)
396 at (center bubble.\angle) {\smitem };
397 }%
398 }%
399 \end{tikzpicture}
400 }{}%end-bubble diagram
401 \IfStrEq{\diagramtype}{constellation diagram}{% true-const diagram
402 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
403 \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
404 \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
405 \foreach \smitem [count=\xi] in {#2}{%
406 \ifnumequal{\xi}{1}{ %true
407 \node[planet, smvisible on=<\xi->](planet){\smitem};
408 }{%false
409 \pgfmathtruncatemacro{\xj}{\xi-1}
410 \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
411 \edef\col{\@nameuse{color@\xj}}
412 \node[satellite, smvisible on=<\xi->] (satellite\xi)
413 at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
414 \draw[connection planet satellite, smvisible on=<\xi->]
415 (planet) -- (satellite\xi);
416 }%
417 }%
418 \end{tikzpicture}
419 }{}%end-constellation diagram
420 \IfStrEq{\diagramtype}{connected constellation diagram}{% true-conn const diagram
421 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
422 \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
423 \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
424 \foreach \smitem [count=\xi] in {#2}{%
425 \ifnumequal{\xi}{1}{ %true
426 \node[planet,smvisible on=<\xi->](planet){\smitem};
427 }{%false
428 \pgfmathtruncatemacro{\xj}{\xi-1}
429 \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
430 \edef\col{\@nameuse{color@\xj}}
431 \node[satellite,smvisible on=<\xi->] (satellite\xj)
432 at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
433 }%
434 }%
435 \foreach \smitem [count=\xi] in {#2}{%
436 \ifnumgreater{\xi}{1}{ %true
437 \pgfmathtruncatemacro{\xj}{\xi-1}
438 \edef\col{\@nameuse{color@\xj}}
439 \pgfmathtruncatemacro{\xk}{mod(\xj,\actualnumitem) +1}
440 \pgfmathtruncatemacro{\smvisible}{\xi+1}
441 \path[connection planet satellite,-,smvisible on=<\smvisible->]
442 (satellite\xj) edge[bend right] (satellite\xk);
443 }{}
444 }%
445 \end{tikzpicture}
446 }{}%end-connected constellation diagram
447 \IfStrEq{\diagramtype}{priority descriptive diagram}{% true-priority descriptive diagram
448 \pgfmathparse{subtract(\sm@core@priorityarrowwidth,\sm@core@priorityarrowheadextend)}
449 \pgfmathsetmacro\sm@core@priorityticksize{\pgfmathresult/2}
450 \pgfmathsetmacro\arrowtickxshift{(\sm@core@priorityarrowwidth-\sm@core@priorityticksize)/2}
451 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
452 \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
453 \foreach \smitem [count=\xi] in {#2}{%
454 \edef\col{\@nameuse{color@\xi}}
455 \pgfmathtruncatemacro\smvisible{\xi+1}
456 \node[description,drop shadow={smvisible on=<\smvisible->},smvisible on=<\smvisible->]
457 (module\xi) at (0,0+\xi*\sm@core@descriptiveitemsysep) {\smitem};
458 \draw[line width=\sm@core@prioritytick,\col,smvisible on=<\smvisible->]
459 ([xshift=-\arrowtickxshift pt]module\xi.base west)--
460 ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\sm@core@priorityticksize pt,0)$);
461 }%
462 \coordinate (A) at (module1);
463 \coordinate (B) at (module\maxsmitem);
464 \CalcHeight(A,B){heightmodules}
465 \pgfmathadd{\heightmodules}{\sm@core@priorityarrowheightadvance}
466 \pgfmathsetmacro{\distancemodules}{\pgfmathresult}
467 \pgfmathsetmacro\arrowxshift{\sm@core@priorityarrowwidth/2}
468 \begin{pgfonlayer}{background}
469 \node[priority arrow] at ([xshift=-\arrowxshift pt]module1.south west){};
470 \end{pgfonlayer}
471 \end{tikzpicture}
472 }{}% end-priority descriptive diagram
473 \IfStrEq{\diagramtype}{sequence diagram}{% true-sequence diagram
474 \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
475 \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
476 \edef\col{\@nameuse{color@\xi}}
477 \ifnum\xi=1
478 \node[sequence item,smvisible on=<\xi->] (sequence-item\xi) {\x};
479 \else
480 \node[sequence item,anchor=west,smvisible on=<\xi->]
481 (sequence-item\xi) at (sequence-item\prevx.east) {\x};
482 \fi
483 }
484 \end{tikzpicture}
485 }{}% end-sequence diagram
486 }% end-no value 1
487 }% end-command
488
489 %%
490 %% Copyright (C) 2012-2013 by Claudio Fiandrino
491 %% E-mail: <claudio <dot> fiandrino <at> gmail <dot> com>
492 %%
493 %% This work may be distributed and/or modified under the
494 %% conditions of the LaTeX Project Public License (LPPL), either
495 %% version 1.3c of this license or (at your option) any later
496 %% version. The latest version of this license is in the file:
497 %%
498 %% http://www.latex-project.org/lppl.txt
499 %%
500 %% This work is "maintained" (as per LPPL maintenance status) by
501 %% Claudio Fiandrino.
502 %%
503 %% This work consists of the file smartdiagram.dtx
504 %% and the derived files smartdiagram.ins,
505 %% smartdiagram.pdf,
506 %% smartdiagramlibrarycore.definitions.code.tex,
507 %% smartdiagramlibrarycore.styles.code.tex,
508 %% smartdiagramlibrarycore.commands.code.tex
509 %% smartdiagramlibraryadditions.code.tex and
510 %% smartdiagram.sty.
511 %%
512 %%
513 %% End of file `smartdiagramlibrarycore.commands.code.tex'.