Commutative Diagrams in TeX
Paul Taylor
September 1992
Message sent to registered users in September 1992
This message brings news of the development of my TEX package for
drawing "commutative" diagrams, which is now widely used in the
category theory and theoretical computer science communities. It is
being sent directly to all of the users I know of (who have requested
it by electronic mail or FTP from me, or asked questions about it),
but as I know the package has been passed on, I would be grateful if
you would copy this message to anyone to whom you have given
the package itself.
The package was originally advertised on the "types" and
"categories" electronic mailing lists in July 1990. In the following
eighteen months some fixing of bugs took place, but there was little
substantial change.
Since April 1992, I have re-written most of the code, largely with a
view to improving the geometrical layout of the diagrams. Before
completing this work and calling it version 4, I would like some
feedback from users.
One of the areas which I have neglected in the past (largely because
TEX makes it so difficult) is diagonal arrows. The code for drawing
these using LATEX line segments has been re-written: now the closest
available slope is chosen automatically and the commands have names
similar to the horizontals and verticals.
However to do a better job of diagonals (and in future to support
curved lines) some extension to TEX is needed. Being extensions they
are necessarily not standard. Three possibilities are:
- additional fonts (as, for example, used by Spivak's Lamstex).
However my experience of design-size fonts and linear logic symbols
suggests that for users without expert knowledge or control of their
local TEX systems this is more trouble than it's worth.
- PostScript is, I believe, now almost universally used as the
language in which TEX documents are sent to a printer. PS commands
can be embedded in DVI files and incorporated in the PS translation
without extra system or user files or any user intervention. This is
to some extent dependent on which DVI�PS translator is used. In
the new version this is exploited in an option to implement
diagonals by rotating horizontals, which works with Tomas Rokicki's
"dvips".
- TPIC is a graphics extension of TEX which uses a simpler set
of embedded commands. These can be used to draw diagonal lines and
curves but not to perform rotations; they are, however, understood
by Vojta's "xdvi" as well. Another option in the new version uses
these to draw diagonal lines.
Besides diagonals, the code for adjusting horizontal and vertical
arrows has been completely rewritten and does a much better job of the
geometry. Many of the problems with alignment, positioning and gaps
have been fixed automatically, and greater control is given to the
user to adjust those which cannot be. There are also several new
options for the placement of the finished diagram on the page.
Arrow commands are now declared in a much simpler way. The declaration
\newarrow{CrossedInto}{hook}-+->
is now all that is needed to define the example \rCrossedInto
in the manual, along with the corresponding left, down, up and
diagonal commands. Another option makes a consistent selection of
arrowheads for all arrows, from a choice of vee, LaTeX, curlyvee,
triangle and blacktriangle.
So much for selling you the new version. The reason for mailing you
and asking for comments before completing what I intend to do for
version 4 is that I want to get feedback on the following questions:
- Can you use FTP (file transfer protocol)? This is the easiest
method of distribution for me and for you, and there is now a huge
volume of public domain software available by this method. My
archive is called ftp.dcs.qmw.ac.uk
and the diagrams package is in the directory /pub/tex/contrib/pt/diagrams.
Please try to fetch the new version and manual by this method.
- If you can't use FTP, and your electronic mail passes via
non-ASCII machines (particularly BITNET), what characters tend to
get corrupted? The new version uses a restricted character set to
avoid this problem.
- Do you have available for printing final copy a printer which
understands Adobe PostScript, for example an Apple or Sun
laserwriter? Who is the author of the DVI-> PS translation program
you use? Please fetch the new version, try the PostScript option and
tell me if you have any difficulty printing. (You may have to change
the \verbatim@ps@special macro if you don't use Rokicki's
dvips: if so, please send me details.) You can preview with a PS
previewer such as PageView under OpenWindows or
GhostView/GhostScript under Xwindows.
- Do your DVI translators and previewers understand TPIC
\specials (as used in eepic.sty)? Please try the TPIC
option. I would like to know whether it is worth putting effort into
PostScript, TPIC or some other method.
- Have you defined your own arrow commands using
\HorizontalMap, \VerticalMap or \DiagonalMap?
Please use "grep alMap *.tex *.sty" or some similar command to
find out, and tell me if you have used any components other than
those in the source of version 3. It is in your interests to do
this, because \newarrow defines arrow commands in a
different way.
- Please tell me if you have any difficulty adapting to the new
version, or any general comments about doing so which might be of
benefit to other users.
- Other comments: have you used other packages for drawing
diagrams? Do you have applications for my package other than the
categorical diagrams for which it was designed? What do you see as
the major limitations of the package? What persuaded you to use it,
or not to use it?