如何让 acmart 停止抱怨附属国缺失?

如何让 acmart 停止抱怨附属国缺失?

由于我们的论文有很多作者,我尝试尽可能地减少论文首页的元数据。因此,我想保留姓名和大学(每个作者两行),并删除电子邮件和国家/地区部分。但是,缺少国家/地区字段会引发错误。有没有办法抑制此错误?

感谢您的帮助

答案1

根据安装和用户指南

字段\institution\city\country是必填字段。如果未提供,则会发出错误或警告。目前缺少\country和 会产生错误;ACM 将来可能会更改此设置。

我建议将错误降级为警告。这将使用日志文件中的警告完成编译。

\documentclass[options]{acmart}在您的文档中添加此代码。

\makeatletter
\def\@ACM@checkaffil{% Only warnings
    \if@ACM@instpresent\else
    \ClassWarningNoLine{\@classname}{No institution present for an affiliation}%
    \fi
    \if@ACM@citypresent\else
    \ClassWarningNoLine{\@classname}{No city present for an affiliation}%
    \fi
    \if@ACM@countrypresent\else
        \ClassWarningNoLine{\@classname}{No country present for an affiliation}%
    \fi
}
\makeatother

此代码可让您测试其功能。

\documentclass[acmsmall]{acmart}

\makeatletter
\def\@ACM@checkaffil{% Only warnings <<<<<<<<<<<<<<<<
    \if@ACM@instpresent\else
    \ClassWarningNoLine{\@classname}{No institution present for an affiliation}%
    \fi
    \if@ACM@citypresent\else
    \ClassWarningNoLine{\@classname}{No city present for an affiliation}%
    \fi
    \if@ACM@countrypresent\else
        \ClassWarningNoLine{\@classname}{No country present for an affiliation}%
    \fi
}
\makeatother


\setcopyright{acmcopyright}
\copyrightyear{2018}
\acmYear{2018}
\acmDOI{XXXXXXX.XXXXXXX}

\acmJournal{JACM}
\acmVolume{37}
\acmNumber{4}
\acmArticle{111}
\acmMonth{8}

\begin{document}

\title{The Name of the Title is Hope}

%%% used to denote shared contribution to the research.
\author{Ben Trovato}
\authornote{Both authors contributed equally to this research.}
\email{[email protected]}
\orcid{1234-5678-9012}
\author{G.K.M. Tobin}
\authornotemark[1]
\email{[email protected]}
\affiliation{%
  \institution{Institute for Clarity in Documentation}
  \streetaddress{P.O. Box 1212}
  \city{Dublin}
  \state{Ohio}
%  \country{USA} 
  \postcode{43017-6221}
}

\author{Lars Th{\o}rv{\"a}ld}
\affiliation{%
  \institution{The Th{\o}rv{\"a}ld Group}
  \streetaddress{1 Th{\o}rv{\"a}ld Circle}
  \city{Hekla}
%  \country{Iceland}
}
\email{[email protected]}


\begin{abstract}
  A clear and well-documented \LaTeX\ document is presented as an
  article formatted for publication by ACM in a conference proceedings
  or journal publication. Based on the ``acmart'' document class, this
  article presents and explains many of the common variations, as well
  as many of the formatting elements an author may use in the
  preparation of the documentation of their work.
\end{abstract}

\maketitle

\section{Introduction}
ACM's consolidated article template, introduced in 2017, provides a
consistent \LaTeX\ style for use across ACM publications, and
incorporates accessibility and metadata-extraction functionality
necessary for future Digital Library endeavors. Numerous ACM and
SIG-specific \LaTeX\ templates have been examined, and their unique
features incorporated into this single new template.

\end{document}

答案2

一个更简单的解决方案是添加\country{}隶属关系但保持正文为空(如果您不想添加国家/地区)。本例中的隶属关系如下所示。

\affiliation{
  \institution{Institute for Clarity in Documentation}
  \country{} 
}

相关内容