Liverpool” post=66118Che ne dici di questa modifica al tuo codice?
`
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,backgrounds}
\begin{document}
\begin{tikzpicture}
\tikzset{mycolor/.style = {opacity=.4,line width=4 mm,line cap=round,color=#1}}
\matrix[matrix of math nodes,left delimiter=(,right delimiter=)]
{
\node(a) {0}; & \node{1}; & \node {0}; &\node {0};\\
\node {0}; & \node{1}; & \node {1}; &\node {1};\\
\node(c) {1}; & \node{1}; & \node {1}; &\node (d){0};\\
\node(b) {0}; & \node{1}; & \node {0}; &\node {0};\\
};\begin{pgfonlayer}{background}
\draw[mycolor=red!45] (a.north)–(b.south);
\draw[mycolor=red!45] (c.west)–(d.east);
\end{pgfonlayer}
\end{tikzpicture}
\end{document}`
N.B.: richiede \usetikzlibrary{backgrounds} nel preamboloCiao
Dico che è decisamente migliore, grazie :smile:. La leggibilità aumenta un sacco.
Ciao
Claudio