[Xy-pic] Xygraph is making me lose my wits

Michael Abbott michael at araneidae.co.uk
Wed May 7 10:28:09 CEST 2003

and xymatrix is not helping either!

I just cannot get to grips with xygraph, so I hope somebody can give me a
hand.  That syntax is so ... unpredictable.  Unfortunately, I'm also
finding it really difficult to get to grips with the xy kernel language,
for much the same reasons.

I'm obviously missing something pretty basic -- I just cannot predict how
xy is going to behave.

I'm trying to set something slightly complicated (otherwise I'd just use
basic xymatrix, which despite the problems in vertical cell layout
discussed earlier, is easy and just works).  Here's what I want it to look

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

I've made two stabs at this, one with xymatrix using \save and \restore
for the side excursions into BBBB and DDDD, and another attempt with

With xymatrix nearly everything works: except the bounding box for DDDD is
rubbish, which means arrow h comes out completely wrong; alas, I can't
figure out how to fix this.

With xygraph I can't get past first base: the most obvious steps don't
behave as I expect.

(I'm ignoring the rather tedious problem of getting the overall spacing
right while gluing two boxes together; perhaps that's a topic for another

So, in case anyone is interested, I include both some source code
(hack.tex) showing the problems I've discussed, and in case the TeX comes
out differently on other peoples machines, a generated postscript file.

Referencing earlier correspondence on trying to draw difficult diagrams,
is it possible to draw what I'm trying to draw using diagxy?
-------------- next part --------------
Here we try using \Xy-matrix:
\[\xymatrix at C=5cm at R=1.5cm{
\ar"b";[]^-{f} \\
    \ar"a";[]_{g} &
Notice how the frame around $DDDD$ extends too much down and
\emph{far} too much to the right; note also how the
arrow $h$ originates from the bottom right hand corner of the frame.
Both of these are clearly wrong.

And again using \Xy-graph
!{[]+R}  % Now I'm trying to move to the right and glue '=BBBB' on
:^-{f} &
{\cong DDDD}="c" :^{h} [d]
{FFFF} :_{k} [l] %="d", "c" :^{h} "d"
{EEEE}="d" "a" :_{g} "d" 
What the hell is going on here?  The escape \verb=!{[]+R}= is working,
but it's \emph{also} appearing as text in the diagram.  I give up!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hack.ps
Type: application/postscript
Size: 66809 bytes
Desc: Typeset version of hack.tex
Url : http://tug.org/pipermail/xy-pic/attachments/20030507/2cf62c8e/hack-0001.ps

More information about the Xy-pic mailing list