答案1
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach \x in {1,...,4}
{
\foreach \y in {1,...,3}
{
\draw[->] (2*\x-1,2*\y+0.5)--(2*\x,2*\y+0.5);
\draw[->] (2*\y+0.5,2*\x) --(2*\y+0.5,2*\x-1);
\draw(1,2*\y+0.5) node[left]{0} (8,2*\y+0.5) node[right]{0};
\draw(2*\y+0.5,1) node[below]{0} (2*\y+0.5,8) node[above]{0};
}
}
\draw (2.5,6.5) node{A};
\draw (4.5,6.5) node{B};
\draw (6.5,6.5) node{C};
\draw (2.5,4.5) node{X};
\draw (4.5,4.5) node{Y};
\draw (6.5,4.5) node{Z};
\draw (2.5,2.5) node{U};
\draw (4.5,2.5) node{V};
\draw (6.5,2.5) node{W};
\end{tikzpicture}
\end{document}
答案2
只是为了好玩。(刚才看到了 Henri 的评论,同意。)
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\[\begin{tikzcd}[sep = large]
& 0 \ar[d] & 0 \ar[d] & 0 \ar[d] & & \\
0 \ar[r] & A \ar[d]\ar[r] & B \ar[d]\ar[r] & C \ar[d]\ar[r] & 0 & (a) \\
0 \ar[r] & X \ar[d]\ar[r] & Y \ar[d]\ar[r] & Z \ar[d]\ar[r] & 0 & (b)\\
0 \ar[r] & U \ar[d]\ar[r] & V \ar[d]\ar[r] & W \ar[d]\ar[r] & 0 & (c)\\
& 0 & 0 & 0 & \\
\end{tikzcd}\]
% see https://tex.stackexchange.com/a/407278/121799
\[\begin{tikzcd}[sep = large,every matrix/.append style={name=mycd},remember
picture]
A \ar[r,"f"]\ar[d,"\alpha",swap] & B \ar[r,"g"]\ar[d,"\beta",swap] & C
\ar[d,"\exists\gamma",dashed] \\
U \ar[r,"h"]& V \ar[r,"k"]& W \\
\end{tikzcd}\]
\begin{tikzpicture}[overlay,remember picture]
\node at (barycentric cs:mycd-1-1=1,mycd-2-1=1,mycd-1-2=1,mycd-2-2=1) {(I)};
\node at (barycentric cs:mycd-1-3=1,mycd-2-3=1,mycd-1-2=1,mycd-2-2=1) {(II)};
\end{tikzpicture}
\end{document}