Re: Le mie (dis)avventure con TikZ

#96702
Up
0
Down
::


Tipo qualcosa del genere?

`
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,calc}
\begin{document}
\begin{tikzpicture}[font=\small,x=5mm,y=5mm]
\matrix (a)[matrix of nodes, nodes in empty cells,nodes={ text width=8mm, text depth=1mm, text centered}]{
& $1$ & $-6$ & $11$ & $-6$ \\
$1$ & & $1$ & $-5$ & \\
& $1$ & $-5$ & & \\
};
\begin{scope}[blue]
\draw(a-1-2.north west)–(a-3-1.south east);
\draw(a-2-1.south west)–(a-2-5.south east);
\draw(a-1-4.north east)–(a-3-4.south east);
\end{scope}

\draw[->,red] ($(a-2-1.center)+(0.5,0)$)–($(a-3-3.center)-(.5,0)$);
\draw[->,red] ($(a-3-3.center)+(0.5,0)$)–($(a-2-4.center)-(0.5,0)$);
\end{tikzpicture}
\end{document}
`

Go to top