重要:如果编译失败删除新生成的文件 .aux .bbl 文件重新开始!
1、下载LaTex模板
下载网址:https://www.acm.org/publications/taps/latex-best-practices
下载的文件夹里含有多个sample,一般期刊就是acmsmall:
All journals use acmsmall with the following exceptions:
o acmlarge - Large single column format, used for JOCCH, TAP
o acmtog - Large double column format, used for TOG
2、Windows or Linux/OS?
由于acm要求使用libertine字体,这字体是linux独有的!
(注意看字母c就能发现区别)
Win是安装不上的,会有各种各样的错误!请移步到Linux/OS编译
如果不介意字体的话,用什么都可以的。
如果非要选择windows+winedt编译,那么会遇到以下情况:
(1)用winedt打开.tex文件显示error reading错误:
直接双击打开sample-acmsmall.tex,winedt界面一边空白,并且提示:error reading:
可能是一些编码问题,解决方案是将原有后缀.tex改成.txt,然后在windet中新建一个空白文件,把原有内容复制粘贴到新文件中,保存~
非常感谢这位博主的分享:https://blog.csdn.net/zjc910997316/article/details/89178059
一般到这里就可以正常用win编译了,如果不介意字体,也没什么问题,可以正常生成pdf。
(2)打开.tex文件显示error reading错误:
此时可以编译了,但是编辑结束显示:
Error Launching Console Application PDFTeXify …
Command Line: gbk2uni.exe “XXX”
Startup Folder: XXX
系统找不到指定的文件
解决方案是下载gbk2uni.zip,解压缩后将其中的gbk2uni.exe复制粘贴到WinEdt安装路径。
(安装路径在Options-Excution mode-Tex system中查看)
非常感谢这位博主的分享:https://www.cnblogs.com/coolqiyu/p/5727372.html
gbk2uni.zip我是从这里下载的:https://download.csdn.net/download/pang9998/10991348
(3)编译成功,但打开后发现字体和原版的sample-acmsmall.pdf不太一样……
去看了author guide,发现:
The “ acmart ” document class requires the use of the “Libertine” typeface family. Your TEX installation should include this set of packages. Please do not substitute other typefaces. The “ lmodern ” and “ ltimes ” packages should not be used, as they will override the built-in typeface families.
STEP1:下载字体文件包https://www.ctan.org/tex-archive/fonts/libertine/
STEP2:安装,参考这个教程https://blog.csdn.net/brave_stone/article/details/88619556[感谢博主的分享!!!]
制作文件夹步骤比较繁琐,如果也是安装libertine可以直接下载这个我弄好的:
STEP3:在Tex文件中加入这行代码
\usepackage{libertine}
STEP4:又报错啦,这次说:
File `mweights.sty’ not found…
参考教程https://www.pianshen.com/article/28371974605/[感谢博主的分享!!!]
与他不同的是,我在这里下载的mweights.sty:https://download.csdn.net/download/RainbowCoral/12894118?utm_source=bbsseo
STEP5:一个小错误:File ‘LinLibertine_I.tex’ not found
这个文件在刚才下载的libertine文件包里,复制到模板路径下就行了
STEP6:报错:! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts
参考了这个教程https://blog.csdn.net/khqxf/article/details/107942802[感谢博主分享!!!]
这里有一些讨论https://github.com/latextemplates/scientific-thesis-template/issues/28
以上方案都没有解决这个error!
我觉得windows不能安装Libertine字体,毕竟叫做Linux Libertine……
STEP7:我单独下载了linux libertine o字体,从控制面板安装了。现在我的word都可以用这个字体,但是tex还是检测不到……
迷惑
3、然后我换了mac
环境是:mbp+texlive+texshop
(1)下载latex模板,解压缩
双击.tex文件:acmart-master/samples/sample-acmsmall.tex
非常顺利就打开了,所以最开始的错误就是在给我提示啊!我竟然没发现!!
(2)安装libertine字体
在latex文件中加入\usepackage{libertine}
,如果报错就说明电脑没有该字体
安装步骤:
STEP1: 下载压缩包,解压缩;
STEP2: 打开程序中的‘字体册’,按左上角的加号,把解压后的文件夹导入
https://blog.csdn.net/xovee/article/details/104879523[感谢博主分享!!]
4、编译reference
STEP1:在\enddocument之前,接入以下两句。
其中bibfilename是.bib文件的文件名,名称不可有空格,不带后缀。例如刚刚建立的.bib文件是paper.bib,那么bibfilename就是paper。
\bibliographystyle{ACM-Reference-Format}
\bibliography{bibfilename}
STEP2:运行步骤如下:
- 用LaTeX编译 .tex 文件 , 会生成一个 .aux 的文件, 这告诉 BibTeX 将使用那些应用;
- 用BibTeX 编译 .bib 文件(我这一步报错了,但不影响结果);
- 再次用LaTeX 编译 .tex 文件, 这个时候在文档中已经包含了参考文献, 但此时引用的编号可能不正确;(都是问号)
- 最后用 LaTeX 编译你的 .tex 文件, 如果一切顺利的话, 这是所有东西都已正常了。
https://blog.csdn.net/gxllhdx/article/details/91865712[感谢博主的分享!!]
5、Appendix
\section*{Appendix}
\appendix
\section{Proof of Theorem 1}
...
\section{Proof of Theorem 2}
6、其他问题
(1)连续几个子表格对不齐的情况:
\begin{small}
\begin{tabular}
...
\end{tabular}
\begin{tabular}
...
\end{tabular}
这里间隔一行,否则表格对不齐
\end{small}
(2)打不开.eps图片:
\usepackage{epstopdf}
(3)如何从ACM的论文模板中删除ACM Reference Format信息:
在\documentclass[sigconf]{acmart}下面直接添加这几行即可去掉
\settopmatter{printacmref=false} % Removes citation information below abstract
\renewcommand\footnotetextcopyrightpermission[1]{} % removes footnote with conference information in first column
\pagestyle{plain} % removes running headers
转载自:https://blog.csdn.net/qq_36136497/article/details/89085897