How can I place two multicolumn tables (tableA and tableB) side by side and draw arrows from cell in tableA to another cell in tableB?
I have tried this Arrows between two tables and its also working ok with simple tables. But if I try to use nested nodes to create multiple columns it goes wrong.
What to do?
This is what I have tried, but if I change the labels to longer words like "Copenhagen" the whole cell gets very wide and it looks weird on the page. Is it something with the margin I have to change? How should I add border in nested nodes?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart,matrix,positioning}
\begin{document}
\begin{tikzpicture}
\node[rectangle split, rectangle split parts=3,draw,inner sep=2ex] (A) at (0,1)
{
\begin{tikzpicture}
\node[rectangle,text height=2em] (1st) {a11};
\node[rectangle,text height=2em,right=of 1st] (2nd) {a21};
\end{tikzpicture}
\nodepart{two}
\begin{tikzpicture}
\node[rectangle,text height=2em] (1st) {a12};
\node[rectangle,text height=2em,right=of 1st] (2nd) {a22};
\end{tikzpicture}
\nodepart{three}
\begin{tikzpicture}
\node[rectangle,text height=2em] (1st) {a13};
\node[rectangle,text height=2em,right=of 1st] (2nd) {a23};
\end{tikzpicture}};
\node[rectangle split, rectangle split parts=3,draw,inner sep=2ex] (B) at (7,1)
{\begin{tikzpicture}
\node[rectangle,text height=2em] (1st) {b11};
\node[rectangle,text height=2em,right=of 1st] (2nd) {b21};
\end{tikzpicture}
\nodepart{two}
\begin{tikzpicture}
\node[rectangle,text height=2em] (1st) {b12};
\node[rectangle,text height=2em,right=of 1st] (2nd) {b22};
\end{tikzpicture}
\nodepart{three}
\begin{tikzpicture}
\node[rectangle,text height=2em] (1st) {b13};
\node[rectangle,text height=2em,right=of 1st] (2nd) {b23};
\end{tikzpicture}};
\draw[->] (A.two east) -- (B.text west);
\draw[->] (B.two west) -- (A.text east);
\end{tikzpicture}
\end{document}



tikzmark. See my answer for a basic illustration of how this might be done. – cfr Jul 06 '14 at 19:24