TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I want to draw an arrow between two nodes (a) and (b), and write text inside the arrow. How can I modify this command to control the size of the arrow head and insert the text?

\draw[->, >=latex, blue!20!white, line width=15pt]   (a) to (b) ; 
share|improve this question
up vote 11 down vote accepted

You can perfectly use the shapes library for this. Use \usetikzlibrary{shapes.arrows}. Based on an example from the TikZ manual, page 441:



    \begin{tikzpicture}[every node/.style={single arrow, draw=none, rotate=60}]
        \node [fill=red!50] {arrow 1};
        \node [fill=blue!50, single arrow head indent=1ex] at (1.5,0) {arrow 2};

This gives:

enter image description here

share|improve this answer
It is best to post a fully compilable example with a \documentclass (can use article, unless a reason to use something else), and include all the packages so that others can just cut and paste. – Peter Grill Jun 4 '12 at 17:39
Updated that, thanks. – Ingo Jun 5 '12 at 10:38
Thanks, but you should not use the minimal class. See Why not use the minimal class, that was why I had suggested using the article class. – Peter Grill Jun 5 '12 at 15:28
It still gave the identical output, but I fixed it anyway. Thanks. – Ingo Jun 5 '12 at 16:29
Yeah in this case it does not matter, but better not to use minimal in general. – Peter Grill Jun 5 '12 at 16:37

Those are two quite different questions, answering the one in the title:

If you simply add a node along the line, it will be printed on top of the line (unless otherwise specified). You have to change the color though, as the color specification of the \draw command also applies to the node.

enter image description here

\coordinate (a) at (0,0);
\coordinate (b) at (6,0);
\draw[->, >=latex, blue!20!white, line width=15pt]   (a) to node[black]{text} (b) ;
share|improve this answer
Great, thanks! I had to specify anchor=center for this to work – Neil G Oct 1 '12 at 0:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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