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 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?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted
\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

share|improve this answer
    
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
show 1 more comment

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.

share|improve this answer
1  
:-) :-) :-) many thanks! –  Marco Mar 7 '12 at 14:05
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.