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 do not have very much experience with the xy-pic package and I always try to figure out things by copying and pasting codes.

I am stuck in here: I would like to get an arrow from A to C with an upper name.

\xymatrix{ A \ar[r] ^a="a"  & B \ar[r] ^b="b" & C }

What I succeeded to plot is:

\xymatrix{A \ar[r] ^a="a" & B \ar[r] ^b="b" & C \ar @/^/ "a";"b" }

but I'd like the arrow to go from A to C :(

I appreciate any kind of help! Thanks a lot!!!

share|improve this question

2 Answers 2

Just to offer an alternative, the tikz-cd package can also be used to produce commutative diagrams using the versatility of PGF/TikZ; here's the code producing the desired diagram:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
 A \ar{r}{a}\ar[bend left=40]{rr}{b\circ a} & B \ar{r}{b} & C
\end{tikzcd}

\end{document}

enter image description here

share|improve this answer

You can add modifiers to the arrows:

\documentclass{article}
\usepackage[all,cmtip]{xy}
\begin{document}
\xymatrix{
 A \ar[r]^a \ar@<3pt>@/^1pc/[rr]^{b\circ a} & B \ar[r]^b & C
}
\end{document}

With @/^1pc/ you state that the arrow is curved, with @<3pt> you shift it a bit up, so the arrow tips near to C don't overlap.

enter image description here

share|improve this answer

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.