\documentclass{standalone}
\usepackage{tikz,pgf}
\usetikzlibrary{fit,scopes,arrows,calc,shapes.misc,matrix,positioning}
\begin{document}
\newcommand{\bbrect}[3]{
\pgfmathtruncatemacro\result{#1+1};
\node[rectangle,draw,fit=(A-#1-\result.north west) (A-#1-#2.south east), inner sep = 0pt] (block#3) {}
}
\begin{tikzpicture}
\ttfamily
\begin{scope}
\matrix (A) [matrix of nodes, ampersand replacement = \&] {
{0} \& {0} \& {1} \& {0} \& {1} \& {0}\\
{0} \& {0} \& {0} \& {1} \& {1} \& {1}\\
{0} \& {0} \& {0} \& {0} \& {1} \& {0}\\
{0} \& {0} \& {0} \& {0} \& {0} \& {1}\\
{0} \& {0} \& {0} \& {0} \& {0} \& {1}\\
{0} \& {0} \& {0} \& {0} \& {0} \& {0}\\
};
\end{scope}
\bbrect{1}{5}{1};
\end{tikzpicture}
\end{document}
I would like to tilt the submatrix rectangle frame created by \bbrect{1}{5}{1}
to some small degree -- with all its entries 0 1 0 1
, too. Since the matrix environment is used expressly for the purpose of aligning items, this seems near to impossible?
snakes
)? Best to keep minimal working examples, minimal.