# How to join arrows within xymatrix?

I use xymatrix (\usepackage[all]{xy}) in order to create the following picture:

$\xymatrix{A \ar@{-}[d] & B \\ \ar[r] & C}$


Is there any possibility to join the lines?

-

\documentclass{article}
\usepackage[all,cmtip]{xy}
\begin{document}
\xymatrix{
A \ar d[dr] [dr] & B \\
& C
}
\end{document}


A sharper turn can be obtained by

\xymatrix{
A \ar d/2pt[dr] [dr] & B \\
& C
}


-
Aw. I just spent the last 15 minutes figuring this out! xypic is not the easiest of packages to fathom. –  qubyte Mar 7 '12 at 14:16
The part on bending arrows is not very well documented. –  egreg Mar 7 '12 at 14:21
sorry, I have already accepted the previous answer. But this is exactly what I was looking for. Many Many thanks! –  Marco Mar 7 '12 at 14:21
I have to admit, I came across the same basic code you give above but it was trial and error, and rather surprising when I worked it out. Excellent to have it here then! –  qubyte Mar 7 '12 at 14:23
@Marco; This is what you actually asked for in the question. Whether you use this or TikZ, this is the correct answer, so I won't hold it against you if you accept this one now. ;) –  qubyte Mar 7 '12 at 14:24

I'm not sure about xypic I'm afraid, but I have an alternative that works well with TikZ:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix}

\begin{document}

\begin{tikzpicture}
\matrix (M) [matrix of math nodes, row sep=2em, column sep=2em, ampersand replacement=\&] {%
A \& B \\
\& C \\
};
\draw[->,rounded corners=1mm] (M-1-1) |- (M-2-2);
\end{tikzpicture}

\end{document}


For more information on TikZ matrices, see section 17 of the PGF/TikZ manual.

-
:-) :-) :-) many thanks! –  Marco Mar 7 '12 at 14:05