I have drawn the following picture in xypicenter image description here

and I would like to align in the right column the Hom term in the first row as well as direct product guys in the 2nd and 3rd rows exactly together. How can I do this? Because right now the diagram is looking odd. For those interested, here is my code:

\[\begin{xy} \xymatrix@C=5em@R=4em{  \Hom(X,\spec A) \ar[r]^\alpha \ar[d] &  \operatorname{Hom}(A,\Gamma(X,\mathcal{O}_X)) \ar[d] \
\prod_i \Hom(U_i,A) \ar[r]^-{\beta_i} \ar@<-0.5ex>[d] \ar@<0.5ex>[d] &\prod_i \operatorname{Hom}\Big(A,\Gamma(U_i,\mathcal{O}_X|_{U_i}) \Big)  \ar@<-0.5ex>[d] \ar@<0.5ex>[d] \
\prod_{i,j} \Hom(U_i \cap U_j,A) \ar[r]^-{\beta_{i,j}} & \prod_{i,j}  \operatorname{Hom}\Big(A,\Gamma(U_i \cap U_j,\mathcal{O}_X|_{U_i\cap U_j}) \Big)   }\end{xy}\]
  • I think that it is not possible on xy. Do you know tikz-cd?
    – Sigur
    Commented Jul 27, 2013 at 1:32
  • Something like this for the RHS?
    – Werner
    Commented Jul 27, 2013 at 1:35
  • @Werner Perhaps but is it possible for them to be perfectly alinged? Commented Jul 27, 2013 at 2:22
  • @Sigur I am not using it now, but if you show me the code I am prepared to change from xypic to tikz-cd. Commented Jul 27, 2013 at 2:22
  • @BenjaLim: According to your post, you want the Hom operator name to be aligned horizontally across the rows. Am I right? That's exactly what I have in my picture. Sure, you want it for the LHS as well, correct? Perhaps use a graphic interface and mock up the exact output you're after as well.
    – Werner
    Commented Jul 27, 2013 at 2:37

1 Answer 1


This is a first cut. I'm sure something can be done better with the arrows than just stretching them (as I did).

\Shortstack[r]{{} {$\nobigdownarrow$} {$\prod_{i,j}\mystrut$}
 {$\nobigdownarrow$} {$\prod_{i,j}\mystrut$}}
\Shortstack[l]{{$\Hom(X, \spec A)$} {$\hgapa\bigdownarrow$} {$\Hom(U_i, A)$}
  {$\hgapb\bigdownarrow\bigdownarrow$} {$\Hom(U_i \cap U_j,A)$}}
\Shortstack[c]{{$\rarrow{\alpha}$} {$\nobigdownarrow$} {$\rarrow{\beta_i}$}
  {$\nobigdownarrow$} {$\rarrow{\beta_{i,j}}$}}
\Shortstack[r]{{} {$\nobigdownarrow$} {$\prod_{i,j}\mystrut$}
 {$\nobigdownarrow$} {$\prod_{i,j}\mystrut$}}
\Shortstack[l]{{$\Hom(A,\Gamma(X,\mathcal{O}_X))$} {$\hgapa\bigdownarrow$}
  {$\Hom\Big(A,\Gamma(U_i,\mathcal{O}_X|_{U_i}) \Big)$}
  {$\Hom\Big(A,\Gamma(U_i \cap U_j,\mathcal{O}_X|_{U_i\cap U_j}) \Big)  $}}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .