Michael Abbott michael at araneidae.co.uk
Wed May 7 18:40:35 CEST 2003

On Wed, 7 May 2003, Michael Barr wrote:
> Here is a copy of the note I sent to Michael Abbott in response to his
> recent request.

Ah.  I guess I'd better post my reply to Michael Barr together with some

Although Michael's answer is very interesting, I don't think it solves the
problem I'm trying to tackle.  In particular, I'm really more interested
in getting to grips with the underlying xy language.  It seems to be a
slippery thing: each time I think I understand it, the next thing I try
breaks :(

---------- Forwarded message ----------
Date: Wed, 7 May 2003 14:52:10 +0000 (GMT)
From: Michael Abbott <michael at saturn.araneidae.co.uk>
To: Michael Barr <barr at barrs.org>

> I am obviously prejudiced in favour of my own package (which is
> essentially a front end to xy-pic, but uses the arrow option and
> definitely not the matrix option that I find rather inferior in several
> respects).  It is on CTAN, but the latest version can always be
> the package as well as documentation/examples). At any rate, with some
> tinkering, I produced the following, which looks pretty good.

Thank you for the thought.  I *think* my best bet is to get to grips with
xy-pic itself, but I keep taking glances at your diagrams package.  I
don't really think I understand the concepts behind it, and I'm also not
at all sure I can handle trying to understand yet another diagramming
system!

>
> \documentclass{article}
> \input diagxy
> \begin{document}
> \def\mathbox#1{\hbox{$#1$}}
>
> $$\bfig > \square/>>><-/<1300,600>[\phantom{=BBBB}AAAA=BBBB\vtop{ > \mathbox{CCCC}\mathbox{\kern 12pt\simeq} > \mathbox{DDDD}}FFFFEEEE;fghk] > \efig\phantom{=BBBB}$$
>
> \end{document}
>
>
> Note the \phantom at the end.  This is to compensate for the way the
> upper left corner was moved over.  Without this, the picture will not be
> centred.  I do not know any other way of doing this; there is no way I
> know of to prescribe a baseline for an hbox.

This is bad news.  I can see your trick with the \phantom{=BBBB} in the
first line, and it feels just so wrong to me.

For example, how would you modify your diagram to product an arrow into
AAAA from the left, eg:

z                   f
ZZZZ ----> AAAA = BBBB -------> CCCC
|                    ~=
|                   DDDD
g |                     |
|                     | h
v          k          v
FFFF <-------------- EEEE
?

>
> The kern of 12pt was just trial and error.  I don't know a good way of
> telling a vbox (or a vtop, in this case) to fill out to the width of the
> remaining hboxes.  Without the vtop, the upper right node will just
> stick up and you could get it centred with a \vcenter box.

Ouch.  Also not nice at all...

> The width of 1300 and height of 600 were just done by eye.  I despair of
> doing things like that automatically.

Hmm.

So what *is* wrong with xymatrix?  The interface seems to me very easy to
understand and simple to use, but it does seem to have problems.

So far I can't figure out whether the problems I'm encoutering are bugs in
Xy or errors in my use.  Both of the problems I described in my first
posting today *look* like bugs to me; but then I despair of ever
understanding xy.  Each time I think I understand it, the next thing I try
breaks.
`