Tikzcd 错误 - 缩小到一个特定的单元格

Tikzcd 错误 - 缩小到一个特定的单元格

我尝试在下面运行,但一直出现以下错误。如果您发现任何问题,请告诉我。从 U \times F 出来的箭头似乎是问题所在,因为如果没有这些箭头,图表运行良好,但无论是否带有标签,放入其中任何一个都会让我出错。

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd}

\begin{document}
    
    \begin{center}
        
        \begin{tikzcd}[column sep=scriptsize]
            
            E' \arrow[r, "\tilde f"] \arrow[d, "\pi'"] & E \arrow[d, "\pi"] && U \times F \arrow[l, "\phi^{-1}"] \arrow[dl, "\pr"] \arrow[r, "\pr_2"]  &&&F \\
            
            X' \arrow[r, "f"] & X && {} &&& {}
            
        \end{tikzcd}
        
    \end{center}
    
\end{document}
Overfull \hbox (12.25192pt too wide) in paragraph at lines 37--38
[]\OT1/cmr/m/n/10 We see im-me-di-ately that each col-umn is or-thog-o-nal to $
(\OML/cmm/m/it/10 x[]; []  ; x[]; []\OT1/cmr/m/n/10 )$
[2] [3] [4]

! Package pgf Error: No shape named `tikz@f@2-1-3' is known.

See the pgf package documentation for explanation.
Type  H <return>  for immediate help
l.70 I think the culprit is a tikzcd arrow in cell 1-4.
\errmessage ...currentrow -\tikzcd@currentcolumn }
                                                  
l.72 \end{tikzcd}

答案1

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{cd}
\begin{document}
\begin{tikzcd}[nodes in empty cells]
E' \arrow[r, "\tilde f"] \arrow[d, "\pi'"] & E \arrow[d, "\pi"] & & U \times F \arrow[l, "\phi^{-1}"] \arrow[dl, "pr"] \arrow[r, "pr_2"]  & & & F\\            
X' \arrow[r, "f"] & X & & & & &              
\end{tikzcd}    
\end{document}

交换图

答案2

你跳得太多了。

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd}

\newcommand{\pr}{\mathrm{pr}}

\begin{document}

\[
\begin{tikzcd}[column sep=large]
  E' \arrow[r, "\tilde f"] \arrow[d, "\pi'"] &
  E \arrow[d, "\pi"] &
  U \times F \arrow[l, "\phi^{-1}"'] \arrow[dl, "\pr"] \arrow[r, "\pr_2"]  &
  F \\
  X' \arrow[r, "f"] & X
\end{tikzcd}
\]

\end{document}

对于中间顶部箭头,我通过在标签后添加来交换位置'。列分隔符似乎太小,您可能还想增加行分隔符。

在此处输入图片描述

相关内容