\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[draw, shape=circle] (n0) at (0,0) {0};
\node[draw, shape=circle] (n1) at (2,0) {1};
\node[draw, shape=circle] (n2) at (2,2) {2};
\node[draw, shape=circle] (n3) at (0,2) {3};
\draw[->] (n0) -- (n1);
\draw[->] (n1) -- (n2);
\draw[->] (n2) -- (n3);
\draw[->] (n3) -- (n0);
\end{tikzpicture}
\end{document}
The above is what I wanted, but I was wondering if there is a single-line solution for the same. I tried:
\draw[->] (n0) -- (n1) -- (n2) -- (n3) -- (n0);
But this gave an arrow tip at the end of the path only.
How can I draw the arrow tip for every edge?
edge
style. For example:every edge/.style = {->}
. That I can show you this, please extend your code fragment to an MWE!\draw[->] (n0) edge (n1) (n1) edge (n2) (n2) edge (n3) (n3) edge (n0);
\draw[->] (n0) edge(n1) edge[<-] (n3) (n2) edge (n3) edge[<-] (n1);