答案1
这个答案将向您展示如何在来源中找到您需要的信息(针对 v0.3b,日期为 2016/12/23,与 TL2018 一起分发)。
首先看一下样式文件,其中内容(仅与您相关的内容):
\usesmartdiagramlibrary{core.definitions}
\usesmartdiagramlibrary{core.styles}
\usesmartdiagramlibrary{core.commands}
因此,您必须搜索这三个库文件。您将能够发现以下相关定义。因此,从颜色开始:
\@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}
这描述了您的图表:
\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};
}
}%
% arrows omitted
\end{tikzpicture}
因此你会发现你需要
\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
},
% arrows omitted
}