14.1.7 Double Square Diagram
Define
\newlength{\DL}
\setlength{\DL}{0.9cm}
The code
\begin{tikzcd}[row sep={10.0*\the\DL,between origins}, column sep={10.0*\the\DL,between origins}, background color=backgroundColor, ampersand replacement=\&]
\bullet
\&
\&
\&
\bullet
\\
\&
\bullet
\&
\bullet
\&
\\
\&
\bullet
\&
\bullet
\&
\\
\bullet
\&
\&
\&
\bullet
% Arrows
% Outer Square
\arrow[from=1-1,to=1-4]%
\arrow[from=1-4,to=4-4]%
%
\arrow[from=1-1,to=4-1]%
\arrow[from=4-1,to=4-4]%
% Inner Square
\arrow[from=2-2,to=2-3]%
\arrow[from=2-3,to=3-3]%
%
\arrow[from=2-2,to=3-2]%
\arrow[from=3-2,to=3-3]%
% Connecting Arrows
\arrow[from=1-1,to=2-2]%
\arrow[from=1-4,to=2-3]%
\arrow[from=3-2,to=4-1]%
\arrow[from=3-3,to=4-4]%
% Subdiagrams
\arrow[from=2-2,to=3-3,"\scriptstyle\left(1\right)",phantom,yshift=10.0*\the\DL]%
\arrow[from=2-2,to=3-2,"\scriptstyle\left(2\right)",phantom,xshift=-5.0*\the\DL]%
\arrow[from=2-2,to=3-3,"\scriptstyle\left(3\right)",phantom]%
\arrow[from=2-3,to=3-3,"\scriptstyle\left(4\right)",phantom,xshift=5.0*\the\DL]%
\arrow[from=2-2,to=3-3,"\scriptstyle\left(5\right)",phantom,yshift=-10.0*\the\DL]%
\end{tikzcd}
will produce the following double square diagram: