[Xy-pic] moving the label away from the arrow

Les Saper saper at math.duke.edu
Tue Apr 17 16:21:29 CEST 2007

On Apr 16,2007 18:31:42 +0100, Baptiste <calmes at math.jussieu.fr> wrote :
>I'm trying to use a label on an arrow, and to move it away from the  
>arrow (because it overlaps for some reason). I have seen that there  
>are options to change the positioning of the label along the arrow,  
>but I can't find anything to move it away. Am I missing something?
>Here is the code in which I would like to move the label away:
>$$\xymatrix{ A \ar@{}[r]|{\subseteq}^{a} & B

The correct way to do this is to change the size of the label 
(not the actual size but the size that XyPic thinks it is).  Once 
you do this, XyPic will position it higher up to avoid overlap.  
For example, 

$$\xymatrix{ A \ar@{}[r]|{\subseteq}^*+{\labelstyle a} & B}$$

Essentially the * indicates that you are adding modifiers to the
label; here the modifier is + which causes it to grow.  You can
change this to ++ which will make it grow more (and hence push
the label up even higher).  Or you can specify +<dimen> to have
it grow by a certain dimen(sion).  See the User's Guide for more
information (and the reference manual for more detailed
possibilities).  Note that I have included \labelstyle in the
label.  This is because when you use *, any default style is
ignored so we have to put it back in.

I hope this helps.

- Les Saper

Leslie Saper                    e-mail: saper at math.duke.edu
Department of Mathematics       phone: 919-660-2843
Duke University                 Fax: 919-660-2821
Box 90320
Durham, NC   27708-0320

More information about the xy-pic mailing list