Combining minimum width
with single arrow head extend
seems buggy. Use inner sep
instead to define the inner width:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}
\begin{document}
\begin{tikzpicture}
\node [single arrow,draw,inner sep=1cm,minimum height=4cm, single arrow head extend=0.8cm,anchor=west] (a) {};
\draw[|<->|, purple, ultra thin] (0,0) -- (4,0) node [midway, above, sloped] {\tiny 4 cm};
\draw[|<->|, red, ultra thin] (0,0) -- (0,1) node [midway, above, sloped] {\tiny 1 cm};
\draw[|<->|, blue, ultra thin] (a.before head) -- ++(0,0.8) node [midway, above, sloped] {\tiny 0.8 cm};
\end{tikzpicture}
\end{document}
Update: the final size of the arrow could still be larger than intended, as caused by the finite line width and default miter
line join option, illustrated below.
\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}
\begin{document}
\begin{tikzpicture}
\tikzset{samplearrow/.style={single arrow,draw,inner sep=1cm,minimum height=4cm, single arrow head extend=0.8cm,anchor=west,line width=5mm}}
\node [samplearrow, orange!50] (a) {};
\node [samplearrow, gray,line join=round] (b) {};
\draw[|<->|, purple, ultra thin] (0.5,0) -- ++(4,0) node [midway, above, sloped] {\tiny 4 cm};
\draw[|<->|, red, ultra thin] (0,0) -- (0,1) node [midway, above, sloped] {\tiny 1 cm};
\draw[|<->|, blue, ultra thin] (a.before head) -- ++(0,0.8) node [midway, above, sloped] {\tiny 0.8 cm};
\draw[|<->|, ultra thin] (0,1) -- ++(0,0.5) node [midway, above, sloped] {\tiny 5 mm};
\draw[|<->|, ultra thin] (0,0) -- (0.5,0) node [pos=0, left, sloped] {\tiny 5 mm};
\draw[<-,orange] (a.before tip) -- ++(-0.2,0) node[left] {\tiny miter};
\end{tikzpicture}
\end{document}
This could be solved by subtracting the line width from both the inner sep
and minimum height
(e.g. inner sep=1cm-0.4pt
for the default case of using a thin
line), and by setting line join
to round
(as illustrated in gray) or bevel
.