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 :

How the arrow should look like



          % Arrow for a
          % bijective mapping


&&&& \\ 
&&&& \\
&& {\bullet}
&& \\
&&&& \\


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:

     % 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
  • 2
    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

After playing a while with the misc. parameters, I found out that the following code works :

      % Arrow for a
      % bijective mapping

It seems the placement is a problem with the rotating functions, which are acting on the whole object (including its frame). Resizing it to zero fixes the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.