答案1
答案2
我想展示一种替代解决方案tikzcd
,因为使用此包无需添加额外的列,您可以直接命名标签并在它们之间绘制箭头。
\documentclass{article}
\usepackage{amsmath,amsfonts}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[
column sep=36pt,
row sep=36pt
]
A' \ar[d, swap, "u'"{name=fromhere}]\ar[r, "v"{name=tohere}] & A\ar[d,"u"] \\
B'\ar[r,"w", swap] & B
\arrow[
dashed,"\alpha", from=fromhere, to=tohere, swap, start anchor={east},
end anchor={south}, shorten >=2pt, shorten <=2pt
]
\end{tikzcd}
\end{document}
如果您喜欢类似的箭头尖xymatrix
,您可以使用Straight Barb
(或 TikZ 的任何其他样式),如下所示:
\documentclass{article}
\usepackage{amsmath,amsfonts}
\usepackage{tikz-cd}
\usetikzlibrary{arrows.meta}
\tikzcdset{arrow style=tikz, diagrams={>={Straight Barb[length=4pt,width=3pt]}}}
\begin{document}
\begin{tikzcd}[
column sep=36pt,
row sep=36pt
]
A' \ar[d, swap, "u'"{name=fromhere}]\ar[r, "v"{name=tohere}] & A\ar[d,"u"] \\
B'\ar[r,"w", swap] & B
\arrow[
dashed,"\alpha", from=fromhere, to=tohere, swap, start anchor={east},
end anchor={south}, shorten >=2pt, shorten <=2pt
]
\end{tikzcd}
\end{document}