[Xy-pic] Positioning frames and understanding positions and objects

Michael Abbott michael@araneidae.co.uk
Mon, 30 Sep 2002 10:55:53 +0000 (GMT)


I don't yet understand how positions and shapes work.  The diagram below
is *nearly* the way I want it, but the frame around the bottom two bullets
is offset to the right in a way I didn't expect and can't explain.

\documentclass{article}
\usepackage[matrix,all]{xy}
\begin{document}
\[\xymatrix@=2ex{
    0 \ar@{-}[dr] && 0 \ar@{-}[dl] &&
    1 \ar@{-}[dr] && 1 \ar@{-}[dl] \\
    & *{\bullet} &&&& *{\bullet}
    \save
    "2,2"."2,6"*++\frm<1ex>{-} % This is the interesting bit
%    ^^^ ^ ^^^ select the two bullets
%               ^^ expanding the frame; *nearly* works
    +R*+!L{1+1}
    \restore
}\]
\end{document}

The "2,2"."2,6" selects the two bullets at the bottom.  I want to frame
them (using *\frm<1ex>{-}), but of course I also want to expand the
selection to leave a gap around the bullets, so I've tried *++\frm...
Unfortunately, although the gap is there it's offset to the right.  I
obviously don't understand something here!
    If I leave out the ++ then it clearly frames the two bullets, so I've
clearly got the selection right.

I have a workaround that works, but it seems somewhat clumsy to me.  This
diagram produces the desired effect, but it feels wrong.  Is this really
the right way to do it?

\documentclass{article}
\usepackage[matrix,all]{xy}
\begin{document}
\[\xymatrix@=2ex{
    0 \ar@{-}[dr] && 0 \ar@{-}[dl] &&
    1 \ar@{-}[dr] && 1 \ar@{-}[dl] \\
    & *{\bullet} &&&& *{\bullet}
    \save
    "2,2"*++\frm{}.{"2,6"*++\frm{}}*\frm<1ex>{-}
    +R*+!L{1+1}
    \restore
}\]
\end{document}


I'd really like to understand what's going on better.  Why is the first
diagram not coming out the way I expect?  It feels like a bug, but I
expect I'm doing it wrong.