Commutative Diagrams in TeX
By Paul Taylor.
Unlike many other packages there is no "installation procedure" -
you just copy the macros
to your TeX macros directory.
The manual is provided in several formats:
LaTeX source,
standard DVI,
300dpi A4 PostScript and
300dpi A5 PS booklet.
The "booklet" form requires a two-sided printer; if you don't have
such a thing, don't bother taking the file.
Here
is a prototype for emulation of
Francis Borceux's macros.
If you are fetching this from any site other than theory.doc.ic.ac.uk
and have not already done so, please register as a user by sending
a message to <pt@doc.ic.ac.uk>
with the words "commutative diagrams" in the subject line.
Here is the obsolete manual for version 2, in
DVI and
LaTeX form.
(The only use for this is that it contains a table of the codes
for LaTeX arrowheads in the various directions.)
There are also some macros for proofs
and other things.
Towards Version 4
This message was 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
theory.doc.ic.ac.uk (146.169.2.37)
and the diagrams package is in the directory /tex/contrib/Taylor/tex.
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?
Version numbers:
- 2 was circulated to some people in September 1989
- 3.16 was advertised on types & categories in July 1990 and emailed to those
who asked for it.
- 3.18 was the final bug-fix before the re-write began in April 1992.
- 3.20 introduced error-recovery, and \newarrow for horizontals & verticals
- 3.22 completely rewrote the reformatting program for h & v and corrected
numerous alignment errors; introduced options in square brackets
- 3.23 fixed a catastrophic error in nested diagrams
- 3.24 (current) extended \newarrow to diagonals, added trigonometry code,
rewrote code for drawing LaTeX diagonals, introduced PostScript and
TPIC diagonals, consistent choice of arrowheads.
It will be called "version 4.0" when the diagonals are adjusted to meet their
endpoints (the one remaining big project, which could not be done before the
others above) and I have dealt with my list of minor quibbles.
Paul Taylor, pt@doc.ic.ac.uk, +44 171 59 48263, 7 September 1992
Department of Computing,
Imperial College of Science, Technology & Medicine,
180 Queen's Gate,
South Kensington,
London SW7 2BZ, UK.