# tikz — scaling of arrows

I declare a new arrow in TikZ via:

\pgfarrowsdeclarecombine{combined}{combined}{latex}{latex}{|}{|}


In the first example you see that the left left arrow doesn't end at the coordinate (0,0). How can I avoid this? Next to the first picture you see an example of PSTricks which represented the correct output.

In the second example the arrow produced by tikz looks weird.

%need latex->ps-pdf or xelatex

\documentclass{article}
\parindent0pt
\usepackage{tikz}
\usepackage{pstricks}
\usetikzlibrary{decorations.markings,arrows,calc}
\begin{document}
\par
First example
\par
\begin{tikzpicture}
\pgfarrowsdeclarecombine{combined}{combined}{latex}{latex}{|}{|}%
\draw[decoration={markings,%
mark=at position 0 with {\arrowreversed[scale=1]{combined}},
mark=at position 1 with {\arrow[scale=1]{combined}},
},
postaction={decorate},line width=3pt,blue] (0,0)  -- (3,0);

\draw[yellow,line width=2pt] (0,0)  -- (3,0);
\end{tikzpicture}
\begin{pspicture}(0,0)(3,1)
\psline[arrowscale=1.25,linecolor=blue,linewidth=3pt,arrowinset=0]{|<->|}(0,0)(3,0)
\psline[linecolor=yellow,linewidth=2pt](0,0)(3,0)
\end{pspicture}
\par\kern1cm
Second example
\par
\begin{tikzpicture}
\pgfarrowsdeclarecombine{combined}{combined}{latex}{latex}{|}{|}%
\draw[red,line width=3pt,combined-combined] (0,0)  -- (3,0);
\draw[yellow,line width=2pt] (0,0)  -- (3,0);
\end{tikzpicture}
\begin{pspicture}(0,0)(3,1)
\psline[linecolor=red,linewidth=3pt,arrowinset=0]{|<->|}(0,0)(3,0)
\psline[linecolor=yellow,linewidth=2pt](0,0)(3,0)
\end{pspicture}
\end{document}


-

\pgfarrowsdeclarecombine[-1\pgflinewidth]{combined}{combined}{latex}{latex}{|}{|}

Actually, I have some doubts about the possibility of fixing that. The reason is that you use the combine version to obtain the new arrow tip and hence pgf just picks up two already defined arrow tips and simply concatenate them with the problem stated on page 612 in the manual regarding the right extent (which is the void you see in my opinion). If you want to use this combining option then (I think) you have to first modify the inner arrow tip and call it, say, modiftip and then use \pgfarrowsdeclarecombine{combined}{combined}{modiftip}{modiftip}{|}{|}  – percusse Sep 10 '11 at 15:50