[Xy-pic] Setting Braces in XYPic, XYMatrix

Ross Moore ross.moore at mq.edu.au
Wed Nov 14 21:03:21 CET 2012

Hi Christian,

On 15/11/2012, at 2:21 AM, Christian Guckelsberger wrote:

> Hi there, 
> I'm new to XYPic, basically I stumbled upon a XYMatrix in a paper which I now have to edit and I'm still very overwhelmed by the elementary syntax. 
> I want to add three braces to a xymatrix in a xypic environment. Here's how I got so far.
> --

> Now there are two issues:
> 	• I want the braces to span from A to B, C to D and the one at the bottom from F to G. At the moment, they only embrace a single element. How can I do this using the xymatrix [rr] syntax?
> 	• I want to add the label for the bottom brace from below. At the moment, it is still displayed on top.
> I also posted the problem on stackexchange. There's also a picture of how it looks like at the moment: http://tex.stackexchange.com/questions/82700/set-braces-in-xypic-xymatrix

You can add those decorations afterwards, using the implicit
names of the matrix cells. 

\xymatrix "M"@C=10pt at R=20pt{
 & A_1 & B_2 & C_3 & D_4\\
 & E_5 & F_6 & G_7 & H_8
 \POS"M2,2"."M2,3"!C*\frm{^\}},+U*++!D\txt{A to B} 
 ,"M2,4"."M2,5"!C*\frm{^\}},+U*++!D\txt{C to D} 
 ,"M3,3"."M3,4"!C*\frm{_\}},+D*++!U\txt{F to G} 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: texshop_image.jpeg
Type: image/jpeg
Size: 27948 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20121115/5a6906cf/attachment-0001.jpeg>
-------------- next part --------------

With this, you probably do not need the row-spacing to be as large
as you made it ( @R=20pt ).

In the above coding below I added a name "M" for the matrix. 
This isn't necessary here, but would be if you wanted to draw 
connections between the cells of 2 or more matrices, so it is 
a useful technique to know about.

> I'm happy about any suggestions concerning this issue!
> Thanks very much,
> Christian

Hope this helps,


Ross Moore                                       ross.moore at mq.edu.au 
Mathematics Department                           office: E7A-419      
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114

More information about the xy-pic mailing list