如何进行具有通用属性的推送?

如何进行具有通用属性的推送?

更准确地说,如下图所示:

在此处输入图片描述

此外,如果我想将其分解$\alpha':B\to Y$$\alpha': B\xrightarrow{p}Z\xrightarrow{h}Y$,我该怎么做?

答案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 leftbend 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} 

在此处输入图片描述

相关内容