Questions tagged [xy-pic]

{xy-pic} or {xy} is a package for typesetting graphs and {commutative-diagrams} using the principle of "logical composition of visual components."

is a package for typesetting graphs and using the principle of "logical composition of visual components." See the xy-pic homepage for more information.

xy-pic uses an array-like syntax, separating objects with & and \\, and using \ar[(direction)] for arrows, as in the following example.

\[\xymatrix{
    A\ar[r]^f\ar[d] & B\ar[d]^h\\
    C\ar[r]_g & D.
}\]

enter image description here

Some reference guides

Frequently Asked Questions

  1. How can I draw the connecting homomorphism from the snake lemma?
  2. How can I draw braid diagrams in xy?
  3. How can I draw natural transformations (2-morphisms) with xy?
  4. How can I notate a pushout square in xy?
431 questions
11
votes
1 answer

How do I make the arrow -->-- using xymatrix?

I do not know any TikZ so I cannot use this post, which otherwise is precisely what I am looking for. So how do I make such a square? The best I could come up with was \ar@{-}[r]^{\delta}|-{>} but it doesn't look good and does not work on vertical…
Lemma
11
votes
1 answer

Natural transformation arrow

I'm trying to do the following with xymatrix: This is a diagram I drew sometime ago... But now I don't have the source and I can't remember how I did it, nor can I find an easy, simple way to do it. More specifically, what I forgot how to do is the…
Bruno Stonek
  • 1,321
  • 1
  • 11
  • 19
11
votes
1 answer

Bending arrows in xy-pic

This question almost duplicates Bending snakes with xy-pic, but I need something slightly different from the solutions presented there. I spent some time trying to figure out how arrow bending works in XY-pic, but I don't seem to understand the…
user45435
8
votes
3 answers

How to position hole in an arrow in xypic

trying to draw a 3D commutative diagram here and getting really stuck trying to get the hole in one of the arrows in the right place, you should see which one I mean as there is only one crossover. Here is my code: \xymatrix{ & …
7
votes
2 answers

How to join the left end of an arrow with a line?

\documentclass[a4paper,twoside]{article} \usepackage{xypic} \begin{document} \xymatrix{ A\ar@{-} [rr] & & D\ar @{-}[r] & E\\ L\ar @{-}[rrr] & & & M \\ P\ar[rrr]\ar[uu] & R\ar[ruu] & S & T\ar…
Soumitra Sen
  • 2,995
6
votes
1 answer

Matrices as labels in xymatrix

How can I use a matrix as label in the xymatrix environment? I tried to nest matrices (naively) but it seems to be rather complicated. \xymatrix{ A \ar[r]^{\xymatrix{f \\ g}} & B }
6
votes
1 answer

Cannot draw diagram

I'm trying to draw a diagram but I get the following error message: ! Xy-pic error: in entry "1,1": No [ld] (is "2,0") from here. The code is: \xymatrix{A\times B \ar[ld]_p \ar[rd]_q\\ &A &B} With the code \xymatrix{& C \ar@/_/[ld]_f…
justow
  • 91
6
votes
1 answer

xypic: curved invisible arrows

I want to create two invisible arrows so I can link between them, the problem is that when I try the make these arrows curved they become no longer invisible? Here is a sample…
ubugnu
  • 265
6
votes
1 answer

relation symbols as arrows in xymatrix

Is there a way to put a relation symbol (appropriately oriented) as the arrow in an xymatrix diagram? For example, a lattice of sets with the subset relation symbol pointing from the subset to the superset.
Alex
  • 2,685
5
votes
3 answers

Label an angle in xypic

I am frequently (i.e. about once per quarter, right before the end) set upon by the need to draw a diagram in which various lines are drawn and the angles between them labeled. I've been using xy-pic for my diagrams, and would like to continue, but…
Henry
  • 325
5
votes
1 answer

a couple of questions on xy-pic

I used xy-pic to typeset the following (long exact sequence) \[ \xymatrix@1{ \cdots \ \ar[r] & \widetilde{H}_n(A) \ar[r]^{i_*} & \widetilde{H}_n(X) \ar[r]^{j_*} & \widetilde{H}_n(X/A) \ar[r]^{\partial} & \widetilde{H}_{n-1}(A) \ar[r] & \ \cdots \…
5
votes
1 answer

Curved arrow in xymatrix going over text

In some notes I took in a lecture, where I was using xymatrix to do the commutative diagrams, I found that a curved arrow beneath the diagram actually crossed over some text. (Ideally, the text should be lowered to accommodate the height of the…
5
votes
1 answer

xypic produces error when I try to use any arrow style

I have a very annoying issue with xypic. I'm trying to typeset an exact sequence, one of which morphisms is the inclusion, so I'd like to use the inclusion arrow ↪. The problem is that when I use ANY style in the xypic@1 environment, I get several…
mathbekunkus
  • 1,389
5
votes
1 answer

Qcircuit: color background in gategroup

I'm looking for a way to use color in qcircuit (based on xy-pic). I'd like to be able to add a background color for a gate, and for a gategroup. For exemple, how can I change this…
tobiasBora
  • 8,684
5
votes
2 answers

go-around arrow with XY-pic

I try to draw a diagram with XY-pic. The following code already works pretty good, but I have a problem with the "go-around arc". \documentclass{article} \usepackage[all]{xy} \begin{document} \[ \xymatrix@C=5mm@R=10mm{ &&&&&&&&&&&& \\ …
1
2 3 4 5 6 7