[Xy-pic] Delicate alignment problem.

Michael Abbott michael at araneidae.co.uk
Sun May 11 19:16:48 CEST 2003


My thanks to Michael Barr, Ross Moore and R.P.I Lewis for your responses
to my construction problem.

I can get closest using \xygraph, indeed I think the following solution
has only one defect, which I'm hoping can be easily solved:

\[\xygraph{
!{0;/r5cm/:/u1.5cm/::}
*{AAAA}="AA"
[] !{"AA"+R *!L{{}=BBBB},
    *+[F.]\frm{}="BB"}       % <--- ????
[] "AA"[r] *+{CCCC}="CC"
[] "BB" :^-f "CC"
[] !{"CC"+D *!U{\cong},
    +D *+!U{DDDD}="DD"}
"DD" :^-h[d] *+{EEEE}="EE"
:^k[l]{FFFF}="FF" []
!{"AA"*+\frm{}} :_g "FF"
}\]

The defect is this: the arrow out of BBBB starts too far away from BBBB.
This is because the reference point when "BB" is defined is at the left,
so when I try to expand the enclosing box (with *+[F.]\frm{}="BB") the
expansion is incorrect.
    I can't figure out how to reset the reference back to the centre
before expanding, so I'd be grateful for any hints.


I'd like to make some comments on the various options.  The three
frameworks for writing this seem to be xygraph, xymatrix or diagxy; each
of these have problems and virtues.

First diagxy.  I'm afraid I am not using diagxy for one main reason: all
the example diagrams using it seem to be full of numbers.  As is clear
from my favoured solution above, I am loath to rely on any numbers in my
diagrams.

Secondly, xymatrix.  In truth, this would be my favoured solution.  It has
a straightforward and potent syntax, and automatically remembers the
complete position of each cell I typeset.  Unfortunately, the closest I've
managed to get in solving this particular problem using xymatrix, included
below, doesn't work:

\[\xymatrix at C=5cm at R=1.5cm{
{AAAA} \save
    []="a",
    R*!L{{}=BBBB},!="b"
\restore &
CCCC \save
    []+D*+!U{\cong},
    +D*+!U{DDDD},!="c"    % <--- Evidently something is wrong here
    ,"c"*[F.]\frm{}       % <--- Just highlighting the incorrect frame
\restore    \ar"b";[]^-{f} \\
EEEE    \ar"a";[]_{g} &
FFFF    \ar"c";[]^{h}    \ar[l]_{k}
}\]

I'd be grateful for any advice about this.

Finally, xygraph.  It's extremely powerful, but the syntax is ghastly, and
it's a pain having to put a label on almost every cell entry.  No doubt
familiarity will breed a greater degree of comfort in due course...

(I do apologise for being rude about the syntax of xypic.  I *am* keen to
learn how to make it work...)


More information about the Xy-pic mailing list