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

Baptiste Calmès calmes at math.jussieu.fr
Tue Apr 17 16:41:36 CEST 2007

Les Saper wrote :

> 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.

It definitely does. Thanks a lot.

I had originally discarded this possibility from the manual because I  
thought it would also make the label font larger at the same time.  
But I hadn't thought of the  \labelstyle trick...

Baptiste Calmès

More information about the xy-pic mailing list