我有这张图:
\begin{tikzcd}
... \arrow[r,""]
& G_{n+1} \arrow[r, "\partial_{n+1}"] \arrow[rd, "f\circ \partial{n+1}"']
& G_{n} \arrow[rd, "g\circ \partial_{n}"'] \arrow[r,"\partial{n}"] \arrow[d,"f"']
& G_{n-1} \arrow[r,"\partial_{n-1}"] \arrow[d, "g"'] \arrow[rd, "f'\circ\partial_{n-1}"']
& G_{n-2} \arrow[r, "\partial{n-2}"] \arrow[d, "f'"'] \arrow[rd]
& ...\\
&
& M & M
& M &...
\end{tikzcd}
问题是:打印时f'\circ\partial_{n-1}
会与向下箭头重叠,因为函数组合与箭头之间的距离太大rd
。我该如何解决?
答案1
除了将标签移近对角箭头之外,我还会增大行和列的间距。
\documentclass{article}
\usepackage{amsmath,tikz-cd}
\begin{document}
\begin{tikzcd}[column sep=large,row sep=huge]
\dots \arrow[r,""]
& G_{n+1} \arrow[r, "\partial_{n+1}"] \arrow[rd, "f\circ \partial_{n+1}\!\!"']
& G_{n} \arrow[rd, "g\circ \partial_{n}\!\!"'] \arrow[r,"\partial{n}"] \arrow[d,"f"']
& G_{n-1} \arrow[r,"\partial_{n-1}"] \arrow[d, "g"'] \arrow[rd, "f'\circ\partial_{n-1}\!\!\!\!"']
& G_{n-2} \arrow[r, "\partial{n-2}"] \arrow[d, "f'"'] \arrow[rd]
& \dots \\
&
& M & M
& M & \dots
\end{tikzcd}
\end{document}
答案2
tikz
最好的办法可能是增加行距和列距,这是 egreg 的解决方案。但是您也可以通过在标签后写选项来调整标签间距,例如yshift=.5ex
或shift={(.5em,.5ex)}
,并且可以通过在第一行中替换 来向右移动给定&
列&[2em]
。
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
\cdots \arrow[r,""]
& G_{n+1}
\arrow[r, "\partial_{n+1}"]
\arrow[rd, "f\circ \partial{n+1}"' yshift=.5ex]
& G_{n}
\arrow[rd, "g\circ \partial_{n}"' yshift=.5ex]
\arrow[r,"\partial{n}"]
\arrow[d,"f"']
& G_{n-1}
\arrow[r,"\partial_{n-1}"]
\arrow[d, "g"']
\arrow[rd, "f'\circ\partial_{n-1}"' shift={(.5em,.5ex)}]
&[2em] G_{n-2}
\arrow[r, "\partial{n-2}"]
\arrow[d, "f'"']
\arrow[rd]
& \cdots\\
& & M & M & M &\cdots
\end{tikzcd}
\end{document}