如何使用命令“\save”将我的代码中的蓝色对象 $C_{n+1},C_n,D_{n+1},D_n$ 分组为平行四边形,就像下图这样?
\documentclass{article}
\usepackage[all]{xy}
\begin{document}
$$\xymatrix{
C:\ar[dd]_{\varphi}^{\psi} & \cdots\ar[r] & C_{n+1}\ar[rr]^{\partial_{n+1}^C}\ar[dd] && C_n\ar[rr]^{\partial_n^C}\ar[dd]_{\varphi_n}^{\psi_n}\ar[ddll]_{T_n} && C_{n-1}\ar[ddll]_{T_{n-1}}\ar[r]\ar[dd] & \cdots\\\\
D: & \cdots\ar[r] & D_{n+1}\ar[rr]^{\partial_{n+1}^D} && D_n\ar[rr]^{\partial_n^D} && D_{n-1}\ar[r] & \cdots,}$$
\end{document}
答案1
不完全相同的图表,也不完全相同的平行四边形,但是这是使用该tikz-cd
包得到的类似图表:
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{tikzmark}
\begin{document}
\[
\begin{tikzcd}
C:\ar[dd,"\varphi"',"\psi"] & \cdots\ar[r] &
C_{n+1}\ar[rr,"\partial_{n+1}^C"]\ar[dd] &&
C_n\ar[rr,"\partial_n^C"]\ar[dd,"\varphi_n"',"\psi_n"]\ar[ddll,"T_n"'] &&
C_{n-1}\ar[ddll,"T_{n-1}"']\ar[r]\ar[dd] & \cdots\\\\
D: & \cdots\ar[r] & D_{n+1}\ar[rr,"\partial_{n+1}^D"] &&
D_n\ar[rr,"\partial_n^D",near end] && D_{n-1}\ar[r] & \cdots
%
\ar[from=1-5,to=1-7,color=blue,dash,start
anchor={[xshift=-1em,yshift=3ex]center},end
anchor={[xshift=3.8em,yshift=3ex]center}]
\ar[from=3-3,to=3-5,color=blue,dash,start
anchor={[xshift=-4em,yshift=-2ex]center},end
anchor={[xshift=1em,yshift=-2ex]center}]
\ar[from=3-3,to=1-5,color=blue,dash,start
anchor={[xshift=-4em,yshift=-2ex]center},end
anchor={[xshift=-1em,yshift=3ex]center}]
\ar[from=1-7,to=3-5,color=blue,dash,start
anchor={[xshift=3.8em,yshift=3ex]center},end
anchor={[xshift=1em,yshift=-2ex]center}]
\end{tikzcd}
\]
\end{document}
问题是tikz-cd
不允许tikz
在图表中使用常用命令,所以我只用四条边(以无尖箭头的形式绘制)来建模平行四边形。结果是: