12.3.5 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(1)",phantom,yshift=10.0*\the\DL]%
    \arrow[from=2-2,to=3-2,"\scriptstyle(2)",phantom,xshift=-5.0*\the\DL]%
    \arrow[from=2-2,to=3-3,"\scriptstyle(3)",phantom]%
    \arrow[from=2-3,to=3-3,"\scriptstyle(4)",phantom,xshift=5.0*\the\DL]%
    \arrow[from=2-2,to=3-3,"\scriptstyle(5)",phantom,yshift=-10.0*\the\DL]%
\end{tikzcd}

will produce the following double square diagram:


Noticed something off, or have any comments? Feel free to reach out!


You can also use the contact form below: