如何擴展此箭頭並更改標籤的位置

如何擴展此箭頭並更改標籤的位置

我有使用以下程式碼的下圖

\begin{tikzcd}
\phi\times\psi\times\theta \arrow[r,"_{X_{p}}{\circ}_{Y_q}\times \Id"]
\arrow[d,"\cong"]
&
(\phi _{X_p}\circ _{Y_q}\psi)\times \theta\arrow[d]
\\
\phi\times \theta \times \psi \arrow[d,"_{X_r}\circ_{Z_t}\times \Id"']
&
\arrow[d,phantom]
\\
(\phi _{X_r}\circ_{Z_t})\times \psi\arrow[r,"(\phi_{X_r}\circ_{Z_t}\theta)_{X_p}\circ_{Y_q}\psi"]
&
(\phi_{X_p}\circ_{Y_q}\psi)_{X_r}\circ_{Z_t}\theta
\end{tikzcd}

在此圖中,您可以看到其中一個箭頭並未一直向下到達右下角(這就是我想要的位置)。我們也可以看到圖表底部的標籤離箭頭太近。我想把它再往下移一點。

看來我必須在 (2,2) 節點有一些東西,否則 Latex 甚至不會編譯該圖。因此我放置了幻影箭頭。我的交換圖的圖片如下。

我的圖表的圖片

答案1

應用column sep = 80row sep = 30不應用\hspace

    \documentclass[]{standalone}
    \usepackage{tikz-cd}
    \begin{document}
    \begin{tikzcd} [column sep = 80, row sep = 30]
       \phi\times\psi\times\theta \arrow[d,"\cong"] \arrow[r,"{X_p}{\circ}_{Y_q}\times Id"] &
       (\phi _{X_p}\circ _{Y_q}\psi)\times \theta\arrow[dd] \\ 
       \phi\times\psi\times\psi \arrow[d,"X_r{\circ}_{Z_t}\times Id"']  &  \\
       (\phi _{X_r}\circ_{Z_t})\times \psi \ar[r,"(\phi_{X_r}\circ_{Z_t}\theta)_{X_p}\circ_{Y_q}\psi"]
     & (\phi_{X_p}\circ_{Y_q}\psi)_{X_r}\circ_{Z_t}\theta
    \end{tikzcd}
    \end{document}

在此輸入影像描述

答案2

只需使用\arrow[dd](無需\arrow[d,phantom])。

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator\Id{Id}
\usepackage{tikz}
\usetikzlibrary{cd}
\begin{document}
\begin{tikzcd}
\phi\times\psi\times\theta \arrow[r,"_{X_{p}}{\circ}_{Y_q}\times \Id"] \arrow[d,"\cong"]          & (\phi _{X_p}\circ _{Y_q}\psi)\times \theta\arrow[dd] \\
\phi\times \theta \times \psi \arrow[d,"_{X_r}\circ_{Z_t}\times \Id"']                            &                                                      \\
(\phi _{X_r}\circ_{Z_t})\times \psi\arrow[r,"(\phi_{X_r}\circ_{Z_t}\theta)_{X_p}\circ_{Y_q}\psi"] & (\phi_{X_p}\circ_{Y_q}\psi)_{X_r}\circ_{Z_t}\theta   \\
\end{tikzcd}
\end{document}

在此輸入影像描述

答案3

\arrow[dd]命令取自 Henri Menke 的回答,我曾經用來shorten更改箭頭的長度並\hspace*{}更改文字的水平位置,以使外觀更好。

  \documentclass[a4paper,10pt]{article}
  \usepackage{tikz-cd}
  \begin{document}
  \begin{tikzcd}
  \phi\times\psi\times\theta \arrow[d,"\cong"] \arrow[r,"{X_p}{\circ}_{Y_q}\times Id"] &  (\phi _{X_p}\circ _{Y_q}\psi)\times \theta\arrow[dd] \\ 
 \phi\times\psi\times\psi \arrow[d,"X_r{\circ}_{Z_t}\times Id"']  &  \\
  (\phi _{X_r}\circ_{Z_t})\times \psi \ar[r,shorten >=- 1.7cm,"\hspace*{1.4cm}(\phi_{X_r}\circ_{Z_t}\theta)_{X_p}\circ_{Y_q}\psi"]
  & \hspace*{1.7cm}(\phi_{X_p}\circ_{Y_q}\psi)_{X_r}\circ_{Z_t}\theta
 \end{tikzcd}

  \end{document}

在此輸入影像描述

相關內容