-pic
—
Typesetting Graphs and Diagrams in TeX

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 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.

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.

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. The style of arrow tips can be
configured to match several styles of symbol arrows.

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 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
continuously: contact Ross Moore for the current
list). Notation for inclusion of literal PostScript* is available.

Support for Adobe PDF* output is available
from version 3.8 (thanks to support by Daniel Müllner and
font conversion software by Scott Pakin).).

Documentation

The official Xy-pic documentation, updated with each release, consists of the following four documents.

Xy-pic User's Guide
by Kristoffer H. Rose.
Explains how to use the Xy-pic macro package to typeset
basic matrix-like diagrams with TeX
(pdf).

Xy-pic Reference Manual
by Kristoffer H. Rose & Ross Moore.
Reference manual for Xy-pic summarising syntax and drawing
semantics of the capabilities in the kernel, all extensions and
features, and the PostScript* backend
(pdf).