关于箭头的交叉

关于箭头的交叉

当我使用绘制交换图时,Tikzcd我遇到了一个问题:该命令crossing over在整个图的某个地方不起作用。

梅威瑟:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usetikzlibrary{patterns,positioning,arrows}
\definecolor{grey1}{RGB}{71,71,71}
\definecolor{grey2}{RGB}{100,100,100}
%\definecolor{pur}{RGB}{186,146,162}

\begin{document}
\begin{tikzcd}[row sep=large, column sep=large, execute at end picture={
\foreach \Valor/\Nombre in
{
  tikz@f@1-1-1/a,tikz@f@1-3-1/b,tikz@f@1-3-3/c,tikz@f@1-1-3/d,
  tikz@f@1-3-1/e,tikz@f@1-3-3/f,tikz@f@1-4-4/g,tikz@f@1-4-2/h,
  tikz@f@1-1-3/i,tikz@f@1-3-3/j,tikz@f@1-4-4/k,tikz@f@1-2-4/l%
}
{
\coordinate (\Nombre) at (\Valor);
}
\fill[pattern=north east lines,pattern color=grey1,opacity=0.3]
  (a) -- (b) -- (c) -- (d) -- cycle;
\fill[grey2,opacity=0.3]
  (e) -- (f) -- (g) -- (h) -- cycle;
\fill[pattern=north east lines,pattern color=grey1,opacity=0.3]
  (i) -- (j) -- (k) -- (l) -- cycle; 
  }
]
  T(\Sigma,X) \arrow[rr,near start,"\text{\emph{free}}"] \arrow[dr,swap,"\pi"]  &&
  \mathcal{C}_{\Sigma} \arrow[leftarrow, dr,"\text{\emph{inclusion}}",sloped,above]& \\
  &T(\Sigma,X)/_{\thickapprox_E} \arrow[rightarrow,crossing over]{rr}[near start]{\text{\emph{free}}} && % Here the command `crossing over' doesn't work after compiling the tex.
  \mathcal{V}(E)  \\
  X \arrow{uu}[near start,sloped,above]{\text{\hspace*{8pt}\emph{determine}}}  \arrow[dashed]{rr}[near start]{\text{\emph{affect}}} \arrow[dr,swap,"{\text{\emph{determine}}}",sloped,above] && T(\Sigma,V) \arrow[dashed]{uu}[near start,below,sloped]{\text{\emph{free}}} \arrow[dashrightarrow,dr,swap,"\pi"]& \\
  & \thickapprox_E \arrow[leftrightarrow,rr] \arrow[leftrightarrow,uu,crossing over]&& T(\Sigma,V)/_{\thickapprox_E} \arrow{uu}[near start,below,sloped]{\text{\emph{free}}}
\end{tikzcd}
\end{document} 

我已经在上面演示的原始 Tex 文档中指出了不起作用的地方crossing over。我尝试调整命令,但仍然失败。

上面演示的Tex的输出如下:

在此处输入图片描述

下面这张图正是我想要的,感谢@egreg的帮助,最终得到了最终版本的交换图。

在此处输入图片描述

答案1

稍后画出要交叉的箭头:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usetikzlibrary{patterns,positioning,arrows}
\definecolor{grey1}{RGB}{71,71,71}
\definecolor{grey2}{RGB}{100,100,100}
%\definecolor{pur}{RGB}{186,146,162}

\begin{document}
\begin{tikzcd}[row sep=large, column sep=large, execute at end picture={
\foreach \Valor/\Nombre in
{
  tikz@f@1-1-1/a,tikz@f@1-3-1/b,tikz@f@1-3-3/c,tikz@f@1-1-3/d,
  tikz@f@1-3-1/e,tikz@f@1-3-3/f,tikz@f@1-4-4/g,tikz@f@1-4-2/h,
  tikz@f@1-1-3/i,tikz@f@1-3-3/j,tikz@f@1-4-4/k,tikz@f@1-2-4/l%
}
{
\coordinate (\Nombre) at (\Valor);
}
\fill[pattern=north east lines,pattern color=grey1,opacity=0.3]
  (a) -- (b) -- (c) -- (d) -- cycle;
\fill[grey2,opacity=0.3]
  (e) -- (f) -- (g) -- (h) -- cycle;
\fill[pattern=north east lines,pattern color=grey1,opacity=0.3]
  (i) -- (j) -- (k) -- (l) -- cycle; 
  }
]
  T(\Sigma,X) \arrow[rr,near start,"\text{\emph{free}}"] \arrow[dr,swap,"\pi"]  &&
  \mathcal{C}_{\Sigma} \arrow[leftarrow, dr,"\text{\emph{inclusion}}",sloped,above] 
\arrow[dashed,leftarrow]{dd}[near end,above,sloped]{\text{\emph{free}}} & \\
  &T(\Sigma,X)/_{\thickapprox_E} \arrow[rightarrow,crossing over]{rr}[near start]{\text{\emph{free}}} && % Here the command `crossing over' doesn't work after compiling the tex.
  \mathcal{V}(E)  \\
  X \arrow{uu}[near start,sloped,above]{\text{\hspace*{8pt}\emph{determine}}}  \arrow[dashed]{rr}[near start]{\text{\emph{affect}}} \arrow[dr,swap,"{\text{\emph{determine}}}",sloped,above] && T(\Sigma,V) 
\arrow[dashrightarrow,dr,swap,"\pi"]& \\
  & \thickapprox_E \arrow[leftrightarrow,rr] \arrow[leftrightarrow,uu,crossing over]&& T(\Sigma,V)/_{\thickapprox_E} \arrow{uu}[near start,below,sloped]{\text{\emph{free}}}
\end{tikzcd}
\end{document} 

由于文本标签的原因,该方法from=dd实际上不起作用。

在此处输入图片描述

相关内容