# Problems rotating arrow labels

Xypic offers many placement and formatting options for labels, including rotation.

However, I can't get this last feature to work correctly.

I have two problems with this:

• with some inclinations the label won't be correctly shifted sideway (see the downleft arrow below)
• with some inclinations the label won't be correctly placed in the length of the arrow (see the left arrow below)

The normal aspect of the arrow being :

MWE:

\documentclass[a4paper,12pt]{article}
\usepackage[all]{xy}

\newcommand{\bijar}[1][]{%
\ar[#1]
\ar@<0.7ex>@{}[#1]|-*[@]{\sim}}
% Arrow for a
% bijective mapping

\begin{document}

$\xymatrix{ &&&& \\ &&&& \\ && {\bullet} \bijar[rr] \bijar[uurr] \bijar[uu] \bijar[uull] \bijar[ll] \bijar[ddll] \bijar[dd] \bijar[ddrr] && \\ &&&& \\ &&&& }$

\end{document}


Some comments about the code: I draw this arrow in 2 arrows, one being only the arrow and the second one being an empty arrow, shifted by the desired dimension, and actually supporting the label. The reason I use that instead of regular labels is that it allows me to specify the distance between the label and the arrow. Also, I don't think it can be the problem. After all, sideway-shifted arrows are exactly in front of their normal position, they aren't shifted backward or forward.

I'm using xy-pic 3.8.6 with pdflatex.

Edit : After reading this question, I came up with the following definition of the macro:

\newcommand{\bijar}[1][]{%
\ar[#1]
\ar@<0.7ex>@{}[#1]|-*@{~}}
% Arrow for a
% bijective mapping


It indeed solves both of the above problems, but as you can see on the picture below, there is another problem appearing on "standard" directions :

The other problem is that it works for this because \sim can be imitated by sloped arrow body, but for other arrows like open or closed immersions, this hack wouldn't work.

• The curious thing is that I get the correct result with Xy-pic v. 3.8.5; I'll try later with the more recent version. – egreg Dec 20 '11 at 17:30
• I can confirm that it's a bug introduced in v. 3.8.6 – egreg Dec 20 '11 at 18:00
• The version history mentions only a bug fix for color support in xypdf at 3.8.6... I guess I could downgrade without breaking any of my diagrams, but honestly, that's much of a hassle. Maybe it is an intentional change that has been made and that requires the user to change the syntax? – T. Verron Dec 20 '11 at 21:33

\newcommand{\bijar}[1][]{%