Consider these squared nodes:
\begin{tikzpicture}
\node [draw] (A) at (0,0) {demo text};
\node [draw] (B) at (0,-2) {demo text};
\end{tikzpicture}
I'd like to link them with two offset lines. If A and B were two numeric coordinates, I could do it as simply as that:
\draw [xshift=1em] (0,0) -- (0,-2);
\draw [xshift=-1em] (0,0) -- (0,-2);
Unfortunately this code doesn't shift the line at all:
\draw [xshift=1em] (A) --(B);
After trial and error, I found I can to do this like so:
\begin{tikzpicture}
\node [draw] (A) at (0,0) {demo text};
\node [draw] (B) at (0,-2) {demo text};
\draw ([xshift=1em]A.south) -- ([xshift=1em]B.north);
\draw ([xshift=-1em]A.south) -- ([xshift=-1em]B.north);
\end{tikzpicture}
I have to set the anchor and shift every point. It seems to much for such a simple task.
Can you suggest a better way?
Cheers.



