Encontrei um bug estranho no latex
compilador pdflatex
usando o modelo ACM (versão 2.1).
Aqui estão os códigos:
%%
%% This is file `sample-acmsmall.tex',
%% generated with the docstrip utility.
%%
\documentclass[acmsmall]{acmart}
%%
%% \BibTeX command to typeset BibTeX logo in the docs
\AtBeginDocument{%
\providecommand\BibTeX{{%
Bib\TeX}}}
\usepackage{CJKutf8}
% code listing
\usepackage{minted}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{enumitem}
\newlist{tabitem}{itemize}{1} % <-- defined new list
\setlist[tabitem]{nosep, % <-- new list setup
leftmargin=*,
label=$\bullet$,
after=\vspace{-\baselineskip},
}
\usepackage{booktabs}
% text box
\usepackage{tcolorbox}
\tcbuselibrary{breakable}
\tcbset{%any default parameters
width=0.95\textwidth,
halign=justify,
center,
breakable,
colback=white
}
%%
%% end of the preamble, start of the body of the document source.
\begin{document}
\begin{CJK*}{UTF8}{gbsn}
%%
%% The "title" command has an optional parameter,
%% allowing the author to define a "short title" to be used in page headers.
\title{My Paper Title}
%%
%% The "author" command and its associated commands are used to define
%% the authors and their affiliations.
%% Of note is the shared affiliation of the first two authors, and the
%% "authornote" and "authornotemark" commands
%% used to denote shared contribution to the research.
\author{Author 1}
\affiliation{%
\institution{My University}
\streetaddress{My Street}
\city{Hong Kong}
\country{China}}
\email{[email protected]}
\author{Author 2}
\affiliation{%
\institution{My University}
\streetaddress{My Street}
\city{Hong Kong}
\country{China}}
\email{[email protected]}
\author{Author 3}
\affiliation{%
\institution{My University}
\streetaddress{My Street}
\city{Hong Kong}
\country{China}}
\email{[email protected]}
\author{Author 4}
\affiliation{%
\institution{My University}
\streetaddress{My Street}
\city{Hong Kong}
\country{China}}
\email{[email protected]}
\orcid{1234-5678-9012-3456}
%%
%% By default, the full list of authors will be used in the page
%% headers. Often, this list is too long, and will overlap
%% other information printed in the page headers. This command allows
%% the author to define a more concise list
%% of authors' names for this purpose.
\renewcommand{\shortauthors}{Authors et al.}
%%
%% The abstract is a short summary of the work to be presented in the
%% article.
\begin{abstract}
Abstract here
\end{abstract}
%%
%% This command processes the author and affiliation and title
%% information and builds the first part of the formatted document.
\maketitle
%%
%% The next two lines define the bibliography style to be used, and
%% the bibliography file.
\bibliographystyle{ACM-Reference-Format}
\bibliography{sample-base}
\end{CJK*}
\end{document}
\endinput
%%
%% End of file `sample-acmsmall.tex'.
Isso resulta no erro no título:
Erro de classe acmart: Nenhum país presente para uma afiliação.
Porém, como você pode ver nos códigos acima, todos os autores marcaram seu país. Como resolver este problema?
Responder1
A classe não espera um ambiente ou algum outro agrupamento em torno dos comandos author e maketitle. Ele é redefinido no \maketitle
comando de verificação para vazio, mas apenas localmente e, portanto, no final do grupo, isso é redefinido e leva a um erro.
Adicione \makeatletter \gdef\@ACM@checkaffil{} \makeatother
depois \maketitle
.
Responder2
A acmart
classe do documento parece ser incompatível com o CJKutf8
pacote. Na verdade, a ACMlista de pacotes aceitosinclui CJK
masnão CJKutf8
. Comentar o CJK*
ambiente no código do seu modelo resolve o seu erro.