\documentclass[12pt,reqno,a4paper]{amsart}
%\usepackage[utf8]{inputenc} % not needed with up-to-date TeX systems
\usepackage[english]{babel}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{color}
\usepackage{mathrsfs}
\usepackage[all]{xy}
\usepackage{tikz-cd}
\usepackage[normalem]{ulem} % do you *really* need it?
\usepackage{datetime}
\usepackage{hyperref}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{construction}{Construction}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{definition}{Definition}
\newtheorem{remark}{Remark}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{example}{Example}
\newtheorem*{question}{Question}
\newtheorem*{solution}{Solution}
\newtheorem{exercise}{Exercise}
\newcommand{\mc}{\mathcal}
\newcommand{\mf}{\mathfrak}
\newcommand{\mb}{\mathbb}
\newcommand{\xra}{\xrightarrow}
\newcommand{\ra}{\rightarrow}
\newcommand{\rra}{\rightrightarrows}
\pagestyle{myheadings}
\textheight 9.3in
\textwidth 6.5in
\calclayout
% metadata
%\date{\today}
\title{Something}
\author{Someone}
\begin{document}
\[\begin{tikzcd}
0 \arrow[r] & A \arrow[rr] \arrow[dd] & & B \arrow[rr] \arrow[dd] & & C \arrow[r] \arrow[dd] & 0 \\
D \arrow[dd] \arrow[ru,xshift=0.75ex,"t"]
\arrow[ru,xshift=-0.75ex,"s"'] & & E \arrow[ru,xshift=0.75ex,"t"]
\arrow[ru,xshift=-0.75ex,"s"'] \arrow[dd] & & F \arrow[ru,xshift=0.75ex,"t"]
\arrow[ru,xshift=-0.75ex,"s"'] \arrow[dd] & & \\
& G & & H & & I & \\
J \arrow[ru,xshift=0.75ex,"t"]
\arrow[ru,xshift=-0.75ex,"s"'] & & K \arrow[ru,xshift=0.75ex,"t"]
\arrow[ru,xshift=-0.75ex,"s"'] & & L \arrow[ru,xshift=0.75ex,"t"]
\arrow[ru,xshift=-0.75ex,"s"'] & &
\end{tikzcd}\]
\end{document}
以上是最小的工作示例。
我希望从 D 到 A、从 E 到 B、从 F 到 C 的箭头以及其他类似的箭头从同一处开始和结束,就像使用“\rightrightarrows”时得到的结果一样。
我该怎么做?欢迎提出任何意见。
答案1
使用shift left
和shift right
而不是xshift
。
\documentclass[12pt,reqno,a4paper]{amsart}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
0 \arrow[r] & A \arrow[rr] \arrow[dd] && B \arrow[rr] \arrow[dd] && C \arrow[r] \arrow[dd] & 0
\\
D \arrow[ru,shift right=0.75ex,"s"'] \arrow[ru,shift left=0.75ex,"t"] \arrow[dd] &&
E \arrow[ru,shift right=0.75ex,"s"'] \arrow[ru,shift left=0.75ex,"t"] \arrow[dd] &&
F \arrow[ru,shift right=0.75ex,"s"'] \arrow[ru,shift left=0.75ex,"t"] \arrow[dd]
\\
& G && H && I
\\
J \arrow[ru,shift right=0.75ex,"s"'] \arrow[ru,shift left=0.75ex,"t"] &&
K \arrow[ru,shift right=0.75ex,"s"'] \arrow[ru,shift left=0.75ex,"t"] &&
L \arrow[ru,shift right=0.75ex,"s"'] \arrow[ru,shift left=0.75ex,"t"]
\end{tikzcd}
\]
\end{document}