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}
