![包含中文的ACM论文提交不允许使用xeCJK包,也不支持XeTeX编译器](https://linux22.com/image/472416/%E5%8C%85%E5%90%AB%E4%B8%AD%E6%96%87%E7%9A%84ACM%E8%AE%BA%E6%96%87%E6%8F%90%E4%BA%A4%E4%B8%8D%E5%85%81%E8%AE%B8%E4%BD%BF%E7%94%A8xeCJK%E5%8C%85%EF%BC%8C%E4%B9%9F%E4%B8%8D%E6%94%AF%E6%8C%81XeTeX%E7%BC%96%E8%AF%91%E5%99%A8.png)
使用 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 不在计划中。
最糟糕的情况是,如果你的作品只有几个汉字,你可以单独排版它们并作为图像插入。这很糟糕,但这种方法可行……