使用 bibtex 批量生成 bibitem 内容的方法
一些期刊要求在提交论文的latex 版本时,不能将参考文献放在.bib 文件里,要求文献以bibitem的形式写在latex程序里,如下格式:
\begin{thebibliography}{10}
\bibitem{adler1998toward}
Jeffrey~L Adler and Victor~J Blue.
\newblock Toward the design of intelligent traveler information systems.
\newblock {\em Transportation Research Part C: Emerging Technologies},6(3):157--172, 1998.
\end{thebibliography}
由于文献较多时逐个手动在latex 中输入会比较繁琐,可以通过bibtex 实现批量处理。
首先将所有文献的bibtex 引用放在一起,存为.bib 文件。然后新建一个.tex 文件,并写如下代码:
\documentclass[preprint,review,12pt,authoryear]{elsarticle}
\begin{document}
\nocite{*}
\bibliographystyle{plain}
\bibliography{bibfile_name}
\end{document}
注意:
\documentclass[preprint,review,12pt,authoryear]{elsarticle}
的作用是按照期刊指定的格式生成文献的格式,包括年份位置、期刊斜体等;
\nocite{*}
的作用是不对文献进行引用,但可以生成文献列表;
\bibliographystyle{plain}
是规定生成参考文献列表顺序的格式,plain
即按字母顺序等格式。其他格式见http://blog.sina.com.cn/s/blog_5caa94a0010185io.html。
\bibliography{bibfile_name}
为引用创建的.bib 文件。
然后在新建的.tex 中运行Latex 或PDFLatex ,再点击bibtex 即可生成包含所有bibitem 内容的.bbl 文件。
然后拷贝.bbl 文件中的所有内容到正文的latex 程序即可使用。