<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos ([email protected]), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>3.6 Grouping objects</TITLE>
<META NAME="description" CONTENT="3.6 Grouping objects">
<META NAME="keywords" CONTENT="xyguide-html">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="xyguide-html.css">
</HEAD>
<BODY LANG="EN" BGCOLOR="#FFFFFF">
<P ALIGN=RIGHT><FONT SIZE=1>Xy-pic User's Guide</FONT> <A HREF="18pt.html"><IMG SRC="./quest.gif" ALIGN=TOP HEIGHT=27 WIDTH=21 BORDER=0 ALT="?"></A><A NAME="entriesgrouping" NAME="tex2html391" HREF="node26.html"><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="previous" SRC="./previous.gif"></A><A NAME="tex2html393" HREF="node26.html"><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="previous" SRC="./previoussection.gif"></A><A NAME="tex2html395" HREF="node21.html"><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="up" SRC="./up.gif"></A><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="next" SRC="./nextsection_gr.gif"><A NAME="tex2html397" HREF="node28.html"><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="next" SRC="./next.gif"></A></P><H2><A NAME="SECTION00056000000000000000">3.6 Grouping objects</A></H2> Sometimes you wish to frame or otherwise treat a rectangle of objects
as a single object. This is possible with the last two
target position forms that we will mention:
<P><CENTER><TABLE BORDER=BASIC CELLPADDING=3 COLS=2><TR><TD> <I>t</I><code>.</code><I>s</I> <TD> merge <I>t</I> with simple <I>s</I> <TR><TD>
<code>{</code><I>t</I><code>}</code> <TD> make <I>t</I> simple
</TABLE></CENTER><P>
<P>
The first will enlarge <I>t</I> to also "cover" the "simple" <I>s</I>
(simple means that it cannot have changes etc. attached unless
encapsulated in <code>{}</code>s). Here is an example where we merge and
frame:
<BLOCKQUOTE><PRE>\xymatrix @R=1pc {
1,1 & 1,2 & 1,3 & 1,4 & 1,5 \\
2,1 & 2,2 & 2,3 & 2,4 & 2,5
\save "1,2"."2,4"*[F.]\frm{}
\ar"1,1" \ar"2,1" \ar"1,5" \ar"2,5"
\restore }</PRE></BLOCKQUOTE>
will typeset
<P><CENTER><BR><IMG WIDTH=381 HEIGHT=83 ALIGN=BOTTOM ALT="displaymath1118" SRC="img69.gif"><BR></CENTER><P>
As you can see, the center of the merged object is the same as the
one of the target <em>before</em> the "<code>.</code>."
<P>
Finally a more advanced example where we create two merged objects
with center in their "real" center, name them and then connect
to them. It also shows how macros can be used inside diagrams: they
should always expand to "commands" like <code>\ar</code>..., etc.:
<P><CENTER><BR><IMG WIDTH=284 HEIGHT=103 ALIGN=BOTTOM ALT="displaymath1127" SRC="img70.gif"><BR></CENTER><P>
can be typeset by
<BLOCKQUOTE><PRE>\def\g#1{\save
[].[dr]!C="g#1"*[F]\frm{}\restore}%
\xymatrix{
\g1 A\ar[r]&B\ar[d]&\g2 A'\ar[r]&B'\ar[d]\\
C\ar[u]&D\ar[l]& C'\ar[u]&D'\ar[l]
\ar @{.>} "g1" ;"1,4"
\ar @{-->} "2,1";"g2" }</PRE></BLOCKQUOTE>
Then we can make arrows from/to the two frames by using the two new
targets <code>"g1"</code> and <code>"g2"</code> as shown.
<P>
<A NAME="Exercise19"> </A><H4><A NAME="SECTION00056010000000000000">Exercise 19.</A></H4> Change the lambda cube of exercise <A HREF="#xcube">12</A> such it is enclosed in
a transparent (<I>i.e.</I>, dotted) cube.
<P>
<A HREF="node33.html#Answer19">Answer.</A>
<P>
<P> <P ALIGN=RIGHT><FONT SIZE=1>Xy-pic User's Guide</FONT> <A HREF="18pt.html"><IMG SRC="./quest.gif" ALIGN=TOP HEIGHT=27 WIDTH=21 BORDER=0 ALT="?"></A><A NAME="tex2html391" HREF="node26.html"><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="previous" SRC="./previous.gif"></A><A NAME="tex2html393" HREF="node26.html"><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="previous" SRC="./previoussection.gif"></A><A NAME="tex2html395" HREF="node21.html"><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="up" SRC="./up.gif"></A><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="next" SRC="./nextsection_gr.gif"><A NAME="tex2html397" HREF="node28.html"><IMG WIDTH=27 HEIGHT=27 BORDER=0 ALIGN=ABSMIDDLE ALT="next" SRC="./next.gif"></A><P><ADDRESS>
<BR><HR>
<a href="COPYING/index.html">�/a> <a href="http://www.brics.dk/~krisrose/">Kristoffer H. Rose</a>
<<a href="mailto:[email protected]">[email protected]</a>>
January 6, 1997
/
<a href="http://www-dsed.llnl.gov/files/programs/unix/latex2html/manual/">LaTeX2<TT>HTML</TT>v96.1-h</a>
</FONT>
</ADDRESS>
</BODY>
</HTML>
|