如何标记交换立方体的面?

如何标记交换立方体的面?

所以我有以下交换立方体,我使用它来绘制tikz-cd

在此处输入图片描述

\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}

我想给它的脸贴上标签,例如:

  • 顶部(1)和底部(2)、右侧(3)和左侧(4)以及前部(5)和后部(6)。

我怎样才能做到这一点tikz-cd

答案1

你必须使用“幻影”箭,就像

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

在以下 MWE 中,我添加了 (1)、(2)、(3) 和 (4)。我不知道将 (5) 和 (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} 

在此处输入图片描述

相关内容