答案1
\documentclass[11pt]{report}
\usepackage[all]{xy}
\begin{document}
\[
\xymatrix@R=1.2cm@C=1.2cm{
A \ar[r]^{g} \ar[d]_{f} & C \ar[d]_{\beta} \ar[rdd]^{\beta'} \\
B \ar[r]^{\alpha} \ar[rrd]_{\alpha'} & D \ar@{-->}[rd]|{\theta} \\
& & Y
}
\]
%% bended arrow
\[
\xymatrix@R=1.2cm@C=1.2cm{
A \ar[r]^{g} \ar[d]_{f} & C \ar[d]_{\beta} \ar@/^1pc/[rdd]^{\beta'} \\
B \ar[r]^{\alpha} \ar@/_1pc/[rrd]_{\alpha'} & D \ar@{-->}[rd]|{\theta} \\
& & Y
}
\]
%% not too symmetric, but....
\[
\xymatrix@R=1.2cm@C=1.2cm{
A \ar[r]^{g} \ar[d]_{f} & C \ar[d]_{\beta} \ar@/^1pc/[rdd]^{\beta'} \\
B \ar[r]^{\alpha} \ar@/_1pc/[rrd]^{\alpha'}\ar[d]_{p} & D \ar@{-->}[rd]|{\theta} \\
Z \ar@/_1pc/[rr]^{h} & & Y
}
\]
\end{document}
答案2
我建议tikz-cd
:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \arrow[d,"f"'] \arrow[r,"g"] &
C \arrow[d,"\beta"'] \arrow[ddr,bend left,"\beta'"] \\
B \arrow[r,"\alpha"] \arrow[drr,bend right,"\alpha'"'] &
D \arrow[dr,dashed,"\theta"] \\
&& Y
\end{tikzcd}
\end{document}
该符号"f"'
的意思是标签应该设置在箭头的右侧,而不是默认的左侧。
省略bend left
,bend right
你会得到
但虚线箭头应输入为
\arrow[dr,dashed,"\theta" near start]
以避免冲突。
带有更多箭头的版本:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \arrow[d,"f"'] \arrow[r,"g"] &
C \arrow[d,"\beta"'] \arrow[dddr,bend left,"\beta'"] \\
B \arrow[r,"\alpha"] \arrow[ddrr,bend right,"\alpha'"'] \arrow[dr,"p"'] &
D \arrow[ddr,dashed,"\theta"] \\
& Z \arrow[dr,"h"'] \\
&& Y
\end{tikzcd}
\end{document}
答案3
一个psmatrix
办法:
\documentclass[border=3pt]{standalone}
\usepackage{pst-node, auto-pst-pdf} %% to compile with pdflates --enable-write18 MiKTeX) or pdflatex --shell-escape (TeX Live, MacTeX)
\begin{document}
$ \begin{psmatrix}[rowsep = 1.2cm]
%%% Matrix nodes
[name = A] A & [name = C] C\\
[name = B] B & [name = D] D \\
& & [name = Y] Y
%%% Connections
\everypsbox{\scriptstyle}
\psset{linewidth = 0.6pt, arrows = ->, arrowinset = 0.15, shortput = nab, nodesep = 3pt, labelsep = 1pt}
\ncline{A}{B}_{f}\ncline{A}{C}^{g}
\ncline{B}{D}^{α}\ncline{C}{D}_{β}
\ncline{B}{Y}_{\alpha'}\ncline{C}{Y}^{\beta'}
\ncline[linestyle = dashed]{D}{Y}^[npos = 0.35]{θ}
\end{psmatrix} $
\end{document}
编辑:α' 因式分解的代码:
\documentclass[border=3pt]{standalone}
\usepackage{pst-node, auto-pst-pdf} %% to compile with pdflates --enable-write18 MiKTeX) or pdflatex --shell-escape (TeX Live, MacTeX)
\begin{document}
$ \begin{psmatrix}[rowsep = 1.2cm]
%%% Matrix nodes
[name = A] A & [name = C] C\\
[name = B] B & [name = D] D \\
& [name = Z]\makebox[2em][l]{$ Z $}\qquad & [name = Y] Y
%%% Connections
\everypsbox{\scriptstyle}
\psset{linewidth = 0.6pt, arrows = ->, arrowinset = 0.15, shortput = nab, nodesep = 3pt, labelsep = 1pt}
\ncline{A}{B}_{f}\ncline{A}{C}^{g}
\ncline{B}{D}^{α}\ncline{C}{D}_{β}
\ncline{B}{Y}_{\alpha'}\ncline{C}{Y}^{\beta'}
\psset{linestyle = dashed}
\ncline{D}{Y}^[npos = 0.35]{θ}
\ncline[offsetB = -1ex, -1ex]{B}{Z}_{p} \ncline[nodesepA = -1em]{Z}{Y}_{h}
\end{psmatrix} $
\end{document}