3

I have this little MWE taken and modificated from the documentation from pag. 6/16 of the guide xyguide:

\documentclass[a4paper,12pt]{article}
\usepackage[all]{xy}
\begin{document}
\xymatrix{
A \ar@<1ex>[dr]^a \\
& B \ar@<1ex>[ul]^b}
\end{document}

enter image description here

My doubts are:

  1. How can I have the two vectors parallel and have the same direction?

enter image description here

  1. What it the significance of the explanation with an example?

enter image description here

3
  • 2
    Regarding (1) is it a requirement that the arrow is drawn from B? Otherwise just draw it from A and use \ar@<-1ex>[dr]_a. Though, noadays I'd use tikz-cd
    – daleif
    Mar 23, 2021 at 12:47
  • @daleif Hi, my English language it is scarce. I want know as to have two parallels tip-arrows or the end in B or in A. Yes of couse, I agree with you but sometimes I like some of old...packages...:-)..and many users create the diagrams with tikz-cd :-)))
    – Sebastiano
    Mar 23, 2021 at 12:50
  • @daleif Sometimes I don't understand English, seriously. I give to Caesar what is Caesar's.
    – Sebastiano
    Mar 23, 2021 at 13:32

1 Answer 1

3

With an xymatrix I recommend a second arrow from A to B, but with a negative shift:

enter image description here

The code would be:

\xymatrix{
A \ar@<1ex>[dr]^a\ar@<-1ex>[dr]_b \\
& B}

Here are three ways to do this with tikz-cd. All produce the same image:

enter image description here

\begin{tikzcd} % Two arrows from A to B
A\arrow[dr, "a", shift left=1ex]\arrow[dr, "b"', shift right=1ex]\\
&B
\end{tikzcd}

\begin{tikzcd} % left arrow from B to A
A\arrow[dr,"a",shift left=1ex]\\
&B\arrow[ul, "b", leftarrow, shift left=1ex]
\end{tikzcd}

\begin{tikzcd} % arrow using 'from' key
A\arrow[dr, "a", shift left=1ex]\\
&B\arrow[from=ul, "b"', shift right=1ex]
\end{tikzcd}

Note the use of the extra single quote to place the label on the opposite side: "b"'

1
  • Hi, and thank you very much for your explanation....In this period I like very much xy package...many users (also I use tikz-cd) use for the simple code tikz-cd. +1 and green check mark.
    – Sebastiano
    Mar 23, 2021 at 17:36

You must log in to answer this question.

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