Xy-pic is a package for typesetting graphs and diagrams using the
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 all variants of 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, topology (knots and braids), database theory, chemistry, and genealogy.
Xy-pic has been designed with great care to allow the style of pictures to match well with the exquisite quality of the surrounding TeX typeset material.
You can get Xy-pic from
or directly from the
SourceForge development project home,
however, chances are that Xy-pic is already included with your TeX installation
(for TeX Live, for example,
Xy-pic is part of the
Xy-pic was conceived by Kristoffer Høgsbro Rose, the present version is the result of several years of collaboration with Ross Moore with essential contributions from George Necula, Jeremy Gibbons, Daniel Müllner, and Alex Perlis, and with many suggestions from more than two decades of users.
Xy-pic is © by its authors as free software.
Xy-pic is structured as a
kernel and several orthogonal modules
options, each defining a custom notation for a particular
kind of graphical object or structure.
logical composition structures are available:
diagrammode Xy-pic version 2 users are used to).
turtle graphicdrawing language for specifying graphs with objects and connections between them in a manner independent of orientation.
visual componentobjects can be used:
but thus oriented; new such objects can be defined in a convenient way.
boxes, i.e., text and mathematical formulae.
diagonal filling); library objects provide common line types.
go byother entries, paired arrows (including support for 2-cells), curved arrows, and arrows with bends. The style of arrow tips can be configured to match several styles of symbol arrows.
matrix-likediagrams with TeX (pdf).
drawing semanticsof the capabilities in the kernel, all extensions and features, and the PostScript* backend (pdf).
If you know of other tutorials, interesting papers, or instructive examples, that can be shared, then please drop a note to the mailing list!
* PostScript and PDF are trademarks of Adobe, Inc.