Debian Codegraph @

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

raw
1 %%
2 %% This is file `smartdiagramlibrarycore.definitions.code.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% smartdiagram.dtx (with options: `definitions')
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 \@namedef{color@1}{red!40}
19 \@namedef{color@2}{cyan!40}
20 \@namedef{color@3}{blue!40}
21 \@namedef{color@4}{green!40}
22 \@namedef{color@5}{orange!40}
23 \@namedef{color@6}{yellow!40}
24 \@namedef{color@7}{magenta!40}
25 \@namedef{color@8}{brown!40}
26 \@namedef{color@9}{violet!40}
27 \@namedef{color@10}{teal!40}
28 \tikzset{rnd rectangle/.style={rectangle,rounded corners}
29 }
30
31 \def\CalcHeight(#1,#2)#3{%
32 \pgfpointdiff{\pgfpointanchor{#1}{south west}}{\pgfpointanchor{#2}{north west}}
33 \pgfmathsetmacro{\myheight}{veclen(\pgf@x,\pgf@y)}
34 \global\expandafter\edef\csname #3\endcsname{\myheight}
35 }
36 \pgfkeys{/smart diagram/.cd, module minimum width/.initial=2cm,
37 module minimum height/.initial={1cm},
38 module y sep/.initial={1.65},
39 module x sep/.initial={2.75},
40 descriptive items y sep/.initial={1.75},
41 text width/.initial={1.5cm},
42 description title width/.initial={1.5cm},
43 description text width/.initial={5cm},
44 description title text width/.initial={1.25cm},
45 description title font/.initial={\small},
46 description font/.initial={\small},
47 description width/.initial={5.5cm},
48 font/.initial={\small},
49 border color/.initial={gray},
50 circular distance/.initial={2.75cm},
51 arrow line width/.initial={0.1cm},
52 module shape/.initial={rnd rectangle},
53 insert decoration/.initial={},
54 arrow tip/.initial={stealth},
55 arrow color/.initial={gray},
56 bubble center node size/.initial={4cm},
57 bubble center node font/.initial={\large},
58 bubble center node color/.initial={lightgray!60},
59 distance center/other bubbles/.initial=0.8cm,
60 distance text center bubble/.initial={0.5cm},
61 bubble fill opacity/.initial={0.5},
62 bubble node size/.initial={2.5cm},
63 bubble text opacity/.initial={0.8},
64 bubble node font/.initial={\normalfont},
65 planet size/.initial={2.5cm},
66 planet color/.initial={lightgray!60},
67 planet font/.initial={\large},
68 distance planet-connection/.initial={0.1cm},
69 distance planet-text/.initial={0.5cm},
70 planet text width/.initial={1.75cm},
71 satellite size/.initial={1.75cm},
72 satellite font/.initial={\normalfont},
73 satellite fill opacity/.initial={0.5},
74 satellite text opacity/.initial={0.8},
75 satellite text width/.initial={1.5cm},
76 distance satellite-connection/.initial={0.075cm},
77 connection line width/.initial={0.1cm},
78 connection color/.initial={gray},
79 distance planet-satellite/.initial={3.5cm},
80 priority arrow width/.initial={1.5cm},
81 priority arrow head extend/.initial={0.15cm},
82 priority tick size/.initial={5pt},
83 priority arrow height advance/.initial={2cm},
84 sequence item height/.initial={1cm},
85 sequence item width/.initial={2cm},
86 sequence item border color/.initial={gray},
87 sequence item border size/.initial={1.75\pgflinewidth},
88 sequence item font size/.initial={\normalfont},
89 sequence item fill opacity/.initial={1},
90 sequence item text opacity/.initial={1},
91 sequence item text width/.initial={1.9cm},
92 sequence item text color/.initial={black},
93 sequence item uniform color/.initial={gray!60!black},
94 arrow style/.initial={<-},
95 text color/.initial={black},
96 back arrow distance/.initial={0.5},
97 }%
98
99 \pgfkeys{/smart diagram/.cd, module minimum width/.get=\sm@core@modulewidth,
100 module minimum height/.get=\sm@core@moduleheight,
101 module y sep/.get=\sm@core@moduleysep,
102 module x sep/.get=\sm@core@modulexsep,
103 descriptive items y sep/.get=\sm@core@descriptiveitemsysep,
104 text width/.get=\sm@core@moduletextwidth,
105 description title width/.get=\sm@core@descriptiontitlewidth,
106 description text width/.get=\sm@core@descriptiontextwidth,
107 description title text width/.get=\sm@core@descriptiontitletextwidth,
108 description title font/.get=\sm@core@descriptiontitlefontsize,
109 description font/.get=\sm@core@descriptionfontsize,
110 description width/.get=\sm@core@descriptionwidth,
111 font/.get=\sm@core@modulefontsize,
112 border color/.get=\sm@core@bordercolor,
113 circular distance/.get=\sm@core@circulardistance,
114 arrow line width/.get=\sm@core@arrowlinewidth,
115 module shape/.get=\sm@core@moduleshape,
116 insert decoration/.get=\sm@core@borderdecoration,
117 arrow tip/.get=\sm@core@arrowtip,
118 arrow color/.get=\sm@core@arrowcolor,
119 bubble center node size/.get=\sm@core@bubblecenternodesize,
120 bubble center node font/.get=\sm@core@bubblecenternodefont,
121 bubble center node color/.get=\sm@core@bubblecenternodecolor,
122 distance center/other bubbles/.get=\sm@core@distancecenterotherbubbles,
123 distance text center bubble/.get=\sm@core@distancetextcenterbubble,
124 bubble fill opacity/.get=\sm@core@bubblefillopacity,
125 bubble node size/.get=\sm@core@bubblenodesize,
126 bubble text opacity/.get=\sm@core@bubbletextopacity,
127 bubble node font/.get=\sm@core@bubblenodefont,
128 planet size/.get=\sm@core@planetminimumsize,
129 planet color/.get=\sm@core@planetcolor,
130 planet font/.get=\sm@core@planetfont,
131 distance planet-connection/.get=\sm@core@planetoutersep,
132 distance planet-text/.get=\sm@core@planetinnersep,
133 planet text width/.get=\sm@core@planettextwidth,
134 satellite size/.get=\sm@core@satelliteminimumsize,
135 satellite font/.get=\sm@core@satellitefont,
136 satellite fill opacity/.get=\sm@core@satellitefillopacity,
137 satellite text opacity/.get=\sm@core@satellitetextopacity,
138 satellite text width/.get=\sm@core@satellitetextwidth,
139 distance satellite-connection/.get=\sm@core@satelliteoutersep,
140 connection line width/.get=\sm@core@connectionlinewidth,
141 connection color/.get=\sm@core@connectioncolor,
142 distance planet-satellite/.get=\sm@core@distanceplanetsatellite,
143 priority arrow width/.get=\sm@core@priorityarrowwidth,
144 priority arrow head extend/.get=\sm@core@priorityarrowheadextend,
145 priority tick size/.get=\sm@core@prioritytick,
146 priority arrow height advance/.get=\sm@core@priorityarrowheightadvance,
147 sequence item height/.get=\sm@core@seqitemheight,
148 sequence item width/.get=\sm@core@seqitemwidth,
149 sequence item border color/.get=\sm@core@seqitembordercolor,
150 sequence item border size/.get=\sm@core@seqlinewidth,
151 sequence item font size/.get=\sm@core@seqitemfont,
152 sequence item fill opacity/.get=\sm@core@seqitemfillopacity,
153 sequence item text opacity/.get=\sm@core@seqitemtextopacity,
154 sequence item text width/.get=\sm@core@seqitemtextwidth,
155 sequence item text color/.get=\sm@core@seqitemtextcolor,
156 sequence item uniform color/.get=\sm@core@seqitemuniformcol,
157 arrow style/.get=\sm@core@arrowstyle,
158 text color/.get=\sm@core@textcolor,
159 back arrow distance/.get=\sm@core@backarrowdistance,
160 }%
161 \pgfkeys{/smart diagram/.cd, set color list/.code={%
162 \foreach \listitem [count=\i] in {#1}{%
163 \global\@namedef{color@\i\expandafter}\expandafter{\listitem}%
164 }%
165 }%
166 }
167
168 \pgfkeys{/smart diagram/.cd, uniform color list/.code args={#1 for #2 items}{%
169 \foreach \listitem [count=\i] in {1,...,#2}{%
170 \global\@namedef{color@\i\expandafter}\expandafter{#1}%
171 }%
172 }%
173 }
174
175 \pgfkeys{/smart diagram/.cd, use predefined color list/.code={%
176 \@namedef{color@1}{red!30}%
177 \@namedef{color@2}{cyan!30}%
178 \@namedef{color@3}{blue!30}%
179 \@namedef{color@4}{green!30}%
180 \@namedef{color@5}{orange!30}%
181 \@namedef{color@6}{yellow!30}%
182 \@namedef{color@7}{magenta!30}%
183 \@namedef{color@8}{brown!30}%
184 \@namedef{color@9}{violet!30}%
185 \@namedef{color@10}{teal!30}%
186 }
187 }
188 \newif\ifbackarrowdisabled
189 \pgfkeys{/smart diagram/.cd,
190 back arrow disabled/.is if=backarrowdisabled,
191 back arrow disabled=false,
192 }
193 \newif\ifcircularfinalarrowdisabled
194 \pgfkeys{/smart diagram/.cd,
195 circular final arrow disabled/.is if=circularfinalarrowdisabled,
196 circular final arrow disabled=false,
197 }
198 \NewDocumentCommand{\smartdiagramset}{m}{%
199 \pgfkeys{/smart diagram/.cd,#1}%
200 \pgfkeys{/smart diagram/.cd, module minimum width/.get=\sm@core@modulewidth,
201 module minimum height/.get=\sm@core@moduleheight,
202 module y sep/.get=\sm@core@moduleysep,
203 module x sep/.get=\sm@core@modulexsep,
204 descriptive items y sep/.get=\sm@core@descriptiveitemsysep,
205 text width/.get=\sm@core@moduletextwidth,
206 description title width/.get=\sm@core@descriptiontitlewidth,
207 description text width/.get=\sm@core@descriptiontextwidth,
208 description title text width/.get=\sm@core@descriptiontitletextwidth,
209 description title font/.get=\sm@core@descriptiontitlefontsize,
210 description font/.get=\sm@core@descriptionfontsize,
211 description width/.get=\sm@core@descriptionwidth,
212 font/.get=\sm@core@modulefontsize,
213 border color/.get=\sm@core@bordercolor,
214 circular distance/.get=\sm@core@circulardistance,
215 arrow line width/.get=\sm@core@arrowlinewidth,
216 module shape/.get=\sm@core@moduleshape,
217 insert decoration/.get=\sm@core@borderdecoration,
218 arrow tip/.get=\sm@core@arrowtip,
219 arrow color/.get=\sm@core@arrowcolor,
220 bubble center node size/.get=\sm@core@bubblecenternodesize,
221 bubble center node font/.get=\sm@core@bubblecenternodefont,
222 bubble center node color/.get=\sm@core@bubblecenternodecolor,
223 distance center/other bubbles/.get=\sm@core@distancecenterotherbubbles,
224 distance text center bubble/.get=\sm@core@distancetextcenterbubble,
225 bubble fill opacity/.get=\sm@core@bubblefillopacity,
226 bubble node size/.get=\sm@core@bubblenodesize,
227 bubble text opacity/.get=\sm@core@bubbletextopacity,
228 bubble node font/.get=\sm@core@bubblenodefont,
229 planet size/.get=\sm@core@planetminimumsize,
230 planet color/.get=\sm@core@planetcolor,
231 planet font/.get=\sm@core@planetfont,
232 distance planet-connection/.get=\sm@core@planetoutersep,
233 distance planet-text/.get=\sm@core@planetinnersep,
234 planet text width/.get=\sm@core@planettextwidth,
235 satellite size/.get=\sm@core@satelliteminimumsize,
236 satellite font/.get=\sm@core@satellitefont,
237 satellite fill opacity/.get=\sm@core@satellitefillopacity,
238 satellite text opacity/.get=\sm@core@satellitetextopacity,
239 satellite text width/.get=\sm@core@satellitetextwidth,
240 distance satellite-connection/.get=\sm@core@satelliteoutersep,
241 connection line width/.get=\sm@core@connectionlinewidth,
242 connection color/.get=\sm@core@connectioncolor,
243 distance planet-satellite/.get=\sm@core@distanceplanetsatellite,
244 priority arrow width/.get=\sm@core@priorityarrowwidth,
245 priority arrow head extend/.get=\sm@core@priorityarrowheadextend,
246 priority tick size/.get=\sm@core@prioritytick,
247 priority arrow height advance/.get=\sm@core@priorityarrowheightadvance,
248 sequence item height/.get=\sm@core@seqitemheight,
249 sequence item width/.get=\sm@core@seqitemwidth,
250 sequence item border color/.get=\sm@core@seqitembordercolor,
251 sequence item border size/.get=\sm@core@seqlinewidth,
252 sequence item font size/.get=\sm@core@seqitemfont,
253 sequence item fill opacity/.get=\sm@core@seqitemfillopacity,
254 sequence item text opacity/.get=\sm@core@seqitemtextopacity,
255 sequence item text width/.get=\sm@core@seqitemtextwidth,
256 sequence item text color/.get=\sm@core@seqitemtextcolor,
257 sequence item uniform color/.get=\sm@core@seqitemuniformcol,
258 arrow style/.get=\sm@core@arrowstyle,
259 text color/.get=\sm@core@textcolor,
260 back arrow distance/.get=\sm@core@backarrowdistance,
261 }%
262 }%
263 \pgfkeys{/smart diagram/.cd,%
264 uniform sequence color/.is choice,%
265 uniform sequence color/true/.code={%
266 \tikzset{sequence item/.append style={%
267 fill=\sm@core@seqitemuniformcol,
268 },%
269 }%
270 },%
271 uniform sequence color/false/.style={sequence item},%
272 uniform sequence color/.default=false,%
273 }%
274 \pgfkeys{/smart diagram/.cd,%
275 uniform connection color/.is choice,%
276 uniform connection color/true/.code={%
277 \tikzset{connection planet satellite/.append style={%
278 \sm@core@connectioncolor
279 },%
280 }%
281 },%
282 uniform connection color/false/.style={connection planet satellite},%
283 uniform connection color/.default=false,%
284 }%
285 \pgfkeys{/smart diagram/.cd,%
286 uniform arrow color/.is choice,%
287 uniform arrow color/true/.code={%
288 \tikzset{diagram arrow type/.append style={%
289 \sm@core@arrowcolor
290 },%
291 }%
292 },%
293 uniform arrow color/false/.style={diagram arrow type},%
294 uniform arrow color/.default=false,%
295 }%
296
297
298 %%
299 %% Copyright (C) 2012-2013 by Claudio Fiandrino
300 %% E-mail: <claudio <dot> fiandrino <at> gmail <dot> com>
301 %%
302 %% This work may be distributed and/or modified under the
303 %% conditions of the LaTeX Project Public License (LPPL), either
304 %% version 1.3c of this license or (at your option) any later
305 %% version. The latest version of this license is in the file:
306 %%
307 %% http://www.latex-project.org/lppl.txt
308 %%
309 %% This work is "maintained" (as per LPPL maintenance status) by
310 %% Claudio Fiandrino.
311 %%
312 %% This work consists of the file smartdiagram.dtx
313 %% and the derived files smartdiagram.ins,
314 %% smartdiagram.pdf,
315 %% smartdiagramlibrarycore.definitions.code.tex,
316 %% smartdiagramlibrarycore.styles.code.tex,
317 %% smartdiagramlibrarycore.commands.code.tex
318 %% smartdiagramlibraryadditions.code.tex and
319 %% smartdiagram.sty.
320 %%
321 %%
322 %% End of file `smartdiagramlibrarycore.definitions.code.tex'.