##### --- typesetting graphs and diagrams in TeX
The latest version available on this server is Xy-pic release 3.5 available at the locations listed below. Northern Hemisphere users may find it more convenient to use the original Xy-pic home page, which is generally updated ahead of this one.

Xy-pic is a package for typesetting graphs and diagrams using the principle of `logical composition of visual components'. It is structured as several modules, each defining a mnemonic plain text notation for a particular kind of graphical object or structure. Example objects are arrows, curves, frames, and colouring/rotation on drivers that support it; these can be organised in matrix, directed graph, path, polygon, knot, and 2-cell structure (a more complete list of the features is given below).

Xy-pic works with most formats, including LaTeX, AMS-TeX, and plain TeX, and has been used to typeset complicated diagrams from many application areas including category theory, automata theory, algebra, neural networks, and database theory. . .

You can get Xy-pic either get from its home or home-down-under ftp directory, or one of its CTAN mirrors.

Xy-pic was written by Kristoffer Høgsbro Rose, ENS-Lyon, with essential contributions by Ross Moore, MPCE. A graphical interface using the X Window System is being developed by Eva Rose.

Finally, note that Xy-pic is © by its authors as free software (see the GNU General Public License for details).

### Papers on Xy-pic

Clicking on a title will show the proper reference; other forms available as indicated.
K H Rose: Xy-pic User's Guide
Latest edition available as html, dvi, ps, and ps.gz.

Explains how to use the Xy-pic macro package to typeset `matrix-like' diagrams with TeX.

K H Rose & R Moore: Xy-pic Reference Manual
Latest edition available as dvi, ps, and ps.gz.

Reference manual for Xy-pic summarising syntax and `drawing semantics' of the capabilities in the kernel, all extensions and features, and the PostScript¹ backend.

K H Rose: Xy-pic and Notation for Categorical Diagrams (available as ps and ps.Z)

Discusses textual notation for categorical diagrams based on the authors experience from developing Xy-pic. In particular the notion of `conceptual markup' for diagrams is introduced, and the `graph' mode implementing it in Xy-pic is explained.

This was presented as an invited talk at ECCT-94, the European Colloquium on Category Theory.

R Moore: Typesetting Neural Nets using Xy-pic (as ps and ps.Z)
This note gives an example of how to use Xy-pic's ``Graph Combinator'' feature to specify the type of diagram that is frequently used to display Neural Networks.

K H Rose: How to Typeset Pretty Diagram Arrows with TeX
Explains the design decisions used in the design of the arrows used by the macro package Xy-pic for typesetting graphs and diagrams with TeX.

K H Rose: Typesetting Diagrams with Xy-pic: User's Manual Obsolete.
First published introduction to Xy-pic (for version 2.6).

### Xy-pic Features

##### (excerpt from `README` file)
Xy-pic is structured as a `kernel' and several orthogonal modules called `options', each defining a custom notation for a particular kind of graphical object or structure.

These (combinable) `logical composition' structures are available:

• A graph combinator mode where diagrams are specified the way they are composed as graphs.
• A matrix-like mode where the dimensions of the drawing are computed by aligning diagram entries in rows and columns (this is the `diagram' mode Xy-pic version 2 users are used to).
• A polygon mode where diagrams shaped as regular polygons are entered in a simple way.
• A mode for typesetting beautiful knots and links.
• A general object-oriented `turtle graphic' drawing language for specifying graphs with objects and connections between them in a manner independent of orientation.
The following `visual component' objects can be used:
• Positions can be given in variety of formats (extendable) including user defined coordinates (x,y) and relative to previous positions, objects, object edges, and points on connections.
• Objects may be circular, elliptic, or rectangular (more shapes can be added) and adjusted in several ways.
• Large library of objects with mnemonic names.
• Objects that orient themself along a connection when placed relative to it, e.g., ``@{|-}`' is like ``\vdash`' but thus oriented; new such objects can be defined in a convenient way.
• TeX `boxes', i.e., text and mathematical formulae.
• Includes circle segments and optionally arbitrary elliptical, quadratic, and cubic arcs.
• Connections are aligned between the reference points of objects but start and end on the edges.
• Any object can be used to build a connection (using `diagonal filling'); library objects provide common line types.
• Flexible notation for drawing arrows and general paths with tail, stem, and head built from any object(s). Special support for arrows that cross each other, arrows that `go by' other entries, paired arrows (including support for 2-cells), curved arrows, and arrows with bends.
• Library of frames and braces.
• Special notation for rotation, scaling, colour, and line thickness. The correct typesetting of these features requires a backend that supports it (i.e., PostScript¹) but even when this is not available Xy-pic tries to approximate what is requested such that at least the picture size is stable (and thus page breaks).
• Output can use PostScript¹ for drawing (several \special formats are supported: dvips, Textures, and OzTeX -- more are being added continually: contact Ross Moore for the current list). Notation for inclusion of literal PostScript¹ is available.

### Xy-pic Examples

R Moore: Polynomial Invariants for Knots (as tex, html, and ps.gz)
This note is an example of the use of the Xy-pic `knots and links' feature.

K H Rose: Fundamental Reduction Systems, Examination (as tex, ps and ps.gz)
This illustrates how the graph mode was used to draw electronic circuits in an exam paper.

R Moore: Typesetting Neural Nets using XY-pic (as tex, dvi, and ps.gz)
This unpublished article discusses how the typesetting code for displaying the layers in a Neural Net is similar to the way the neural net itself is structured.

R Moore: matrices and graphs for studying endomorphism rings, devised by George Ivanov and P Schultz.
(1st: tex, dvi, and ps 2nd: tex, dvi and ps, 3rd: tex, dvi and ps, 4th: tex, dvi and ps)

Examples nesting different structures.

S E Crans: On Combinatorial Models for Higher Dimensional Homotopies (in Australia)
This Ph.D. thesis is a prime example of very complex diagrams that exploit the capabilities of Xy-pic.