我需要一个图表,我已将形状附在下面,这是我的尝试,但它没有按我想要的方式工作,如果你能帮助我,我将不胜感激。
\documentclass{article}
\usepackage{amssymb}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \arrow[d,Rightarrow,"\not\Uparrow"]\arrow[r,Rightarrow, "\not\Leftarrow"] & B \arrow[d,Rightarrow,"\not\Uparrow"]\\
C \arrow[r,Rightarrow,"/" marking,"\not\Leftarrow"] &D
\end{tikzcd}
\end{document}}
结果:
答案1
您可以使用shift left=
或shift right=
来并排显示两个箭头。移动的方向是从箭头的角度,因此在示例中,所有箭头都向右移动。
\documentclass{article}
\usepackage{amssymb}
\usepackage{tikz-cd}
\newcommand{\slsh}{\diagup}
\begin{document}
\begin{tikzcd}
A \arrow[d, Rightarrow, shift right=3pt]\arrow[r, Rightarrow, shift right=3pt]
& B \arrow[d, Rightarrow, shift right=3pt]\arrow[l, Rightarrow, shift right=3pt, "\slsh"marking]\\
C \arrow[r, Rightarrow,"\slsh"marking, shift right=3pt]\arrow[u, Rightarrow, shift right=3pt, "\slsh"marking]
&D \arrow[u, Rightarrow, shift right=3pt, "\slsh" marking]\arrow[l, Rightarrow, shift right=3pt, "\slsh"marking]
\end{tikzcd}
\end{document}
如果您想要一个较小的斜线,更改字体大小将不起作用,因为斜线不会相对于箭头垂直居中。但您可以使用库decorations.markings
创建not
可添加到任何箭头的样式。
\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.markings}
\tikzset{not/.style={
decoration={markings, mark=at position .5 with {\node[scale=.7][transform shape]{/};}}, postaction={decorate}}
}
\begin{document}
\begin{tikzcd}
A \arrow[d, Rightarrow, shift right=2.5pt]\arrow[r, Rightarrow, shift right=2.5pt]
& B \arrow[d, Rightarrow, shift right=2.5pt]\arrow[l, Rightarrow, shift right=2.5pt, not]\\
C \arrow[r, Rightarrow, shift right=2.5pt, not]\arrow[u, Rightarrow, shift right=2.5pt, not]
&D\arrow[u, Rightarrow, shift right=2.5pt, not]\arrow[l, Rightarrow, shift right=2.5pt, not]
\end{tikzcd}
\end{document}