4

I have a problem typesetting a diagram. The problematic part is this:

\documentclass{article}
\usepackage[all]{xy}

\begin{document}

\[
\xymatrix{%
  &&  C \\
  & B \ar[ru]  & \\
  A \ar[ru] \ar`[rr][rruu] && }
\]

\end{document}

I would like the arrow from A to C go approximately on that path (that is go right, then turn upward and go up), but take a simple left turn instead of the cusp it is making. What am I doing wrong? Thanks!!

(Remark: I know that in this particular example I could just make an arrow that goes [rruu] from A and bend it so it curves around B, but I have a more complicated diagram than this, I just simplified it so I could concentrate the question on the essential point I'd like to resolve.)

result of the above code

3
  • 1
    Please post complete code i.e. a small, compilable document people can copy-paste-compile to help you. That is much more useful than a mere fragment. Although code fragments are often useful in explanations, they do not make MWEs.
    – cfr
    Commented Jan 18, 2015 at 21:47
  • Sorry, I didn't realize I should include a header. Does this now qualify to be a MWE? Thanks! Commented Jan 18, 2015 at 21:59
  • Yes, that works. It doesn't matter here, I don't think, but, in general, best to use a standard class if the issue doesn't require a different one. (I.e. use article, book or whatever unless the problem depends on a different class.) But it doesn't matter that much so long as it is in the standard TeX distros, as amsart is.
    – cfr
    Commented Jan 18, 2015 at 22:01

1 Answer 1

5

You have one u forgotten in the first bracket. The first bracket describes the turn (2 to the right and then up) and the second one the target as always.

I added an example using as this is much more modern. If you are willing to learn something new, I would recommend to change.

% arara: pdflatex

\documentclass{article}
\usepackage[all,cmtip]{xy}
\usepackage{tikz-cd}

\begin{document}
\[
\xymatrix{
  &&  C \\
  & B \ar[ru]  & \\
  A \ar[ru] \ar `[rru][uurr]  && }
\]
\[
\begin{tikzcd}
&& C\\
& B \arrow{ur} &\\ % you may use \arrow or \ar here
A \ar{ur} \ar[rounded corners, to path=-| (\tikztotarget)]{uurr}&&\\ % rounded corners=10 if you want the same as with xy
\end{tikzcd}
\]
\end{document}

enter image description here

1
  • Perfect. Thank you. I'll give tikz-cd a try. Commented Jan 19, 2015 at 0:11

You must log in to answer this question.

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