Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/doc/generic/xypic/xyguide-html/node27.html

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), 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 &amp; 1,2 &amp; 1,3 &amp; 1,4 &amp; 1,5 \\
 2,1 &amp; 2,2 &amp; 2,3 &amp; 2,4 &amp; 2,5
 \save &quot;1,2&quot;.&quot;2,4&quot;*[F.]\frm{}
  \ar&quot;1,1&quot; \ar&quot;2,1&quot; \ar&quot;1,5&quot; \ar&quot;2,5&quot;
 \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=&quot;g#1&quot;*[F]\frm{}\restore}%
\xymatrix{
 \g1 A\ar[r]&amp;B\ar[d]&amp;\g2 A'\ar[r]&amp;B'\ar[d]\\
     C\ar[u]&amp;D\ar[l]&amp;    C'\ar[u]&amp;D'\ar[l]
 \ar @{.&gt;}  &quot;g1&quot; ;&quot;1,4&quot;
 \ar @{--&gt;} &quot;2,1&quot;;&quot;g2&quot; }</PRE></BLOCKQUOTE>
	Then we can make arrows from/to the two frames by using the two new
	targets <code>&quot;g1&quot;</code> and <code>&quot;g2&quot;</code> as shown.
<P>
<A NAME="Exercise19">&#160;</A><H4><A NAME="SECTION00056010000000000000">Exercise 19.</A></H4>	Change the lambda cube of exercise&nbsp;<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>&#160;<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>
&lt;<a href="mailto:krisrose@brics.dk">krisrose@brics.dk</a>&gt;
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>

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.