Have you visited the
Hypatia Electronic Library yet?
My book
Practical Foundations of Mathematics
(Cambridge University Press) is now in the bookshops.
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,
600dpi A4 PostScript and
600dpi A5 PS booklet.
The "booklet" form requires a two-sided printer with A4 paper;
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 ftp.dcs.qmw.ac.uk
and have not already done so, please register as a user by sending
a message to <pt@dcs.qmw.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.
Version 3.88 was released on 1 September 2000
Before calling this version 4.0, I was intending to make the LaTeX (non-PS)
arrows stretch correctly by moving the code that generates from from the
first to the second pass. However, this turned out to involve rather more
difficulties than I had expected, or that my [I confess, diminishing]
enthusiasm for this project could deal with.
As I would like to use the non-PS version for putting my book on-line in
DVI, this is still on the agenda.
Features introduced since September 1992
See also the top of the source file for bug fixes and adjustments
to the positioning of things.
3.88 Released 1 September 2000
- Square hooks made available as arrowtails:
\newarrow{SquareInto}{sqhook}--->
so you can put \rSquareInto etc in your LaTeX files
and define other arrows with square hooks as you please.
- Time bomb set for five years instead of one.
3.87 Released 1 September 1999
This version was used for the absolutely final 1200dpi PostScript copy
of the book, as it was handed over to CUP in December 1998.
The only change was a 0.2pt fudge to the positioning of the components
of arrows. Previously a lot of tweaking had been done in this department.
3.86 Released 1 September 1998
- New options hug and nohug in PostScript mode: [PS,nohug] uses
PS for the arrows without rotating the labels, but the way of
calculating the actual position of these horizontal labels on
will remain subject to alteration for some period of time ---
please send me examples if you feel that adjustment is needed.
- midvshaft and snake for vertical arrows
- New option [gap=width] (default=shortfall) to use instead of
~{\;} on horizontals and PS diagonals, as this caused ^ and _
labels to be moved too far away from the shaft.
- Added >-> and <-< heads and tails, same as >> and << but the
shaft goes *through* the extra arrowhead.
- Added 2pt space separating labels from vertical arrows.
- Identify the cell in which a second-pass error occurs.
- Corrected position of hook in \dInto (see \shifthook).
- Corrections to \lhtriangle \dhtriangle \newarrowtail{boldhook}
- Suppress indentation of following text (due to LaTeX change)
- Mangle \left@label and \right@label (conflict with Elsevier).
- Corrected dot spacing with [dotted] option.
3.85 Released 20 August 1997
- New option [leftflush=margin] for left alignment of diagrams on a margin,
instead of centering them.
[leftflush] is like [flushleft], except that it reckons the alignment
from multiple verticals, or from text if there's no vertical.
- New options [hug] and [nohug] in PostScript mode: [PS,nohug] uses
PS for the arrows without rotating the labels.
Beware that this has been done in a lazy way
by overprinting empty LaTeX-style diagonals
carrying the labels, which may therefore be mis-placed.
- New option [crab=distance] shifts horizontals and PS diagonals
transversally by the specified distance.
The abbreviations [crab+] and [crab-] use \PileSpacing,
so to put four diagonal lines in parallel do something like
\ruTo[crab--] \ldTo[crab-] \ruTo[crab+] \ldTo[crab++]
This doesn't work with [nohug].
- New option [snake=distance] shifts the middle of midshaft horizontals and
PS diagonals longitudinally by the specified distance.
3.84 Released 2 September 1996
Provided \NWclck etc 2-cell arrows.
3.83 Released 18 May 1995
- New [dotted] option to change the filler on an arrow to dots
(useful for mediators for universal properties).
- Option [LaTeXeqno] uses LaTeX's equation number and style
for "eqno"; LaTeX's \label command picks this up.
3.81 Released 18 July 1994
- Stretchable PostScript diagonals implemented.
- \overprint{text} sets text in maths and overprints it in the
current cell, centered in the column irrespective of other stuff.
- Option [repositionpullbacks] redefines \SEpbk etc to use \overprint.
- New option [grid] to set column and row widths individually:
see manual for examples such as a regular pentagon and cube with perspective.
- Option [PostScript=name] takes the name of a DVI->PS translator
as argument.
- Equilateral triangle or regular hexagon size options.
- Introduced landscape and portrait options.
- Peter Freyd's \puncture symbol provided.
Arrowheads used in the book
You will see that the diagrams in the book have arrowheads compatible
with those of TeX's ordinary \rightarrow.
This was done by modifying the MetaFont source of \rightarrow to reduce
its shaft to nothing, ie to make it just an arrowhead.
I regret that I will NOT be releasing this MetaFont code, or PK files
derived from it, because I am not prepared to undertake the support work
that would be necessary afterwards.
(Not even if you "promise to keep it to yourself",
as you will inevitably release DVI files into the world containing
references to these characters, obliging me to provide PK files to
your readers, and explain to them why they keep getting checksum errors
from dvips.)
However, if you are intending to create a new symbols font yourself
(to follow the "St. Mary Road" fonts),
and undertake the necessary support work,
I will be very pleased to give you the MetaFont source for these arrowheads
and the other new symbols that are introduced in the book.
I now have these in a form that's compatible with teTeX.
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
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?
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@dcs.qmw.ac.uk, +44 20 7882 5241, 7 September 1992
Department of Computer Science,
Queen Mary and Westfield College,
London E1 4NS