TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Well, try tikz-cd instead. It's easier to shorten arrows in tikz. – Leo Liu Feb 27 '13 at 15:31
@LeoLiu: I like tikz-cd, but I have co-authors who prefer to stick to xymatrix where possible. – Peter LeFanu Lumsdaine Feb 27 '13 at 22:15
up vote 4 down vote accepted

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 }

share|improve this answer
I tried this in LyX and got <pos> "a" not defined" and <pos> "b" not defined. How do I fix it? – Exterior Dec 6 '14 at 14:08
@Exterior Sounds like a LyX specific problem. You should ask a separate question. – Andrew Swann Dec 6 '14 at 21:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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