# [Xy-pic] Questionable behaviour of the arrow extension

Johann Bauer jbauer-news at web.de
Wed Aug 23 22:07:30 CEST 2006

Hello,

the arrow extension behaves strangely in two instances that came up when
I drew some mathematical diagrams. I would be grateful if someone could
help me with these problems.

1) xypic outputs for each arrow (\ar) obviously three paths: two at both
ends of the stem of (nearly) length zero and the proper one for the
stem. I discovered this when I increased the linewidth for a certain
diagram. The effect becomes obvious in the following example. Note that
this bug (?) occurs independent of the "line" extension - I just used
this to demonstrate the effect.

\documentclass{minimal}
\usepackage[arrow,line,dvips]{xy}
\begin{document}
\xy <3pc,0pc>:<0pc,2pc>::
\ar@[|<30pt>]@[projcap]@{-} (10,10)
\endxy
\end{document}

Without the line extension, the additional paths can be seen in the
postscript output (generated by dvips):

%%Page: 1 1
TeXDict begin 1 0 bop 0 26567 a
SDict begin {pu  2 lc 30.0 lw}xyg  end
0 26567 a -2672 x @beginspecial
@setspecial
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{0.0 0.14063 l}xy  % Unwanted!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@endspecial 0 26567 a
SDict begin { pp}xyf end
0 26567 a 0 26567
a
SDict begin {pu  2 lc 30.0 lw}xyg  end
0 26567 a 39851 0 a @beginspecial @setspecial
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{360.0 216.0 l}xy % This is the proper arrow stem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@endspecial
0 26567 a
SDict begin { pp}xyf end
0 26567 a 0 26567 a
SDict begin {pu  2 lc 30.0 lw}xyg  end
0 26567 a 39851 0 a @beginspecial
@setspecial
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{0.0 0.14063 l}xy % Unwanted!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@endspecial 0 26567 a
SDict begin { pp}xyf end
0 26567 a eop end
%%Trailer

How can I get rid of these (nearly) zero paths? They create ugly
artefacts in some of the diagrams I wrote.

2) Another strange output comes from this example:

\documentclass{minimal}
\usepackage[arrow]{xy}
\begin{document}
\xy
(0,0), {\ar@{=} (10,0)},
(20,0), {\PATH ~={**\dir{.}}  '(30,0) (30,10)},
(0,20), {\ar@{=} (00,30)},
(20,20), {\PATH ~={**\dir{.}}  '(30,20) (30,30)},
\endxy
\end{document}

Here, the arrow command causes the succeeding path to be drawn twice:
once with its own style (here: dotted) and once with the arrow style
(here: double line). To avoid this, I can of course move all the arrow
commands to the end of the diagram. But is this a bug in xypic or did I
just not understand the syntax rules? What would then be the correct syntax?

Thanks in advance for any help!

Johann Bauer