# Commutative cube

> Two commutative squares joined into a cube, with the front edges crossing over the back. A tikz-cd example with its LaTeX source.

A tikz-cd example in the TeXeR TikZ library: https://texer.org/library/tikz-cd/commutative-cube

Package: [tikz-cd](https://texer.org/library/tikz-cd.md), on CTAN at https://ctan.org/pkg/tikz-cd.

Tags: cube, commutative diagram, crossing over

## Source

```latex
\usepackage{tikz-cd}

\begin{tikzcd}[row sep=1.6em, column sep=1.6em]
  & A' \arrow[rr] \arrow[dd] & & B' \arrow[dd] \\
  A \arrow[ur] \arrow[rr, crossing over] \arrow[dd] & & B \arrow[ur] \\
  & C' \arrow[rr] & & D' \\
  C \arrow[ur] \arrow[rr] & & D \arrow[ur] \arrow[from=uu, crossing over]
\end{tikzcd}
```

## As a complete document

The same example in a document that compiles on its own with pdfLaTeX:

```latex
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[row sep=1.6em, column sep=1.6em]
  & A' \arrow[rr] \arrow[dd] & & B' \arrow[dd] \\
  A \arrow[ur] \arrow[rr, crossing over] \arrow[dd] & & B \arrow[ur] \\
  & C' \arrow[rr] & & D' \\
  C \arrow[ur] \arrow[rr] & & D \arrow[ur] \arrow[from=uu, crossing over]
\end{tikzcd}
\end{document}
```
