2

Consider the following

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
  \node{A} [grow=east]
  child {node{B}
    child {node{C}}};
\end{tikzpicture}
\end{document}

which gives

output

How can I coerce each edge to have arrow heads so that I can have something like A->B->C? (Let's assume the style [->,>=stealth].)

Sean Allred
  • 27,421

1 Answers1

2

You can use the edge from parent key. If you do it after the first node it will propagate to all edges below that node.

\documentclass[tikz]{standalone}
\begin{document}

\begin{tikzpicture}
  \node{A} [grow=east, ]
  child {node{B} edge from parent[-stealth]
    child {node{C}}};
\end{tikzpicture}

\end{document}

output of code

See §18.6 of the TikZ manual for details.

Alan Munn
  • 218,180