Consider a small example below.
I'd like to automate the addition of the label-node along the edge through the use of styles.
I've tried the naïve solution of just adding such a necessary node statement,
but it makes sense why it wouldn't work like this.
Can I add the labels another way?
(Since it's not reasonable to expect node placement to be automated, is it possible to also 'clip away' the part of the edge that would clash with the node?)

What I'd like to happen is simply be able to say
\path[graph forward edge]
(F) edge (E);
\path[graph back edge]
(C) edge (B)
(G) edge (A);
\path[graph cross edge]
(D) edge (C)
(G) edge (B)
(G) edge (F);
and have the graph forward edge style add an f in the middle of the edge to more clearly denote its role in the graph.
(Similarly with graph back edge and graph cross edge.)
Full example
\documentclass[tikz]{standalone}
\tikzset{
node distance = 1.5 cm,
graph vertex/.style={
circle,
draw,
},
graph directed edge/.style={
->,
>=stealth,
thick,
},
graph tree edge/.style={
graph directed edge
},
graph forward edge/.style={
graph directed edge,
loosely dotted,
% I'd like to put the magic here...
},
graph back edge/.style={
graph directed edge,
densely dotted,
},
graph cross edge/.style={
graph directed edge,
dotted,
},
}
\begin{document}
\begin{tikzpicture}
\node[graph vertex] (A) {A};
\node[graph vertex] (B) [ right of=A] {B};
\node[graph vertex] (C) [below right of=B] {C};
\node[graph vertex] (D) [below of=C] {D};
\node[graph vertex] (E) [below left of=D] {E};
\node[graph vertex] (F) [ left of=E] {F};
\node[graph vertex] (G) [above left of=F] {G};
\node[graph vertex] (H) [above of=G] {H};
\path[graph tree edge]
(A) edge (B)
(B) edge (F)
(F) edge (C)
(F) edge (D)
(D) edge (E)
(A) edge (H)
(H) edge (G);
\path[graph forward edge]
(F) edge node [ below] {f} (E);
\path[graph back edge]
(C) edge node [above right] {b} (B)
(G) edge node [ right] {b} (A);
\path[graph cross edge]
(D) edge node [ right] {c} (C)
(G) edge node [below right] {c} (B)
(G) edge node [above right] {c} (F);
\end{tikzpicture}
\end{document}

\path[graph forward edge] (A) edge (B);and automagically have anf(per path style) appear in the middle of the edge (with the edge clipped)—hopefully my edit explains this better :-) – Sean Allred Feb 09 '14 at 03:25decoration.markingsis your friend: you can exploit myinsert node(see for example TikZ: using the pos = x in a node) and put it in a high level stylegraph forward edge. – Claudio Fiandrino Feb 09 '14 at 07:51