This is probably the same mechanism for description
key in the manual of tikz-cd
but more explicit.
\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.markings}
\tikzset{degil/.style={
decoration={markings,
mark= at position 0.5 with {
\node[transform shape] (tempnode) {$\backslash$};
%\draw[thick] (tempnode.north east) -- (tempnode.south west);
}
},
postaction={decorate}
}
}
\begin{document}
\begin{tikzcd}[arrows=Rightarrow]
A \arrow[out=30,in=150,degil]{r}{}\arrow[degil]{d} & B \arrow[out=210,in=330]{l}{}\arrow{d} \\
E \arrow{r}{} & F
\end{tikzcd}
\end{document}
![enter image description here](https://i.stack.imgur.com/PtmWk.png)
If you want to keep the backslashes upright(unrotated) regardless of the arrow direction, you can remove the transform shape
option and give it a try.
You can use the fill
key to “delete” the background. As the comments show you must care to set no other color after the fill key with color
or just using the color name as an option. That will overwrite the color given to fill
. As you can see in the example color
set the color for filling, drawing and the text.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,0) -- ++(5,2) node [midway,fill=white] {ABC};
\draw (3,0) -- ++(5,2) node [midway,fill=white,color=blue] {ABC};
\draw (6,0) -- ++(5,2) node [midway,fill=white,color=blue,text=white] {ABC};
\end{tikzpicture}
\end{document}
![color settings](https://i.stack.imgur.com/ex3SF.png)
To change the text or drawing color you can use the draw
and text
options, which won’t affect the fill
color.
\node [draw=blue,fill=gray,text=white] {Colors};
![three colors](https://i.stack.imgur.com/uqaz0.png)
Best Answer
midway
andabove
Second try: