[Xy-pic] Delicate alignment problem.

R.P.I. Lewis xypic at rtf.org.uk
Mon May 12 03:32:59 CEST 2003

Michael Abbott <michael at araneidae.co.uk> writes:

> 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.

Perhaps i am missing the point, but if you move the "BB" to 
Then the arrow starts next to the BBBB just as in your xymatrix below

> \[\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

Here I tried +D*+!U{DDDD}="c"  which appears to work. I am not
entirely sure what the !, bit does, but it doesnt seem necessary

>     ,"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 found that the syntax made a lot more sense after i read Kris Rose's
 paper "Xy-pic and Notation for Categorical Diagrams" available from

More information about the Xy-pic mailing list