# [Xy-pic] spanning columns in xymatrix

Ross Moore ross at maths.mq.edu.au
Tue Jun 22 17:24:22 CEST 2004

Hello Melan,

On 22/06/2004, at 11:39 PM, EXTERN Melan Hermann (Praktikant;
CS-ENS/EFB1) wrote:

> Hello !
>
> I recently use the xy-pic package in order to create "in-and-out
> boxes" in my TeX document.
> An in-and-out box is constitued of a frame and several arrows placed
> on each side of the frame.
>  See the file I insert to see an example.
>
> I want to give a name to this diagram and I want to place it in middle
> of the frame.
>
> This is the code concerning the example but with a name
> (alonganduselesswordtotestthispossibility).
>
> \xymatrix @R=1pc at C=1pc{
> &&&&\ar@{-}`d/0pt[l]`/0pt[l]^{}_<{ts1}
> `/0pt[ll]`_d[ddll][ddll]&&\\
> &&&&\ar@{->}`d/0pt[l]`/0pt[l]^{}_<{ti1}`/0pt[l]`_d[dl][dl]&&\\
> &&&&&\\
>  &&alonganduselesswordtotestthispossibility&&&\\
> &&&&&\\
>  &&&&&\\
>  &&&\ar@{<-}`d/0pt[d]`/0pt[d]`_r[dr][dr]^>{bo1}&&&&\\
> &&&&&\\
>  &&&&&\\
>  \save "3,2"."7,5"*[F]\frm{}
> \ar@{-}^{ls1}"4,1";"4,2"
> \ar@{<-}^{li1}"5,1";"5,2"
> \ar@{-}^{ls2}"6,1";"6,2"
> \ar@{-}^{ls1}"4,5";"4,6"
> \ar@{<-}^{li1}"5,5";"5,6"
> \ar@{-}^{ls2}"6,5";"6,6"
> \restore
>
>  The problem is that if the name is too long, the column spacing will
> be increased for the column in which the name is written.

Your problem is really one of specifying how much space
you want the name to occupy, if indeed any at all.

Try the effect of placing the name this way:

&&*=<3cm,0pt>\txt\footnotesize{alonganduselesswordtotestthispossibility}
&&&\\
^^^
and change the value used here.

>
> As a result, certain arrows at the bottom and the top side of the
> frame are moved forward or moved back, which is a problem for me
> because I want to keep the gap between arrows.
>
>  If I force equal column spacing, my diagram is too big for the output
> ^^.
>
> That's why, I would like to know if there is a way to span certain
> columns in the xymatrix like the "multicolumn" solution in LateX (I
> tried it but it does not work).

No, there is no multi-column as such.
Xy-pic allows much greater control than this would allow.

>
>
>
>

Hope this helps,

Ross Moore

> Melan Hermann <<inoutbox.jpg>>
>
>  <inoutbox.jpg>_______________________________________________
> 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                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------