# Drawing delta-complexes (essentially labeled directed graphs) with TikZ? [duplicate]

Possible Duplicate:
TikZ: How to draw an arrow in the middle of the line?

How can I draw delta-complex diagrams like ones on this page from Hatcher's book:

using TikZ (or any other LaTeX package)? For my documents I usually draw them by hand and scan them in but I'd like to learn how to do it with LaTeX, so it'll be neater, self-contained, editable, copy-paste-able, etc.

I'm sorry, I've tried to figure this out myself but nothing came even close to working. Thanks for your help.

-

## marked as duplicate by percusse, lockstep, cgnieder, Tom Bombadil, Harish KumarOct 6 '12 at 23:24

That looks great! How can I get the labels though? Sorry again, I'm just starting out with TikZ. –  topology student Oct 6 '12 at 18:33

Here's one possibility using decorations:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings,positioning}

\begin{document}

\begin{tikzpicture}[node distance=2cm]
\coordinate[label=right:$v$] (tv) {};
\coordinate[left=of tv,label=left:$w$] (tw) {};
\coordinate[below=of tw,label=left:$v$] (bv) {};
\coordinate[below=of tv,label=right:$w$] (bw) {};
\begin{scope}[decoration={markings,mark=at position 0.5 with {\arrow{>}}}]
\draw[postaction={decorate}] (tv) -- node[auto,swap] {$b$} (tw);
\draw[postaction={decorate}] (bv) -- node[auto] {$a$} (tw);
\draw[postaction={decorate}] (bv) -- node[auto,swap] {$b$} (bw);
\draw[postaction={decorate}] (tv) -- node[auto] {$a$} (bw);
\draw[postaction={decorate}] (bv) -- node[auto,swap] {$c$} (tv);
\end{scope}
\node at (barycentric cs:bv=0.5,tv=0.5,bw=0.9) {$L$};
\end{tikzpicture}

\end{document}


-
Awesome! Thanks so much for your help! –  topology student Oct 6 '12 at 18:43
Ah, thanks for explaining that. Also, how can we make the label L appear in the middle of its triangle? –  topology student Oct 6 '12 at 18:50
@topologystudent answer updated. –  Gonzalo Medina Oct 6 '12 at 18:55