更新 MikTex 后出现错误“未定义的控制序列。\begin{document}”

更新 MikTex 后出现错误“未定义的控制序列。\begin{document}”

我的主要问题如下:(i) 在我更新 MikTex 软件包之前,tex 完全可以正常工作。(ii) 今天更新 MikTex 后,我的 tex 文件中出现此错误。(iii) 我发现在检查更新后 MikTex 中有一个提醒。请参阅附件中的快照。(iii) 我正在使用 TeXstudio。

在此处输入图片描述

.tex 中的源文本如下:

\documentclass[journal]{new-aiaa}
%\documentclass[journal]{new-aiaa} for journal papers
\usepackage[utf8]{inputenc}

\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[version=4]{mhchem}
\usepackage{siunitx}
\usepackage{longtable,tabularx}
\usepackage{multirow}
\usepackage{xcolor}
\setlength\LTleft{0pt} 

\title{Hello world}

\author{Hello World\footnote{{Hello World}}}
\affil{Hello World}

\begin{document}

\maketitle

\begin{abstract}
Hello World.
\end{abstract}

Hello World.

\end{document}

有人能帮我解决这个问题吗?提前谢谢了。

\ProvidesClass{new-aiaa}[2018/01/10, v1.2]

\newif\if@conf
\newif\if@journal
\DeclareOption{conf}{\@conftrue}
\DeclareOption{journal}{\@journaltrue}

\ExecuteOptions{}
\ProcessOptions\relax
\LoadClass[10pt]{article}

\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage{microtype}
\RequirePackage{newtxtext,newtxmath}

\RequirePackage[letterpaper,margin=1in]{geometry}
\RequirePackage{enumitem}
\setlist{labelindent=\parindent,leftmargin=*,nosep}
\setlist[enumerate]{label={\arabic*)}}

\RequirePackage[symbol*]{footmisc}

\RequirePackage{setspace}
\if@conf
\fi
\if@journal
  \doublespacing
\fi

\RequirePackage[style]{abstract}
\renewcommand{\abstitlestyle}[1]{}
\renewcommand{\abstracttextfont}{\bfseries\normalsize}
\setlength{\absleftindent}{0.5in}
\setlength{\absrightindent}{0.5in}


\RequirePackage[blocks]{authblk}
\renewcommand{\Authfont}{\normalsize\upshape}
\renewcommand{\Affilfont}{\normalsize\itshape}
\setlength{\affilsep}{0pt}

\renewcommand{\maketitle}{%
  \begingroup
  \renewcommand\and{\\[\baselineskip]}
  \centering\singlespacing
  {\LARGE\bfseries\@title\par}
  \vskip2\baselineskip
  \@author\par
  \endgroup
  \vskip\baselineskip
  \if@journal
    \thispagestyle{empty}
  \fi
  \setcounter{footnote}{0}
}


\RequirePackage[explicit]{titlesec}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\thesection.\Alph{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\titleformat{\section}
  {\large\bfseries\singlespacing\centering}
  {\thesection.\space}{0pt}{#1}[]
\titlespacing{\section}{0pt}{0.5\baselineskip}{0pt}
\titleformat{\subsection}
  {\normalsize\bfseries\singlespacing}
  {\Alph{subsection}.\space}{0pt}{#1}[]
\titlespacing{\subsection}{0pt}{0.5\baselineskip}{0pt}
\titleformat{\subsubsection}
  {\normalsize\itshape\singlespacing}
  {\arabic{subsubsection}.\space}{0pt}{#1}[]
\titlespacing{\subsubsection}{0pt}{0.5\baselineskip}{0pt}

\RequirePackage{lettrine}
\setlength{\DefaultNindent}{0pt}

\RequirePackage[tableposition=top]{caption}
\renewcommand{\figurename}{Fig.}
\captionsetup*{font=bf,labelsep=quad}
\renewcommand{\arraystretch}{1.2}

\RequirePackage[indentfirst=false,font+=small,leftmargin=0.4in,rightmargin=0pt,vskip=0pt]
{quoting}

\setlength{\abovedisplayskip}{\baselineskip}
\setlength{\belowdisplayskip}{\baselineskip}
\setlength{\abovedisplayshortskip}{\baselineskip}
\setlength{\belowdisplayshortskip}{\baselineskip}

\RequirePackage[sort&compress,numbers]{natbib}
% \bibliographystyle{aiaa}
\bibliographystyle{new-aiaa}
\renewcommand{\bibfont}{\small}

\RequirePackage[hyphens]{url}
\RequirePackage{hyperref}

日志文件太长,无法显示完整。我包括了错误部分:

Package chemgreek Info: Activating mapping `newtx' on line 19.


! Undefined control sequence.
<argument> \LaTeX3 error: 
                           Use \cs_prefix_spec:N not \token_get_prefix_spec:...
l.19 \begin{document}
                     
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \LaTeX3 error: 
                           Use \cs_prefix_spec:N not \token_get_prefix_spec:...
l.19 \begin{document}
                     
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \LaTeX3 error: 
                           Use \cs_prefix_spec:N not \token_get_prefix_spec:...
l.19 \begin{document}
                     
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \LaTeX3 error: 
                           Use \cs_prefix_spec:N not \token_get_prefix_spec:...
l.19 \begin{document}
                     
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


(C:\Users\kk\AppData\Local\Programs\MiKTeX 2.9\tex/latex/siunitx.tds/tex/
latex/siunitx\siunitx-abbreviations.cfg
File: siunitx-abbreviations.cfg 2017/11/26 v2.7k siunitx: Abbreviated units
)
(C:\Users\kk\AppData\Local\Programs\MiKTeX 2.9\tex/latex/translator\trans
lator-basic-dictionary-English.dict
Dictionary: translator-basic-dictionary, Language: English 
)
LaTeX Font Info:    Trying to load font information for OT1+ntxtlf on input lin
e 19.

抱歉,日志数据太长,无法显示。请从test.log的下载链接查看完整日志: 测试日志

我找不到在哪里切换 MikTex 的用户模式和管理员模式。请查看我的 MikTex 的快照:

在此处输入图片描述

相关内容