我正在尝试绘制一个连接两个元素的箭头,如下所示:
即使我使用-|
命令。
\draw [arrow, very thick] (a1) -- (a2);
\draw [arrow] (a2) -- (a3);
\draw [arrow] (a3) -- (a4);
\draw [arrow] (a4) -- (a5);
\draw [arrow] (a5) -- (a6);
\draw [arrow] (a6) -| node[anchor=west] {No} (a2);
\draw [arrow] (a6) -- node[anchor=west] {Yes} (a7);
\draw [arrow] (a7) -- (a8);
答案1
我使用了这个方法:https://tex.stackexchange.com/a/102390/308613像这样 声明一个line
样式:tikzset
line/.style={draw, -latex}
\path
然后在主体中创建一个tikzpicture
。
\node (s1) [process, yshift=-0.5cm] {ACT 1};
\node (s2) [process, below of=s1] {ACT 2};
\node (d1) [decision, below of=s2, yshift=-1.5cm] {DECISION 1};
\node (s3) [process, below of=d1, yshift=-1.5cm] {ACT 3};
\path [line] (s1) -- (s2);
\path [line] (s2) -- (d1);
\path [line] (d1) -- (s3);
\path [line] (d1.east) -- ([xshift=0.6cm]s2.east) -- ([xshift=0.5cm]s1.east) -- (s1.east);
最终结果: