独立 tikzcd:缺失{已插入

独立 tikzcd:缺失{已插入

我的org-mode latex预览下图好像有问题,tikzcd生成的源代码如下:

\documentclass[preview]{standalone}
\usepackage[usenames]{color}
% Package babel omitted
\usepackage{tikz}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usetikzlibrary{babel}
\tikzset{every path/.style={line width=1 cm}}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% Package fixltx2e omitted
\usepackage{graphicx}
\usepackage{grffile}
% Package longtable omitted
% Package wrapfig omitted
% Package rotating omitted
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
% Package capt-of omitted
% Package hyperref omitted
% Package commath omitted

\begin{document}
\definecolor{fg}{rgb}{0.396078,0.482353,0.513725}
\definecolor{bg}{rgb}{0.992157,0.964706,0.890196}

\pagecolor{bg}

{\color{fg}
\begin{tikzcd}
                                                                         &                                                    & U\times F \arrow[ld, "\phi^{-1}", bend left] \\
(f^\ast E_)V \arrow[r, "\tilde f"] \arrow[d, "\tilde \pi\vert_\cdots"] & E_U \arrow[ru, "\phi"] \arrow[d, "\pi\vert_{E_U}"] &                                              \\
V \arrow[r, "f"]                                                         & U                                                  &
\end{tikzcd}

}

\end{document}

latexmk -pdf告诉我:

! Missing { inserted.
<to be read again> 
                   \def 
l.37 \end{tikzcd}
                 
?

然而,它在在线 tikzcd 编辑器。 我做错了什么?

答案1

\vert_\cdots是错误的,正确的是\vert_{\cdots}

\documentclass{standalone}
\usepackage[usenames]{color}
\usepackage{tikz-cd}

\definecolor{fg}{rgb}{0.396078,0.482353,0.513725}
\definecolor{bg}{rgb}{0.992157,0.964706,0.890196}

\pagecolor{bg}

\begin{document}
{\color{fg}
\begin{tikzcd}
    &   & U\times F \ar[ld, "\phi^{-1}", bend left] \\
(f^\ast E)V \ar[r, "\tilde f"] % (f^\ast E_) is probably wrong
             \ar[d, "\tilde \pi \vert_{\cdots}"] % <---
    & E_U \ar[ru, "\phi"]
          \ar[d, "\pi \vert_{E_U}"] %
        &                                            \\
V \ar[r, "f"]                                                         
    & U &
\end{tikzcd}
}
\end{document}

在此处输入图片描述

相关内容