![我怎样才能对齐列中的条目?](https://linux22.com/image/272666/%E6%88%91%E6%80%8E%E6%A0%B7%E6%89%8D%E8%83%BD%E5%AF%B9%E9%BD%90%E5%88%97%E4%B8%AD%E7%9A%84%E6%9D%A1%E7%9B%AE%EF%BC%9F.png)
我在xypic中画了下面的图
我想将第一行的 Hom 项以及第二行和第三行的直接乘积项对齐到右列。我该怎么做?因为现在图表看起来很奇怪。对于那些感兴趣的人,这是我的代码:
\[\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}\]
答案1
这是第一次切割。我相信除了拉伸箭头(就像我做的那样)之外,还可以对箭头做些更好的处理。
\documentclass{article}
\usepackage{stackengine}
\usepackage{scalerel}
\def\spec{\mathrm{Spec}}
\def\Hom{\mystrut\mathrm{Hom}}
\def\bigdownarrow{\stretchto{\downarrow}{6ex}}
\def\bigrightarrow{\protect\hstretch{5}{\rightarrow}}
\def\nobigdownarrow{\protect\phantom{\bigdownarrow}}
\newcommand\rarrow[1]{\mystrut\smash{\stackon{$\bigrightarrow$}{$#1$}}}
\def\hgapa{\hspace{5ex}}
\def\hgapb{\hspace{4.5ex}}
\def\mystrut{\protect\vphantom{\Big(}}
\begin{document}
\[
\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)$}
{$\hgapb\bigdownarrow\bigdownarrow$}
{$\Hom\Big(A,\Gamma(U_i \cap U_j,\mathcal{O}_X|_{U_i\cap U_j}) \Big) $}}
\]
\end{document}