I have the following 2 matrix. If I do that:
\documentclass{article}
\usepackage{amsmath}
\usepackage[usenames,dvipsnames]{xcolor}
\newcommand\x{\times}
% requires version 0.3 of the package
\usepackage[customcolors]{hf-tikz}
\tikzset{style EstiloRojo/.style={
set fill color=red!35!,
set border color=MidnightBlue,
},
style EstiloAzul/.style={
set fill color=MidnightBlue!35!,
set border color=red,
},
hor/.style={
above left offset={-0.15,0.35},
below right offset={0.15,-0.160},
#1
},
ver/.style={
above left offset={-0.1,0.4},
below right offset={0.15,-0.20},
#1
}
}
\begin{document}
\begin{equation}\label{eq:appendcol}
\left(\begin{array}{cccc}
\tikzmarkin[ver=style red]{col 1}\x & \x & \tikzmarkin[ver=style red]{col 2} \x & \x \\
0 & \x & \x & \x \\
0 & 0 & \x & \x \\
0 & 0 & 0 & \x \\
a \tikzmarkend{col 1} & b & c \tikzmarkend{col 2} & d \\
\end{array}\right)
\end{equation}
\begin{equation}\label{eq:appendcol}
\left(\begin{array}{cccc}
\tikzmarkin[ver=style red]{col 1}\x & \x & \tikzmarkin[ver=style red]{col 2} \x & \x \\
0 & \x & \x & \x \\
0 & 0 & \x & \x \\
0 & 0 & 0 & \x \\
a \tikzmarkend{col 1} & b & c \tikzmarkend{col 2} & d \\
\end{array}\right)
\end{equation}
\end{document}
Vertical highlighting continues from first matrix to second, invading the space between them. The result:

How can I solve it? Thank you for your help.
