最近在使用acmart-primary的sample-sigconf.tex模版时,编译文档总是会出现这个问题。
sample-sigconf.tex 中的代码示例如下:
\begin{document}
\title{The Name of the Title is Hope}
\author{Ben Trovato}
.
.
.
\begin{abstract}
...
\end{abstract}
\begin{CCSXML}
...
\end{CCSXML}
\ccsdesc[500]{...}
\keywords{...}
\begin{teaserfigure}
\end{teaserfigure}
\maketitle
而acmart.pdf的官方文档中saveabstract的定义如下
\@saveabstract And saving the abstract
1554 \long\def\@saveabstract#1{\if@ACM@maketitle@typeset
1555 \ClassError{\@classname}{Abstract must be defined before maketitle
1556 command. Please move it!}\fi
1557 \long\gdef\@abstract{#1}}
1558 \@saveabstract{}
可以看出,sample-sigconf.tex中abstract确实是定义在maketitle前的。
后来根据stackexchange中的回答,将\begin{document}置于\maketitle前,可以解决这个问题