1

Minimum working example:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows, positioning}

\begin{document}
    \begin{tikzpicture}
        \draw
        node[draw](A){A}
        node[draw,right=of A](S){S}
        node[draw,right=of A,above=of S](B){B};

        \draw[->]
        (A) |- (B)
        (S) -- +(0,-1) -| (A);
    \end{tikzpicture}
\end{document}

The nodes are positioned exactly as I desire. But the arrowtip for the arrow from A to B is missing.

I also noticed that when I move the command for drawing the arrow from S to A above the one for A to B, then instead the arrowtip for the arrow from S to A disappears.

Why does this happen? How do I fix it?

1 Answer 1

1

I hope to have understood your problem. There are two different codes with the same image.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows, positioning}

\begin{document}
    \begin{tikzpicture}
        \draw
        node[draw](A){A}
        node[draw,right=of A](S){S}
        node[draw,right=of A,above=of S](B){B};
        \draw[->] (A)|- (B);
        \draw[->](S) -- +(0,-1) -| (A);
    \end{tikzpicture}
\end{document}

The problem is that it is missing \draw[->]. You can compare also your code with my two codes.

enter image description here

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows, positioning}

\begin{document}
    \begin{tikzpicture}
        \draw
        node[draw](A){A}
        node[draw,right=of A](S){S}
        node[draw,right=of A,above=of S](B){B};

        \draw[->]
        (A) |- (B);
        \draw[->](S) -- +(0,-1) -| (A);
    \end{tikzpicture}
\end{document}
1
  • I hope I have helped you well. :-) I edited my answer. Both codes have the same arrow.
    – Sebastiano
    Mar 3, 2018 at 11:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .