在以下 MCE 中tikzpicture
,每一行:
- 在“a”和“b”之间,
- 在“a”和“c”之间,
以箭头结尾:到目前为止,一切都很好。但是,一旦取消注释注释行,前者的末尾就没有任何箭头。为什么?
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}[-latex]
\matrix (chart)
[
matrix of nodes,
column sep = 1cm,
row sep = 1cm,
]
{
a & \\
b & c \\
& d \\
};
\draw
(chart-1-1) -- (chart-2-1)
(chart-1-1) edge (chart-2-2)
% (chart-2-1) |- (chart-3-2) % <- uncomment in order to see the effect
;
\end{tikzpicture}
\end{document}
两个案例的说明
答案1
尝试这个:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}[-latex]
\matrix (chart)
[
matrix of nodes,
column sep = 1cm,
row sep = 1cm,
]
{
a & \\
b & c \\
& d \\
};
\draw
(chart-1-1) -- (chart-2-1)
(chart-1-1) edge (chart-2-2);
\draw
(chart-2-1) |- (chart-3-2) % <- uncomment in order to see the effect
;
\end{tikzpicture}
\end{document}