[Xy-pic] xymatrix and matrix

Aleks Kleyn Aleks_Kleyn at MailAPS.org
Mon Mar 21 01:21:31 CET 2011


Trying to understand how works xybox I looked into manual xyguide. I found
there one example where they used xymatrix inside matrix environment. The
first command was \vcenter. I yet not found description ( I thought that
maybe I need \vtop) however the following code show me expected picture
\begin{matrix}
\vcenter
\xymatrix
{
D\ar[r]|(.4){*}^{f_{1,2}}&
A\ar[r]|{*}^{f_{2,3}}&
A
\\
&&D\ar[u]|{*}_{f_{1,2}}
}
&
\begin{array}{r@{\,}l}
f_{1,2}(d):&v\rightarrow d\,v
\\
f_{2,3}(v):&w\rightarrow g(v, w)
\\
g&\in\mathcal L(A^2;A)
\end{array}
\end{matrix}

Thank you one time more.

Aleks Kleyn
http://sites.google.com/site/AleksKleyn/ 
http://arxiv.org/a/kleyn_a_1  
http://AleksKleyn.blogspot.com/


-----Original Message-----
From: Ross Moore [mailto:ross.moore at mq.edu.au] 
Sent: Sunday, March 20, 2011 3:54 PM
To: Aleks Kleyn
Cc: xy-pic at tug.org
Subject: Re: [Xy-pic] xymatrix and matrix

Hi Aleks,


On 21/03/2011, at 12:07 AM, Aleks Kleyn wrote:


> However code
> \[
> \begin{matrix}
> \xymatrix
> {
> D\ar[r]|(.4){*}^{f_{1,2}}&
> A\ar[r]|{*}^{f_{2,3}}&
> A
> \\
> &&D\ar[u]|{*}_{f_{1,2}}
> }
> &
> \begin{array}{r@{\,}l}
> f_{1,2}(d):&v\rightarrow d\,v
> \\
> f_{2,3}(v):&w\rightarrow g(v, w)
> \\
> g&\in\mathcal L(A^2;A)
> \end{array}
> \end{matrix}
> \]
> 
> has extra line before diagram. The picture looks little shifted. I 
> will appreciate any idea to improve image.

It isn't a line. It's simply how a multi-row diagram is placed, with a
particular proportion of height vs depth.

You can adjust this by wrapping it in an \xybox and aligning that, using
<object> modifiers; viz.

\fbox{% just to show the size of the diagram
  \xy*!C\xybox{\xymatrix
   ...
   ...
 }}\endxy}


See the attached image, to appreciate the difference that this produces, in
your example.





More information about the xy-pic mailing list