[Tex/LaTex] Shorten or extend xypic arrows


In an xypic or xymatrix diagram, is it possible to specify that an arrow should only cover part of the distance it normally would? In other words, for an arrow \xymatrix{ A \ar[r] & B }, or between two nodes in a more complex diagram \ar@{>=>}"A";"B", I would like to specify that e.g. it should start at 0.3 of the distance from A to B, and end at 0.85 of the distance to B.

(This would be similar to what the \xymatrix{ A \ar[r(0.6)] & B } notation does, except that that only shortens the arrow on the target end, not the source.)

Best Answer

One way to do this is to first typeset an empty arrow \ar@{}[r] and label the required positions. For example ^(0.4){}="a" places an empty label named "a" at 0.4 of the way along the arrow. If you have set up labels "a" and "b" this way, then \ar "a";"b" will draw an arrow between them.

Sample output




Normal arrow
  \xymatrix{ A \ar[r] & B }
Shortened arrow
  \xymatrix{ A \ar@{}[r]^(.25){}="a"^(.75){}="b" \ar "a";"b"& B }

Related Question