# Arrow tip for curved arrow in xymatrix

Inserting () in A on diagram #3 corrects the arrow tip at C.

But replacing C by a fraction, the problem comes back.

MWE

\documentclass[11pt,a5paper]{report}
\usepackage[all]{xy}
\SelectTips{cm}{11}

\begin{document}
$\xymatrix{% A \ar[r] \ar d/8pt[r] [rr] [rr] & \displaystyle\frac{A}{B} \ar[r] & \frac{A}{B} }$

$\xymatrix{% A \ar[r] \ar d/8pt[r] [rr]_{s} [rr] & \displaystyle\frac{A}{B} \ar[r] & C }$

$\xymatrix{% (A) \ar[r] \ar d/8pt[r] [rr]_{s} [rr] & \displaystyle\frac{A}{B} \ar[r] & C }$

$\xymatrix{% (A) \ar[r] \ar d/8pt[r] [rr]_{s} [rr] & \displaystyle\frac{A}{B} \ar[r] & \frac{A}{B} }$
\end{document}


(original post)

1. I have no idea how to correct the arrow tip for s arrow. The strange is that I just copied the code for s from another diagram I have in the same file, which works perfectly, as you can see below:

1. How to move the s arrow down without increasing the radius for the circle? I mean, I'd like to have a bigger space between the arrow and B. I know that I could add a new line but I'd like to keep only one.

2. Why \displaystyle is lifting A? How to write correctly the middle fraction? I tried \dfrac but no success.

MWE

\documentclass[12pt,margin=0mm]{standalone}
\usepackage[all]{xy}

\begin{document}
$\xymatrix{% A \ar[r] \ar d/8pt[r] [rr]_{s} [rr] & \displaystyle\frac{A}{B} \ar[r] & \frac{A}{B} }$
\end{document}


• I have moved quite a few legacy pictures from xymatrix to TikZ. Never regretted it. (In particular, TikZ has a pretty strong arrow-tip drawing component these days.) – Raphael Jul 17 '15 at 10:37
• @Raphael, yes, I agree. But when we collaborate with old people who are using xy for years, they don't want to learn new codes just for a curved arrow. lol – Sigur Jul 17 '15 at 10:43
• @LaRiFaRi, I edited. The bug is worst than I had imagined. – Sigur Jul 17 '15 at 11:01
• @Sigur Yes, it is really awful. See my answer. All your examples show what I just found out: The start cell has to be deeper than the target cell. – LaRiFaRi Jul 17 '15 at 11:14

1. The arrow head gets broken when touching the target. You have to shift the whole arrow down until it fits again. If you replace the fraction by just A, it works.

2. You have just the possibility to shift the arrow like in \ar@<-1ex> or to increase the radius. I would not do both but just increase the vertical height of the first cell.

3. I loaded amsmath and \dfrac works as expected. \xymatrix gets set in inline math style. No matter if you put it in  or in  ([preview] option to standalone needed)

Here is my approach. I just found out that the depth of the first cell has to be a little bit bigger than the depth of the last cell. The bigger the subscript, the bigger the distance between s and \dfrac{A}{B}

% arara: pdflatex

\documentclass[12pt]{standalone}
\usepackage[all,cmtip]{xypic}
\usepackage{mathtools}

\begin{document}
$\xymatrix{% A\vphantom{\dfrac{A}{B_x}} \ar[r] \ar@<0ex> d/8pt[r] [rr]_s [rr] & \dfrac{A}{B} \ar[r] & \dfrac{A}{B} }$
\end{document}


The result may not be pleasing due to the big gap on the left. Will be better when just using \frac{}{}. And, you guessed it, it would be nicer with !

% arara: pdflatex

\documentclass[12pt, border=2mm]{standalone}
\usepackage{tikz-cd}
\usepackage{mathtools}

\begin{document}
\begin{tikzcd}
A \arrow{r} \arrow[rounded corners, to path={ -- ([yshift=-3ex]\tikztostart.south)\tikztonodes -| (\tikztotarget.south)}]{rr}{s} & \dfrac{A}{B} \arrow{r} & \dfrac{A}{B}
\end{tikzcd}
\end{document}


• Very pretty with tikz-cd. I don't know. Somehow my file keeps some invisible problems. I tried to delete all temp files but no success. If I copy your code and paste it before my \documentclass it works. If I paste my diagram inside your MWE it does not work. – Sigur Jul 17 '15 at 11:17
• @Sigur just a guess: have your apostrophes changed while copy pasting? Make sure, you have the same ticks like me. – LaRiFaRi Jul 17 '15 at 11:20
• I created a new file and typed everything by hand. It is really a very boring bug related with the height/depth of the cells. This simple diagram does not work, $\xymatrix{\cdot \ar d[r] [r] [r] & \cdot}$ but with @<1pt> it works. lol – Sigur Jul 17 '15 at 11:26
• @Sigur Please clarify "does not work"! Have you loaded [cmtip]? This fixes the scrumbled arrow head (but has nothing to do with the rest of the described above problem) – LaRiFaRi Jul 17 '15 at 11:29
• I mean that you discovered the solution. It is related with the size of the cells. I just commented that it is very stupid error. For example, suppose that I want two cells with the same content \cdot for example. The arrow tip (with cmtip) is wrong. I have to change a little the position of the arrow using @<>. – Sigur Jul 17 '15 at 11:31