[Xy-pic] brackets for one of two xymatrix diagrams in xy
Ross Moore
ross at ics.mq.edu.au
Tue Mar 13 21:44:43 CET 2007
Hi Roger,
On 12/03/2007, at 4:50 PM, Roger Hart wrote:
> I would like to ask for some help adding brackets in xy. Within a
> single xy diagram, I've created two diagrams with xymatrix, as the
> attached PDF file shows:
>
> <texshop_image.pdf>
> The left-hand side xymatrix represents a linear algebra augmented
> matrix, and so I would like to add brackets around it, that is "["
> and "]" in the customary manner. But I need to be able to connect
> the two diagrams with arrows. I've tried several approaches, but
> I've run into four problems:
>
> (i) While xy can draw braces ( "{" and "}" ) and parentheses ( "("
> and ")" ), it seems that it does not draw brackets. Is this correct?
>
> (ii) If xy cannot draw brackets, I would hope to use parentheses.
> But I have not been able to position the parentheses around the
> entire first xymatrix. How might I do this?
By brackets, if you mean "square brackets", then these are built from
straight lines. You can use \ar or kernel commands to draw these.
Try the effect of modifying your macro below, as follows:
\def\determinantdiagram#1#2#3#4{%
\xy%
\xymatrix"*"@1@=0mm at M=0mm at R=.5mm at C=.5mm{#1}\POS="box"
,"box"!UL,+/ul.25pc/*+{};p+/r.25pc/,**@{-},p,"box"!DL,+/dl.25pc/*+
{},**@{-};p+/r.25pc/,**@{-}
,"box"!UR,+/ur.25pc/*+{};p+/l.25pc/,**@{-},p,"box"!DR,+/dr.25pc/*+
{},**@{-};p+/l.25pc/,**@{-}
\POS(#2,#3)
\xymatrix at 1@=0pt at M=0pt at R=.5mm{#4}
\endxy}
Cheers,
Ross
>
> (iii) Related to (ii), if I try to group the xymatrix on the lhs
> using braces, I can't connect to the rhs with arrows. So I'm
> looking for a solution that will allow me to draw arrows from the
> xymatrix on the lhs to the one on the rhs.
>
> (iv) The xy parentheses I've been able to draw are pretty thick.
> How can I make them thinner?
>
> The xy code I'm trying to use is below (I use the package ps4pdf,
> but I've not included that code here):
>
> \def\determinantdiagram#1#2#3#4{%
> \xy%
> \xymatrix"*"@1@=0mm at M=0mm at R=.5mm at C=.5mm{#1}
> \POS(#2,#3)
> \xymatrix at 1@=0pt at M=0pt at R=.5mm{#4}
> \endxy}
>
> \determinantdiagram{
> *+<1mm>[F-:<10pt>]{k_1} \ar@/_.7pc/[ddddrrrrr] & l_1 & 0 & \cdots
> & 0 & *+<1mm>[F-:<10pt>]{b_1} \\
> 0 & k_2 & l_2 & \ddots & \vdots & b_2 \\
> \vdots & \ddots & \ddots & \ddots & 0 & \vdots \\
> 0 & \cdots & 0 & k_{N-1} & l_{N-1} & b_{N-1} \\
> *+<1mm>[F-:<10pt>]{l_N} \ar@/^1pc/[uuuurrrrr] & -l_N l_1 & \cdots
> & -l_N l_1 \cdots l_{N-2} & k_N & *+<1mm>[F-:<10pt>]{b_N}
> }{70}{-14}{
> *+<1mm>[F-:<10pt>]{k_1 b_N}\ar@{<-}@/_7mm/["*"rrrrr] & *+<1mm>
> [F-:<10pt>]{- l_N b_1}\ar@{<-}@/^5mm/["*"ddddrrrr]
> }
>
> Thanks very much,
>
> Roger
>
> ********************************
>
> Roger Hart
> Assistant Professor, Departments of History and Asian Studies
> University of Texas at Austin
>
> office: Room 470, Burdine Hall
> office phone: 512-475-7258
> department fax: 512-475-7222
> email: rhart at mail.utexas.edu
> http://uts.cc.utexas.edu/~rhart
>
> *********************************
>
>
> _______________________________________________
> xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia 2109 fax: +61 +2 9850 8114
------------------------------------------------------------------------
More information about the xy-pic
mailing list