there are two arrows I need to show in my tikz picture, meaning:
a). From A cannot get B;
b). B can be derived from A, but not the other way around.
\draw[->] (a) -- (b) can get a normal arrow, but what's the command to get these special arrows?
there are two arrows I need to show in my tikz picture, meaning:
a). From A cannot get B;
b). B can be derived from A, but not the other way around.
\draw[->] (a) -- (b) can get a normal arrow, but what's the command to get these special arrows?
For the strike out in the middle part the link Guilherme Zanotelli posted (Double arrow in TikZ?) can help, I used the highest voted answer there, by Jannis Pohlmann, for the code below.
To make the "half" arrow tips in your bottom figure, use the Straight Barb[left] arrow tip from the arrows.meta library.
\documentclass[border=4mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{
decorations.markings,
arrows.meta %% <--
}
\tikzset{
barbarrow/.style={ % style that just defines the arrow tip
>={Straight Barb[left,length=5pt,width=5pt]}
},
strike through/.style={
postaction=decorate,
decoration={
markings,
mark=at position 0.5 with {
\draw[-] (-3pt,-3pt) -- (3pt, 3pt);
}
}
}
}
\begin{document}
\begin{tikzpicture}
\node (A1) at (0,1) { A };
\node (B1) at (4,1) { B };
\draw[-Stealth,strike through] (A1) -- (B1);
\node (A) at (0,0) { A };
\node (B) at (4,0) { B };
\draw[->,barbarrow] ([yshift= 2pt] A.east) -- ([yshift= 2pt] B.west);
\draw[<-,barbarrow,strike through] ([yshift=-2pt] A.east) -- ([yshift=-2pt] B.west);
\end{tikzpicture}
\end{document}