summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-02 22:28:50 +0000
committerKarl Berry <karl@freefriends.org>2013-04-02 22:28:50 +0000
commitba89989f5cd51530e500f47fc9d078289265e6a6 (patch)
treeb2462c1a64e0189c381823a09bd0ea8b32a77ce0 /Master/texmf-dist
parent6574ff6201be11b02c528187bda322fe9ac79d57 (diff)
smartdiagram (2apr13)
git-svn-id: svn://tug.org/texlive/trunk@29611 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/smartdiagram/README4
-rw-r--r--Master/texmf-dist/doc/latex/smartdiagram/smartdiagram.pdfbin230760 -> 266073 bytes
-rw-r--r--Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibraryadditions.code.tex161
-rw-r--r--Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.commands.code.tex511
-rw-r--r--Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.definitions.code.tex319
-rw-r--r--Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.styles.code.tex183
-rw-r--r--Master/texmf-dist/source/latex/smartdiagram/smartdiagram.dtx1439
-rw-r--r--Master/texmf-dist/source/latex/smartdiagram/smartdiagram.ins38
-rw-r--r--Master/texmf-dist/tex/latex/smartdiagram/smartdiagram.sty867
9 files changed, 2285 insertions, 1237 deletions
diff --git a/Master/texmf-dist/doc/latex/smartdiagram/README b/Master/texmf-dist/doc/latex/smartdiagram/README
index d002feba250..9b3914ea45a 100644
--- a/Master/texmf-dist/doc/latex/smartdiagram/README
+++ b/Master/texmf-dist/doc/latex/smartdiagram/README
@@ -1,6 +1,8 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
smartdiagram --- Automatic creation of smart diagrams with LaTeX
-E-mail: claudio.fiandrino@gmail.com
+
+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
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/Master/texmf-dist/doc/latex/smartdiagram/smartdiagram.pdf b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagram.pdf
index 386180f40fa..54c051d0837 100644
--- a/Master/texmf-dist/doc/latex/smartdiagram/smartdiagram.pdf
+++ b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagram.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibraryadditions.code.tex b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibraryadditions.code.tex
new file mode 100644
index 00000000000..7be7ddca814
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibraryadditions.code.tex
@@ -0,0 +1,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'.
diff --git a/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.commands.code.tex b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.commands.code.tex
new file mode 100644
index 00000000000..5069921936a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.commands.code.tex
@@ -0,0 +1,511 @@
+%%
+%% This is file `smartdiagramlibrarycore.commands.code.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% smartdiagram.dtx (with options: `commands')
+%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+%% 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
+%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+%%
+
+\NewDocumentCommand{\smartdiagram}{r[] m}{%
+ \StrCut{#1}{:}\diagramtype\option
+ \IfNoValueTF{#1}{% true-no value 1
+ \PackageError{smartdiagram}%
+ {Type of the diagram not inserted. Please insert it}%
+ {Example: \protect\smartdiagram[flow diagram]}}
+ {%false-no value 1
+ \IfStrEq{\diagramtype}{}{%
+ \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
+ {Example: \protect\smartdiagram[flow diagram]}
+ }{}
+ \IfStrEq{\diagramtype}{circular diagram}{% true-circular diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+
+ \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
+
+ \foreach \smitem [count=\xi] in {#2}{%
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \pgfmathtruncatemacro{\angle}{180+360/\maxsmitem*\xi}
+ }{% false-clockwise-circular diagram
+ \pgfmathtruncatemacro{\angle}{360/\maxsmitem*\xi}
+ }
+ \edef\col{\@nameuse{color@\xi}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \node[module,drop shadow] (module\xi)
+ at (-\angle:\sm@core@circulardistance) {\smitem };
+ }{% false-clockwise-circular diagram
+ \node[module,drop shadow] (module\xi)
+ at (\angle:\sm@core@circulardistance) {\smitem };
+ }
+ }%
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnum\xi=\maxsmitem
+ \ifcircularfinalarrowdisabled
+ \relax
+ \else
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend right] (module\xi);
+ }{% false-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend left] (module\xi);
+ }
+ \fi
+ \else
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend right] (module\xi);
+ }{% false-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend left] (module\xi);
+ }
+
+ \fi
+ }%
+ \end{tikzpicture}
+ }{}% end-circular diagram
+ \IfStrEq{\diagramtype}{flow diagram}{% true-flow diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+
+ \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
+
+ \foreach \smitem [count=\xi] in {#2}{%
+ \edef\col{\@nameuse{color@\xi}}
+ \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
+ \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\sm@core@modulexsep} in
+ node[module,drop shadow] (module\xi) at +(\n2,0) {\smitem};
+ }{% false-horizontal-flow diagram
+ \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\sm@core@moduleysep} in
+ node[module,drop shadow] (module\xi) at +(0,\n2) {\smitem};
+ }
+ }%
+
+ \foreach \smitem [count=\xi] in {#2}{%
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \ifnum\xi<\maxsmitem
+ \begin{pgfonlayer}{smart diagram arrow back}
+ \draw[diagram arrow type] (module\xj) -- (module\xi);
+ \end{pgfonlayer}
+ \fi
+ % last arrow - not display it in background - check if disabled
+ \ifbackarrowdisabled
+ \relax
+ \else
+ \ifnum\xi=\maxsmitem
+ \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
+ \tikzset{square arrow/.style={
+ to path={-- ++(0,0.5) -| (\tikztotarget)}
+ }
+ }
+ \draw[diagram arrow type, square arrow]
+ (module\xj.north) to (module\xi.north);
+ }{% false-horizontal-flow diagram
+ \tikzset{square arrow/.style={
+ to path={-- ++(0.5,0) |- (\tikztotarget)}
+ }
+ }
+ \draw[diagram arrow type,square arrow]
+ (module\xj.east) to (module\xi);
+ }
+ \fi
+ \fi
+ }%
+ \end{tikzpicture}
+ }{}% end-flow diagram
+ \IfStrEq{\diagramtype}{descriptive diagram}{% true-descr. diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{%
+ \edef\col{\@nameuse{color@\xi}}
+ \foreach \subitem [count=\xii] in \smitem{%
+ \ifnumequal{\xii}{1}{% true
+ \node[description title,drop shadow]
+ (module-title\xi) at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};
+ }{}
+ \ifnumequal{\xii}{2}{% true
+ \node[description,drop shadow](module\xi)
+ at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};
+ }{}
+ }%
+ }%
+ \end{tikzpicture}
+ }{}% end-descr. diagram
+ \IfStrEq{\diagramtype}{bubble diagram}{% true-bubble diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
+ \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnumequal{\xi}{1}{ %true
+ \node[bubble center node](center bubble){\smitem};
+ }{%false
+ \pgfmathtruncatemacro{\xj}{\xi-1}
+ \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
+ \edef\col{\@nameuse{color@\xj}}
+ \node[bubble node] (module\xi)
+ at (center bubble.\angle) {\smitem };
+ }%
+ }%
+ \end{tikzpicture}
+ }{}%end-bubble diagram
+ \IfStrEq{\diagramtype}{constellation diagram}{% true-const diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
+ \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnumequal{\xi}{1}{ %true
+ \node[planet](planet){\smitem};
+ }{%false
+ \pgfmathtruncatemacro{\xj}{\xi-1}
+ \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
+ \edef\col{\@nameuse{color@\xj}}
+ \node[satellite] (satellite\xi)
+ at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
+ \draw[connection planet satellite] (planet) -- (satellite\xi);
+ }%
+ }%
+ \end{tikzpicture}
+ }{}%end-const diagram
+ \IfStrEq{\diagramtype}{connected constellation diagram}{% true-conn const diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
+ \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnumequal{\xi}{1}{ %true
+ \node[planet](planet){\smitem};
+ }{%false
+ \pgfmathtruncatemacro{\xj}{\xi-1}
+ \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
+ \edef\col{\@nameuse{color@\xj}}
+ \node[satellite] (satellite\xj)
+ at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
+ }%
+ }%
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnumgreater{\xi}{1}{ %true
+ \pgfmathtruncatemacro{\xj}{\xi-1}
+ \edef\col{\@nameuse{color@\xj}}
+ \pgfmathtruncatemacro{\xk}{mod(\xj,\actualnumitem) +1}
+ \path[connection planet satellite,-]
+ (satellite\xj) edge[bend right] (satellite\xk);
+ }{}
+ }%
+ \end{tikzpicture}
+ }{}%end-connected constellation diagram
+ \IfStrEq{\diagramtype}{priority descriptive diagram}{% true-priority descriptive diagram
+ \pgfmathparse{subtract(\sm@core@priorityarrowwidth,\sm@core@priorityarrowheadextend)}
+ \pgfmathsetmacro\sm@core@priorityticksize{\pgfmathresult/2}
+ \pgfmathsetmacro\arrowtickxshift{(\sm@core@priorityarrowwidth-\sm@core@priorityticksize)/2}
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \edef\col{\@nameuse{color@\xi}}
+ \node[description,drop shadow](module\xi)
+ at (0,0+\xi*\sm@core@descriptiveitemsysep) {\smitem};
+\draw[line width=\sm@core@prioritytick,\col]
+ ([xshift=-\arrowtickxshift pt]module\xi.base west)--
+ ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\sm@core@priorityticksize pt,0)$);
+ }%
+ \coordinate (A) at (module1);
+ \coordinate (B) at (module\maxsmitem);
+ \CalcHeight(A,B){heightmodules}
+ \pgfmathadd{\heightmodules}{\sm@core@priorityarrowheightadvance}
+ \pgfmathsetmacro{\distancemodules}{\pgfmathresult}
+ \pgfmathsetmacro\arrowxshift{\sm@core@priorityarrowwidth/2}
+ \begin{pgfonlayer}{background}
+ \node[priority arrow] at ([xshift=-\arrowxshift pt]module1.south west){};
+ \end{pgfonlayer}
+ \end{tikzpicture}
+ }{}% end-priority descriptive diagram
+ \IfStrEq{\diagramtype}{sequence diagram}{% true-sequence diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
+ \edef\col{\@nameuse{color@\xi}}
+ \ifnum\xi=1
+ \node[sequence item] (sequence-item\xi) {\x};
+ \else
+ \node[sequence item,anchor=west] (sequence-item\xi) at (sequence-item\prevx.east) {\x};
+ \fi
+ }
+ \end{tikzpicture}
+ }{}% end-sequence diagram
+}% end-no value 1
+}% end-command
+\NewDocumentCommand{\smartdiagramanimated}{r[] m}{%
+ \StrCut{#1}{:}\diagramtype\option
+ \IfNoValueTF{#1}{% true-no value 1
+ \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
+ {Example: \protect\smartdiagram[flow diagram]}}
+ {%false-no value 1
+ \IfStrEq{\diagramtype}{}{%
+ \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
+ {Example: \protect\smartdiagram[flow diagram]}
+ }{}
+ \IfStrEq{\diagramtype}{circular diagram}{% true-circular diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \pgfmathtruncatemacro{\angle}{180+360/\maxsmitem*\xi}
+ }{% false-clockwise-circular diagram
+ \pgfmathtruncatemacro{\angle}{360/\maxsmitem*\xi}
+ }
+ \edef\col{\@nameuse{color@\xi}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \node[module,
+ drop shadow={smvisible on=<\xi->},
+ smvisible on=<\xi->] (module\xi)
+ at (-\angle:\sm@core@circulardistance) {\smitem};
+ }{% false-clockwise-circular diagram
+ \node[module,
+ drop shadow={smvisible on=<\xi->},
+ smvisible on=<\xi->] (module\xi)
+ at (\angle:\sm@core@circulardistance) {\smitem};
+ }
+ }%
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnum\xi=\maxsmitem
+ \ifcircularfinalarrowdisabled
+ \relax
+ \else
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \pgfmathtruncatemacro{\adv}{\xi + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend right] (module\xi);
+ }{% false-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend left] (module\xi);
+ }
+ \fi
+ \else
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \pgfmathtruncatemacro{\adv}{\xi + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
+ smvisible on=<\adv->]
+ (module\xj) to[bend right] (module\xi);
+ }{% false-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
+ smvisible on=<\adv->]
+ (module\xj) to[bend left] (module\xi);
+ }
+
+ \fi
+ }%
+ \end{tikzpicture}
+ }{}% end-circular diagram
+ \IfStrEq{\diagramtype}{flow diagram}{% true-flow diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+
+ \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
+
+ \foreach \smitem [count=\xi] in {#2}{%
+ \edef\col{\@nameuse{color@\xi}}
+ \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
+ \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\sm@core@modulexsep}
+ in node[module,drop shadow={smvisible on=<\xi->},
+ smvisible on=<\xi->] (module\xi) at +(\n2,0) {\smitem};
+ }{% false-horizontal-flow diagram
+ \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\sm@core@moduleysep}
+ in node[module,drop shadow={smvisible on=<\xi->},
+ smvisible on=<\xi->] (module\xi) at +(0,\n2) {\smitem};
+ }
+ }%
+
+ \foreach \smitem [count=\xi] in {#2}{%
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \ifnum\xi<\maxsmitem
+ \begin{pgfonlayer}{smart diagram arrow back}
+ \draw[diagram arrow type,smvisible on=<\xi->]
+ (module\xj) -- (module\xi);
+ \end{pgfonlayer}
+ \fi
+ % last arrow - not display it in background - check if disabled
+ \ifbackarrowdisabled
+ \relax
+ \else
+ \ifnum\xi=\maxsmitem
+ \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
+ \tikzset{square arrow/.style={
+ to path={-- ++(0,0.5) -| (\tikztotarget)}
+ }
+ }
+ \draw[diagram arrow type, square arrow,smvisible on=<\xi->]
+ (module\xj.north) to (module\xi.north);
+ }{% false-horizontal-flow diagram
+ \tikzset{square arrow/.style={
+ to path={-- ++(0.5,0) |- (\tikztotarget)}
+ }
+ }
+ \draw[diagram arrow type,square arrow,smvisible on=<\xi->]
+ (module\xj.east) to (module\xi);
+ }
+ \fi
+ \fi
+ }%
+ \end{tikzpicture}
+ }{}% end-flow diagram
+ \IfStrEq{\diagramtype}{descriptive diagram}{% true-descriptive diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{%
+ \edef\col{\@nameuse{color@\xi}}
+
+ \foreach \subitem [count=\xii] in \smitem{%
+ \pgfmathtruncatemacro\subitemvisible{\xi}
+ \ifnumequal{\xii}{1}{% true
+ \node[description title,drop shadow, smvisible on=<\subitemvisible->]
+ (module-title\xi) at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};\pause
+ }{}
+ \ifnumequal{\xii}{2}{% true
+ \node[description,drop shadow,smvisible on=<\subitemvisible->]
+ (module\xi)at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};\pause
+ }{}
+ }%
+ }%
+ \end{tikzpicture}
+ }{}% end-descriptive diagram
+ \IfStrEq{\diagramtype}{bubble diagram}{% true-bubble diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
+ \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnumequal{\xi}{1}{ %true
+ \node[bubble center node, smvisible on=<\xi->](center bubble){\smitem};
+ }{%false
+ \pgfmathtruncatemacro{\xj}{\xi-1}
+ \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
+ \edef\col{\@nameuse{color@\xj}}
+ \node[bubble node, smvisible on=<\xi->](module\xi)
+ at (center bubble.\angle) {\smitem };
+ }%
+ }%
+ \end{tikzpicture}
+ }{}%end-bubble diagram
+ \IfStrEq{\diagramtype}{constellation diagram}{% true-const diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
+ \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnumequal{\xi}{1}{ %true
+ \node[planet, smvisible on=<\xi->](planet){\smitem};
+ }{%false
+ \pgfmathtruncatemacro{\xj}{\xi-1}
+ \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
+ \edef\col{\@nameuse{color@\xj}}
+ \node[satellite, smvisible on=<\xi->] (satellite\xi)
+ at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
+ \draw[connection planet satellite, smvisible on=<\xi->]
+ (planet) -- (satellite\xi);
+ }%
+ }%
+ \end{tikzpicture}
+ }{}%end-constellation diagram
+ \IfStrEq{\diagramtype}{connected constellation diagram}{% true-conn const diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
+ \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnumequal{\xi}{1}{ %true
+ \node[planet,smvisible on=<\xi->](planet){\smitem};
+ }{%false
+ \pgfmathtruncatemacro{\xj}{\xi-1}
+ \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
+ \edef\col{\@nameuse{color@\xj}}
+ \node[satellite,smvisible on=<\xi->] (satellite\xj)
+ at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
+ }%
+ }%
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnumgreater{\xi}{1}{ %true
+ \pgfmathtruncatemacro{\xj}{\xi-1}
+ \edef\col{\@nameuse{color@\xj}}
+ \pgfmathtruncatemacro{\xk}{mod(\xj,\actualnumitem) +1}
+ \pgfmathtruncatemacro{\smvisible}{\xi+1}
+ \path[connection planet satellite,-,smvisible on=<\smvisible->]
+ (satellite\xj) edge[bend right] (satellite\xk);
+ }{}
+ }%
+ \end{tikzpicture}
+ }{}%end-connected constellation diagram
+ \IfStrEq{\diagramtype}{priority descriptive diagram}{% true-priority descriptive diagram
+ \pgfmathparse{subtract(\sm@core@priorityarrowwidth,\sm@core@priorityarrowheadextend)}
+ \pgfmathsetmacro\sm@core@priorityticksize{\pgfmathresult/2}
+ \pgfmathsetmacro\arrowtickxshift{(\sm@core@priorityarrowwidth-\sm@core@priorityticksize)/2}
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
+ \foreach \smitem [count=\xi] in {#2}{%
+ \edef\col{\@nameuse{color@\xi}}
+ \pgfmathtruncatemacro\smvisible{\xi+1}
+ \node[description,drop shadow={smvisible on=<\smvisible->},smvisible on=<\smvisible->]
+ (module\xi) at (0,0+\xi*\sm@core@descriptiveitemsysep) {\smitem};
+\draw[line width=\sm@core@prioritytick,\col,smvisible on=<\smvisible->]
+ ([xshift=-\arrowtickxshift pt]module\xi.base west)--
+ ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\sm@core@priorityticksize pt,0)$);
+ }%
+ \coordinate (A) at (module1);
+ \coordinate (B) at (module\maxsmitem);
+ \CalcHeight(A,B){heightmodules}
+ \pgfmathadd{\heightmodules}{\sm@core@priorityarrowheightadvance}
+ \pgfmathsetmacro{\distancemodules}{\pgfmathresult}
+ \pgfmathsetmacro\arrowxshift{\sm@core@priorityarrowwidth/2}
+ \begin{pgfonlayer}{background}
+ \node[priority arrow] at ([xshift=-\arrowxshift pt]module1.south west){};
+ \end{pgfonlayer}
+ \end{tikzpicture}
+ }{}% end-priority descriptive diagram
+ \IfStrEq{\diagramtype}{sequence diagram}{% true-sequence diagram
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
+ \edef\col{\@nameuse{color@\xi}}
+ \ifnum\xi=1
+ \node[sequence item,smvisible on=<\xi->] (sequence-item\xi) {\x};
+ \else
+ \node[sequence item,anchor=west,smvisible on=<\xi->]
+ (sequence-item\xi) at (sequence-item\prevx.east) {\x};
+ \fi
+ }
+ \end{tikzpicture}
+ }{}% end-sequence diagram
+ }% end-no value 1
+}% end-command
+
+%%
+%% 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 `smartdiagramlibrarycore.commands.code.tex'.
diff --git a/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.definitions.code.tex b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.definitions.code.tex
new file mode 100644
index 00000000000..11c2f925e3b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.definitions.code.tex
@@ -0,0 +1,319 @@
+%%
+%% This is file `smartdiagramlibrarycore.definitions.code.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% smartdiagram.dtx (with options: `definitions')
+%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+%% 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
+%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+%%
+
+\@namedef{color@1}{red!40}
+\@namedef{color@2}{cyan!40}
+\@namedef{color@3}{blue!40}
+\@namedef{color@4}{green!40}
+\@namedef{color@5}{orange!40}
+\@namedef{color@6}{yellow!40}
+\@namedef{color@7}{magenta!40}
+\@namedef{color@8}{brown!40}
+\@namedef{color@9}{violet!40}
+\@namedef{color@10}{teal!40}
+\tikzset{rnd rectangle/.style={rectangle,rounded corners}
+}
+
+\def\CalcHeight(#1,#2)#3{%
+\pgfpointdiff{\pgfpointanchor{#1}{south west}}{\pgfpointanchor{#2}{north west}}
+\pgfmathsetmacro{\myheight}{veclen(\pgf@x,\pgf@y)}
+\global\expandafter\edef\csname #3\endcsname{\myheight}
+}
+\pgfkeys{/smart diagram/.cd, module minimum width/.initial=2cm,
+ module minimum height/.initial={1cm},
+ module y sep/.initial={1.65},
+ module x sep/.initial={2.75},
+ descriptive items y sep/.initial={1.75},
+ text width/.initial={1.5cm},
+ description title width/.initial={1.5cm},
+ description text width/.initial={5cm},
+ description title text width/.initial={1.25cm},
+ description title font/.initial={\small},
+ description font/.initial={\small},
+ description width/.initial={5.5cm},
+ font/.initial={\small},
+ border color/.initial={gray},
+ circular distance/.initial={2.75cm},
+ arrow line width/.initial={0.1cm},
+ module shape/.initial={rnd rectangle},
+ insert decoration/.initial={},
+ arrow tip/.initial={stealth},
+ arrow color/.initial={gray},
+ bubble center node size/.initial={4cm},
+ bubble center node font/.initial={\large},
+ bubble center node color/.initial={lightgray!60},
+ distance center/other bubbles/.initial=0.8cm,
+ distance text center bubble/.initial={0.5cm},
+ bubble fill opacity/.initial={0.5},
+ bubble node size/.initial={2.5cm},
+ bubble text opacity/.initial={0.8},
+ bubble node font/.initial={\normalfont},
+ planet size/.initial={2.5cm},
+ planet color/.initial={lightgray!60},
+ planet font/.initial={\large},
+ distance planet-connection/.initial={0.1cm},
+ distance planet-text/.initial={0.5cm},
+ planet text width/.initial={1.75cm},
+ satellite size/.initial={1.75cm},
+ satellite font/.initial={\normalfont},
+ satellite fill opacity/.initial={0.5},
+ satellite text opacity/.initial={0.8},
+ satellite text width/.initial={1.5cm},
+ distance satellite-connection/.initial={0.075cm},
+ connection line width/.initial={0.1cm},
+ connection color/.initial={gray},
+ distance planet-satellite/.initial={3.5cm},
+ priority arrow width/.initial={1.5cm},
+ priority arrow head extend/.initial={0.15cm},
+ priority tick size/.initial={5pt},
+ priority arrow height advance/.initial={2cm},
+ sequence item height/.initial={1cm},
+ sequence item width/.initial={2cm},
+ sequence item border color/.initial={gray},
+ sequence item border size/.initial={1.75\pgflinewidth},
+ sequence item font size/.initial={\normalfont},
+ sequence item fill opacity/.initial={1},
+ sequence item text opacity/.initial={1},
+ sequence item text width/.initial={1.9cm},
+ sequence item text color/.initial={black},
+ sequence item uniform color/.initial={gray!60!black},
+ arrow style/.initial={<-},
+ text color/.initial={black},
+}%
+
+\pgfkeys{/smart diagram/.cd, module minimum width/.get=\sm@core@modulewidth,
+ module minimum height/.get=\sm@core@moduleheight,
+ module y sep/.get=\sm@core@moduleysep,
+ module x sep/.get=\sm@core@modulexsep,
+ descriptive items y sep/.get=\sm@core@descriptiveitemsysep,
+ text width/.get=\sm@core@moduletextwidth,
+ description title width/.get=\sm@core@descriptiontitlewidth,
+ description text width/.get=\sm@core@descriptiontextwidth,
+ description title text width/.get=\sm@core@descriptiontitletextwidth,
+ description title font/.get=\sm@core@descriptiontitlefontsize,
+ description font/.get=\sm@core@descriptionfontsize,
+ description width/.get=\sm@core@descriptionwidth,
+ font/.get=\sm@core@modulefontsize,
+ border color/.get=\sm@core@bordercolor,
+ circular distance/.get=\sm@core@circulardistance,
+ arrow line width/.get=\sm@core@arrowlinewidth,
+ module shape/.get=\sm@core@moduleshape,
+ insert decoration/.get=\sm@core@borderdecoration,
+ arrow tip/.get=\sm@core@arrowtip,
+ arrow color/.get=\sm@core@arrowcolor,
+ bubble center node size/.get=\sm@core@bubblecenternodesize,
+ bubble center node font/.get=\sm@core@bubblecenternodefont,
+ bubble center node color/.get=\sm@core@bubblecenternodecolor,
+ distance center/other bubbles/.get=\sm@core@distancecenterotherbubbles,
+ distance text center bubble/.get=\sm@core@distancetextcenterbubble,
+ bubble fill opacity/.get=\sm@core@bubblefillopacity,
+ bubble node size/.get=\sm@core@bubblenodesize,
+ bubble text opacity/.get=\sm@core@bubbletextopacity,
+ bubble node font/.get=\sm@core@bubblenodefont,
+ planet size/.get=\sm@core@planetminimumsize,
+ planet color/.get=\sm@core@planetcolor,
+ planet font/.get=\sm@core@planetfont,
+ distance planet-connection/.get=\sm@core@planetoutersep,
+ distance planet-text/.get=\sm@core@planetinnersep,
+ planet text width/.get=\sm@core@planettextwidth,
+ satellite size/.get=\sm@core@satelliteminimumsize,
+ satellite font/.get=\sm@core@satellitefont,
+ satellite fill opacity/.get=\sm@core@satellitefillopacity,
+ satellite text opacity/.get=\sm@core@satellitetextopacity,
+ satellite text width/.get=\sm@core@satellitetextwidth,
+ distance satellite-connection/.get=\sm@core@satelliteoutersep,
+ connection line width/.get=\sm@core@connectionlinewidth,
+ connection color/.get=\sm@core@connectioncolor,
+ distance planet-satellite/.get=\sm@core@distanceplanetsatellite,
+ priority arrow width/.get=\sm@core@priorityarrowwidth,
+ priority arrow head extend/.get=\sm@core@priorityarrowheadextend,
+ priority tick size/.get=\sm@core@prioritytick,
+ priority arrow height advance/.get=\sm@core@priorityarrowheightadvance,
+ sequence item height/.get=\sm@core@seqitemheight,
+ sequence item width/.get=\sm@core@seqitemwidth,
+ sequence item border color/.get=\sm@core@seqitembordercolor,
+ sequence item border size/.get=\sm@core@seqlinewidth,
+ sequence item font size/.get=\sm@core@seqitemfont,
+ sequence item fill opacity/.get=\sm@core@seqitemfillopacity,
+ sequence item text opacity/.get=\sm@core@seqitemtextopacity,
+ sequence item text width/.get=\sm@core@seqitemtextwidth,
+ sequence item text color/.get=\sm@core@seqitemtextcolor,
+ sequence item uniform color/.get=\sm@core@seqitemuniformcol,
+ arrow style/.get=\sm@core@arrowstyle,
+ text color/.get=\sm@core@textcolor,
+}%
+\pgfkeys{/smart diagram/.cd, set color list/.code={
+ \foreach \listitem [count=\i] in {#1}{
+ \global\@namedef{color@\i\expandafter}\expandafter{\listitem}
+ }
+ }
+}
+
+\pgfkeys{/smart diagram/.cd, uniform color list/.code args={#1 for #2 items}{
+ \foreach \listitem [count=\i] in {1,...,#2}{
+ \global\@namedef{color@\i\expandafter}\expandafter{#1}
+ }
+ }
+}
+
+\pgfkeys{/smart diagram/.cd, use predefined color list/.code={
+ \@namedef{color@1}{red!30}
+ \@namedef{color@2}{cyan!30}
+ \@namedef{color@3}{blue!30}
+ \@namedef{color@4}{green!30}
+ \@namedef{color@5}{orange!30}
+ \@namedef{color@6}{yellow!30}
+ \@namedef{color@7}{magenta!30}
+ \@namedef{color@8}{brown!30}
+ \@namedef{color@9}{violet!30}
+ \@namedef{color@10}{teal!30}
+ }
+}
+\newif\ifbackarrowdisabled
+\pgfkeys{/smart diagram/.cd,
+ back arrow disabled/.is if=backarrowdisabled,
+ back arrow disabled=false,
+}
+\newif\ifcircularfinalarrowdisabled
+\pgfkeys{/smart diagram/.cd,
+ circular final arrow disabled/.is if=circularfinalarrowdisabled,
+ circular final arrow disabled=false,
+}
+\NewDocumentCommand{\smartdiagramset}{m}{%
+ \pgfkeys{/smart diagram/.cd,#1}%
+ \pgfkeys{/smart diagram/.cd, module minimum width/.get=\sm@core@modulewidth,
+ module minimum height/.get=\sm@core@moduleheight,
+ module y sep/.get=\sm@core@moduleysep,
+ module x sep/.get=\sm@core@modulexsep,
+ descriptive items y sep/.get=\sm@core@descriptiveitemsysep,
+ text width/.get=\sm@core@moduletextwidth,
+ description title width/.get=\sm@core@descriptiontitlewidth,
+ description text width/.get=\sm@core@descriptiontextwidth,
+ description title text width/.get=\sm@core@descriptiontitletextwidth,
+ description title font/.get=\sm@core@descriptiontitlefontsize,
+ description font/.get=\sm@core@descriptionfontsize,
+ description width/.get=\sm@core@descriptionwidth,
+ font/.get=\sm@core@modulefontsize,
+ border color/.get=\sm@core@bordercolor,
+ circular distance/.get=\sm@core@circulardistance,
+ arrow line width/.get=\sm@core@arrowlinewidth,
+ module shape/.get=\sm@core@moduleshape,
+ insert decoration/.get=\sm@core@borderdecoration,
+ arrow tip/.get=\sm@core@arrowtip,
+ arrow color/.get=\sm@core@arrowcolor,
+ bubble center node size/.get=\sm@core@bubblecenternodesize,
+ bubble center node font/.get=\sm@core@bubblecenternodefont,
+ bubble center node color/.get=\sm@core@bubblecenternodecolor,
+ distance center/other bubbles/.get=\sm@core@distancecenterotherbubbles,
+ distance text center bubble/.get=\sm@core@distancetextcenterbubble,
+ bubble fill opacity/.get=\sm@core@bubblefillopacity,
+ bubble node size/.get=\sm@core@bubblenodesize,
+ bubble text opacity/.get=\sm@core@bubbletextopacity,
+ bubble node font/.get=\sm@core@bubblenodefont,
+ planet size/.get=\sm@core@planetminimumsize,
+ planet color/.get=\sm@core@planetcolor,
+ planet font/.get=\sm@core@planetfont,
+ distance planet-connection/.get=\sm@core@planetoutersep,
+ distance planet-text/.get=\sm@core@planetinnersep,
+ planet text width/.get=\sm@core@planettextwidth,
+ satellite size/.get=\sm@core@satelliteminimumsize,
+ satellite font/.get=\sm@core@satellitefont,
+ satellite fill opacity/.get=\sm@core@satellitefillopacity,
+ satellite text opacity/.get=\sm@core@satellitetextopacity,
+ satellite text width/.get=\sm@core@satellitetextwidth,
+ distance satellite-connection/.get=\sm@core@satelliteoutersep,
+ connection line width/.get=\sm@core@connectionlinewidth,
+ connection color/.get=\sm@core@connectioncolor,
+ distance planet-satellite/.get=\sm@core@distanceplanetsatellite,
+ priority arrow width/.get=\sm@core@priorityarrowwidth,
+ priority arrow head extend/.get=\sm@core@priorityarrowheadextend,
+ priority tick size/.get=\sm@core@prioritytick,
+ priority arrow height advance/.get=\sm@core@priorityarrowheightadvance,
+ sequence item height/.get=\sm@core@seqitemheight,
+ sequence item width/.get=\sm@core@seqitemwidth,
+ sequence item border color/.get=\sm@core@seqitembordercolor,
+ sequence item border size/.get=\sm@core@seqlinewidth,
+ sequence item font size/.get=\sm@core@seqitemfont,
+ sequence item fill opacity/.get=\sm@core@seqitemfillopacity,
+ sequence item text opacity/.get=\sm@core@seqitemtextopacity,
+ sequence item text width/.get=\sm@core@seqitemtextwidth,
+ sequence item text color/.get=\sm@core@seqitemtextcolor,
+ sequence item uniform color/.get=\sm@core@seqitemuniformcol,
+ arrow style/.get=\sm@core@arrowstyle,
+ text color/.get=\sm@core@textcolor,
+ }%
+}%
+\pgfkeys{/smart diagram/.cd,%
+ uniform sequence color/.is choice,%
+ uniform sequence color/true/.code={%
+ \tikzset{sequence item/.append style={
+ fill=\sm@core@seqitemuniformcol,
+ },
+ }
+ },%
+ uniform sequence color/false/.style={sequence item},%
+ uniform sequence color/.default=false,
+}%
+\pgfkeys{/smart diagram/.cd,%
+ uniform connection color/.is choice,%
+ uniform connection color/true/.code={%
+ \tikzset{connection planet satellite/.append style={
+ \sm@core@connectioncolor
+ },
+ }
+ },%
+ uniform connection color/false/.style={connection planet satellite},%
+ uniform connection color/.default=false,
+}%
+\pgfkeys{/smart diagram/.cd,%
+ uniform arrow color/.is choice,%
+ uniform arrow color/true/.code={%
+ \tikzset{diagram arrow type/.append style={
+ \sm@core@arrowcolor
+ },
+ }
+ },%
+ uniform arrow color/false/.style={diagram arrow type},%
+ uniform arrow color/.default=false,
+}%
+
+
+%%
+%% 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 `smartdiagramlibrarycore.definitions.code.tex'.
diff --git a/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.styles.code.tex b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.styles.code.tex
new file mode 100644
index 00000000000..6972be4b692
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/smartdiagram/smartdiagramlibrarycore.styles.code.tex
@@ -0,0 +1,183 @@
+%%
+%% This is file `smartdiagramlibrarycore.styles.code.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% smartdiagram.dtx (with options: `styles')
+%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+%% 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
+%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+%%
+
+\tikzfading[name=priorityarrowfading,
+ bottom color=transparent!5,
+ top color=transparent!80
+]
+\tikzset{priority arrow fill/.style={
+ fill=gray,
+ path fading=priorityarrowfading
+ }
+}
+
+\tikzset{module/.style={
+ \pgfkeysvalueof{/smart diagram/module shape},
+ thick,
+ draw=\sm@core@bordercolor,
+ top color=white,
+ bottom color=\col,
+ text=\sm@core@textcolor,
+ text width=\sm@core@moduletextwidth,
+ minimum width=\sm@core@modulewidth,
+ minimum height=\sm@core@moduleheight,
+ font=\sm@core@modulefontsize,
+ \sm@core@borderdecoration
+ },
+ diagram arrow type/.style={
+ \sm@core@arrowstyle,
+ >=\sm@core@arrowtip,
+ line width=\sm@core@arrowlinewidth,
+ \col
+ },
+}
+\tikzset{description title/.style={
+ circle,
+ draw=\sm@core@bordercolor,
+ minimum width=\sm@core@descriptiontitlewidth,
+ anchor=east,
+ bottom color=\col,
+ top color=white!80!\col,
+ font=\sm@core@descriptiontitlefontsize,
+ text width=\sm@core@descriptiontitletextwidth,
+ \sm@core@borderdecoration,
+ },
+ description/.style={
+ \pgfkeysvalueof{/smart diagram/module shape},
+ text width=\sm@core@descriptiontextwidth,
+ draw=\sm@core@bordercolor,
+ anchor=west,
+ minimum height=\sm@core@moduleheight,
+ minimum width=\sm@core@descriptionwidth,
+ bottom color=\col,
+ top color=white!80!\col,
+ font=\sm@core@descriptionfontsize,
+ \sm@core@borderdecoration,
+ }
+}
+\tikzset{priority arrow/.style={
+ draw=\sm@core@bordercolor,
+ single arrow,
+ minimum height=\distancemodules,
+ minimum width=\sm@core@priorityarrowwidth,
+ priority arrow fill,
+ rotate=90,
+ single arrow head extend=\sm@core@priorityarrowheadextend,
+ anchor=west,
+ }
+}
+\tikzset{bubble center node/.style={
+ minimum size=\sm@core@bubblecenternodesize,
+ circle,
+ fill=\sm@core@bubblecenternodecolor,
+ font=\sm@core@bubblecenternodefont,
+ outer sep=\sm@core@distancecenterotherbubbles,
+ inner sep=\sm@core@distancetextcenterbubble,
+ },
+ bubble node/.style={
+ minimum size=\sm@core@bubblenodesize,
+ circle,
+ ultra thick,
+ font=\sm@core@bubblenodefont,
+ draw=white,
+ fill opacity=\sm@core@bubblefillopacity,
+ fill=\col,
+ text opacity=\sm@core@bubbletextopacity,
+ }
+}
+\tikzset{planet/.style={
+ minimum size=\sm@core@planetminimumsize,
+ circle,
+ fill=\sm@core@planetcolor,
+ font=\sm@core@planetfont,
+ outer sep=\sm@core@planetoutersep,
+ inner sep=\sm@core@planetinnersep,
+ text width=\sm@core@planettextwidth,
+ },
+ satellite/.style={
+ minimum size=\sm@core@satelliteminimumsize,
+ circle,
+ font=\sm@core@satellitefont,
+ fill opacity=\sm@core@satellitefillopacity,
+ fill=\col,
+ text opacity=\sm@core@satellitetextopacity,
+ text width=\sm@core@satellitetextwidth,
+ outer sep=\sm@core@satelliteoutersep,
+ },
+ connection planet satellite/.style={
+ ->,
+ line width=\sm@core@connectionlinewidth,
+ >=\sm@core@arrowtip,
+ \col,
+ }
+}
+
+\tikzset{sequence item/.style={
+ minimum height=\sm@core@seqitemheight,
+ minimum width=\sm@core@seqitemwidth,
+ signal,
+ signal from=west,
+ signal to=east,
+ draw=\sm@core@seqitembordercolor,
+ line width=\sm@core@seqlinewidth,
+ font=\sm@core@seqitemfont,
+ fill opacity=\sm@core@seqitemfillopacity,
+ fill=\col,
+ text opacity=\sm@core@seqitemtextopacity,
+ text width=\sm@core@seqitemtextwidth,
+ text=\sm@core@seqitemtextcolor,
+ }
+}
+\tikzset{let hypenation/.style={
+ execute at begin node={%
+ \hspace{0pt}%
+ }
+ }
+}%
+\tikzset{
+ sminvisible/.style={opacity=0,text opacity=0},
+ smvisible on/.style={smalt=#1{}{sminvisible}},
+ smalt/.code args={<#1>#2#3}{%
+ \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
+ },
+}
+
+%%
+%% 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 `smartdiagramlibrarycore.styles.code.tex'.
diff --git a/Master/texmf-dist/source/latex/smartdiagram/smartdiagram.dtx b/Master/texmf-dist/source/latex/smartdiagram/smartdiagram.dtx
index 052ab29dbf9..281885fde8a 100644
--- a/Master/texmf-dist/source/latex/smartdiagram/smartdiagram.dtx
+++ b/Master/texmf-dist/source/latex/smartdiagram/smartdiagram.dtx
@@ -5,7 +5,9 @@
%<*readme>
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
smartdiagram --- Automatic creation of smart diagrams with LaTeX
-E-mail: claudio.fiandrino@gmail.com
+
+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
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -27,7 +29,9 @@ simple documents and for presentations.
\preamble
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
smartdiagram --- Automatic creation of smart diagrams from lists of items.
-E-mail: claudio.fiandrino@gmail.com
+
+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
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -35,7 +39,8 @@ See http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2012-2013 by Claudio Fiandrino <claudio.fiandrino@gmail.com>
+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
@@ -49,7 +54,11 @@ Claudio Fiandrino.
This work consists of the file smartdiagram.dtx
and the derived files smartdiagram.ins,
- smartdiagram.pdf, and
+ smartdiagram.pdf,
+ smartdiagramlibrarycore.definitions.code.tex,
+ smartdiagramlibrarycore.styles.code.tex,
+ smartdiagramlibrarycore.commands.code.tex
+ smartdiagramlibraryadditions.code.tex and
smartdiagram.sty.
\endpostamble
@@ -57,6 +66,18 @@ and the derived files smartdiagram.ins,
\generate{
\file{\jobname.sty}{\from{\jobname.dtx}{package}}
}
+\generate{
+ \file{smartdiagramlibrarycore.definitions.code.tex}{\from{\jobname.dtx}{definitions}}
+}
+\generate{
+ \file{smartdiagramlibrarycore.styles.code.tex}{\from{\jobname.dtx}{styles}}
+}
+\generate{
+ \file{smartdiagramlibrarycore.commands.code.tex}{\from{\jobname.dtx}{commands}}
+}
+\generate{
+ \file{smartdiagramlibraryadditions.code.tex}{\from{\jobname.dtx}{additions}}
+}
%</install>
%<install>\endbatchfile
%<*internal>
@@ -77,7 +98,7 @@ and the derived files smartdiagram.ins,
%</internal>
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{smartdiagram}[2013/03/09 v0.2 Automatic creation of smart diagrams from lists of items.]
+\ProvidesPackage{smartdiagram}[2013/04/01 v0.3 Automatic creation of smart diagrams from lists of items.]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -88,11 +109,13 @@ and the derived files smartdiagram.ins,
\usepackage{microtype}
\usepackage{xcolor}
\usepackage{\jobname}
-\usetikzlibrary{shapes.geometric,decorations.pathmorphing}
+\usesmartdiagramlibrary{additions}
+\usetikzlibrary{shapes.geometric,decorations.pathmorphing,arrows}
\usepackage{hypdoc}
\newcommand{\library}[1]{\textcolor{red!80!black}{\texttt{#1}}}
\newcommand{\packoption}[2]{\textcolor{blue!60!cyan}{\texttt{#1}} \texttt{(initial:~#2)}}
\newcommand{\smkey}[1]{\textcolor{blue!60!cyan}{\texttt{#1}}}
+\newcommand{\smnumeration}[1]{\textcolor{green!70!blue}{\texttt{#1}}}
\newcommand{\diagram}[1]{\textcolor{orange!30!red}{\texttt{#1}}}
\newcommand{\mbrarg}[1]{\texttt{\{}\small\meta{#1}\texttt{\}}}
\newcommand{\mqbarg}[1]{\texttt{[}\small\meta{#1}\texttt{]}}
@@ -107,7 +130,7 @@ and the derived files smartdiagram.ins,
%</driver>
% \fi
%
-% \CheckSum{1102}
+% \CheckSum{1360}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -128,6 +151,9 @@ and the derived files smartdiagram.ins,
%
% \changes{v0.1}{2012/10/28}{Initial version}
% \changes{v0.2}{2013/03/09}{Clockwise order circular diagram/horizontal order flow diagram/Uniform colors/Sequence diagram}
+% \changes{v0.3}{2013/03/26}{Fix color arrow problem in circular diagram animated, add possibility uniform color list,
+% added initial null space to items to hypenate first word,libraries, additions, arrows styles
+% }
%
% \GetFileInfo{smartdiagram.sty}
% \title{The \textsf{smartdiagram} package\thanks{This document
@@ -161,7 +187,11 @@ and the derived files smartdiagram.ins,
% \item \library{shapes.arrows};
% \item \library{shapes.symbols} (from version 0.2).
% \end{itemize}
-% and it sets a new layer called \verb|smart diagram arrow back|.
+% and it sets a new layer called \verb|smart diagram arrow back|. From version 0.3, by loading the library
+% \begin{flushleft}
+% \texttt{\textbackslash usesmartdiagramlibrary\{}\library{additions}\texttt{\}}
+% \end{flushleft}
+% forces the Ti\textit{k}Z library \library{positioning} to be loaded as well.
%
% The package could be loaded by means of \cs{usepackage}\texttt{\{smartdiagram\}}.
%
@@ -204,15 +234,177 @@ and the derived files smartdiagram.ins,
% For diagrams like the \diagram{circular diagram} and the \diagram{flow diagram} the animation runs as follows: at the beginning the first item of the list is displayed, then each time appears an arrow connecting the previous element with the new one; at the end it is displayed the arrow connecting the last element with the first one. Considering instead the \diagram{descriptive diagram}, per couple description title-description, first it is shown the description title and subsequently the description. In the \diagram{priority descriptive diagram}, very simply, the list of items is deployted starting from the bottom, that is the less relevant item, to the top to progressively show much relevant items.
% For what concern the \diagram{bubble diagram}, the \diagram{constellation diagram} and the \diagram{connected constellation diagram}, at first it is always shown the \emph{bubble center} and \emph{planet}, respectively and later all the items subsequently.
% Finally, in the \diagram{sequence} diagram, the items are presented one at a time starting from the left one ending with the right one.
-%
+%
+% \section{Additions}
+% \DescribeMacro{\usesmartdiagramlibrary} From version 0.3, it is possible to load a separate library called \library{additions} which allows to create annotations over a smart diagram. Load the library through:
+% \begin{flushleft}
+% \texttt{\textbackslash usesmartdiagramlibrary\{}\library{additions}\texttt{\}}
+% \end{flushleft}
+% in the preamble. \DescribeMacro{\smartdiagramadd} The basic command introduced by the library is \cs{smartdiagramadd}\mqbarg{type of diagram}\mbrarg{list of items}\mbrarg{list of additions}. The \mbrarg{list of additions} have a special syntax:
+% \begin{flushleft}
+% \meta{position of module/Annotation text}
+% \end{flushleft}
+% where:
+% \begin{itemize}
+% \item \textit{position} is an anchor of Ti\textit{k}Z (i.e \texttt{above}, \texttt{below right} and so on);
+% \item \textit{module} is the name of a module in the smart diagram;
+% \item \textit{position} and \textit{module} should be separated by the string \texttt{of}: spaces before and after the string are \emph{mandatory}.
+% \end{itemize}
+% \textsf{Smartdiagram} defines as names:
+% \begin{itemize}
+% \item for the diagrams \diagram{circular diagram} and \diagram{circular diagram:clockwise}:\\ \smkey{module}\smnumeration{progressive-number} (no space or other symbols in between); example: \texttt{module1};
+% \item for the diagrams \diagram{flow diagram} and \diagram{flow diagram:horizontal}:\\ \smkey{module}\smnumeration{progressive-number}; example: \texttt{module3};
+% \item for the diagram \diagram{descriptive diagram}: \smkey{module-title}\smnumeration{progressive-number} for titles and \smkey{module}\smnumeration{progressive-number} for descriptions; example: \texttt{module-title1} and \texttt{module1};
+% \item for the diagram \diagram{bubble diagram}: \smkey{center bubble} for the center module and \smkey{module}\smnumeration{progressive-number} for the other modules; example: \texttt{center bubble} and \texttt{module2};
+% \item for the diagrams \diagram{constallation diagram} and \diagram{connected constellation diagram}: \smkey{planet} for the center module and \smkey{satellite}\smnumeration{progressive-number} for the other modules; example: \texttt{planet} and \texttt{satellite3};
+% \item for the diagram \diagram{priority descriptive diagram}: \smkey{module}\smnumeration{progressive-number};
+% \item for the diagram \diagram{sequence diagram}: \smkey{sequence-item}\smnumeration{progressive-number}; example: \texttt{sequence-item1}.
+% \end{itemize}
+% The use of the library \library{additions} in a document requires two compilation runs at least because of the Ti\textit{k}Z options \texttt{remember picture} and \texttt{overlay}.
+%
+% An example:
+% \begin{verbatim}
+% \begin{minipage}[t][3.5cm]{\textwidth}
+% \begin{center}
+% \smartdiagramset{
+% uniform color list=gray!60!black for 3 items,
+% back arrow disabled=true,
+% additions={
+% additional item offset=0.85cm,
+% additional item border color=red,
+% additional connections disabled=false,
+% additional arrow color=red,
+% additional arrow tip=stealth,
+% additional arrow line width=1pt,
+% additional arrow style=]-latex',
+% }
+% }
+% \smartdiagramadd[flow diagram:horizontal]{%
+% PGF,Ti\textit{k}Z,Smartdiagram%
+% }{%
+% below of module1/Low Level, below of module3/High level%
+% }
+% \end{center}
+% \end{minipage}
+% \end{verbatim}
+% The result:
+% \medskip
+%
+% \begin{minipage}[t][3.5cm]{\textwidth}
+% \begin{center}
+% \smartdiagramset{
+% uniform color list=gray!60!black for 3 items,
+% back arrow disabled=true,
+% additions={
+% additional item offset=0.85cm,
+% additional item border color=red,
+% additional connections disabled=false,
+% additional arrow color=red,
+% additional arrow tip=stealth,
+% additional arrow line width=1pt,
+% additional arrow style=]-latex',
+% }
+% }
+% \smartdiagramadd[flow diagram:horizontal]{%
+% PGF,Ti\textit{k}Z,Smartdiagram%
+% }{%
+% below of module1/Low Level, below of module3/High level%
+% }
+% \end{center}
+% \end{minipage}
+%
+% \DescribeMacro{\smartdiagramconnect} Notice that with the \cs{smartdiagramadd} facility it is not possible to fine customize the direction of the arrow tips. Since each additional module has as name\\ \smkey{additional-module}\smnumeration{progressive-number}, then by means of the specific command\\ \cs{smartdiagramconnect}\mbrarg{arrow options}\mbrarg{start module/end module} one could do better. For example:
+% \begin{verbatim}
+% \begin{minipage}[t][3.5cm]{\textwidth}
+% \begin{center}
+% \smartdiagramset{
+% uniform color list=gray!60!black for 3 items,
+% back arrow disabled=true,
+% additions={
+% additional item offset=0.85cm,
+% additional item border color=red,
+% additional arrow color=red,
+% additional arrow tip=stealth,
+% additional arrow line width=1pt,
+% additional arrow style=]-latex',
+% }
+% }
+% \smartdiagramadd[flow diagram:horizontal]{%
+% PGF,Ti\textit{k}Z,Smartdiagram%
+% }{%
+% below of module1/Low Level, below of module3/High level%
+% }
+% \smartdiagramconnect{{]-latex'}}{additional-module1/module1}
+% \smartdiagramconnect{{latex'-[}}{additional-module2/module3}
+% \end{center}
+% \end{minipage}
+% \end{verbatim}
+% gives:
+% \medskip
+%
+% \begin{minipage}[t][3.5cm]{\textwidth}
+% \begin{center}
+% \smartdiagramset{
+% uniform color list=gray!60!black for 3 items,
+% back arrow disabled=true,
+% additions={
+% additional item offset=0.85cm,
+% additional item border color=red,
+% additional arrow color=red,
+% additional arrow tip=stealth,
+% additional arrow line width=1pt,
+% additional arrow style=]-latex',
+% }
+% }
+% \smartdiagramadd[flow diagram:horizontal]{%
+% PGF,Ti\textit{k}Z,Smartdiagram%
+% }{%
+% below of module1/Low Level, below of module3/High level%
+% }
+% \smartdiagramconnect{{]-latex'}}{additional-module1/module1}
+% \smartdiagramconnect{{latex'-[}}{additional-module2/module3}
+% \end{center}
+% \end{minipage}
+% Because of the option \texttt{overlay}, it is better to protect within a \texttt{minipage} the diagram: in this way the missing bounding box update would not affect the subsequent/precedent text.
+%
+% By default, the arrows are customized by the keys which start with \smkey{additional} (explained more in detail in the subsubsection \ref{subsubsect:options}), but it is possible to override locally this definition, for example with:
+% \begin{verbatim}
+% \smartdiagramconnect{{latex'-[},green}{additional-module2/module3}
+% \end{verbatim}
+% For the moment, the library \library{additions} \emph{does not work} in the animated mode.
+%
% \section{The options}
% \label{sec:options}
% \subsection{Setting the options}
-% \DescribeMacro{\smartdiagramset} The options should be introduced similarly to what happens with \cs{tikzset} in Ti\textit{k}Z: \cs{smartdiagramset}\mbrarg{list of options}. Examples in which some options are used are shown in section \ref{sec:gallery}.
+% \DescribeMacro{\smartdiagramset} The options should be introduced similarly to what happens with \cs{tikzset} in Ti\textit{k}Z: \cs{smartdiagramset}\mbrarg{list of options}. As well as in Ti\textit{k}Z, it is possible to collect options within styles: see for more details subsection \ref{subsec:stylesdef}. Examples in which the options are used are shown in section \ref{sec:gallery}.
% \subsection{Available options}
-% Here follows the list of general available options.
+% Here follows the list of general available options: these options are related to generic aspects as color lists or arrows.
% \subsubsection{General options}
% \begin{itemize}
+% \item \packoption{set color list}{none}: this option allows the user to define the list of colors usable in the diagram;
+%
+% \item \packoption{uniform color list}{none}: this option allows the user to set one single color for the whole list of colors usable in the diagram;
+%
+% \item \packoption{use predefined color list}{none}: this option allows the user to reuse the pre-defined colors whenever in a previous diagram they have been changed;
+%
+% \item \packoption{insert decoration}{none}: this option allows to decorate the border of the module; the user should declare properly a decoration style and load manually the libraries required, e.g. \library{decorations.pathmorphing}; some more hints are given in section \ref{sec:recommendations};
+%
+% \item \packoption{arrow line width}{0.1cm}: this option sets the width of the connection arrows within two modules;
+%
+% \item \packoption{arrow tip}{stealth}: this option allows to select the single arrow tip; possible choices are described in the pgfmanual and for particular types it is recommended to load the library \library{arrows};
+%
+% \item \packoption{arrow style}{<-}: this option allows the user to define a new style for the arrow; as well as the key \smkey{arrow tip}, see the pgfmanual to see a list of possible arrow styles;
+%
+% \item \packoption{uniform arrow color}{false}: this option, set to true, activates the possibility to use one single arrow color for all the connections;
+%
+% \item \packoption{arrow color}{gray}: this option, when the key \smkey{uniform arrow color} is set to true, allows to select the uniform arrow color.
+%
+% \end{itemize}
+% \subsubsection{Specific options}
+% Here follows the list of specific available options per type of diagram.
+%
+% For what concern the \diagram{circular diagram}, \diagram{circular diagram:clockwise}, the \diagram{flow diagram} and the \diagram{flow diagram:horizontal}:
+% \begin{itemize}
% \item \packoption{module minimum width}{2cm}: this option sets the minimum width of the module;
%
% \item \packoption{module minimum height}{1cm}: this option sets the minimum height of the module;
@@ -229,31 +421,21 @@ and the derived files smartdiagram.ins,
%
% \item \packoption{border color}{gray}: this option sets the border color of the module;
%
-% \item \packoption{circular distance}{2.75cm}: this option sets the radius of cirle around which the modules in a \verb|circular diagram|;
+% \item \packoption{text color}{black}: this option sets the text color of the module;
%
-% \item \packoption{arrow line width}{0.1cm}: this option sets the width of the connection arrows within two modules;
+% \item \packoption{circular distance}{2.75cm}: this option sets the radius of cirle around which the modules in a \diagram{circular diagram};
%
-% \item \packoption{set color list}{none}: this option allows the user to define the list of colors usable in the diagram;
-%
-% \item \packoption{use predefined color list}{none}: this option allows the user to reuse the pre-defined colors whenever in a previous diagram they have been changed;
-%
-% \item \packoption{insert decoration}{none}: this option allows to decorate the border of the module; the user should declare properly a decoration style and load manually the libraries required, e.g. \library{decorations.pathmorphing}; some more hints are given in section \ref{sec:recommendations};
-%
-% \item \packoption{arrow tip}{stealth}: this option allows to select the arrow tip; possible choices are described in the pgfmanual and for particular types it is recommended to load the library \library{arrows}.
-% \end{itemize}
-% \subsubsection{Specific options}
-% Here follows the list of specific available options per type of diagram.
-%
-% For what concern the \diagram{circular diagram} and the \diagram{flow diagram}:
-% \begin{itemize}
-% \item \packoption{uniform arrow color}{false}: the option, set to \texttt{true} overrides the color list definition;
-% \item \packoption{arrow color}{gray}: this option allows to specify the color valid for all arrows.
% \end{itemize}
%
-% Considering just the \diagram{flow diagram}, there is a specific option to disable the back arrow going from the final module to the first one:
+% Considering just the \diagram{flow diagram} and the \diagram{flow diagram:horizontal}, there is a specific option to disable the back arrow going from the final module to the first one:
% \begin{itemize}
% \item \packoption{back arrow disabled}{false}: the option, set to \texttt{true} disables the back arrow.
% \end{itemize}
+%
+% Similarly, in the \diagram{circular diagram} and in the \diagram{circular diagram:clockwise}, there is a specific option to disable the back arrow going from the final module to the first one:
+% \begin{itemize}
+% \item \packoption{circular final arrow disabled}{false}: the option, set to \texttt{true} disables the final connection.
+% \end{itemize}
%
% For what concern the \diagram{descriptive diagram} and the \diagram{priority descriptive diagram}:
% \begin{itemize}
@@ -361,7 +543,67 @@ and the derived files smartdiagram.ins,
% \item \packoption{sequence item uniform color}{gray!60!black}: this option allows to specify the color valid for all the items in the sequence.
%
% \end{itemize}
+%
+% \subsubsection{Options of the additions library}
+% \label{subsubsect:options}
+% The options of the library necessitate to be set within a specific key \smkey{additions}; this key is defined as
+% \begin{verbatim}
+% \pgfkeys{/smart diagram/.cd,
+% additions/.style={/smart diagram/additions/.cd,#1}%
+% }
+% \end{verbatim} and it basically sets the correct path; indeed all of these keys are defined in a subtree of the main path: \verb!/smart diagram/additions!. For example:
+% \begin{verbatim}
+% \smartdiagramset{
+% additions={
+% additional item offset=0.85cm,
+% additional item border color=red,
+% additional arrow color=red,
+% additional arrow tip=stealth,
+% additional arrow line width=1pt,
+% additional arrow style=]-latex',
+% }
+% }
+% \end{verbatim}
+% Notice that each key starts with \smkey{additional}: in my opinion, although it may seems heavy type this every time, it could avoid some confusion with other keys.
+% \begin{itemize}
%
+% \item \packoption{additional item shape}{rectangle,rounded corners}: this option should be used to change the shape of the additional module; similarly to the key \smkey{module shape}, for some shapes the user should load manually the proper Ti\textit{k}Z library;
+%
+% \item \packoption{additional item border color}{none}: sets the border line color;
+%
+% \item \packoption{additional item bottom color}{white}: this option sets the bottom color of the module; use it if you want to keep the same aspect of the diagrams: \diagram{circular diagram}, \diagram{flow diagram}, \diagram{circular diagram:clockwise} and \diagram{flow diagram:horizontal};
+%
+% \item \packoption{additional item fill color}{none}: this option sets the fill color of the module; use it if you want to keep the same aspect of the other types of diagrams;
+%
+% \item \packoption{additional item text width}{1.75cm}: it defines the text width of the module;
+%
+% \item \packoption{additional item width}{2cm}: it defines the minimum width of the module;
+%
+% \item \packoption{additional item height}{1cm}: it defines the minimum height of the module;
+%
+% \item \packoption{additional item font}{\textbackslash normalfont}: this option allows to customize the font of the module;
+%
+% \item \packoption{additional item border decoration}{none}: this option allows to customize the module with a decoration; some more hints are given in section \ref{sec:recommendations};
+%
+% \item \packoption{additional item offset}{0.25cm}: this option defines the distance between the original module and the additional one;
+%
+% \item \packoption{additional item fill opacity}{1}: it sets the fill opacity of the module;
+%
+% \item \packoption{additional item text opacity}{1}: it sets the text opacity of the module;
+%
+% \item \packoption{additional arrow tip}{stealth}: this option defines the single arrow tip of the connection;
+%
+% \item \packoption{additional arrow line width}{0.1cm}: this option defines the line width of the connection;
+%
+% \item \packoption{additional arrow color}{gray}: this option defines the connection color;
+%
+% \item \packoption{additional arrow style}{->}: this option allows to customize the connection aspect, that is both arrow tips simultaneously;
+%
+% \item \packoption{additional item shadow}{none}: it allows to define a shadow for the module; use the usual Ti\textit{k}Z shadow options;
+%
+% \item \packoption{additional connections disabled}{true}: this option when set to \texttt{false} makes all the connections visible.
+%
+% \end{itemize}
% \section{Gallery of examples}
% \label{sec:gallery}
% \DescribeMacro{Horizontal flow chart: custom color list - no back arrow}
@@ -369,11 +611,9 @@ and the derived files smartdiagram.ins,
% \begin{verbatim}
% \begin{center}
% \smartdiagramset{border color=none,
-% set color list={blue!50!cyan,green!60!lime,
-% orange!50!red,red!80!black},
+% set color list={blue!50!cyan,green!60!lime,orange!50!red,red!80!black},
% back arrow disabled=true}
-% \smartdiagram[flow diagram:horizontal]{Set up,Run,
-% Analyse,Modify~/ Add}
+% \smartdiagram[flow diagram:horizontal]{Set up,Run,Analyse,Modify~/ Add}
% \end{center}
% \end{verbatim}
% \begin{center}
@@ -384,18 +624,40 @@ and the derived files smartdiagram.ins,
% \smartdiagram[flow diagram:horizontal]{Set up,Run,Analyse,Modify~/ Add}
% }
% \end{center}
+% \DescribeMacro{Horizontal flow chart: uniform color list - custom arrow style}
+% A similar example with an uniform color list and custom arrow style definition:
+% \begin{verbatim}
+% \begin{center}
+% \smartdiagramset{border color=none,
+% uniform color list=teal!60 for 4 items,
+% arrow style=[-stealth',
+% module x sep=3.75,
+% }
+% \smartdiagram[flow diagram:horizontal]{Set up,Run,Analyse,Modify~/ Add}
+% \end{center}
+% \end{verbatim}
+% \begin{center}
+% \scalebox{0.8}{
+% \smartdiagramset{border color=none,
+% uniform color list=teal!60 for 4 items,
+% arrow style=stealth'-], module x sep=3.75,
+% }
+% \smartdiagram[flow diagram:horizontal]{Set up,Run,Analyse,Modify~/ Add}
+% }
+% \end{center}
% \smartdiagramset{use predefined color list}
% \DescribeMacro{Circular diagram with custom options}
% Another example:
% \begin{verbatim}
% \begin{center}
% \smartdiagramset{circular distance=4cm,
-% font=\large, text width=2.5cm,
-% module minimum width=2.5cm,
-% module minimum height=1.5cm,
-% arrow tip=to}
-% \smartdiagram[circular diagram]{Set up~/ Adapt,Run,
-% Analyse,Modify~/ Add,Check,Check again}
+% font=\large,
+% text width=2.5cm,
+% module minimum width=2.5cm,
+% module minimum height=1.5cm,
+% arrow tip=to}
+% \smartdiagram[circular diagram]{Set up~/ Adapt,Run,Analyse,Modify~/ Add,
+% Check,Check again}
% \end{center}
% \end{verbatim}
% \begin{center}
@@ -405,23 +667,28 @@ and the derived files smartdiagram.ins,
% \smartdiagram[circular diagram]{Set up~/ Adapt,Run,Analyse,Modify~/ Add,Check,Check again}
% }
% \end{center}
-% \DescribeMacro{Circular diagram with custom shape}
-% An example with a diamond shape:
+% \DescribeMacro{Circular diagram with custom shape and final arrow disabled}
+% An example with a diamond shape and the final arrow disabled:
% \begin{verbatim}
% \begin{center}
% \usetikzlibrary{shapes.geometric} % required in the preamble
-% \smartdiagramset{module shape=diamond,font=\scriptsize,
-% module minimum width=1cm,module minimum height=1cm,
+% \smartdiagramset{module shape=diamond,
+% font=\scriptsize,
+% module minimum width=1cm,
+% module minimum height=1cm,
% text width=1cm,
-% circular distance=2cm}
-% \smartdiagram[circular diagram:clockwise]{Set up,Run,
-% Analyse,Modify~/ Add}
+% circular distance=2cm,
+% circular final arrow disabled=true,
+% }
+% \smartdiagram[circular diagram:clockwise]{Set up,Run,Analyse,Modify~/ Add}
% \end{center}
% \end{verbatim}
% \begin{center}
% \smartdiagramset{module shape=diamond,font=\scriptsize,
% module minimum width=1cm,module minimum height=1cm,text width=1cm,
-% circular distance=2cm}
+% circular distance=2cm,
+% circular final arrow disabled=true,
+% }
% \smartdiagram[circular diagram:clockwise]{Set up,Run,Analyse,Modify~/ Add}
% \end{center}
% \DescribeMacro{Flow diagram with decorated border and uniform arrow color}
@@ -429,14 +696,11 @@ and the derived files smartdiagram.ins,
% \begin{verbatim}
% \usetikzlibrary{decorations.pathmorphing} % required in the preamble
% \begin{center}
-% \tikzset{my decoration/.style={
-% decorate,
-% decoration=zigzag
-% }
-% }
+% \tikzset{my decoration/.style={decorate,decoration=zigzag}}
% \smartdiagramset{module shape=rectangle,
% insert decoration={my decoration},
-% uniform arrow color=true, arrow color=gray!50!black,
+% uniform arrow color=true,
+% arrow color=gray!50!black,
% }
% \smartdiagram[flow diagram]{Set up,Run,Analyse,Modify~/ Add}
% \end{center}
@@ -476,8 +740,9 @@ and the derived files smartdiagram.ins,
% An example of bubble diagram:
% \begin{verbatim}
% \begin{center}
-% \smartdiagram[bubble diagram]{Build a program,Set up,Run,
-% Analyze,Modify~/\\ Add,Check}
+% \smartdiagram[bubble diagram]{
+% Build a program,Set up,Run,Analyze,Modify~/\\ Add,Check
+% }
% \end{center}
% \end{verbatim}
% \begin{center}
@@ -489,8 +754,9 @@ and the derived files smartdiagram.ins,
% An example of constellation diagram:
% \begin{verbatim}
% \begin{center}
-% \smartdiagram[constellation diagram]{Build a program,
-% Set up,Run,Analyze,Modify~/\\ Add}
+% \smartdiagram[constellation diagram]{
+% Build a program,Set up,Run,Analyze,Modify~/\\ Add
+% }
% \end{center}
% \end{verbatim}
% \begin{center}
@@ -502,11 +768,13 @@ and the derived files smartdiagram.ins,
% An example of constellation diagram with custom colors:
% \begin{verbatim}
% \begin{center}
-% \smartdiagramset{set color list={orange!60, green!50!lime!60,
-% magenta!60,blue!50!cyan},
-% uniform connection color=true}
-% \smartdiagram[constellation diagram]{Build a program,
-% Set up,Run,Analyze,Modify~/\\ Add}
+% \smartdiagramset{set color list={orange!60, green!50!lime!60,magenta!60,
+% blue!50!cyan},
+% uniform connection color=true
+% }
+% \smartdiagram[constellation diagram]{
+% Build a program,Set up,Run,Analyze,Modify~/\\ Add
+% }
% \end{center}
% \end{verbatim}
% \begin{center}
@@ -520,7 +788,9 @@ and the derived files smartdiagram.ins,
% An example of connected constellation diagram:
% \begin{verbatim}
% \begin{center}
-% \smartdiagramset{planet color=orange!60, distance planet-satellite=1cm}
+% \smartdiagramset{planet color=orange!60,
+% distance planet-satellite=1cm
+% }
% \smartdiagram[connected constellation diagram]
% {Build a program,Set up,Run,Analyze,Modify~/\\ Add,Check}
% \end{center}
@@ -535,11 +805,12 @@ and the derived files smartdiagram.ins,
% An example of priority descriptive diagram describing that Ti\textit{k}Z is built on top of PGF and Smartdiagram on top of Ti\textit{k}Z:
% \begin{verbatim}
% \begin{center}
-% \smartdiagramset{set color list={blue!50!cyan,green!60!lime,
-% orange!50!red},
-% priority arrow width=2cm,priority arrow height advance=2.25cm}
-% \smartdiagram[priority descriptive diagram]{PGF,
-% Ti\textit{k}Z,Smartdiagram}
+% \smartdiagramset{
+% set color list={blue!50!cyan,green!60!lime,orange!50!red},
+% priority arrow width=2cm,
+% priority arrow height advance=2.25cm
+% }
+% \smartdiagram[priority descriptive diagram]{PGF,Ti\textit{k}Z,Smartdiagram}
% \end{center}
% \end{verbatim}
% \begin{center}
@@ -575,6 +846,65 @@ and the derived files smartdiagram.ins,
% }
% \smartdiagram[sequence diagram]{PGF,Ti\textit{k}Z,Smartdiagram}
% \end{center}
+% \DescribeMacro{Put additions to a diagram}
+% Here is an example of a circular diagram with some additions:
+% \begin{verbatim}
+% \usesmartdiagramlibrary{additions} % required in the preamble
+% \usetikzlibrary{arrows} % required in the preamble
+% \bigskip
+% \begin{minipage}[c][8cm]{\textwidth}
+% \centering
+% \smartdiagramset{
+% uniform color list=orange!60!yellow for 5 items,
+% circular final arrow disabled=true,
+% circular distance=2.25cm,
+% arrow tip=to,
+% arrow line width=2pt,
+% additions={
+% additional item bottom color=orange!60!yellow,
+% additional item border color=gray,
+% additional item shadow=drop shadow,
+% additional item offset=0.65cm,
+% additional arrow line width=2pt,
+% additional arrow tip=to,
+% additional arrow color=orange!60!yellow,
+% }
+% }
+% \smartdiagramadd[circular diagram]{
+% aa,bb,cc,dd,ee
+% }{
+% above of module1/Start,right of module5/End
+% }
+% \smartdiagramconnect{to-}{module1/additional-module1}
+% \smartdiagramconnect{-to}{module5/additional-module2}
+% \end{minipage}
+% \end{verbatim}
+% \begin{minipage}[c][8cm]{\textwidth}
+% \centering
+% \smartdiagramset{
+% uniform color list=orange!60!yellow for 5 items,
+% circular final arrow disabled=true,
+% circular distance=2.25cm,
+% arrow tip=to,
+% arrow line width=2pt,
+% additions={
+% additional item bottom color=orange!60!yellow,
+% additional item border color=gray,
+% additional item shadow=drop shadow,
+% additional item offset=0.65cm,
+% additional arrow line width=2pt,
+% additional arrow tip=to,
+% additional arrow color=orange!60!yellow,
+% }
+% }
+% \smartdiagramadd[circular diagram]{
+% aa,bb,cc,dd,ee
+% }{
+% above of module1/Start,right of module5/End
+% }
+% \smartdiagramconnect{to-}{module1/additional-module1}
+% \smartdiagramconnect{-to}{module5/additional-module2}
+% \end{minipage}
%
% \section{Recommendations and known issues}
% \label{sec:recommendations}
@@ -583,11 +913,66 @@ and the derived files smartdiagram.ins,
% \begin{verbatim}
% \smartdiagramset{use predefined color list}
% \end{verbatim}
+%
+% In order to use one color for all the items it is possible to exploit the \smkey{uniform color list}; it has a particular syntax:
+% \begin{verbatim}
+% \smartdiagramset{uniform color list=<some color> for <n> items}
+% \end{verbatim}
+% The \meta{some color} is set for a list of \meta{n} items and nothing more, so in order to avoid problems make sure you dimension \meta{n} correctly. Indeed, in case \meta{n} is lower than the number of items inside the diagram the following happens:
+% \begin{verbatim}
+% \begin{center}
+% \smartdiagramset{
+% uniform color list=gray!60!black for 2 items,
+% back arrow disabled=true,
+% }
+% \smartdiagram[flow diagram:horizontal]{PGF,Ti\textit{k}Z,Smartdiagram}
+% \end{center}
+% \end{verbatim}
+% \begin{center}
+% \smartdiagramset{use predefined color list,
+% uniform color list=gray!60!black for 2 items,
+% back arrow disabled=true,
+% }
+% \smartdiagram[flow diagram:horizontal]{PGF,Ti\textit{k}Z,Smartdiagram}
+% \end{center}
+% In conclusion, the uniform setting is extend only for \meta{n} items, for the remaining ones the predefined or a custom color list is used.
%
+% Notice also that the key \smkey{uniform color list} makes the arrow color be uniform for \meta{n} items, but it has no relation with the \smkey{uniform arrow color} which automatically makes \emph{all} items with an uniform color. Indeed, the color taken by the arrows with:
+% \begin{verbatim}
+% \smartdiagramset{uniform arrow color=true}
+% \end{verbatim}
+% could be customized throught the key \smkey{arrow color}, while \smkey{uniform color list} make modules and arrows be rendered with the same color.
+%
+% \subsection{Defining styles}
+% \label{subsec:stylesdef}
+% The \textsf{smartdiagram} package admits the definition of styles to collect key-definitions; for example:
+% \begin{verbatim}
+% \smartdiagramset{my diagram style/.style={
+% module shape=diamond,
+% font=\scriptsize,
+% module minimum width=1cm,
+% module minimum height=1cm,
+% text width=1cm
+% }
+% }
+% \end{verbatim}
+% can be subsequently used in:
+% \begin{verbatim}
+% \begin{center}
+% \smartdiagramset{my diagram style, arrow tip=to}
+% \smartdiagram[circular diagram]{Do, This, Only, For, Me}
+% \end{center}
+% \begin{center}
+% \smartdiagramset{my diagram style, module y sep=2.5}
+% \smartdiagram[flow diagram]{Do, This, For, Me}
+% \end{center}
+% \end{verbatim}
+%
% \subsection{Circular, bubble and constellation diagrams}
% For these type of diagrams, the number of items is relevant: too many items lead to overlapping satellites and bubbles besides any attempt to resize things by means of keys that reduce the radius.
%
% Notice also that imposing a too short distance from the planet to satellites is bad and leads to something like:
+% \smartdiagramset{use predefined color list}
% \begin{verbatim}
% \begin{center}
% \smartdiagramset{planet color=orange!60, distance planet-satellite=1cm}
@@ -612,7 +997,7 @@ and the derived files smartdiagram.ins,
% A working example:
% \begin{verbatim}
% \smartdiagram[descriptive diagram]{
-% {Set up,The set up operation consist of..},
+% {Set up, The set up operation consist of..},
% {Run, {After having set up the program, you must run..}},
% {Analyze, You must check what did with analytical tools like..},
% }
@@ -620,7 +1005,7 @@ and the derived files smartdiagram.ins,
% A non-working example:
% \begin{verbatim}
% \smartdiagram[descriptive diagram]{
-% {Set up,The set up operation consist of..},
+% {Set up, The set up operation consist of..},
% {Run, {After having set up the program, you must run..}},
% {Analyze, You must check what did with analytical tools like..}
% }
@@ -650,7 +1035,7 @@ and the derived files smartdiagram.ins,
% \tikzset{my decoration/.style={decorate,decoration=random steps}}
% \smartdiagramset{insert decoration=my decoration}
% \smartdiagramanimated[descriptive diagram]{
-% {Set up,The set up operation consist of..},
+% {Set up, The set up operation consist of..},
% {Run, {After having set up the program, you must run..}},
% {Analyze, You must check what did with analytical tools like..},
% {Modify, {After the analysis, you can still modify or add..}},
@@ -710,7 +1095,43 @@ and the derived files smartdiagram.ins,
}
\pgfdeclarelayer{smart diagram arrow back}
\pgfsetlayers{background,smart diagram arrow back,main}
+
+
+\def\usesmartdiagramlibrary{\pgfutil@ifnextchar[{\use@smartdiagramlibrary}{\use@@smartdiagramlibrary}}%}
+\def\use@smartdiagramlibrary[#1]{\use@@smartdiagramlibrary{#1}}
+\def\use@@smartdiagramlibrary#1{%
+ \edef\pgf@list{#1}%
+ \pgfutil@for\pgf@temp:=\pgf@list\do{%
+ \expandafter\pgfkeys@spdef\expandafter\pgf@temp\expandafter{\pgf@temp}%
+ \ifx\pgf@temp\pgfutil@empty
+ \else
+ \expandafter\ifx\csname smartdiagram@library@\pgf@temp @loaded\endcsname\relax%
+ \expandafter\global\expandafter\let\csname smartdiagram@library@\pgf@temp @loaded\endcsname=\pgfutil@empty%
+ \expandafter\edef\csname smartdiagram@library@#1@atcode\endcsname{\the\catcode`\@}
+ \expandafter\edef\csname smartdiagram@library@#1@barcode\endcsname{\the\catcode`\|}
+ \catcode`\@=11
+ \catcode`\|=12
+ \pgfutil@InputIfFileExists{smartdiagramlibrary\pgf@temp.code.tex}{}{
+ \PackageError{smartdiagram}{I did not find the smartdiagram library '\pgf@temp'.}{}
+ }%
+ \catcode`\@=\csname smartdiagram@library@#1@atcode\endcsname
+ \catcode`\|=\csname smartdiagram@library@#1@barcode\endcsname
+ \fi%
+ \fi
+ }%
+}
+
+\usesmartdiagramlibrary{core.definitions}
+\usesmartdiagramlibrary{core.styles}
+\usesmartdiagramlibrary{core.commands}
% \end{macrocode}
+% \iffalse
+%</package>
+% \fi
+%
+% \iffalse
+%<*definitions>
+% \fi
% \subsection{Keys and color declaration}
% The predefined colors:
% \begin{macrocode}
@@ -796,72 +1217,74 @@ and the derived files smartdiagram.ins,
sequence item text width/.initial={1.9cm},
sequence item text color/.initial={black},
sequence item uniform color/.initial={gray!60!black},
+ arrow style/.initial={<-},
+ text color/.initial={black},
}%
-\pgfkeys{/smart diagram/.cd, module minimum width/.get=\modulewidth,
- module minimum height/.get=\moduleheight,
- module y sep/.get=\moduleysep,
- module x sep/.get=\modulexsep,
- descriptive items y sep/.get=\descriptiveitemsysep,
- text width/.get=\moduletextwidth,
- description title width/.get=\descriptiontitlewidth,
- description text width/.get=\descriptiontextwidth,
- description title text width/.get=\descriptiontitletextwidth,
- description title font/.get=\descriptiontitlefontsize,
- description font/.get=\descriptionfontsize,
- description width/.get=\descriptionwidth,
- font/.get=\modulefontsize,
- border color/.get=\bordercolor,
- circular distance/.get=\circulardistance,
- arrow line width/.get=\arrowlinewidth,
- module shape/.get=\moduleshape,
- insert decoration/.get=\borderdecoration,
- arrow tip/.get=\arrowtip,
- arrow color/.get=\arrowcolor,
- bubble center node size/.get=\bubblecenternodesize,
- bubble center node font/.get=\bubblecenternodefont,
- bubble center node color/.get=\bubblecenternodecolor,
- distance center/other bubbles/.get=\distancecenterotherbubbles,
- distance text center bubble/.get=\distancetextcenterbubble,
- bubble fill opacity/.get=\bubblefillopacity,
- bubble node size/.get=\bubblenodesize,
- bubble text opacity/.get=\bubbletextopacity,
- bubble node font/.get=\bubblenodefont,
- planet size/.get=\planetminimumsize,
- planet color/.get=\planetcolor,
- planet font/.get=\planetfont,
- distance planet-connection/.get=\planetoutersep,
- distance planet-text/.get=\planetinnersep,
- planet text width/.get=\planettextwidth,
- satellite size/.get=\satelliteminimumsize,
- satellite font/.get=\satellitefont,
- satellite fill opacity/.get=\satellitefillopacity,
- satellite text opacity/.get=\satellitetextopacity,
- satellite text width/.get=\satellitetextwidth,
- distance satellite-connection/.get=\satelliteoutersep,
- connection line width/.get=\connectionlinewidth,
- connection color/.get=\connectioncolor,
- distance planet-satellite/.get=\distanceplanetsatellite,
- priority arrow width/.get=\priorityarrowwidth,
- priority arrow head extend/.get=\priorityarrowheadextend,
- priority tick size/.get=\prioritytick,
- priority arrow height advance/.get=\priorityarrowheightadvance,
- sequence item height/.get=\seqitemheight,
- sequence item width/.get=\seqitemwidth,
- sequence item border color/.get=\seqitembordercolor,
- sequence item border size/.get=\seqlinewidth,
- sequence item font size/.get=\seqitemfont,
- sequence item fill opacity/.get=\seqitemfillopacity,
- sequence item text opacity/.get=\seqitemtextopacity,
- sequence item text width/.get=\seqitemtextwidth,
- sequence item text color/.get=\seqitemtextcolor,
- sequence item uniform color/.get=\seqitemuniformcol,
+\pgfkeys{/smart diagram/.cd, module minimum width/.get=\sm@core@modulewidth,
+ module minimum height/.get=\sm@core@moduleheight,
+ module y sep/.get=\sm@core@moduleysep,
+ module x sep/.get=\sm@core@modulexsep,
+ descriptive items y sep/.get=\sm@core@descriptiveitemsysep,
+ text width/.get=\sm@core@moduletextwidth,
+ description title width/.get=\sm@core@descriptiontitlewidth,
+ description text width/.get=\sm@core@descriptiontextwidth,
+ description title text width/.get=\sm@core@descriptiontitletextwidth,
+ description title font/.get=\sm@core@descriptiontitlefontsize,
+ description font/.get=\sm@core@descriptionfontsize,
+ description width/.get=\sm@core@descriptionwidth,
+ font/.get=\sm@core@modulefontsize,
+ border color/.get=\sm@core@bordercolor,
+ circular distance/.get=\sm@core@circulardistance,
+ arrow line width/.get=\sm@core@arrowlinewidth,
+ module shape/.get=\sm@core@moduleshape,
+ insert decoration/.get=\sm@core@borderdecoration,
+ arrow tip/.get=\sm@core@arrowtip,
+ arrow color/.get=\sm@core@arrowcolor,
+ bubble center node size/.get=\sm@core@bubblecenternodesize,
+ bubble center node font/.get=\sm@core@bubblecenternodefont,
+ bubble center node color/.get=\sm@core@bubblecenternodecolor,
+ distance center/other bubbles/.get=\sm@core@distancecenterotherbubbles,
+ distance text center bubble/.get=\sm@core@distancetextcenterbubble,
+ bubble fill opacity/.get=\sm@core@bubblefillopacity,
+ bubble node size/.get=\sm@core@bubblenodesize,
+ bubble text opacity/.get=\sm@core@bubbletextopacity,
+ bubble node font/.get=\sm@core@bubblenodefont,
+ planet size/.get=\sm@core@planetminimumsize,
+ planet color/.get=\sm@core@planetcolor,
+ planet font/.get=\sm@core@planetfont,
+ distance planet-connection/.get=\sm@core@planetoutersep,
+ distance planet-text/.get=\sm@core@planetinnersep,
+ planet text width/.get=\sm@core@planettextwidth,
+ satellite size/.get=\sm@core@satelliteminimumsize,
+ satellite font/.get=\sm@core@satellitefont,
+ satellite fill opacity/.get=\sm@core@satellitefillopacity,
+ satellite text opacity/.get=\sm@core@satellitetextopacity,
+ satellite text width/.get=\sm@core@satellitetextwidth,
+ distance satellite-connection/.get=\sm@core@satelliteoutersep,
+ connection line width/.get=\sm@core@connectionlinewidth,
+ connection color/.get=\sm@core@connectioncolor,
+ distance planet-satellite/.get=\sm@core@distanceplanetsatellite,
+ priority arrow width/.get=\sm@core@priorityarrowwidth,
+ priority arrow head extend/.get=\sm@core@priorityarrowheadextend,
+ priority tick size/.get=\sm@core@prioritytick,
+ priority arrow height advance/.get=\sm@core@priorityarrowheightadvance,
+ sequence item height/.get=\sm@core@seqitemheight,
+ sequence item width/.get=\sm@core@seqitemwidth,
+ sequence item border color/.get=\sm@core@seqitembordercolor,
+ sequence item border size/.get=\sm@core@seqlinewidth,
+ sequence item font size/.get=\sm@core@seqitemfont,
+ sequence item fill opacity/.get=\sm@core@seqitemfillopacity,
+ sequence item text opacity/.get=\sm@core@seqitemtextopacity,
+ sequence item text width/.get=\sm@core@seqitemtextwidth,
+ sequence item text color/.get=\sm@core@seqitemtextcolor,
+ sequence item uniform color/.get=\sm@core@seqitemuniformcol,
+ arrow style/.get=\sm@core@arrowstyle,
+ text color/.get=\sm@core@textcolor,
}%
-
% \end{macrocode}
% The specific key to set the list of colors:
% \begin{macrocode}
-
\pgfkeys{/smart diagram/.cd, set color list/.code={
\foreach \listitem [count=\i] in {#1}{
\global\@namedef{color@\i\expandafter}\expandafter{\listitem}
@@ -869,6 +1292,13 @@ and the derived files smartdiagram.ins,
}
}
+\pgfkeys{/smart diagram/.cd, uniform color list/.code args={#1 for #2 items}{
+ \foreach \listitem [count=\i] in {1,...,#2}{
+ \global\@namedef{color@\i\expandafter}\expandafter{#1}
+ }
+ }
+}
+
\pgfkeys{/smart diagram/.cd, use predefined color list/.code={
\@namedef{color@1}{red!30}
\@namedef{color@2}{cyan!30}
@@ -882,84 +1312,140 @@ and the derived files smartdiagram.ins,
\@namedef{color@10}{teal!30}
}
}
-
% \end{macrocode}
-% The specific key to disable the back arrow in the flow diagram:
+% The specific key to disable the back arrow in the \diagram{flow diagram} and in the \diagram{flow diagram:horizontal}:
% \begin{macrocode}
-
\newif\ifbackarrowdisabled
\pgfkeys{/smart diagram/.cd,
back arrow disabled/.is if=backarrowdisabled,
back arrow disabled=false,
}
-
% \end{macrocode}
-% The specific command to use within the document to use the keys:
+% The specific key to disable the final arrow in the \diagram{circular diagram} and in the \diagram{circular diagram: clockwise}:
+% \begin{macrocode}
+\newif\ifcircularfinalarrowdisabled
+\pgfkeys{/smart diagram/.cd,
+ circular final arrow disabled/.is if=circularfinalarrowdisabled,
+ circular final arrow disabled=false,
+}
+% \end{macrocode}
+% The command to activate the various keys:
% \begin{macrocode}
-
\NewDocumentCommand{\smartdiagramset}{m}{%
\pgfkeys{/smart diagram/.cd,#1}%
- \pgfkeys{/smart diagram/.cd, module minimum width/.get=\modulewidth,
- module minimum height/.get=\moduleheight,
- module y sep/.get=\moduleysep,
- module x sep/.get=\modulexsep,
- descriptive items y sep/.get=\descriptiveitemsysep,
- text width/.get=\moduletextwidth,
- description title width/.get=\descriptiontitlewidth,
- description text width/.get=\descriptiontextwidth,
- description title text width/.get=\descriptiontitletextwidth,
- description title font/.get=\descriptiontitlefontsize,
- description font/.get=\descriptionfontsize,
- description width/.get=\descriptionwidth,
- font/.get=\modulefontsize,
- border color/.get=\bordercolor,
- circular distance/.get=\circulardistance,
- arrow line width/.get=\arrowlinewidth,
- module shape/.get=\moduleshape,
- insert decoration/.get=\borderdecoration,
- arrow tip/.get=\arrowtip,
- arrow color/.get=\arrowcolor,
- bubble center node size/.get=\bubblecenternodesize,
- bubble center node font/.get=\bubblecenternodefont,
- bubble center node color/.get=\bubblecenternodecolor,
- distance center/other bubbles/.get=\distancecenterotherbubbles,
- distance text center bubble/.get=\distancetextcenterbubble,
- bubble fill opacity/.get=\bubblefillopacity,
- bubble node size/.get=\bubblenodesize,
- bubble text opacity/.get=\bubbletextopacity,
- bubble node font/.get=\bubblenodefont,
- planet size/.get=\planetminimumsize,
- planet color/.get=\planetcolor,
- planet font/.get=\planetfont,
- distance planet-connection/.get=\planetoutersep,
- distance planet-text/.get=\planetinnersep,
- planet text width/.get=\planettextwidth,
- satellite size/.get=\satelliteminimumsize,
- satellite font/.get=\satellitefont,
- satellite fill opacity/.get=\satellitefillopacity,
- satellite text opacity/.get=\satellitetextopacity,
- satellite text width/.get=\satellitetextwidth,
- distance satellite-connection/.get=\satelliteoutersep,
- connection line width/.get=\connectionlinewidth,
- connection color/.get=\connectioncolor,
- distance planet-satellite/.get=\distanceplanetsatellite,
- priority arrow width/.get=\priorityarrowwidth,
- priority arrow head extend/.get=\priorityarrowheadextend,
- priority tick size/.get=\prioritytick,
- priority arrow height advance/.get=\priorityarrowheightadvance,
- sequence item height/.get=\seqitemheight,
- sequence item width/.get=\seqitemwidth,
- sequence item border color/.get=\seqitembordercolor,
- sequence item border size/.get=\seqlinewidth,
- sequence item font size/.get=\seqitemfont,
- sequence item fill opacity/.get=\seqitemfillopacity,
- sequence item text opacity/.get=\seqitemtextopacity,
- sequence item text width/.get=\seqitemtextwidth,
- sequence item text color/.get=\seqitemtextcolor,
- sequence item uniform color/.get=\seqitemuniformcol,
+ \pgfkeys{/smart diagram/.cd, module minimum width/.get=\sm@core@modulewidth,
+ module minimum height/.get=\sm@core@moduleheight,
+ module y sep/.get=\sm@core@moduleysep,
+ module x sep/.get=\sm@core@modulexsep,
+ descriptive items y sep/.get=\sm@core@descriptiveitemsysep,
+ text width/.get=\sm@core@moduletextwidth,
+ description title width/.get=\sm@core@descriptiontitlewidth,
+ description text width/.get=\sm@core@descriptiontextwidth,
+ description title text width/.get=\sm@core@descriptiontitletextwidth,
+ description title font/.get=\sm@core@descriptiontitlefontsize,
+ description font/.get=\sm@core@descriptionfontsize,
+ description width/.get=\sm@core@descriptionwidth,
+ font/.get=\sm@core@modulefontsize,
+ border color/.get=\sm@core@bordercolor,
+ circular distance/.get=\sm@core@circulardistance,
+ arrow line width/.get=\sm@core@arrowlinewidth,
+ module shape/.get=\sm@core@moduleshape,
+ insert decoration/.get=\sm@core@borderdecoration,
+ arrow tip/.get=\sm@core@arrowtip,
+ arrow color/.get=\sm@core@arrowcolor,
+ bubble center node size/.get=\sm@core@bubblecenternodesize,
+ bubble center node font/.get=\sm@core@bubblecenternodefont,
+ bubble center node color/.get=\sm@core@bubblecenternodecolor,
+ distance center/other bubbles/.get=\sm@core@distancecenterotherbubbles,
+ distance text center bubble/.get=\sm@core@distancetextcenterbubble,
+ bubble fill opacity/.get=\sm@core@bubblefillopacity,
+ bubble node size/.get=\sm@core@bubblenodesize,
+ bubble text opacity/.get=\sm@core@bubbletextopacity,
+ bubble node font/.get=\sm@core@bubblenodefont,
+ planet size/.get=\sm@core@planetminimumsize,
+ planet color/.get=\sm@core@planetcolor,
+ planet font/.get=\sm@core@planetfont,
+ distance planet-connection/.get=\sm@core@planetoutersep,
+ distance planet-text/.get=\sm@core@planetinnersep,
+ planet text width/.get=\sm@core@planettextwidth,
+ satellite size/.get=\sm@core@satelliteminimumsize,
+ satellite font/.get=\sm@core@satellitefont,
+ satellite fill opacity/.get=\sm@core@satellitefillopacity,
+ satellite text opacity/.get=\sm@core@satellitetextopacity,
+ satellite text width/.get=\sm@core@satellitetextwidth,
+ distance satellite-connection/.get=\sm@core@satelliteoutersep,
+ connection line width/.get=\sm@core@connectionlinewidth,
+ connection color/.get=\sm@core@connectioncolor,
+ distance planet-satellite/.get=\sm@core@distanceplanetsatellite,
+ priority arrow width/.get=\sm@core@priorityarrowwidth,
+ priority arrow head extend/.get=\sm@core@priorityarrowheadextend,
+ priority tick size/.get=\sm@core@prioritytick,
+ priority arrow height advance/.get=\sm@core@priorityarrowheightadvance,
+ sequence item height/.get=\sm@core@seqitemheight,
+ sequence item width/.get=\sm@core@seqitemwidth,
+ sequence item border color/.get=\sm@core@seqitembordercolor,
+ sequence item border size/.get=\sm@core@seqlinewidth,
+ sequence item font size/.get=\sm@core@seqitemfont,
+ sequence item fill opacity/.get=\sm@core@seqitemfillopacity,
+ sequence item text opacity/.get=\sm@core@seqitemtextopacity,
+ sequence item text width/.get=\sm@core@seqitemtextwidth,
+ sequence item text color/.get=\sm@core@seqitemtextcolor,
+ sequence item uniform color/.get=\sm@core@seqitemuniformcol,
+ arrow style/.get=\sm@core@arrowstyle,
+ text color/.get=\sm@core@textcolor,
}%
}%
-% \end{macrocode}
+% \end{macrocode}
+% Key to let the sequence color be uniform:
+% \begin{macrocode}
+\pgfkeys{/smart diagram/.cd,%
+ uniform sequence color/.is choice,%
+ uniform sequence color/true/.code={%
+ \tikzset{sequence item/.append style={
+ fill=\sm@core@seqitemuniformcol,
+ },
+ }
+ },%
+ uniform sequence color/false/.style={sequence item},%
+ uniform sequence color/.default=false,
+}%
+% \end{macrocode}
+% Key to let the connection planet satellite color be uniform:
+% \begin{macrocode}
+\pgfkeys{/smart diagram/.cd,%
+ uniform connection color/.is choice,%
+ uniform connection color/true/.code={%
+ \tikzset{connection planet satellite/.append style={
+ \sm@core@connectioncolor
+ },
+ }
+ },%
+ uniform connection color/false/.style={connection planet satellite},%
+ uniform connection color/.default=false,
+}%
+% \end{macrocode}
+% Key to let the arrow color be uniform:
+% \begin{macrocode}
+\pgfkeys{/smart diagram/.cd,%
+ uniform arrow color/.is choice,%
+ uniform arrow color/true/.code={%
+ \tikzset{diagram arrow type/.append style={
+ \sm@core@arrowcolor
+ },
+ }
+ },%
+ uniform arrow color/false/.style={diagram arrow type},%
+ uniform arrow color/.default=false,
+}%
+
+% \end{macrocode}
+% \iffalse
+%</definitions>
+% \fi
+%
+% \iffalse
+%<*styles>
+% \fi
% The fading style applied to the \diagram{priority descriptive diagram} and styles diagram definition:
% \begin{macrocode}
\tikzfading[name=priorityarrowfading,
@@ -975,157 +1461,145 @@ and the derived files smartdiagram.ins,
\tikzset{module/.style={
\pgfkeysvalueof{/smart diagram/module shape},
thick,
- draw=\bordercolor,
+ draw=\sm@core@bordercolor,
top color=white,
- bottom color=\col,
- text width=\moduletextwidth,
- minimum width=\modulewidth,
- minimum height=\moduleheight,
- font=\modulefontsize,
- \borderdecoration
+ bottom color=\col,
+ text=\sm@core@textcolor,
+ text width=\sm@core@moduletextwidth,
+ minimum width=\sm@core@modulewidth,
+ minimum height=\sm@core@moduleheight,
+ font=\sm@core@modulefontsize,
+ \sm@core@borderdecoration
},
diagram arrow type/.style={
- >=\arrowtip,line width=\arrowlinewidth,\col
+ \sm@core@arrowstyle,
+ >=\sm@core@arrowtip,
+ line width=\sm@core@arrowlinewidth,
+ \col
},
}
-
-% let the arrow color be uniform
-\pgfkeys{/smart diagram/.cd,%
- uniform arrow color/.is choice,%
- uniform arrow color/true/.code={%
- \tikzset{diagram arrow type/.append style={
- \arrowcolor
- },
- }
- },%
- uniform arrow color/false/.style={diagram arrow type},%
- uniform arrow color/.default=false,
-}%
-
-
\tikzset{description title/.style={
circle,
- draw=\bordercolor,
- minimum width=\descriptiontitlewidth,
+ draw=\sm@core@bordercolor,
+ minimum width=\sm@core@descriptiontitlewidth,
anchor=east,
bottom color=\col,
top color=white!80!\col,
- font=\descriptiontitlefontsize,
- text width=\descriptiontitletextwidth,
- \borderdecoration,
+ font=\sm@core@descriptiontitlefontsize,
+ text width=\sm@core@descriptiontitletextwidth,
+ \sm@core@borderdecoration,
},
description/.style={
\pgfkeysvalueof{/smart diagram/module shape},
- text width=\descriptiontextwidth,
- draw=\bordercolor,
+ text width=\sm@core@descriptiontextwidth,
+ draw=\sm@core@bordercolor,
anchor=west,
- minimum height=\moduleheight,
- minimum width=\descriptionwidth,
+ minimum height=\sm@core@moduleheight,
+ minimum width=\sm@core@descriptionwidth,
bottom color=\col,
top color=white!80!\col,
- font=\descriptionfontsize,
- \borderdecoration,
+ font=\sm@core@descriptionfontsize,
+ \sm@core@borderdecoration,
}
}
\tikzset{priority arrow/.style={
- draw=\bordercolor,
+ draw=\sm@core@bordercolor,
single arrow,
minimum height=\distancemodules,
- minimum width=\priorityarrowwidth,
+ minimum width=\sm@core@priorityarrowwidth,
priority arrow fill,
rotate=90,
- single arrow head extend=\priorityarrowheadextend,
+ single arrow head extend=\sm@core@priorityarrowheadextend,
anchor=west,
}
}
\tikzset{bubble center node/.style={
- minimum size=\bubblecenternodesize,
+ minimum size=\sm@core@bubblecenternodesize,
circle,
- fill=\bubblecenternodecolor,
- font=\bubblecenternodefont,
- outer sep=\distancecenterotherbubbles,
- inner sep=\distancetextcenterbubble,
+ fill=\sm@core@bubblecenternodecolor,
+ font=\sm@core@bubblecenternodefont,
+ outer sep=\sm@core@distancecenterotherbubbles,
+ inner sep=\sm@core@distancetextcenterbubble,
},
bubble node/.style={
- minimum size=\bubblenodesize,
+ minimum size=\sm@core@bubblenodesize,
circle,
ultra thick,
- font=\bubblenodefont,
+ font=\sm@core@bubblenodefont,
draw=white,
- fill opacity=\bubblefillopacity,
+ fill opacity=\sm@core@bubblefillopacity,
fill=\col,
- text opacity=\bubbletextopacity,
+ text opacity=\sm@core@bubbletextopacity,
}
}
\tikzset{planet/.style={
- minimum size=\planetminimumsize,
+ minimum size=\sm@core@planetminimumsize,
circle,
- fill=\planetcolor,
- font=\planetfont,
- outer sep=\planetoutersep,
- inner sep=\planetinnersep,
- text width=\planettextwidth,
+ fill=\sm@core@planetcolor,
+ font=\sm@core@planetfont,
+ outer sep=\sm@core@planetoutersep,
+ inner sep=\sm@core@planetinnersep,
+ text width=\sm@core@planettextwidth,
},
satellite/.style={
- minimum size=\satelliteminimumsize,
+ minimum size=\sm@core@satelliteminimumsize,
circle,
- font=\satellitefont,
- fill opacity=\satellitefillopacity,
+ font=\sm@core@satellitefont,
+ fill opacity=\sm@core@satellitefillopacity,
fill=\col,
- text opacity=\satellitetextopacity,
- text width=\satellitetextwidth,
- outer sep=\satelliteoutersep,
+ text opacity=\sm@core@satellitetextopacity,
+ text width=\sm@core@satellitetextwidth,
+ outer sep=\sm@core@satelliteoutersep,
},
connection planet satellite/.style={
- line width=\connectionlinewidth,
- >=\arrowtip,
- \col,
+ ->,
+ line width=\sm@core@connectionlinewidth,
+ >=\sm@core@arrowtip,
+ \col,
}
}
\tikzset{sequence item/.style={
- minimum height=\seqitemheight,
- minimum width=\seqitemwidth,
+ minimum height=\sm@core@seqitemheight,
+ minimum width=\sm@core@seqitemwidth,
signal,
signal from=west,
signal to=east,
- draw=\seqitembordercolor,
- line width=\seqlinewidth,
- font=\seqitemfont,
- fill opacity=\seqitemfillopacity,
+ draw=\sm@core@seqitembordercolor,
+ line width=\sm@core@seqlinewidth,
+ font=\sm@core@seqitemfont,
+ fill opacity=\sm@core@seqitemfillopacity,
fill=\col,
- text opacity=\seqitemtextopacity,
- text width=\seqitemtextwidth,
- text=\seqitemtextcolor,
+ text opacity=\sm@core@seqitemtextopacity,
+ text width=\sm@core@seqitemtextwidth,
+ text=\sm@core@seqitemtextcolor,
}
}
-
-% let the sequence color be uniform
-\pgfkeys{/smart diagram/.cd,%
- uniform sequence color/.is choice,%
- uniform sequence color/true/.code={%
- \tikzset{sequence item/.append style={
- fill=\seqitemuniformcol,
- },
- }
- },%
- uniform sequence color/false/.style={sequence item},%
- uniform sequence color/.default=false,
-}%
-
-% let the connection planet satellite color be uniform
-\pgfkeys{/smart diagram/.cd,%
- uniform connection color/.is choice,%
- uniform connection color/true/.code={%
- \tikzset{connection planet satellite/.append style={
- \connectioncolor
- },
- }
- },%
- uniform connection color/false/.style={connection planet satellite},%
- uniform connection color/.default=false,
+% let the first word of the item be hypenate
+\tikzset{let hypenation/.style={
+ execute at begin node={%
+ \hspace{0pt}%
+ }
+ }
}%
-% \end{macrocode}
+% \end{macrocode}
+% The definition of the visibility style:
+% \begin{macrocode}
+\tikzset{
+ sminvisible/.style={opacity=0,text opacity=0},
+ smvisible on/.style={smalt=#1{}{sminvisible}},
+ smalt/.code args={<#1>#2#3}{%
+ \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
+ },
+}
+% \end{macrocode}
+% \iffalse
+%</styles>
+% \fi
+%
+% \iffalse
+%<*commands>
+% \fi
% \subsection{Commands}
% Definition of the two commands. The diagrams:
% \begin{macrocode}
@@ -1141,7 +1615,7 @@ and the derived files smartdiagram.ins,
{Example: \protect\smartdiagram[flow diagram]}
}{}
\IfStrEq{\diagramtype}{circular diagram}{% true-circular diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
@@ -1154,38 +1628,54 @@ and the derived files smartdiagram.ins,
\edef\col{\@nameuse{color@\xi}}
\IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
\node[module,drop shadow] (module\xi)
- at (-\angle:\circulardistance) {\smitem };
+ at (-\angle:\sm@core@circulardistance) {\smitem };
}{% false-clockwise-circular diagram
\node[module,drop shadow] (module\xi)
- at (\angle:\circulardistance) {\smitem };
+ at (\angle:\sm@core@circulardistance) {\smitem };
}
}%
-
- \foreach \smitem [count=\xi] in {#2}{%
- \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
- \edef\col{\@nameuse{color@\xj}}
- \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
- \draw[<-,diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
- (module\xj) to[bend right] (module\xi);
- }{% false-clockwise-circular diagram
- \draw[<-,diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
- (module\xj) to[bend left] (module\xi);
- }
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnum\xi=\maxsmitem
+ \ifcircularfinalarrowdisabled
+ \relax
+ \else
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend right] (module\xi);
+ }{% false-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend left] (module\xi);
+ }
+ \fi
+ \else
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend right] (module\xi);
+ }{% false-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend left] (module\xi);
+ }
+
+ \fi
}%
\end{tikzpicture}
}{}% end-circular diagram
\IfStrEq{\diagramtype}{flow diagram}{% true-flow diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
\foreach \smitem [count=\xi] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
\IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
- \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\modulexsep} in
+ \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\sm@core@modulexsep} in
node[module,drop shadow] (module\xi) at +(\n2,0) {\smitem};
}{% false-horizontal-flow diagram
- \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\moduleysep} in
+ \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\sm@core@moduleysep} in
node[module,drop shadow] (module\xi) at +(0,\n2) {\smitem};
}
}%
@@ -1195,7 +1685,7 @@ and the derived files smartdiagram.ins,
\edef\col{\@nameuse{color@\xj}}
\ifnum\xi<\maxsmitem
\begin{pgfonlayer}{smart diagram arrow back}
- \draw[<-,diagram arrow type] (module\xj) -- (module\xi);
+ \draw[diagram arrow type] (module\xj) -- (module\xi);
\end{pgfonlayer}
\fi
% last arrow - not display it in background - check if disabled
@@ -1208,14 +1698,14 @@ and the derived files smartdiagram.ins,
to path={-- ++(0,0.5) -| (\tikztotarget)}
}
}
- \draw[<-,diagram arrow type, square arrow]
+ \draw[diagram arrow type, square arrow]
(module\xj.north) to (module\xi.north);
}{% false-horizontal-flow diagram
\tikzset{square arrow/.style={
to path={-- ++(0.5,0) |- (\tikztotarget)}
}
}
- \draw[<-,diagram arrow type,square arrow]
+ \draw[diagram arrow type,square arrow]
(module\xj.east) to (module\xi);
}
\fi
@@ -1224,24 +1714,24 @@ and the derived files smartdiagram.ins,
\end{tikzpicture}
}{}% end-flow diagram
\IfStrEq{\diagramtype}{descriptive diagram}{% true-descr. diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
\foreach \subitem [count=\xii] in \smitem{%
\ifnumequal{\xii}{1}{% true
\node[description title,drop shadow]
- (module-title\xi) at (0,0-\xi*\descriptiveitemsysep) {\subitem};
+ (module-title\xi) at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};
}{}
\ifnumequal{\xii}{2}{% true
\node[description,drop shadow](module\xi)
- at (0,0-\xi*\descriptiveitemsysep) {\subitem};
+ at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};
}{}
}%
}%
\end{tikzpicture}
}{}% end-descr. diagram
\IfStrEq{\diagramtype}{bubble diagram}{% true-bubble diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
\pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
\foreach \smitem [count=\xi] in {#2}{%
@@ -1258,7 +1748,7 @@ and the derived files smartdiagram.ins,
\end{tikzpicture}
}{}%end-bubble diagram
\IfStrEq{\diagramtype}{constellation diagram}{% true-const diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
\pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
\foreach \smitem [count=\xi] in {#2}{%
@@ -1269,14 +1759,14 @@ and the derived files smartdiagram.ins,
\pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
\edef\col{\@nameuse{color@\xj}}
\node[satellite] (satellite\xi)
- at (\angle:\distanceplanetsatellite) {\smitem };
- \draw[->,connection planet satellite] (planet) -- (satellite\xi);
+ at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
+ \draw[connection planet satellite] (planet) -- (satellite\xi);
}%
}%
\end{tikzpicture}
}{}%end-const diagram
\IfStrEq{\diagramtype}{connected constellation diagram}{% true-conn const diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
\pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
\foreach \smitem [count=\xi] in {#2}{%
@@ -1287,7 +1777,7 @@ and the derived files smartdiagram.ins,
\pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
\edef\col{\@nameuse{color@\xj}}
\node[satellite] (satellite\xj)
- at (\angle:\distanceplanetsatellite) {\smitem };
+ at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
}%
}%
\foreach \smitem [count=\xi] in {#2}{%
@@ -1295,63 +1785,54 @@ and the derived files smartdiagram.ins,
\pgfmathtruncatemacro{\xj}{\xi-1}
\edef\col{\@nameuse{color@\xj}}
\pgfmathtruncatemacro{\xk}{mod(\xj,\actualnumitem) +1}
- \path[connection planet satellite]
+ \path[connection planet satellite,-]
(satellite\xj) edge[bend right] (satellite\xk);
}{}
}%
\end{tikzpicture}
}{}%end-connected constellation diagram
\IfStrEq{\diagramtype}{priority descriptive diagram}{% true-priority descriptive diagram
- \pgfmathparse{subtract(\priorityarrowwidth,\priorityarrowheadextend)}
- \pgfmathsetmacro\priorityticksize{\pgfmathresult/2}
- \pgfmathsetmacro\arrowtickxshift{(\priorityarrowwidth-\priorityticksize)/2}
- \begin{tikzpicture}[every node/.style={align=center}]
+ \pgfmathparse{subtract(\sm@core@priorityarrowwidth,\sm@core@priorityarrowheadextend)}
+ \pgfmathsetmacro\sm@core@priorityticksize{\pgfmathresult/2}
+ \pgfmathsetmacro\arrowtickxshift{(\sm@core@priorityarrowwidth-\sm@core@priorityticksize)/2}
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
\foreach \smitem [count=\xi] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
\node[description,drop shadow](module\xi)
- at (0,0+\xi*\descriptiveitemsysep) {\smitem};
- \draw[line width=\prioritytick,\col]
+ at (0,0+\xi*\sm@core@descriptiveitemsysep) {\smitem};
+ \draw[line width=\sm@core@prioritytick,\col]
([xshift=-\arrowtickxshift pt]module\xi.base west)--
- ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\priorityticksize pt,0)$);
+ ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\sm@core@priorityticksize pt,0)$);
}%
\coordinate (A) at (module1);
\coordinate (B) at (module\maxsmitem);
\CalcHeight(A,B){heightmodules}
- \pgfmathadd{\heightmodules}{\priorityarrowheightadvance}
+ \pgfmathadd{\heightmodules}{\sm@core@priorityarrowheightadvance}
\pgfmathsetmacro{\distancemodules}{\pgfmathresult}
- \pgfmathsetmacro\arrowxshift{\priorityarrowwidth/2}
+ \pgfmathsetmacro\arrowxshift{\sm@core@priorityarrowwidth/2}
\begin{pgfonlayer}{background}
\node[priority arrow] at ([xshift=-\arrowxshift pt]module1.south west){};
\end{pgfonlayer}
\end{tikzpicture}
}{}% end-priority descriptive diagram
\IfStrEq{\diagramtype}{sequence diagram}{% true-sequence diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
- \ifnum\xi=1
- \node[sequence item] (x-\xi) {\x};
- \else
- \node[sequence item,anchor=west] (x-\xi) at (x-\prevx.east) {\x};
- \fi
- }
+ \ifnum\xi=1
+ \node[sequence item] (sequence-item\xi) {\x};
+ \else
+ \node[sequence item,anchor=west] (sequence-item\xi) at (sequence-item\prevx.east) {\x};
+ \fi
+ }
\end{tikzpicture}
}{}% end-sequence diagram
}% end-no value 1
}% end-command
% \end{macrocode}
-% Definition of the style for making visible elements and command definition for animations:
+% The command definition for the animated diagrams:
% \begin{macrocode}
-\tikzset{
- sminvisible/.style={opacity=0,text opacity=0},
- smvisible on/.style={smalt=#1{}{sminvisible}},
- smalt/.code args={<#1>#2#3}{%
- \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
- },
-}
-
-
\NewDocumentCommand{\smartdiagramanimated}{r[] m}{%
\StrCut{#1}{:}\diagramtype\option
\IfNoValueTF{#1}{% true-no value 1
@@ -1363,7 +1844,7 @@ and the derived files smartdiagram.ins,
{Example: \protect\smartdiagram[flow diagram]}
}{}
\IfStrEq{\diagramtype}{circular diagram}{% true-circular diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
\foreach \smitem [count=\xi] in {#2}{%
\IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
@@ -1376,42 +1857,61 @@ and the derived files smartdiagram.ins,
\node[module,
drop shadow={smvisible on=<\xi->},
smvisible on=<\xi->] (module\xi)
- at (-\angle:\circulardistance) {\smitem};
+ at (-\angle:\sm@core@circulardistance) {\smitem};
}{% false-clockwise-circular diagram
\node[module,
drop shadow={smvisible on=<\xi->},
smvisible on=<\xi->] (module\xi)
- at (\angle:\circulardistance) {\smitem};
+ at (\angle:\sm@core@circulardistance) {\smitem};
}
}%
- \foreach \smitem [count=\xi] in {#2}
- {%
- \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
- \pgfmathtruncatemacro{\adv}{\xi + 1)}
- \edef\col{\@nameuse{color@\xi}}
- \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
- \draw[<-,diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
- smvisible on=<\adv->] (module\xj) to[bend right] (module\xi);
- }{% false-clockwise-circular diagram
- \draw[<-,diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
- smvisible on=<\adv->] (module\xj) to[bend left] (module\xi);
- }
+ \foreach \smitem [count=\xi] in {#2}{%
+ \ifnum\xi=\maxsmitem
+ \ifcircularfinalarrowdisabled
+ \relax
+ \else
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \pgfmathtruncatemacro{\adv}{\xi + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend right] (module\xi);
+ }{% false-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
+ (module\xj) to[bend left] (module\xi);
+ }
+ \fi
+ \else
+ \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
+ \pgfmathtruncatemacro{\adv}{\xi + 1)}
+ \edef\col{\@nameuse{color@\xj}}
+ \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
+ smvisible on=<\adv->]
+ (module\xj) to[bend right] (module\xi);
+ }{% false-clockwise-circular diagram
+ \draw[diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
+ smvisible on=<\adv->]
+ (module\xj) to[bend left] (module\xi);
+ }
+
+ \fi
}%
\end{tikzpicture}
}{}% end-circular diagram
\IfStrEq{\diagramtype}{flow diagram}{% true-flow diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
\foreach \smitem [count=\xi] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
\IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
- \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\modulexsep}
+ \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\sm@core@modulexsep}
in node[module,drop shadow={smvisible on=<\xi->},
smvisible on=<\xi->] (module\xi) at +(\n2,0) {\smitem};
}{% false-horizontal-flow diagram
- \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\moduleysep}
+ \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\sm@core@moduleysep}
in node[module,drop shadow={smvisible on=<\xi->},
smvisible on=<\xi->] (module\xi) at +(0,\n2) {\smitem};
}
@@ -1422,7 +1922,7 @@ and the derived files smartdiagram.ins,
\edef\col{\@nameuse{color@\xj}}
\ifnum\xi<\maxsmitem
\begin{pgfonlayer}{smart diagram arrow back}
- \draw[<-,diagram arrow type,smvisible on=<\xi->]
+ \draw[diagram arrow type,smvisible on=<\xi->]
(module\xj) -- (module\xi);
\end{pgfonlayer}
\fi
@@ -1436,14 +1936,14 @@ and the derived files smartdiagram.ins,
to path={-- ++(0,0.5) -| (\tikztotarget)}
}
}
- \draw[<-,diagram arrow type, square arrow,smvisible on=<\xi->]
+ \draw[diagram arrow type, square arrow,smvisible on=<\xi->]
(module\xj.north) to (module\xi.north);
}{% false-horizontal-flow diagram
\tikzset{square arrow/.style={
to path={-- ++(0.5,0) |- (\tikztotarget)}
}
}
- \draw[<-,diagram arrow type,square arrow,smvisible on=<\xi->]
+ \draw[diagram arrow type,square arrow,smvisible on=<\xi->]
(module\xj.east) to (module\xi);
}
\fi
@@ -1452,7 +1952,7 @@ and the derived files smartdiagram.ins,
\end{tikzpicture}
}{}% end-flow diagram
\IfStrEq{\diagramtype}{descriptive diagram}{% true-descriptive diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
@@ -1460,18 +1960,18 @@ and the derived files smartdiagram.ins,
\pgfmathtruncatemacro\subitemvisible{\xi}
\ifnumequal{\xii}{1}{% true
\node[description title,drop shadow, smvisible on=<\subitemvisible->]
- (module-title\xi) at (0,0-\xi*\descriptiveitemsysep) {\subitem};\pause
+ (module-title\xi) at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};\pause
}{}
\ifnumequal{\xii}{2}{% true
\node[description,drop shadow,smvisible on=<\subitemvisible->]
- (module\xi)at (0,0-\xi*\descriptiveitemsysep) {\subitem};\pause
+ (module\xi)at (0,0-\xi*\sm@core@descriptiveitemsysep) {\subitem};\pause
}{}
}%
}%
\end{tikzpicture}
}{}% end-descriptive diagram
\IfStrEq{\diagramtype}{bubble diagram}{% true-bubble diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
\pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
\foreach \smitem [count=\xi] in {#2}{%
@@ -1488,7 +1988,7 @@ and the derived files smartdiagram.ins,
\end{tikzpicture}
}{}%end-bubble diagram
\IfStrEq{\diagramtype}{constellation diagram}{% true-const diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
\pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
\foreach \smitem [count=\xi] in {#2}{%
@@ -1499,15 +1999,15 @@ and the derived files smartdiagram.ins,
\pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
\edef\col{\@nameuse{color@\xj}}
\node[satellite, smvisible on=<\xi->] (satellite\xi)
- at (\angle:\distanceplanetsatellite) {\smitem };
- \draw[->,connection planet satellite, smvisible on=<\xi->]
+ at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
+ \draw[connection planet satellite, smvisible on=<\xi->]
(planet) -- (satellite\xi);
}%
}%
\end{tikzpicture}
}{}%end-constellation diagram
\IfStrEq{\diagramtype}{connected constellation diagram}{% true-conn const diagram
- \begin{tikzpicture}[every node/.style={align=center}]
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
\pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
\foreach \smitem [count=\xi] in {#2}{%
@@ -1518,7 +2018,7 @@ and the derived files smartdiagram.ins,
\pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
\edef\col{\@nameuse{color@\xj}}
\node[satellite,smvisible on=<\xi->] (satellite\xj)
- at (\angle:\distanceplanetsatellite) {\smitem };
+ at (\angle:\sm@core@distanceplanetsatellite) {\smitem };
}%
}%
\foreach \smitem [count=\xi] in {#2}{%
@@ -1527,49 +2027,49 @@ and the derived files smartdiagram.ins,
\edef\col{\@nameuse{color@\xj}}
\pgfmathtruncatemacro{\xk}{mod(\xj,\actualnumitem) +1}
\pgfmathtruncatemacro{\smvisible}{\xi+1}
- \path[connection planet satellite,smvisible on=<\smvisible->]
+ \path[connection planet satellite,-,smvisible on=<\smvisible->]
(satellite\xj) edge[bend right] (satellite\xk);
}{}
}%
\end{tikzpicture}
}{}%end-connected constellation diagram
\IfStrEq{\diagramtype}{priority descriptive diagram}{% true-priority descriptive diagram
- \pgfmathparse{subtract(\priorityarrowwidth,\priorityarrowheadextend)}
- \pgfmathsetmacro\priorityticksize{\pgfmathresult/2}
- \pgfmathsetmacro\arrowtickxshift{(\priorityarrowwidth-\priorityticksize)/2}
- \begin{tikzpicture}[every node/.style={align=center}]
+ \pgfmathparse{subtract(\sm@core@priorityarrowwidth,\sm@core@priorityarrowheadextend)}
+ \pgfmathsetmacro\sm@core@priorityticksize{\pgfmathresult/2}
+ \pgfmathsetmacro\arrowtickxshift{(\sm@core@priorityarrowwidth-\sm@core@priorityticksize)/2}
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
\foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
\foreach \smitem [count=\xi] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
\pgfmathtruncatemacro\smvisible{\xi+1}
\node[description,drop shadow={smvisible on=<\smvisible->},smvisible on=<\smvisible->]
- (module\xi) at (0,0+\xi*\descriptiveitemsysep) {\smitem};
- \draw[line width=\prioritytick,\col,smvisible on=<\smvisible->]
+ (module\xi) at (0,0+\xi*\sm@core@descriptiveitemsysep) {\smitem};
+ \draw[line width=\sm@core@prioritytick,\col,smvisible on=<\smvisible->]
([xshift=-\arrowtickxshift pt]module\xi.base west)--
- ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\priorityticksize pt,0)$);
+ ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\sm@core@priorityticksize pt,0)$);
}%
\coordinate (A) at (module1);
\coordinate (B) at (module\maxsmitem);
\CalcHeight(A,B){heightmodules}
- \pgfmathadd{\heightmodules}{\priorityarrowheightadvance}
+ \pgfmathadd{\heightmodules}{\sm@core@priorityarrowheightadvance}
\pgfmathsetmacro{\distancemodules}{\pgfmathresult}
- \pgfmathsetmacro\arrowxshift{\priorityarrowwidth/2}
+ \pgfmathsetmacro\arrowxshift{\sm@core@priorityarrowwidth/2}
\begin{pgfonlayer}{background}
\node[priority arrow] at ([xshift=-\arrowxshift pt]module1.south west){};
\end{pgfonlayer}
\end{tikzpicture}
}{}% end-priority descriptive diagram
\IfStrEq{\diagramtype}{sequence diagram}{% true-sequence diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
+ \begin{tikzpicture}[every node/.style={align=center,let hypenation}]
+ \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
\edef\col{\@nameuse{color@\xi}}
- \ifnum\xi=1
- \node[sequence item,smvisible on=<\xi->] (x-\xi) {\x};
- \else
- \node[sequence item,anchor=west,smvisible on=<\xi->]
- (x-\xi) at (x-\prevx.east) {\x};
- \fi
- }
+ \ifnum\xi=1
+ \node[sequence item,smvisible on=<\xi->] (sequence-item\xi) {\x};
+ \else
+ \node[sequence item,anchor=west,smvisible on=<\xi->]
+ (sequence-item\xi) at (sequence-item\prevx.east) {\x};
+ \fi
+ }
\end{tikzpicture}
}{}% end-sequence diagram
}% end-no value 1
@@ -1577,7 +2077,148 @@ and the derived files smartdiagram.ins,
% \end{macrocode}
%
% \iffalse
-%</package>
+%</commands>
+% \fi
+%
+% \iffalse
+%<*additions>
+% \fi
+% \subsection{Library Additions}
+% The library at first loads the Ti\textit{k}Z library \library{positioning}.
+% \begin{macrocode}
+\usetikzlibrary{positioning}
+% \end{macrocode}
+% Key definition:
+% \begin{macrocode}
+\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}%
+}
+% \end{macrocode}
+% Style definition; the \texttt{additional item} style comprises lot of usual Ti\textit{k}Z options: it possible to select a coloring with a vertical shading or an uniform filling.
+% \begin{macrocode}
+\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
+ },
+}
+% \end{macrocode}
+% Command definition; at first the diagram is created with the usual command, then the foreach iterates in order to get additions. The additions' strings are cut by means of the package xstring and its macro \cs{StrCut}. Of course, to all the tikzpictures, the option \texttt{remember picture} is added.
+% \begin{macrocode}
+\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}
+}
+% \end{macrocode}
+% Definition of the command to connect additions with diagram modules:
+% \begin{macrocode}
+\NewDocumentCommand{\smartdiagramconnect}{m m}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \foreach \start/\end in {#2}
+ \draw[additional item arrow type,#1]
+ (\start) -- (\end);
+ \end{tikzpicture}
+}
+% \end{macrocode}
+% \iffalse
+%</additions>
% \fi
%
% \Finale
diff --git a/Master/texmf-dist/source/latex/smartdiagram/smartdiagram.ins b/Master/texmf-dist/source/latex/smartdiagram/smartdiagram.ins
index 59fecee2ef7..7695a6c55fd 100644
--- a/Master/texmf-dist/source/latex/smartdiagram/smartdiagram.ins
+++ b/Master/texmf-dist/source/latex/smartdiagram/smartdiagram.ins
@@ -7,7 +7,9 @@
%% smartdiagram.dtx (with options: `install')
%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
%% smartdiagram --- Automatic creation of smart diagrams from lists of items.
-%% E-mail: claudio.fiandrino@gmail.com
+%%
+%% 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
%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -18,7 +20,9 @@
\preamble
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
smartdiagram --- Automatic creation of smart diagrams from lists of items.
-E-mail: claudio.fiandrino@gmail.com
+
+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
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -26,7 +30,8 @@ See http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2012-2013 by Claudio Fiandrino <claudio.fiandrino@gmail.com>
+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
@@ -40,7 +45,11 @@ Claudio Fiandrino.
This work consists of the file smartdiagram.dtx
and the derived files smartdiagram.ins,
- smartdiagram.pdf, and
+ smartdiagram.pdf,
+ smartdiagramlibrarycore.definitions.code.tex,
+ smartdiagramlibrarycore.styles.code.tex,
+ smartdiagramlibrarycore.commands.code.tex
+ smartdiagramlibraryadditions.code.tex and
smartdiagram.sty.
\endpostamble
@@ -48,11 +57,24 @@ and the derived files smartdiagram.ins,
\generate{
\file{\jobname.sty}{\from{\jobname.dtx}{package}}
}
+\generate{
+ \file{smartdiagramlibrarycore.definitions.code.tex}{\from{\jobname.dtx}{definitions}}
+}
+\generate{
+ \file{smartdiagramlibrarycore.styles.code.tex}{\from{\jobname.dtx}{styles}}
+}
+\generate{
+ \file{smartdiagramlibrarycore.commands.code.tex}{\from{\jobname.dtx}{commands}}
+}
+\generate{
+ \file{smartdiagramlibraryadditions.code.tex}{\from{\jobname.dtx}{additions}}
+}
\endbatchfile
%%
-%% Copyright (C) 2012-2013 by Claudio Fiandrino <claudio.fiandrino@gmail.com>
+%% 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
@@ -66,7 +88,11 @@ and the derived files smartdiagram.ins,
%%
%% This work consists of the file smartdiagram.dtx
%% and the derived files smartdiagram.ins,
-%% smartdiagram.pdf, and
+%% smartdiagram.pdf,
+%% smartdiagramlibrarycore.definitions.code.tex,
+%% smartdiagramlibrarycore.styles.code.tex,
+%% smartdiagramlibrarycore.commands.code.tex
+%% smartdiagramlibraryadditions.code.tex and
%% smartdiagram.sty.
%%
%%
diff --git a/Master/texmf-dist/tex/latex/smartdiagram/smartdiagram.sty b/Master/texmf-dist/tex/latex/smartdiagram/smartdiagram.sty
index de6878aedcd..e50fc6a2819 100644
--- a/Master/texmf-dist/tex/latex/smartdiagram/smartdiagram.sty
+++ b/Master/texmf-dist/tex/latex/smartdiagram/smartdiagram.sty
@@ -7,13 +7,15 @@
%% smartdiagram.dtx (with options: `package')
%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
%% smartdiagram --- Automatic creation of smart diagrams from lists of items.
-%% E-mail: claudio.fiandrino@gmail.com
+%%
+%% 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
%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{smartdiagram}[2013/03/09 v0.2 Automatic creation of smart diagrams from lists of items.]
+\ProvidesPackage{smartdiagram}[2013/04/01 v0.3 Automatic creation of smart diagrams from lists of items.]
\RequirePackage{tikz}
@@ -30,839 +32,38 @@
}
\pgfdeclarelayer{smart diagram arrow back}
\pgfsetlayers{background,smart diagram arrow back,main}
-\@namedef{color@1}{red!40}
-\@namedef{color@2}{cyan!40}
-\@namedef{color@3}{blue!40}
-\@namedef{color@4}{green!40}
-\@namedef{color@5}{orange!40}
-\@namedef{color@6}{yellow!40}
-\@namedef{color@7}{magenta!40}
-\@namedef{color@8}{brown!40}
-\@namedef{color@9}{violet!40}
-\@namedef{color@10}{teal!40}
-\tikzset{rnd rectangle/.style={rectangle,rounded corners}
-}
-
-\def\CalcHeight(#1,#2)#3{%
-\pgfpointdiff{\pgfpointanchor{#1}{south west}}{\pgfpointanchor{#2}{north west}}
-\pgfmathsetmacro{\myheight}{veclen(\pgf@x,\pgf@y)}
-\global\expandafter\edef\csname #3\endcsname{\myheight}
-}
-\pgfkeys{/smart diagram/.cd, module minimum width/.initial=2cm,
- module minimum height/.initial={1cm},
- module y sep/.initial={1.65},
- module x sep/.initial={2.75},
- descriptive items y sep/.initial={1.75},
- text width/.initial={1.5cm},
- description title width/.initial={1.5cm},
- description text width/.initial={5cm},
- description title text width/.initial={1.25cm},
- description title font/.initial={\small},
- description font/.initial={\small},
- description width/.initial={5.5cm},
- font/.initial={\small},
- border color/.initial={gray},
- circular distance/.initial={2.75cm},
- arrow line width/.initial={0.1cm},
- module shape/.initial={rnd rectangle},
- insert decoration/.initial={},
- arrow tip/.initial={stealth},
- arrow color/.initial={gray},
- bubble center node size/.initial={4cm},
- bubble center node font/.initial={\large},
- bubble center node color/.initial={lightgray!60},
- distance center/other bubbles/.initial=0.8cm,
- distance text center bubble/.initial={0.5cm},
- bubble fill opacity/.initial={0.5},
- bubble node size/.initial={2.5cm},
- bubble text opacity/.initial={0.8},
- bubble node font/.initial={\normalfont},
- planet size/.initial={2.5cm},
- planet color/.initial={lightgray!60},
- planet font/.initial={\large},
- distance planet-connection/.initial={0.1cm},
- distance planet-text/.initial={0.5cm},
- planet text width/.initial={1.75cm},
- satellite size/.initial={1.75cm},
- satellite font/.initial={\normalfont},
- satellite fill opacity/.initial={0.5},
- satellite text opacity/.initial={0.8},
- satellite text width/.initial={1.5cm},
- distance satellite-connection/.initial={0.075cm},
- connection line width/.initial={0.1cm},
- connection color/.initial={gray},
- distance planet-satellite/.initial={3.5cm},
- priority arrow width/.initial={1.5cm},
- priority arrow head extend/.initial={0.15cm},
- priority tick size/.initial={5pt},
- priority arrow height advance/.initial={2cm},
- sequence item height/.initial={1cm},
- sequence item width/.initial={2cm},
- sequence item border color/.initial={gray},
- sequence item border size/.initial={1.75\pgflinewidth},
- sequence item font size/.initial={\normalfont},
- sequence item fill opacity/.initial={1},
- sequence item text opacity/.initial={1},
- sequence item text width/.initial={1.9cm},
- sequence item text color/.initial={black},
- sequence item uniform color/.initial={gray!60!black},
-}%
-
-\pgfkeys{/smart diagram/.cd, module minimum width/.get=\modulewidth,
- module minimum height/.get=\moduleheight,
- module y sep/.get=\moduleysep,
- module x sep/.get=\modulexsep,
- descriptive items y sep/.get=\descriptiveitemsysep,
- text width/.get=\moduletextwidth,
- description title width/.get=\descriptiontitlewidth,
- description text width/.get=\descriptiontextwidth,
- description title text width/.get=\descriptiontitletextwidth,
- description title font/.get=\descriptiontitlefontsize,
- description font/.get=\descriptionfontsize,
- description width/.get=\descriptionwidth,
- font/.get=\modulefontsize,
- border color/.get=\bordercolor,
- circular distance/.get=\circulardistance,
- arrow line width/.get=\arrowlinewidth,
- module shape/.get=\moduleshape,
- insert decoration/.get=\borderdecoration,
- arrow tip/.get=\arrowtip,
- arrow color/.get=\arrowcolor,
- bubble center node size/.get=\bubblecenternodesize,
- bubble center node font/.get=\bubblecenternodefont,
- bubble center node color/.get=\bubblecenternodecolor,
- distance center/other bubbles/.get=\distancecenterotherbubbles,
- distance text center bubble/.get=\distancetextcenterbubble,
- bubble fill opacity/.get=\bubblefillopacity,
- bubble node size/.get=\bubblenodesize,
- bubble text opacity/.get=\bubbletextopacity,
- bubble node font/.get=\bubblenodefont,
- planet size/.get=\planetminimumsize,
- planet color/.get=\planetcolor,
- planet font/.get=\planetfont,
- distance planet-connection/.get=\planetoutersep,
- distance planet-text/.get=\planetinnersep,
- planet text width/.get=\planettextwidth,
- satellite size/.get=\satelliteminimumsize,
- satellite font/.get=\satellitefont,
- satellite fill opacity/.get=\satellitefillopacity,
- satellite text opacity/.get=\satellitetextopacity,
- satellite text width/.get=\satellitetextwidth,
- distance satellite-connection/.get=\satelliteoutersep,
- connection line width/.get=\connectionlinewidth,
- connection color/.get=\connectioncolor,
- distance planet-satellite/.get=\distanceplanetsatellite,
- priority arrow width/.get=\priorityarrowwidth,
- priority arrow head extend/.get=\priorityarrowheadextend,
- priority tick size/.get=\prioritytick,
- priority arrow height advance/.get=\priorityarrowheightadvance,
- sequence item height/.get=\seqitemheight,
- sequence item width/.get=\seqitemwidth,
- sequence item border color/.get=\seqitembordercolor,
- sequence item border size/.get=\seqlinewidth,
- sequence item font size/.get=\seqitemfont,
- sequence item fill opacity/.get=\seqitemfillopacity,
- sequence item text opacity/.get=\seqitemtextopacity,
- sequence item text width/.get=\seqitemtextwidth,
- sequence item text color/.get=\seqitemtextcolor,
- sequence item uniform color/.get=\seqitemuniformcol,
-}%
-
-
-\pgfkeys{/smart diagram/.cd, set color list/.code={
- \foreach \listitem [count=\i] in {#1}{
- \global\@namedef{color@\i\expandafter}\expandafter{\listitem}
- }
- }
-}
-
-\pgfkeys{/smart diagram/.cd, use predefined color list/.code={
- \@namedef{color@1}{red!30}
- \@namedef{color@2}{cyan!30}
- \@namedef{color@3}{blue!30}
- \@namedef{color@4}{green!30}
- \@namedef{color@5}{orange!30}
- \@namedef{color@6}{yellow!30}
- \@namedef{color@7}{magenta!30}
- \@namedef{color@8}{brown!30}
- \@namedef{color@9}{violet!30}
- \@namedef{color@10}{teal!30}
- }
-}
-
-
-\newif\ifbackarrowdisabled
-\pgfkeys{/smart diagram/.cd,
- back arrow disabled/.is if=backarrowdisabled,
- back arrow disabled=false,
-}
-
-
-\NewDocumentCommand{\smartdiagramset}{m}{%
- \pgfkeys{/smart diagram/.cd,#1}%
- \pgfkeys{/smart diagram/.cd, module minimum width/.get=\modulewidth,
- module minimum height/.get=\moduleheight,
- module y sep/.get=\moduleysep,
- module x sep/.get=\modulexsep,
- descriptive items y sep/.get=\descriptiveitemsysep,
- text width/.get=\moduletextwidth,
- description title width/.get=\descriptiontitlewidth,
- description text width/.get=\descriptiontextwidth,
- description title text width/.get=\descriptiontitletextwidth,
- description title font/.get=\descriptiontitlefontsize,
- description font/.get=\descriptionfontsize,
- description width/.get=\descriptionwidth,
- font/.get=\modulefontsize,
- border color/.get=\bordercolor,
- circular distance/.get=\circulardistance,
- arrow line width/.get=\arrowlinewidth,
- module shape/.get=\moduleshape,
- insert decoration/.get=\borderdecoration,
- arrow tip/.get=\arrowtip,
- arrow color/.get=\arrowcolor,
- bubble center node size/.get=\bubblecenternodesize,
- bubble center node font/.get=\bubblecenternodefont,
- bubble center node color/.get=\bubblecenternodecolor,
- distance center/other bubbles/.get=\distancecenterotherbubbles,
- distance text center bubble/.get=\distancetextcenterbubble,
- bubble fill opacity/.get=\bubblefillopacity,
- bubble node size/.get=\bubblenodesize,
- bubble text opacity/.get=\bubbletextopacity,
- bubble node font/.get=\bubblenodefont,
- planet size/.get=\planetminimumsize,
- planet color/.get=\planetcolor,
- planet font/.get=\planetfont,
- distance planet-connection/.get=\planetoutersep,
- distance planet-text/.get=\planetinnersep,
- planet text width/.get=\planettextwidth,
- satellite size/.get=\satelliteminimumsize,
- satellite font/.get=\satellitefont,
- satellite fill opacity/.get=\satellitefillopacity,
- satellite text opacity/.get=\satellitetextopacity,
- satellite text width/.get=\satellitetextwidth,
- distance satellite-connection/.get=\satelliteoutersep,
- connection line width/.get=\connectionlinewidth,
- connection color/.get=\connectioncolor,
- distance planet-satellite/.get=\distanceplanetsatellite,
- priority arrow width/.get=\priorityarrowwidth,
- priority arrow head extend/.get=\priorityarrowheadextend,
- priority tick size/.get=\prioritytick,
- priority arrow height advance/.get=\priorityarrowheightadvance,
- sequence item height/.get=\seqitemheight,
- sequence item width/.get=\seqitemwidth,
- sequence item border color/.get=\seqitembordercolor,
- sequence item border size/.get=\seqlinewidth,
- sequence item font size/.get=\seqitemfont,
- sequence item fill opacity/.get=\seqitemfillopacity,
- sequence item text opacity/.get=\seqitemtextopacity,
- sequence item text width/.get=\seqitemtextwidth,
- sequence item text color/.get=\seqitemtextcolor,
- sequence item uniform color/.get=\seqitemuniformcol,
- }%
-}%
-\tikzfading[name=priorityarrowfading,
- bottom color=transparent!5,
- top color=transparent!80
-]
-\tikzset{priority arrow fill/.style={
- fill=gray,
- path fading=priorityarrowfading
- }
-}
-
-\tikzset{module/.style={
- \pgfkeysvalueof{/smart diagram/module shape},
- thick,
- draw=\bordercolor,
- top color=white,
- bottom color=\col,
- text width=\moduletextwidth,
- minimum width=\modulewidth,
- minimum height=\moduleheight,
- font=\modulefontsize,
- \borderdecoration
- },
- diagram arrow type/.style={
- >=\arrowtip,line width=\arrowlinewidth,\col
- },
-}
-
-\pgfkeys{/smart diagram/.cd,%
- uniform arrow color/.is choice,%
- uniform arrow color/true/.code={%
- \tikzset{diagram arrow type/.append style={
- \arrowcolor
- },
- }
- },%
- uniform arrow color/false/.style={diagram arrow type},%
- uniform arrow color/.default=false,
-}%
-\tikzset{description title/.style={
- circle,
- draw=\bordercolor,
- minimum width=\descriptiontitlewidth,
- anchor=east,
- bottom color=\col,
- top color=white!80!\col,
- font=\descriptiontitlefontsize,
- text width=\descriptiontitletextwidth,
- \borderdecoration,
- },
- description/.style={
- \pgfkeysvalueof{/smart diagram/module shape},
- text width=\descriptiontextwidth,
- draw=\bordercolor,
- anchor=west,
- minimum height=\moduleheight,
- minimum width=\descriptionwidth,
- bottom color=\col,
- top color=white!80!\col,
- font=\descriptionfontsize,
- \borderdecoration,
- }
-}
-\tikzset{priority arrow/.style={
- draw=\bordercolor,
- single arrow,
- minimum height=\distancemodules,
- minimum width=\priorityarrowwidth,
- priority arrow fill,
- rotate=90,
- single arrow head extend=\priorityarrowheadextend,
- anchor=west,
- }
-}
-\tikzset{bubble center node/.style={
- minimum size=\bubblecenternodesize,
- circle,
- fill=\bubblecenternodecolor,
- font=\bubblecenternodefont,
- outer sep=\distancecenterotherbubbles,
- inner sep=\distancetextcenterbubble,
- },
- bubble node/.style={
- minimum size=\bubblenodesize,
- circle,
- ultra thick,
- font=\bubblenodefont,
- draw=white,
- fill opacity=\bubblefillopacity,
- fill=\col,
- text opacity=\bubbletextopacity,
- }
-}
-\tikzset{planet/.style={
- minimum size=\planetminimumsize,
- circle,
- fill=\planetcolor,
- font=\planetfont,
- outer sep=\planetoutersep,
- inner sep=\planetinnersep,
- text width=\planettextwidth,
- },
- satellite/.style={
- minimum size=\satelliteminimumsize,
- circle,
- font=\satellitefont,
- fill opacity=\satellitefillopacity,
- fill=\col,
- text opacity=\satellitetextopacity,
- text width=\satellitetextwidth,
- outer sep=\satelliteoutersep,
- },
- connection planet satellite/.style={
- line width=\connectionlinewidth,
- >=\arrowtip,
- \col,
- }
-}
-
-\tikzset{sequence item/.style={
- minimum height=\seqitemheight,
- minimum width=\seqitemwidth,
- signal,
- signal from=west,
- signal to=east,
- draw=\seqitembordercolor,
- line width=\seqlinewidth,
- font=\seqitemfont,
- fill opacity=\seqitemfillopacity,
- fill=\col,
- text opacity=\seqitemtextopacity,
- text width=\seqitemtextwidth,
- text=\seqitemtextcolor,
- }
-}
-
-\pgfkeys{/smart diagram/.cd,%
- uniform sequence color/.is choice,%
- uniform sequence color/true/.code={%
- \tikzset{sequence item/.append style={
- fill=\seqitemuniformcol,
- },
- }
- },%
- uniform sequence color/false/.style={sequence item},%
- uniform sequence color/.default=false,
-}%
-
-\pgfkeys{/smart diagram/.cd,%
- uniform connection color/.is choice,%
- uniform connection color/true/.code={%
- \tikzset{connection planet satellite/.append style={
- \connectioncolor
- },
- }
- },%
- uniform connection color/false/.style={connection planet satellite},%
- uniform connection color/.default=false,
-}%
-\NewDocumentCommand{\smartdiagram}{r[] m}{%
- \StrCut{#1}{:}\diagramtype\option
- \IfNoValueTF{#1}{% true-no value 1
- \PackageError{smartdiagram}%
- {Type of the diagram not inserted. Please insert it}%
- {Example: \protect\smartdiagram[flow diagram]}}
- {%false-no value 1
- \IfStrEq{\diagramtype}{}{%
- \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
- {Example: \protect\smartdiagram[flow diagram]}
- }{}
- \IfStrEq{\diagramtype}{circular diagram}{% true-circular diagram
- \begin{tikzpicture}[every node/.style={align=center}]
-
- \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
-
- \foreach \smitem [count=\xi] in {#2}{%
- \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
- \pgfmathtruncatemacro{\angle}{180+360/\maxsmitem*\xi}
- }{% false-clockwise-circular diagram
- \pgfmathtruncatemacro{\angle}{360/\maxsmitem*\xi}
- }
- \edef\col{\@nameuse{color@\xi}}
- \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
- \node[module,drop shadow] (module\xi)
- at (-\angle:\circulardistance) {\smitem };
- }{% false-clockwise-circular diagram
- \node[module,drop shadow] (module\xi)
- at (\angle:\circulardistance) {\smitem };
- }
- }%
-
- \foreach \smitem [count=\xi] in {#2}{%
- \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
- \edef\col{\@nameuse{color@\xj}}
- \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
- \draw[<-,diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
- (module\xj) to[bend right] (module\xi);
- }{% false-clockwise-circular diagram
- \draw[<-,diagram arrow type,shorten <=0.3cm,shorten >=0.3cm]
- (module\xj) to[bend left] (module\xi);
- }
- }%
- \end{tikzpicture}
- }{}% end-circular diagram
- \IfStrEq{\diagramtype}{flow diagram}{% true-flow diagram
- \begin{tikzpicture}[every node/.style={align=center}]
-
- \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
-
- \foreach \smitem [count=\xi] in {#2}{%
- \edef\col{\@nameuse{color@\xi}}
- \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
- \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\modulexsep} in
- node[module,drop shadow] (module\xi) at +(\n2,0) {\smitem};
- }{% false-horizontal-flow diagram
- \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\moduleysep} in
- node[module,drop shadow] (module\xi) at +(0,\n2) {\smitem};
- }
- }%
-
- \foreach \smitem [count=\xi] in {#2}{%
- \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
- \edef\col{\@nameuse{color@\xj}}
- \ifnum\xi<\maxsmitem
- \begin{pgfonlayer}{smart diagram arrow back}
- \draw[<-,diagram arrow type] (module\xj) -- (module\xi);
- \end{pgfonlayer}
- \fi
- % last arrow - not display it in background - check if disabled
- \ifbackarrowdisabled
- \relax
- \else
- \ifnum\xi=\maxsmitem
- \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
- \tikzset{square arrow/.style={
- to path={-- ++(0,0.5) -| (\tikztotarget)}
- }
- }
- \draw[<-,diagram arrow type, square arrow]
- (module\xj.north) to (module\xi.north);
- }{% false-horizontal-flow diagram
- \tikzset{square arrow/.style={
- to path={-- ++(0.5,0) |- (\tikztotarget)}
- }
- }
- \draw[<-,diagram arrow type,square arrow]
- (module\xj.east) to (module\xi);
- }
- \fi
- \fi
- }%
- \end{tikzpicture}
- }{}% end-flow diagram
- \IfStrEq{\diagramtype}{descriptive diagram}{% true-descr. diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{%
- \edef\col{\@nameuse{color@\xi}}
- \foreach \subitem [count=\xii] in \smitem{%
- \ifnumequal{\xii}{1}{% true
- \node[description title,drop shadow]
- (module-title\xi) at (0,0-\xi*\descriptiveitemsysep) {\subitem};
- }{}
- \ifnumequal{\xii}{2}{% true
- \node[description,drop shadow](module\xi)
- at (0,0-\xi*\descriptiveitemsysep) {\subitem};
- }{}
- }%
- }%
- \end{tikzpicture}
- }{}% end-descr. diagram
- \IfStrEq{\diagramtype}{bubble diagram}{% true-bubble diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
- \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
- \foreach \smitem [count=\xi] in {#2}{%
- \ifnumequal{\xi}{1}{ %true
- \node[bubble center node](center bubble){\smitem};
- }{%false
- \pgfmathtruncatemacro{\xj}{\xi-1}
- \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
- \edef\col{\@nameuse{color@\xj}}
- \node[bubble node] (module\xi)
- at (center bubble.\angle) {\smitem };
- }%
- }%
- \end{tikzpicture}
- }{}%end-bubble diagram
- \IfStrEq{\diagramtype}{constellation diagram}{% true-const diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
- \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
- \foreach \smitem [count=\xi] in {#2}{%
- \ifnumequal{\xi}{1}{ %true
- \node[planet](planet){\smitem};
- }{%false
- \pgfmathtruncatemacro{\xj}{\xi-1}
- \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
- \edef\col{\@nameuse{color@\xj}}
- \node[satellite] (satellite\xi)
- at (\angle:\distanceplanetsatellite) {\smitem };
- \draw[->,connection planet satellite] (planet) -- (satellite\xi);
- }%
- }%
- \end{tikzpicture}
- }{}%end-const diagram
- \IfStrEq{\diagramtype}{connected constellation diagram}{% true-conn const diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
- \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
- \foreach \smitem [count=\xi] in {#2}{%
- \ifnumequal{\xi}{1}{ %true
- \node[planet](planet){\smitem};
- }{%false
- \pgfmathtruncatemacro{\xj}{\xi-1}
- \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
- \edef\col{\@nameuse{color@\xj}}
- \node[satellite] (satellite\xj)
- at (\angle:\distanceplanetsatellite) {\smitem };
- }%
- }%
- \foreach \smitem [count=\xi] in {#2}{%
- \ifnumgreater{\xi}{1}{ %true
- \pgfmathtruncatemacro{\xj}{\xi-1}
- \edef\col{\@nameuse{color@\xj}}
- \pgfmathtruncatemacro{\xk}{mod(\xj,\actualnumitem) +1}
- \path[connection planet satellite]
- (satellite\xj) edge[bend right] (satellite\xk);
- }{}
- }%
- \end{tikzpicture}
- }{}%end-connected constellation diagram
- \IfStrEq{\diagramtype}{priority descriptive diagram}{% true-priority descriptive diagram
- \pgfmathparse{subtract(\priorityarrowwidth,\priorityarrowheadextend)}
- \pgfmathsetmacro\priorityticksize{\pgfmathresult/2}
- \pgfmathsetmacro\arrowtickxshift{(\priorityarrowwidth-\priorityticksize)/2}
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
- \foreach \smitem [count=\xi] in {#2}{%
- \edef\col{\@nameuse{color@\xi}}
- \node[description,drop shadow](module\xi)
- at (0,0+\xi*\descriptiveitemsysep) {\smitem};
-\draw[line width=\prioritytick,\col]
- ([xshift=-\arrowtickxshift pt]module\xi.base west)--
- ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\priorityticksize pt,0)$);
- }%
- \coordinate (A) at (module1);
- \coordinate (B) at (module\maxsmitem);
- \CalcHeight(A,B){heightmodules}
- \pgfmathadd{\heightmodules}{\priorityarrowheightadvance}
- \pgfmathsetmacro{\distancemodules}{\pgfmathresult}
- \pgfmathsetmacro\arrowxshift{\priorityarrowwidth/2}
- \begin{pgfonlayer}{background}
- \node[priority arrow] at ([xshift=-\arrowxshift pt]module1.south west){};
- \end{pgfonlayer}
- \end{tikzpicture}
- }{}% end-priority descriptive diagram
- \IfStrEq{\diagramtype}{sequence diagram}{% true-sequence diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
- \edef\col{\@nameuse{color@\xi}}
-\ifnum\xi=1
- \node[sequence item] (x-\xi) {\x};
-\else
- \node[sequence item,anchor=west] (x-\xi) at (x-\prevx.east) {\x};
-\fi
- }
- \end{tikzpicture}
- }{}% end-sequence diagram
-}% end-no value 1
-}% end-command
-\tikzset{
- sminvisible/.style={opacity=0,text opacity=0},
- smvisible on/.style={smalt=#1{}{sminvisible}},
- smalt/.code args={<#1>#2#3}{%
- \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
- },
+\def\usesmartdiagramlibrary{\pgfutil@ifnextchar[{\use@smartdiagramlibrary}{\use@@smartdiagramlibrary}}%}
+\def\use@smartdiagramlibrary[#1]{\use@@smartdiagramlibrary{#1}}
+\def\use@@smartdiagramlibrary#1{%
+ \edef\pgf@list{#1}%
+ \pgfutil@for\pgf@temp:=\pgf@list\do{%
+ \expandafter\pgfkeys@spdef\expandafter\pgf@temp\expandafter{\pgf@temp}%
+ \ifx\pgf@temp\pgfutil@empty
+ \else
+ \expandafter\ifx\csname smartdiagram@library@\pgf@temp @loaded\endcsname\relax%
+ \expandafter\global\expandafter\let\csname smartdiagram@library@\pgf@temp @loaded\endcsname=\pgfutil@empty%
+ \expandafter\edef\csname smartdiagram@library@#1@atcode\endcsname{\the\catcode`\@}
+ \expandafter\edef\csname smartdiagram@library@#1@barcode\endcsname{\the\catcode`\|}
+ \catcode`\@=11
+ \catcode`\|=12
+ \pgfutil@InputIfFileExists{smartdiagramlibrary\pgf@temp.code.tex}{}{
+ \PackageError{smartdiagram}{I did not find the smartdiagram library '\pgf@temp'.}{}
+ }%
+ \catcode`\@=\csname smartdiagram@library@#1@atcode\endcsname
+ \catcode`\|=\csname smartdiagram@library@#1@barcode\endcsname
+ \fi%
+ \fi
+ }%
}
-\NewDocumentCommand{\smartdiagramanimated}{r[] m}{%
- \StrCut{#1}{:}\diagramtype\option
- \IfNoValueTF{#1}{% true-no value 1
- \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
- {Example: \protect\smartdiagram[flow diagram]}}
- {%false-no value 1
- \IfStrEq{\diagramtype}{}{%
- \PackageError{smartdiagram}{Type of the diagram not inserted. Please insert it}
- {Example: \protect\smartdiagram[flow diagram]}
- }{}
- \IfStrEq{\diagramtype}{circular diagram}{% true-circular diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
- \foreach \smitem [count=\xi] in {#2}{%
- \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
- \pgfmathtruncatemacro{\angle}{180+360/\maxsmitem*\xi}
- }{% false-clockwise-circular diagram
- \pgfmathtruncatemacro{\angle}{360/\maxsmitem*\xi}
- }
- \edef\col{\@nameuse{color@\xi}}
- \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
- \node[module,
- drop shadow={smvisible on=<\xi->},
- smvisible on=<\xi->] (module\xi)
- at (-\angle:\circulardistance) {\smitem};
- }{% false-clockwise-circular diagram
- \node[module,
- drop shadow={smvisible on=<\xi->},
- smvisible on=<\xi->] (module\xi)
- at (\angle:\circulardistance) {\smitem};
- }
- }%
- \foreach \smitem [count=\xi] in {#2}
- {%
- \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
- \pgfmathtruncatemacro{\adv}{\xi + 1)}
- \edef\col{\@nameuse{color@\xi}}
- \IfStrEq{\option}{clockwise}{% true-clockwise-circular diagram
- \draw[<-,diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
- smvisible on=<\adv->] (module\xj) to[bend right] (module\xi);
- }{% false-clockwise-circular diagram
- \draw[<-,diagram arrow type,shorten <=0.3cm,shorten >=0.3cm,
- smvisible on=<\adv->] (module\xj) to[bend left] (module\xi);
- }
- }%
- \end{tikzpicture}
- }{}% end-circular diagram
- \IfStrEq{\diagramtype}{flow diagram}{% true-flow diagram
- \begin{tikzpicture}[every node/.style={align=center}]
-
- \foreach \smitem [count=\xi] in {#2} {\global\let\maxsmitem\xi}
-
- \foreach \smitem [count=\xi] in {#2}{%
- \edef\col{\@nameuse{color@\xi}}
- \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
- \path let \n1 = {int(0-\xi)}, \n2={0+\xi*\modulexsep}
- in node[module,drop shadow={smvisible on=<\xi->},
- smvisible on=<\xi->] (module\xi) at +(\n2,0) {\smitem};
- }{% false-horizontal-flow diagram
- \path let \n1 = {int(0-\xi)}, \n2={0-\xi*\moduleysep}
- in node[module,drop shadow={smvisible on=<\xi->},
- smvisible on=<\xi->] (module\xi) at +(0,\n2) {\smitem};
- }
- }%
-
- \foreach \smitem [count=\xi] in {#2}{%
- \pgfmathtruncatemacro{\xj}{mod(\xi, \maxsmitem) + 1)}
- \edef\col{\@nameuse{color@\xj}}
- \ifnum\xi<\maxsmitem
- \begin{pgfonlayer}{smart diagram arrow back}
- \draw[<-,diagram arrow type,smvisible on=<\xi->]
- (module\xj) -- (module\xi);
- \end{pgfonlayer}
- \fi
- % last arrow - not display it in background - check if disabled
- \ifbackarrowdisabled
- \relax
- \else
- \ifnum\xi=\maxsmitem
- \IfStrEq{\option}{horizontal}{% true-horizontal-flow diagram
- \tikzset{square arrow/.style={
- to path={-- ++(0,0.5) -| (\tikztotarget)}
- }
- }
- \draw[<-,diagram arrow type, square arrow,smvisible on=<\xi->]
- (module\xj.north) to (module\xi.north);
- }{% false-horizontal-flow diagram
- \tikzset{square arrow/.style={
- to path={-- ++(0.5,0) |- (\tikztotarget)}
- }
- }
- \draw[<-,diagram arrow type,square arrow,smvisible on=<\xi->]
- (module\xj.east) to (module\xi);
- }
- \fi
- \fi
- }%
- \end{tikzpicture}
- }{}% end-flow diagram
- \IfStrEq{\diagramtype}{descriptive diagram}{% true-descriptive diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{%
- \edef\col{\@nameuse{color@\xi}}
-
- \foreach \subitem [count=\xii] in \smitem{%
- \pgfmathtruncatemacro\subitemvisible{\xi}
- \ifnumequal{\xii}{1}{% true
- \node[description title,drop shadow, smvisible on=<\subitemvisible->]
- (module-title\xi) at (0,0-\xi*\descriptiveitemsysep) {\subitem};\pause
- }{}
- \ifnumequal{\xii}{2}{% true
- \node[description,drop shadow,smvisible on=<\subitemvisible->]
- (module\xi)at (0,0-\xi*\descriptiveitemsysep) {\subitem};\pause
- }{}
- }%
- }%
- \end{tikzpicture}
- }{}% end-descriptive diagram
- \IfStrEq{\diagramtype}{bubble diagram}{% true-bubble diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
- \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
- \foreach \smitem [count=\xi] in {#2}{%
- \ifnumequal{\xi}{1}{ %true
- \node[bubble center node, smvisible on=<\xi->](center bubble){\smitem};
- }{%false
- \pgfmathtruncatemacro{\xj}{\xi-1}
- \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
- \edef\col{\@nameuse{color@\xj}}
- \node[bubble node, smvisible on=<\xi->](module\xi)
- at (center bubble.\angle) {\smitem };
- }%
- }%
- \end{tikzpicture}
- }{}%end-bubble diagram
- \IfStrEq{\diagramtype}{constellation diagram}{% true-const diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
- \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
- \foreach \smitem [count=\xi] in {#2}{%
- \ifnumequal{\xi}{1}{ %true
- \node[planet, smvisible on=<\xi->](planet){\smitem};
- }{%false
- \pgfmathtruncatemacro{\xj}{\xi-1}
- \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
- \edef\col{\@nameuse{color@\xj}}
- \node[satellite, smvisible on=<\xi->] (satellite\xi)
- at (\angle:\distanceplanetsatellite) {\smitem };
- \draw[->,connection planet satellite, smvisible on=<\xi->]
- (planet) -- (satellite\xi);
- }%
- }%
- \end{tikzpicture}
- }{}%end-constellation diagram
- \IfStrEq{\diagramtype}{connected constellation diagram}{% true-conn const diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
- \pgfmathtruncatemacro\actualnumitem{\maxsmitem-1}
- \foreach \smitem [count=\xi] in {#2}{%
- \ifnumequal{\xi}{1}{ %true
- \node[planet,smvisible on=<\xi->](planet){\smitem};
- }{%false
- \pgfmathtruncatemacro{\xj}{\xi-1}
- \pgfmathtruncatemacro{\angle}{360/\actualnumitem*\xj}
- \edef\col{\@nameuse{color@\xj}}
- \node[satellite,smvisible on=<\xi->] (satellite\xj)
- at (\angle:\distanceplanetsatellite) {\smitem };
- }%
- }%
- \foreach \smitem [count=\xi] in {#2}{%
- \ifnumgreater{\xi}{1}{ %true
- \pgfmathtruncatemacro{\xj}{\xi-1}
- \edef\col{\@nameuse{color@\xj}}
- \pgfmathtruncatemacro{\xk}{mod(\xj,\actualnumitem) +1}
- \pgfmathtruncatemacro{\smvisible}{\xi+1}
- \path[connection planet satellite,smvisible on=<\smvisible->]
- (satellite\xj) edge[bend right] (satellite\xk);
- }{}
- }%
- \end{tikzpicture}
- }{}%end-connected constellation diagram
- \IfStrEq{\diagramtype}{priority descriptive diagram}{% true-priority descriptive diagram
- \pgfmathparse{subtract(\priorityarrowwidth,\priorityarrowheadextend)}
- \pgfmathsetmacro\priorityticksize{\pgfmathresult/2}
- \pgfmathsetmacro\arrowtickxshift{(\priorityarrowwidth-\priorityticksize)/2}
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \smitem [count=\xi] in {#2}{\global\let\maxsmitem\xi}
- \foreach \smitem [count=\xi] in {#2}{%
- \edef\col{\@nameuse{color@\xi}}
- \pgfmathtruncatemacro\smvisible{\xi+1}
- \node[description,drop shadow={smvisible on=<\smvisible->},smvisible on=<\smvisible->]
- (module\xi) at (0,0+\xi*\descriptiveitemsysep) {\smitem};
-\draw[line width=\prioritytick,\col,smvisible on=<\smvisible->]
- ([xshift=-\arrowtickxshift pt]module\xi.base west)--
- ($([xshift=-\arrowtickxshift pt]module\xi.base west)-(\priorityticksize pt,0)$);
- }%
- \coordinate (A) at (module1);
- \coordinate (B) at (module\maxsmitem);
- \CalcHeight(A,B){heightmodules}
- \pgfmathadd{\heightmodules}{\priorityarrowheightadvance}
- \pgfmathsetmacro{\distancemodules}{\pgfmathresult}
- \pgfmathsetmacro\arrowxshift{\priorityarrowwidth/2}
- \begin{pgfonlayer}{background}
- \node[priority arrow] at ([xshift=-\arrowxshift pt]module1.south west){};
- \end{pgfonlayer}
- \end{tikzpicture}
- }{}% end-priority descriptive diagram
- \IfStrEq{\diagramtype}{sequence diagram}{% true-sequence diagram
- \begin{tikzpicture}[every node/.style={align=center}]
- \foreach \x[count=\xi, count=\prevx from 0] in {#2}{%
- \edef\col{\@nameuse{color@\xi}}
-\ifnum\xi=1
- \node[sequence item,smvisible on=<\xi->] (x-\xi) {\x};
-\else
- \node[sequence item,anchor=west,smvisible on=<\xi->]
- (x-\xi) at (x-\prevx.east) {\x};
-\fi
- }
- \end{tikzpicture}
- }{}% end-sequence diagram
- }% end-no value 1
-}% end-command
+\usesmartdiagramlibrary{core.definitions}
+\usesmartdiagramlibrary{core.styles}
+\usesmartdiagramlibrary{core.commands}
%%
-%% Copyright (C) 2012-2013 by Claudio Fiandrino <claudio.fiandrino@gmail.com>
+%% 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
@@ -876,7 +77,11 @@
%%
%% This work consists of the file smartdiagram.dtx
%% and the derived files smartdiagram.ins,
-%% smartdiagram.pdf, and
+%% smartdiagram.pdf,
+%% smartdiagramlibrarycore.definitions.code.tex,
+%% smartdiagramlibrarycore.styles.code.tex,
+%% smartdiagramlibrarycore.commands.code.tex
+%% smartdiagramlibraryadditions.code.tex and
%% smartdiagram.sty.
%%
%%