![范畴论图(需要帮助)](https://linux22.com/image/476103/%E8%8C%83%E7%95%B4%E8%AE%BA%E5%9B%BE%EF%BC%88%E9%9C%80%E8%A6%81%E5%B8%AE%E5%8A%A9%EF%BC%89.png)
我是 Latex 的初学者。请帮我通过 Latex 绘制这个类别理论图。我试过这个代码,但工作正常:
\begin{tikzcd}
A \arrow[dd, bend right, shift right=2] \arrow[rrr, bend left, shift left] & & & B \arrow[lll, bend left, shift left] \arrow[dd, bend left, shift left=2] & \colon & P \\
& & & & & \\
C \arrow[uu, bend right, shift right=2] & & & D \arrow[uu, bend left] \arrow[lll] & \colon & Q
\end{tikzcd}
答案1
类似这样的事情似乎可以做你想做的事:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[column sep=4em,row sep=4em,/tikz/column 2/.style={column sep=2em}]
A \arrow[r,bend left,"h"]
\arrow[d,bend right,swap,"f"]
& C \arrow[l,bend left,"k"] \arrow[d,bend right,swap,"s"] & : P\\
B \arrow[u,bend right,swap,"g"] & D \arrow[l]\arrow[u,bend right,swap,"t"] & : Q
\end{tikzcd}
\end{document}