3

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

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

enter image description here

Is there any possibility to join the lines?

2 Answers 2

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

enter image description here

A sharper turn can be obtained by

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

enter image description here

5
  • Aw. I just spent the last 15 minutes figuring this out! xypic is not the easiest of packages to fathom.
    – qubyte
    Commented Mar 7, 2012 at 14:16
  • The part on bending arrows is not very well documented.
    – egreg
    Commented Mar 7, 2012 at 14:21
  • sorry, I have already accepted the previous answer. But this is exactly what I was looking for. Many Many thanks!
    – Marco
    Commented Mar 7, 2012 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
    Commented Mar 7, 2012 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
    Commented Mar 7, 2012 at 14:24
2

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}

enter image description here

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .