前言
在用latex写论文的时候,会遇到各种模板,如果你要投IEEE的期刊或者会议,就得使用相应的latex模板。对于普通使用者来说,在写latex的时候这些不同的模板大同小异,比如将模板中的标题,摘要,介绍等等替换为自己的。
但是有一个地方,不同的模板有一些不一样,那就是引用参考文献部分,那里需要使用命令,\bibliography{xxx}
或者\bibliographystyle{xxx}
,这些xxx命令有的模板里面会介绍是什么,但是今天遇到没有介绍的,特此记录。
参考文献的两种导入方式
文本导入
不喜欢这种,特别麻烦,需要自己注意参考文献格式,比如需要写几个作者。
下面是一个IEEE会议模板的例子(不同模板命令可能不同)
\cite{b6}.#引用b6这个参考文献。
\begin{thebibliography}{00}
\bibitem{b1} G. Eason, B. Noble, and I. N. Sneddon, ``On certain integrals of Lipschitz-Hankel type involving products of Bessel functions,'' Phil. Trans. Roy. Soc. London, vol. A247, pp. 529--551, April 1955.
\bibitem{b2} J. Clerk Maxwell, A Treatise on Electricity and Magnetism, 3rd ed., vol. 2. Oxford: Clarendon, 1892, pp.68--73.
\bibitem{b3} I. S. Jacobs and C. P. Bean, ``Fine particles, thin films and exchange anisotropy,'' in Magnetism, vol. III, G. T. Rado and H. Suhl, Eds. New York: Academic, 1963, pp. 271--350.
\bibitem{b4} K. Elissa, ``Title of paper if known,'' unpublished.
\bibitem{b5} R. Nicole, ``Title of paper with only first word capitalized,'' J. Name Stand. Abbrev., in press.
\bibitem{b6} Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa, ``Electron spectroscopy studies on magneto-optical media and plastic substrate interface,'' IEEE Transl. J. Magn. Japan, vol. 2, pp. 740--741, August 1987 [Digests 9th Annual Conf. Magnetics Japan, p. 301, 1982].
\bibitem{b7} M. Young, The Technical Writer's Handbook. Mill Valley, CA: University Science, 1989.
\end{thebibliography}
文件导入
这个是推荐的,也是本文后续导入参考文献的方法。
这种方法需要建立一个reference.bib
文件,然后将一篇论文的.bibtex
引用格式复制到这个文件里面,然后就是怎么引用的问题了。
动脑想一想,在正文文件.tex
文件中,我们应该做哪几步呢?首先,肯定是导入这个文件,然后就是控制参考文献的格式,最后就是引用的命令(这个很简单,模板里面绝对有写,一般是\cite{}
或者\citep{}
,你自己看一看),下面我们就是记录一下各种模板这两步的命令分别是什么。
IEEE
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv,reference}%第二个参数参数是你的bib文件的名字
ACM
\bibliographystyle{ACM-Reference-Format}
\bibliography{ref}%你的bib文件的名字
NeurIPS
NeurIPS使用的是natbib包来管理引用系统,并且默认就是导入的,不需要再\usepackage了。那么那个bibliographystyle填写什么呢?官方是说随便一个style都行。
问题来了,natbib提供哪些内置style供使用呢?可以查看网站,https://www.overleaf.com/learn/latex/Natbib_bibliography_styles。
个人比较喜欢rusnat,即
\bibliographystyle{rusnat}