I'm using tikz to make an array with arrows connecting different cells in order to explain how to get one cell using the others.
The problem is that the arrows are far to small to be visible.
I also don't understand why the size of the arrows depends on the line.
I would really appreciate if anyone could explain me how to improve my code to make it look better.
Here's the code :
\begin{tikzpicture}
\draw[xstep=3cm,ystep=1.05cm,color=gray] (0,0) grid (18,6.3);
\matrix (magic) [matrix of nodes,
inner sep=0pt,
anchor=south west,
nodes={inner sep=0pt,text width=3cm,align=center,minimum height=1cm}]
{
& $\epsilon$ & A & B & C & D \\
$\epsilon$ & 0 & 1 & 2 & 3 & 4 \\
D & 1 & 1 & 2 & 3 & 3 \\
A & 2 & 1 & 2 & 3 & 4 \\
B & 3 & 2 & 1 & 2 & 3 \\
C & 4 & 3 & 2 & 1 & 2 \\
};
\draw[thick,black,->] (magic-2-2) -- (magic-3-3);
\draw[thick,black,->] (magic-2-3) -- (magic-3-4);
\draw[thick,black,->] (magic-3-3) -- (magic-3-4);
\draw[thick,black,->] (magic-2-4) -- (magic-3-5);
\draw[thick,black,->] (magic-3-4) -- (magic-3-5);
\draw[thick,red,->] (magic-2-5) -- (magic-3-6);
\draw[thick,red,->] (magic-3-2) -- (magic-4-3);
\draw[thick,black,->] (magic-3-3) -- (magic-4-4);
\draw[thick,black,->] (magic-4-3) -- (magic-4-4);
\draw[thick,black,->] (magic-3-4) -- (magic-4-5);
\draw[thick,black,->] (magic-4-4) -- (magic-4-5);
\draw[thick,black,->] (magic-3-5) -- (magic-4-6);
\draw[thick,black,->] (magic-3-6) -- (magic-4-6);
\draw[thick,black,->] (magic-4-5) -- (magic-4-6);
\draw[thick,black,->] (magic-4-3) -- (magic-5-3);
\draw[thick,red,->] (magic-4-3) -- (magic-5-4);
\draw[thick,black,->] (magic-5-4) -- (magic-5-5);
\draw[thick,black,->] (magic-5-5) -- (magic-5-6);
\draw[thick,black,->] (magic-5-3) -- (magic-6-3);
\draw[thick,black,->] (magic-5-4) -- (magic-6-4);
\draw[thick,red,->] (magic-5-4) -- (magic-6-5);
\draw[thick,black,->] (magic-6-5) -- (magic-6-6);
\end{tikzpicture}
Please forgive me if my english isn't perfect or if the code isn't clear (I'm not english and I use latex for a short time).
Thanks a lot !
\documentclass
and the appropriate packages so that those trying to help don't have to recreate it. This is especially important fortikz
as there are numerous libraries.