写作业的时候需要引用,但是也不想直接下载ACM的模板去套,想着只用ACM的引用格式。
ACM-Reference-Format.srt文件可以去ACM的网站去下载,这里说一下如何引用。
\documentclass[a4paper,10pt]{article}
\usepackage[number]{natbib} %至关重要的包 不然就不是数字格式了。
\usepackage{hyperref}
\begin{document}
This is an example of a paragraph with in-text
citations using the ACM-Reference-Format BibTeX style.
Here is a reference to a journal article with
a single author \cite{article1}, to a journal
article with two authors \cite{article2} and
three authors \cite{article3}, and to a book
with four authors \cite{book4}.
\bibliographystyle{ACM-Reference-Format} %引用格式文件
\bibliography{sampleBibFile}
\end{document}
当然,删除
\usepackage[number]{natbib} 命令,
直接使用自带的acm格式也可以:
\bibliographystyle{acm}
这里有一个很好的网站,对于各种各样的引用格式都写得非常清楚,也有具体的实例。