# Arrow tips in TiKZ appearing where I do not specify them

In a simple drawing like this (I use automata library):

\begin{tikzpicture}[shorten >=1pt,node
distance=2cm,auto,initial text=]
\tikzstyle{every state}=[draw=blue!50,very thick,fill=blue!20]
\node[state] (a) {};
\node[coordinate] (b) [right of=a] {};
\node[state] (c) [right of=b] {};
\draw[-] (a) edge node {a} (b);
\draw[->] (b) edge (c);
\end{tikzpicture}


I get a tip in node b even though I do not specify it there. I create an additional node (here: b) to have a segmented line, and I don't want any tips there. How can I get rid of that tip? Interestingly, if I put a star at the end of - as an option for \draw, I get both a filled circle and an arrow tip at b, but if I keep - option, and prepend a star to ->, I get two filled circles at b.

I don't know how to mark a comment as a good answer, but the right (and the simplest) answer was among comments. I replaced \draw[-] (a) edge with \path (a) edge[-] and draw[->] (b) edge with \path (b) edge[->]. I also had to remove the global option shorten >=1pt which gave me still small gaps in lines. What I wanted to achieve was several lines going horizontally, and then converging at various angles (with an arrow tip at the end) at a single state. Thanks for all the comments and answers.

• Welcome to TeX.SX! A tip: You can use backticks  to mark your inline code as I did in my edit. Nov 22 '13 at 23:41
• It's \draw (a) edge[->] node {a} (b); if that's your intention Nov 22 '13 at 23:43
• @percusse It's \path[->, <and other options for everything including edges>] (a) edge[<local edge options>] node {a} (b); See Strange arrow mark with TikZ edge and anchors. — Reading the question better, the arrow comes from the last path. Up should just use \path[->] (b) edge (c);, (or \path with every edge really). Nov 23 '13 at 0:18
• The tip at (b) comes from \draw[->] (b) …; which although only including a move-to operator, draws the arrow there. General rule: Use only \path with edges. See Strange arrow mark with TikZ edge and anchors. Also related: Does a zero-length line with an arrow make sense? Is it a bug? Nov 23 '13 at 0:24
• @Qrrbrbirlbel It's a pointer. And you can get away with \draw if required. Nov 23 '13 at 0:26

To remove the tip at node b, first remove the coordinate option in that command. This will leave a short segment of space. Then use calc for calculaion of a new coordinate to fill the space by line.

Code: method 1

\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{automata,arrows,calc}

\begin{document}
\begin{tikzpicture}[shorten >=0pt, node distance=2cm,auto]
\tikzstyle{every state}=[draw=blue!50,very thick,fill=blue!20]
\node[state] (a) {};
% method 1: remove the coordinate definition
\node [] (b) [right of=a] {};
\node[state] (c) [right of=b] {};
\draw (a) edge node{a} ($(b)+(0.2,0)$); % an extra line is drawn to fill the blank
\draw[->] (b) edge (c);
\end{tikzpicture}
\end{document}


Edit (2014/01/23): Method 2

\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{automata,arrows}

\begin{document}
\begin{tikzpicture}[shorten >=1pt, node distance=2cm,auto]
\tikzstyle{every state}=[draw=blue!50,very thick,fill=blue!20]
\node[state] (a) {};
% method 2: remove the coordinate definition and set outer sep=-4pt.
\node[outer sep=-4pt] (b) [right of=a] {};
\node[state] (c) [right of=b] {};
\draw (a) edge node{a} (b);     % method 2: no extended draw.
\draw[->] (b) edge (c);
\end{tikzpicture}
\end{document}


As far as I understand, you are expecting two-parts arrow:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{automata}

\begin{document}

\begin{tikzpicture}[shorten >=1pt,node
distance=2cm,auto,initial text=]
\tikzstyle{every state}=[draw=blue!50,very thick,fill=blue!20]
\node[state] (a) {};
\node[coordinate] (b) [right of=a] {};
\node[state] (c) [right of=b] {};
\draw (a) [->] edge node {a}(b);
\draw [->] (b) --  (c);
\end{tikzpicture}

\end{document}
`