Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to make a diagram with arrows returning to the same entry using xymatrix. The following example works perfectly fine.

\[
\xymatrix{
V \ar@(dl,ul)[]^{h'} \ar@<0.5ex>[r]^{i} & W \ar@(dr,ur)[]_{h} \ar@<0.5ex>[l]^{p} 
},
\]

However, if I try to change V to (V,d_V), I only get error messages. I tried already to place it into {}, but it makes no difference. Typing

\[
\xymatrix{
{(V,d_V)} \ar@(dl,ul)[]^{h'} \ar@<0.5ex>[r]^{i} & {(W,d_W)} \ar@(dr,ur)[]_{h} \ar@<0.5ex>[l]^{p} 
},
\]

I still get error messages like

! Undefined control sequence.
\splineendScan@ ...s@ \expandafter {\splineedges@ 
                                              }\xylowtolerance@ \splined...

I hope someone can help me.

share|improve this question
    
This may be a defect of xy-pic, you can change V to (x,y) but not (X,Y), and for (x,y) the result is unsatisfactory. –  Ma Ming May 23 '11 at 17:14
add comment

1 Answer 1

up vote 1 down vote accepted

Xy-pic sometimes has problems with curving or turning arrows when the nodes are too large. (I've never been able to predict when the problems would arise.) For a crude workaround, you can use

\[
\xymatrix{
  *[r]{\;(V,d_V)\;} \ar@<0.5ex>[rr]^{i} \ar@(dl,ul)[]^{h'} 
  && *[l]{\;(W,d_W)\,} \ar@<0.5ex>[ll]^{p} \ar@(dr,ur)[]_{h} 
},
\]

We used *[r]{node} to shift that first node to the right and *[l]{node} to shift that second node to the left. We also padded each node with a \; at the beginning and end, and we made the second node two jumps to the right, and made the arrows into \ar[rr] and \ar[ll], to leave room for the arrows (which were otherwise crowded by the shifted nodes). It's crude, but it mostly works: enter image description here

share|improve this answer
    
Thank you, it worked perfectly! –  pyro4erebus May 23 '11 at 21:35
add comment

Your Answer

 
discard

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.