6

So I have the following commutative cube, which I draw using tikz-cd:

enter image description here

\documentclass{article}

\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[row sep=2.5em]
A \arrow[rr,"f"] \arrow[dr,swap,"a"] \arrow[dd,swap,"h"] &&
  B \arrow[dd,swap,"h'" near start] \arrow[dr,"b"] \\
& A' \arrow[rr,crossing over,"f'" near start] &&
  B' \arrow[dd,"k'"] \\
C \arrow[rr,"g" near end] \arrow[dr,swap,"c"] && D \arrow[dr,swap,"d"] \\
& C' \arrow[rr,"g'"] \arrow[uu,<-,crossing over,"k" near end]&& D'
\end{tikzcd}

\end{document}

And I want to label its faces, for example:

  • top (1) and bottom (2), right (3) and left (4) and front (5) and back (6).

How can I do this in tikz-cd?

1
  • 1
    For readability, I suggest you to label faces on a separate image.
    – svavil
    Commented May 14, 2017 at 12:22

1 Answer 1

7

You have to use "phantom" arrows as in

\arrow[drrr,phantom,"\alpha"]

In the following MWE I've added (1), (2), (3) and (4). I wouldn't know where to place (5) and (6)....

\documentclass{article}

\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[row sep=2.5em]
A \arrow[rr,"f"] \arrow[dr,swap,"a"] \arrow[dd,swap,"h"] \arrow[drrr,phantom,"\alpha"] \arrow[dddr,phantom,"\gamma"] &&
  B \arrow[dd,swap,"h'" near start] \arrow[dr,"b"] \arrow[dddr,phantom,"\delta"] \\
& A' \arrow[rr,crossing over,"f'" near start] &&
  B' \arrow[dd,"k'"] \\
C \arrow[rr,"g" near end] \arrow[dr,swap,"c"] \arrow[drrr,phantom,"\beta"] && D \arrow[dr,swap,"d"] \\
& C' \arrow[rr,"g'"] \arrow[uu,<-,crossing over,"k" near end]&& D'
\end{tikzcd}

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .