TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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}\]
share|improve this question
I think that it is not possible on xy. Do you know tikz-cd? – Sigur Jul 27 '13 at 1:32
Something like this for the RHS? – Werner Jul 27 '13 at 1:35
@Werner Perhaps but is it possible for them to be perfectly alinged? – BenjaLim Jul 27 '13 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. – BenjaLim Jul 27 '13 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 Jul 27 '13 at 2:37

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.