Encontré un error extraño en latex
el pdflatex
compilador que usa la plantilla ACM (versión 2.1).
Aquí están los 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'.
Resulta en el error en el título:
Error de acmart de clase: No hay ningún país presente para una afiliación.
Sin embargo, como puede ver en los códigos anteriores, todos los autores han marcado su país. ¿Cómo resolver este problema?
Respuesta1
La clase no espera un entorno ni ninguna otra agrupación en torno a los comandos autor y maketitle. Se reinicia en \maketitle
el comando de verificación para vaciar, pero solo localmente, por lo que al final del grupo esto se reinicia y genera un error.
Añadir \makeatletter \gdef\@ACM@checkaffil{} \makeatother
después \maketitle
.
Respuesta2
La acmart
clase de documento parece ser incompatible con el CJKutf8
paquete. De hecho, la ACMlista de paquetes aceptadosincluye CJK
perono CJKutf8
. Comentar el CJK*
entorno en el código de su plantilla resuelve su error.