How can I draw the following figure in LaTeX using tikz (if possible)?
How to draw the figure with the fruits replaced by letters or numbers?
How can I draw the following figure in LaTeX using tikz (if possible)?
How to draw the figure with the fruits replaced by letters or numbers?
Here you go! The matrix of nodes from the matrix library seems to be ideal for that task.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix[matrix of nodes,row sep=1em] (m)
{
$S$: & apple & apple & apple & apple & apple \\
$T$: & 1 & 2 & 3 & 4 & 5 \\
$W$: & banana & banana & banana & banana & banana \\
};
\foreach \y in {1,3} {
\foreach \x in {2,...,6} {
\draw[<->] (m-\y-\x) -- (m-2-\x);
}
}
\end{tikzpicture}
\end{document}
\includegraphics{original-image}.
– Henri Menke
Oct 28 '15 at 09:20