I was trying to draw something similar to:
without the border around nodes and where arrows should have a line (with a given width to be visible) connecting the tail and the tip.
My code is:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows,calc}
% knowing the angle starting from two coordinates
% by Altermundus:
% http://tex.stackexchange.com/questions/39293/coordinates-a-b-compute-b-a-and-angle-between-x-and-b-a
\newcommand{\pgfextractangle}[3]{%
\pgfmathanglebetweenpoints{\pgfpointanchor{#2}{center}}
{\pgfpointanchor{#3}{center}}
\global\let#1\pgfmathresult
}
% style of the arrow
\tikzset{stylefreccia/.style={single arrow, draw=none,fill=gray!80!black,minimum height=#1,minimum width=0.5cm}}
\tikzset{freccia/.code={
\coordinate (A) at (\tikzparentnode.south);
\coordinate (B) at (\tikzchildnode.north);
\pgfextractangle{\angle}{A}{B}
\node [stylefreccia=1cm,single arrow head indent=1ex,rotate=\angle] (x) at ($(\tikzparentnode.south)!0.5!(\tikzchildnode.north)$){}; % <= insert the node exactly in between parent and child node with the angle computed before
\draw[gray!20,draw,line width=2pt](x.tail)--(x.tip); % <= draw the line connecting tail and tip
}
}
\begin{document}
\tikzset{edge from parent/.style={freccia}}
\begin{center}
\begin{tikzpicture}[level distance=2cm,
level 1/.style={sibling distance=30mm},
level 2/.style={sibling distance=20mm},
level 3/.style={sibling distance=10mm}
]
\node {root}
child {node {left}
child {node{child}}}
child {node {right}
child {node {child}}
child {node {child}}
};
\end{tikzpicture}
\end{center}
\end{document}
which actually gets the point because the output is:
My question is: why leaves seem to be typeset in bold?