使用 ACM 模板 - acmsmall 版本 2.1(撰写本文时的最新版本),ACM 上传系统不支持 XeTeX 编译器;仅支持 LaTeX 编译器。
这是我的代码(最小版本):
\documentclass[acmsmall]{acmart}
\AtBeginDocument{%
\providecommand\BibTeX{{%
Bib\TeX}}}
\usepackage{xeCJK}
\setCJKmainfont{Noto Serif CJK TC}
\definecolor{eclipseStrings}{RGB}{42,0.0,255}
\definecolor{eclipseKeywords}{RGB}{127,0,85}
\colorlet{numb}{magenta!60!black}
% 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}
\title{My Title here}
\begin{abstract}
My Abstract here
\end{abstract}
\maketitle
\section{Introduction}
This is Chinese content 我
\begin{tcolorbox}
Chinese content in a box 我
\end{tcolorbox}
\bibliographystyle{ACM-Reference-Format}
\bibliography{sample-base}
\end{document}
以下是 ACM 提交平台报告的部分错误:
Below LaTeX Error detected:
! Critical Package xeCJK Error: The xeCJK package requires XeTeX to function. (xeCJK) (xeCJK) You must change your typesetting engine to (xeCJK) "xelatex" (xeCJK) instead of plain "latex" or "pdflatex" or (xeCJK) "lualatex". (xeCJK) Loading xeCJK will abort! Type to continue. ... l.43 ..._critical:nn { xeCJK } { Require-XeTeX } }
! Undefined control sequence. \setCJKmainfont l.112 \setCJKmainfont
! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.112 \setCJKmainfont{N
! LaTeX Error: Unicode character 我 (U+6211) not set up for use with LaTeX. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.299 \item 我
我尝试将代码和编译器改为 LaTeX(在 Overleaf 中),以下是修改后的代码:
\documentclass[acmsmall]{acmart}
\AtBeginDocument{%
\providecommand\BibTeX{{%
Bib\TeX}}}
\usepackage{CJKutf8}
\definecolor{eclipseStrings}{RGB}{42,0.0,255}
\definecolor{eclipseKeywords}{RGB}{127,0,85}
\colorlet{numb}{magenta!60!black}
% 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}
\title{My Title here}
\begin{abstract}
My Abstract here
\end{abstract}
\maketitle
\section{Introduction}
\begin{CJK}{UTF8}{gbsn}
This is Chinese content 我
\begin{tcolorbox}
Chinese content in a box 我
\end{tcolorbox}
\end{CJK}
\bibliographystyle{ACM-Reference-Format}
\bibliography{sample-base}
\end{document}
Overleaf 返回空 PDF没有错误,但有一些警告:
Package cmap Warning: pdftex in DVI mode - exiting.
Package hyperxmp Warning: Suppressing the _entire_ PDF Info dictionary. Please notify the hyperxmp maintainer.
Package caption Warning: The option `hypcap=true' will be ignored for this particular \caption on input line 667. See the caption package documentation for explanation.
我应该怎么做才能让它在上传到 ACM(或使用 LaTeX 编译)时没有错误?
答案1
生产团队正在转向 LuaLaTeX 以适应标记。据我所知,XeTeX 不在计划中。
最糟糕的情况是,如果你的作品只有几个汉字,你可以单独排版它们并作为图像插入。这很糟糕,但这种方法可行……