我正在尝试使用 MDPI 期刊 latex 模板,但是,关于包“array”,我不断出现此错误“扫描 @newenv. \RequirePackage 的使用时文件结束”。我检查后发现它现在包含在“latex-tools”中,我安装了包“latex-tools”。但是它并没有解决问题,请问我该怎么做才能解决这个问题?
https://www.mdpi.com/data/MDPI_template.zip?v=20221213
以下是 .cls 代码的一部分
%% IDENTIFICATION \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{Definitions/mdpi}[09/12/2022 MDPI paper class]
%% PRELIMINARY DECLARATIONS \LoadClass[10pt,a4paper]{article}
\RequirePackage[T1]{fontenc} \RequirePackage[utf8]{inputenc}
\RequirePackage{calc} \RequirePackage{indentfirst}
\RequirePackage{fancyhdr} \RequirePackage{graphicx,epstopdf}
\RequirePackage{lastpage} \RequirePackage{ifthen}
\RequirePackage[right]{lineno} \RequirePackage{float}
\RequirePackage{amsmath} \RequirePackage{array} % For table array
\RequirePackage{tabularx} \RequirePackage{amssymb} % For math
environment bold format \RequirePackage{setspace}
\RequirePackage{enumitem} \RequirePackage{mathpazo}
\RequirePackage{booktabs} % For \toprule etc. in tables
\RequirePackage{titlesec} \RequirePackage{etoolbox} % For
\AtBeginDocument etc. \RequirePackage{tabto} % To use tab for
alignment on first page \RequirePackage{xcolor, colortbl} % To provide
color for soul (for english editing), for adding cell color of table
\RequirePackage{soul} % To highlight text
\newcommand{\highlighting}[1]{\colorbox{yellow}{#1}}
\RequirePackage{multirow} \RequirePackage{microtype} % For command
\textls[]{} \RequirePackage{tikz} % For \foreach used for Orcid icon
\RequirePackage{totcount} % To enable extracting the value of the
counter "page" \RequirePackage{changepage} % To adjust the width of
the column for the title part and figures/tables (adjustwidth
environment) \RequirePackage{attrib} % For XML2PDF use \tag{} for
equation \RequirePackage{upgreek} % For making greek letters not
italic \RequirePackage{pbox} % For biography environment
\RequirePackage{ragged2e} % For command \justifying
\RequirePackage[]{tocloft} % For dots in TOC. If subfigure package is
loaded, the subfigure option needs to be added here to avoid clash:
\RequirePackage[subfigure]{tocloft} \RequirePackage{marginnote} % For
left column \reversemarginpar % To have the left column on the left
side \RequirePackage{marginfix} % For command \clearmargin for
manually moving the left column to the next page
\RequirePackage{enotez} % For endnotes
%% MORE DECLARATIONS
%%%% Maths environments \RequirePackage{amsthm}
\newtheoremstyle{mdpi}% name {12pt}% space above {12pt}% space below
{\itshape}% body font {}% indent amount 1 {\bfseries}% theorem head
font {.}% punctuation after theorem head {.5em}% space after theorem
head {}% theorem head spec (can be left empty, meaning `normal')
\renewcommand{\qed}{\unskip\nobreak\quad\qedsymbol} %% This places the
symbol right after the text instead of placing it at the end on the
line.
\renewenvironment{proof}[1][\proofname]{\par %% \proofname allows to
have "Proof of my theorem" \pushQED{\qed}% \normalfont
\topsep6\p@\@plus6\p@\relax \trivlist \item[\hskip\labelsep
\bfseries %% "Proof" is bold
#1\@addpunct{.}]\ignorespaces %% Period instead of colon }{% \popQED\endtrivlist\@endpefalse }
\theoremstyle{mdpi} \newcounter{theorem} \setcounter{theorem}{0}
\newtheorem{Theorem}[theorem]{Theorem} \newcounter{lemma}
\setcounter{lemma}{0} \newtheorem{Lemma}[lemma]{Lemma}
\newcounter{corollary} \setcounter{corollary}{0}
\newtheorem{Corollary}[corollary]{Corollary}
\newcounter{proposition} \setcounter{proposition}{0}
\newtheorem{Proposition}[proposition]{Proposition}
\newcounter{characterization} \setcounter{characterization}{0}
\newtheorem{Characterization}[characterization]{Characterization}
\newcounter{property} \setcounter{property}{0}
\newtheorem{Property}[property]{Property} \newcounter{problem}
\setcounter{problem}{0} \newtheorem{Problem}[problem]{Problem}
\newcounter{example} \setcounter{example}{0}
\newtheorem{Example}[example]{Example}
\newcounter{examplesanddefinitions}
\setcounter{examplesanddefinitions}{0}
\newtheorem{ExamplesandDefinitions}[examplesanddefinitions]{Examples
and Definitions} \newcounter{remark} \setcounter{remark}{0}
\newtheorem{Remark}[remark]{Remark} \newcounter{definition}
\setcounter{definition}{0}
\newtheorem{Definition}[definition]{Definition}
\newcounter{hypothesis} \setcounter{hypothesis}{0}
\newtheorem{Hypothesis}[hypothesis]{Hypothesis}
\newcounter{notation} \setcounter{notation}{0}
\newtheorem{Notation}[notation]{Notation} \newcounter{assumption}
\setcounter{assumption}{0}
\newtheorem{Assumption}[assumption]{Assumption}
\newcounter{algorithm} \setcounter{algorithm}{0}
\newtheorem{Algorithm}[algorithm]{Algorithm} % Define left/right
mark in math environment \let\originalleft\left
\let\originalright\right
\renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft}
\renewcommand{\right}{\aftergroup\egroup\originalright
}