我是 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}