TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


Source: http://www.math.cornell.edu/~hatcher/AT/AT.pdf#page=111

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.

share|improve this question

marked as duplicate by percusse, lockstep, clemens, Tom Bombadil, Harish Kumar Oct 6 '12 at 23:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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
up vote 5 down vote accepted

Here's one possibility using decorations:



\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);
\node at (barycentric cs:bv=0.5,tv=0.5,bw=0.9) {$L$};


enter image description here

share|improve this answer
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

Not the answer you're looking for? Browse other questions tagged or ask your own question.