1
我使用neosnippet
爲latex
模板創建片段。這段代碼相當長,當我嘗試展開代碼段時,我一直在收到奇怪的錯誤E745 Using a List as a Number
。Vim錯誤E745在`neosnippet`中創建`Latex`片段時'使用列表作爲數字'
以下是neovim發佈的錯誤消息。
[dein] Error occurred while executing hook: neosnippet.vim
[dein] Vim(let):E745: Using a List as a Number
Error detected while processing function <SNR>346 snippets_expand ...
Line 11
E15: invalid expression:
E15: invalid expression
實際的代碼片段本身在下面 - 它很長。現在,當我從片段文件中取出這個長片段時,所有其他片段都可以正常工作。所以它似乎在某個地方我正在使用我不應該使用的角色或什麼的。或者可能是某些東西沒有正確逃脫,等等。
我所有的其他膠乳片段都能正常工作,但也有短得多。有沒有人有任何想法,爲什麼這個片段造成這麼多麻煩?
這是乳膠片段。
\documentclass{book}
\addtolength{\topmargin}{-.5in}
\addtolength{\headsep}{.5in}
\oddsidemargin=.5in
\evensidemargin=.5in
\textwidth=5.5in
\usepackage{
amsmath,% AMS basic math stuff
amsthm,% AMS theorem defining stuff
amsfonts,% defines the blackboard bold fonts for \Z, \R, etc
longtable,% used to create the tcproof environment below
verbatim,% allows for verbatim output, and also covering up stuff in comments
xspace,% adds an extra space an the end of some commands
multicol,% allows multicolumn output
tikz,% creates the tikzpicture drawing environment
charter,% changes the default font to charter
framed,% used to color in the TIscreen environment below
bm,
mathrsfs}
\usepackage{pifont}
\usepackage[colorlinks,unicode]{hyperref}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Tau}{\bm{\mathcal{T}}}
\newcommand{\Taup}{\bm{\mathcal{T}^{\prime}}}
\newcommand{\Bp}{\mathscr{B}^{\prime}}
\newcommand{\B}{\mathscr{B}}
\newcommand{\CCp}{\mathscr{C}^{\prime}}
\newcommand{\CC}{\mathscr{C}}
\newcommand{\Ltop}{\R_{\mathscr{L}}}
\newcommand{\Ktop}{\R_{\mathscr{K}}}
\DeclareMathOperator{\lcm}{lcm}
\newcommand{\cl}[1]{[#1]}
\newcommand{\st}{\mid}
\newcommand{\eq}{\stackrel{?}{=}}
\newcommand{\divq}{\stackrel{?}{|}}
\newcommand{\forwards}{\mbox{``$\Longrightarrow$''}\xspace}
\newcommand{\backwards}{\mbox{``$\Longleftarrow$''}\xspace}
\newcommand{\define}[1]{\textbf{#1}}
\newcommand{\threeven}{pretty\xspace}
\newcommand{\throd}{normal\xspace}
\newcommand{\throve}{ugly\xspace}
\DeclareMathSymbol{\nmid}{\mathrel}{AMSb}{"2D}
\newcommand{\notdiv}{\nmid}
\renewcommand{\tilde}{\widetilde}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\def\endclass#1{\par\noindent\hrulefill\fbox{\tiny This is where we
ended on #1}\hrulefill\vskip 5pt plus 1pt\par }
\pagestyle{headings}
\makeatletter
\edef\today{%
\the\year/\[email protected]{\the\month}/\[email protected]{\the\day}}
\renewcommand{\@evenhead}{\emph{Ordinary Differential Equations - Arnold}
(v. \today)
\hfill Krishna Bhogaonker \hfill \thepage}
\renewcommand{\@oddhead}{(version \today) \hfill \thepage}
\makeatother
\DeclareMathSymbol{\varnothing}{\mathord}{AMSb}{"3F}
\renewcommand{\emptyset}{\varnothing}
\colorlet{shadecolor}{gray!35}
\newenvironment{TIscreen}
{\begin{center}\tt
\renewcommand{\in}[1]{##1\\}
\newcommand{\out}[1]{\mbox{}\hfill##1\\}
\begin{minipage}{2in}\begin{snugshade}}
{\end{snugshade}\end{minipage}\end{center}}
\newenvironment{tcproof}[1]
{\smallskip\par\begin{longtable}{@{}p{.45\textwidth}p{.45\textwidth}@{}}
\multicolumn{2}{@{}l}{\emph{#1}}\\[\smallskipamount]
Assertion & Justification \endfirsthead
Assertion & Justification \endhead
\hline }
{\end{longtable}\qed\smallskip\par}
\newtheorem{lemma}{Lemma}[section]
\newtheorem{theorem}[lemma]{Theorem}
\newtheorem{cor}[lemma]{Corollary}
\newtheorem*{scholium}{Scholium}
\theoremstyle{definition}
\newtheorem{definition}[lemma]{Definition}
\newtheorem{example}[lemma]{Example}
\newenvironment{comments}{}{}
\makeatletter
\[email protected]{hide}{scholium}[true]{\renewenvironment{scholium}{\comment}{\endcomment}}
\[email protected]{hide}{proof}[true]{\renewenvironment{proof}{\comment}{\endcomment}}
\[email protected]{hide}{lemma}[true]{\renewenvironment{lemma}{\comment}{\endcomment}}
\[email protected]{hide}{comments}[true]{\renewenvironment{comments}{\comment}{\endcomment}}
\[email protected]{hide}{cor}[true]{\renewenvironment{cor}{\comment}{\endcomment}}
\[email protected]{hide}{definition}[true]{\renewenvironment{definition}{\comment}{\endcomment}}
\[email protected]{hide}{example}[true]{\renewenvironment{example}{\comment}{\endcomment}}
\[email protected]{hide}{theorem}[true]{\renewenvironment{theorem}{\comment}{\endcomment}}
\newcommand{\HideEnvirons}[1]{\setkeys{hide}{#1}}
\[email protected]{show}{scholium}[true]{\[email protected]{hide}{scholium}{}}
\[email protected]{show}{proof}[true]{\[email protected]{hide}{proof}{}}
\[email protected]{show}{lemma}[true]{\[email protected]{hide}{lemma}{}}
\[email protected]{show}{comments}[true]{\[email protected]{hide}{comments}{}}
\[email protected]{show}{cor}[true]{\[email protected]{hide}{cor}{}}
\[email protected]{show}{definition}[true]{\[email protected]{hide}{definition}{}}
\[email protected]{show}{example}[true]{\[email protected]{hide}{example}{}}
\[email protected]{show}{theorem}[true]{\[email protected]{hide}{theorem}{}}
\newcommand{\ShowEnvirons}[1]
{\setkeys{show}{#1}\HideEnvirons{%
comments,
cor,
definition,
example,
proof,
theorem,
lemma,
scholium
}}
\makeatother
\begin{document}
\tableofcontents
\newpage
\chapter{Basic Concepts}
${0}
\end{document}