答案1
下面的简短示例可以作为起点:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix(table)[
matrix of nodes,
row sep =0.5cm,
nodes={anchor=center,
minimum width=0.5cm,
minimum height=0.5cm,
},
]
{
3 & 8 & 9 & 0 \\
4 & 5 & 2 & \\
};
\draw [red, very thick] (table-1-4.south) -- (table-2-1.north);
\draw [red, very thick] (table-1-3.south) -- (table-2-2.north);
\draw [red, very thick] (table-1-2.south) -- (table-2-3.north);
\end{tikzpicture}
\end{document}