# Custom Tikz arrowhead with bar before triangle 45

How do I make a custom arrowhead in Tikz having a perpendicular bar before a triangle 45? I would also like to adapt this solution to a bar before a square, open square, etc.

For example, imagine arrow coming from (0,0) to (10,0), then the arrowhead would be a filled triangle roughly (9,1) -- (10, 0) -- (9, -1). I want to add a bar, which is a filled rectangle roughly (8.5,1) -- (8.6, 1) -- (8.6, -1) -- (8.5, -1).

I guess I can use pgfdeclarearrow to declar a bar somehow and then pgfarrowsdeclarecombine* to combine it with existing arrows?

-
Could you draw a picture using MS paint or something? –  John Kormylo Dec 16 '13 at 16:03
I think you may want to have a look to Can I combine arrow tips in TikZ/pgf? –  Claudio Fiandrino Dec 16 '13 at 16:04
@JohnKormylo: edited. –  Neil G Dec 16 '13 at 16:24
@ClaudioFiandrino: Thanks, I missed that question, so I'm now closer to a solution. –  Neil G Dec 16 '13 at 16:25

With the new arrows.meta library in the CVS version of pgf, combining arrow heads is pretty simple and can be done in advance or in-line:

\documentclass[border=0.125cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\tikzset{%
tipA/.tip={Bar[sep]Triangle[open,angle=45:4pt]},
tipB/.tip={Bar[sep]Square[open]}
}
\begin{document}

\begin{tikzpicture}
\draw [-tipA] (0,0)  -- +(1,0);
\draw [-tipB] (0,.5) -- +(1,0);
% in-line
\draw [-{Bar[sep]Triangle[angle=45:4pt]}] (0,1)   -- +(1,0);
\draw [-{Bar[sep]Square[]}]   (0,1.5) -- +(1,0);
\end{tikzpicture}

\end{document}


Just for Thomas:

\documentclass[border=0.125cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\tikzset{%
tipA/.tip={Bar[sep]Triangle[open,angle=45:4pt]},
tipB/.tip={Bar[sep]Square[open]},
legs/.tip={Straight Barb[reversed]},
long legs/.tip={Straight Barb[reversed,angle=30:4pt]},
hat/.tip={Bracket[reversed,sep=-1pt]Rectangle[]},
arms/.tip={Bar[sep]},
skirt/.tip={Triangle[reversed]},
arms down/.tip={Straight Barb[angle=35:4pt]},
long hair/.tip={Arc Barb[length=9pt,width=6pt,sep=-9pt]Arc Barb[length=9pt,width=5pt,sep=-9pt]Arc Barb[length=9pt,width=7pt]}
}

\begin{document}

\begin{tikzpicture}[x=0.5cm,y=0.5cm]
\draw [legs-tipA] (0,0)  -- +(0,1);
\draw [legs-tipB] (1,0) -- +(0,1);
% in-line
\draw [legs-{Bar[sep]Triangle[angle=45:4pt]}]
(2,0)   -- +(0,1);
\draw [legs-{Bar[sep]Square[]}]
(3,0) -- +(0,1);
(4,0) -- +(0,1);