
smartdiagram
矢印がつながっているボックスではなく、前のボックスの色を矢印にも使用したいと思います。したがって、この画像では次のようになります。
緑の矢印を赤に、青の矢印を緑に、オレンジの矢印を青に、赤の矢印をオレンジにしたいです。
これを実現するにはどうすればよいでしょうか? 私の MWE は次のとおりです:
\documentclass[border=3mm]{standalone}
\usepackage{smartdiagram}
\tikzset{
every shadow/.style={
fill=none,
shadow xshift=0pt,
shadow yshift=0pt}
}
\tikzset{module/.append style={top color=\col,bottom color=\col}}
\smartdiagramset{%
module shape=rectangle,
text color=white,
border color=none,
}
\smartdiagramset{set color list={red,green,blue,orange}}
\begin{document}
\sffamily
\smartdiagram[flow diagram:horizontal]{elem1,elem2,elem3,elem4}
\end{document}
答え1
https://tex.stackexchange.com/a/126481/197451
\documentclass[border=3mm]{standalone}
\usepackage{smartdiagram}
\tikzset{
every shadow/.style={
fill=none,
shadow xshift=0pt,
shadow yshift=0pt}
}
\tikzset{module/.append style={top color=\col,bottom color=\col}}
\smartdiagramset{%
module shape=rectangle,
text color=white,
border color=none,
}
\makeatletter
\smartdiagramset{
flip arrow colors/.style={
/tikz/diagram arrow type/.prefix code={%
\edef\col{\@nameuse{color@\xi}}%
}
}
}
\smartdiagramset{flip arrow colors}
\begin{document}
\sffamily
\smartdiagram[flow diagram:horizontal]{elem1,elem2,elem3,elem4}
\end{document}