答案1
TikZ
使用纯而不是肯定更容易做到这一点tikz-cd
。使用 节点布局并不难tikz-cd
,但线条形状,特别是分割、弯曲路径,相当困难。使用 容易得多Tikz
。
基本思路是放置节点,然后在节点之间画线。尝试各种定位,直到看起来符合您的要求。我制作了两种节点样式(big box
和small box
)。可以进行许多调整。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{big box/.style={draw, minimum width=5cm, minimum height=4cm},
small box/.style={draw, minimum width=1cm, minimum height=1cm}}
\begin{document}
\begin{tikzpicture}
\node[big box] at (0,0)(F){};
\node[right=of F](M){};
\node[above=of M.center, anchor=center](B1){$B$};
\node[below=of M.center, anchor=center, yshift=-.5cm](B2){$B'$};
\node[big box, right=of M] (G){};
\node[small box, above=of F.center, anchor=center](F1){$f$};
\node[small box, below=of F.center, anchor=center](F2){$f^*$};
\node[small box, above=of G.center, anchor=center](G1){$g$};
\node[small box, below=of G.center, anchor=center](G2){$g^*$};
\node[left=of F.west, yshift=.5cm](A1){$A$};
\node[left=of F.west, yshift=-1cm](A2){$A'$};
\node[right=of G.east, yshift=1cm](C1){$C$};
\node[right=of G.east, yshift=-1.25cm](C2){$C'$};
%
\draw[->](C2)--(C2-|G2.east);
\draw[->](G2)--(G2-|B2.north east)to[out=180,in=0](B2.north west);
\draw[->](B2.north west)--(B2.north west-|F2.east);
\draw[->](F2)--(A2);
\draw[->](A1)--++(2,0)to[out=0,in=180]++(1,.5)--(F1);
\draw[->](A1)--++(2,0)to[out=0,in=180]++(1,-.5)--(F.center);
\draw[->](F.center)--++(1,0)arc(90:-90:.4)node(T){}--(T-|F2.east);
\draw[->](F1)--++(3,0)node(T2){};
\draw[->](T2.center)to[out=0,in=180]++(1,-.5)--++(1,0)node(T3){}to[out=0,in=180]++(1,.5)--(G1);
\draw[->](T3){}to[out=0,in=180]++(1,-.5)--(G.center)--++(1,0)arc(90:-90:.4)node(T4){}--(T4-|G2.east);
\draw[->](G1)--(C1);
\end{tikzpicture}
\end{document}