答案1
将您的\draw
行更改为:
\draw [->] (1) edge (2) (2) edge (3);
arrows.meta
您还可以像这样使用 tikz 库:
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[thick, every edge/.style = {draw, -to}]
\node (1) {1};
\node (2) [right of=1] {2};
\node (3) [right of=2] {3};
\path (1) edge (2)
(2) edge (3);
\end{tikzpicture}
\end{document}