Here is an idea that might answer both your questions. It uses yshift
to move the start and end points of the two paths up/down by 5pt
. The result could be further improved by shifting the start/end points along the x axis in order for the paths to really be in contact with the nodes' circles.
A custom TikZ style is used to add a strike-through marking at the middle of the second path. This could be parameterized further to allow moving the marking to any position on the path etc.
I cannot tell whether this is the most elegant solution though.
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{decorations,decorations.markings}
\tikzset{
strike through/.style={
postaction=decorate,
decoration={
markings,
mark=at position 0.5 with {
\draw[-] (-5pt,-5pt) -- (5pt, 5pt);
}
}
}
}
\begin{document}
\begin{tikzpicture}
\node[draw,circle] (foo) at (0,0) { foo };
\node[draw,circle] (bar) at (4,0) { bar };
\draw[>=latex,->] ([yshift= 5pt] foo.east) -- ([yshift= 5pt] bar.west);
\draw[>=latex,<-,strike through] ([yshift=-5pt] foo.east) -- ([yshift=-5pt] bar.west);
\end{tikzpicture}
\end{document}
Here is how it looks like:
Best Answer
Is this close to what you want?
I don't think you can have
=
as part of a style name, so I've denoted a double line withz
. Note that the arrowheads aren't quite the same for the two styles, although this can probably be fixed. For some reason, styles directly on the\draw
commands don't get reliably passed to the decorations, but if you need to style it further you can use a scope.