Latex参考文献排序

最近由于需要开始尝试使用LaTeX。瞎忙活了好多天,最近总算有一点点眉目了。
由于以前没有接触过LaTeX,而且网上有好多种不同的编译、编辑工具,我也不知道用哪个。偶尔看到LyTeX:
LyTeX 是一个绿色的中文 TeX 套装,它包含绿色版还是安装版,无论哪种版本都不会与系统的其它 TeX 套装冲突。它包含了 LaTeX,XeTeX,TeXworks 和 LyX,特别地包含了绝大部分 LaTeX 宏包,使用时基本不会遇到缺乏宏包的问题。它同时支持 TeXLive 和 MiKTeX,方便不同爱好的用户。
1. 几个文件类型:
tex---就是tex文件,这个地球人都知道,是文章所在的主要文件
bib---参考文献所在的文件
bst---参考文献样式文件
.tex 文件的最后加上\bibliography{xxx},  xxx是bib文件同名,在\bibliography中不需要加载扩展名。

2. 模版:
如IEEE需要:

\bibliographystyle{IEEEtran}   
\bibliography{IEEEabrv,bare_conf}

第一行表示使用的bst文件, 这个不用管它。
第二行的第一个参数表示使用的bib文件, 第二个参数是你自己写的bib文件。

如果是其他的模板:
\bibliographystyle{ownbib}
只需这一句就可以,  参数就是自己的bib文件名。

3. 编译生成.bbl文件:
分成4步
1. Run latex: LaTeX finds the references that are cited in the .tex file
   and the declaration of the bibliography style file (.bst) and
   bibliography database (.bib) and records them in the .aux file.
2. Run bibtex: BibTeX reads the .aux file to determine what cited entries
   to pull from what .bib files, formats and sorts the cited references
   according to the rules in the .bst file, and write the .bbl file.
3. Run latex again: LaTeX now finds the .bbl file and will read it and
   write cross reference data to the .aux file.
4. Run latex once more: LaTeX now finds the cross reference data for the
   citations in the .aux file and will resolve the citations.
既:
1. 用LaTeX或PDFLaTeX编译你的主TeX文件一次,生成.aux文件。
2. 然后你在主TeX文件的WinEdt面板上点bibtex按钮,编译.bib 文件一次,生成bbl文件。
3。再用LaTeX或PDFLaTeX编译你的主TeX文件两次.运行两遍的原因是第一遍是插入,第二遍是排序。

4. 在文章末尾\end{document}之前加入以下三行:
\renewcommand\refname{Reference}
\bibliographystyle{plain}
\bibliography{Thesis}
其中第一行是参考文献的标题,标题是Reference;第二行是格式,还有其他格式见此处,这里用plain;第三行是一个bib格式文件的名字,最好和tex文件名称一致,编译起来方便一些。
(有一点小小要注意的地方:最常见的引用格式是plain,它是按作者字母排序的,如果要按引用顺序来排序,推荐用格式unsrt)

转自:http://blog.sina.com.cn/s/blog_97fcf3c40101e8we.html

猜你喜欢

转载自blog.csdn.net/qq_16568205/article/details/79205698