Latex-引用文献按引用顺序排号

来源:互联网 发布:gnuplot软件微盘 编辑:程序博客网 时间:2024/04/28 07:54

文章转载自:http://blog.sina.com.cn/s/blog_7e4ac8b50102uxlg.html

http://blog.sina.com.cn/s/blog_4fa881040100wtty.html


BibTeX 是一种格式和一个程序, 用于协调LaTeX的参考文献处理.

BibTeX 使用数据库的的方式来管理参考文献. BibTeX 文件的后缀名为 .bib . 先来看一个例子

@article{name1,
author = {作者, 多个作者用 and 连接},
title = {标题},
journal = {期刊名},
volume = {卷20},
number = {页码},
year = {年份},
abstract = {摘要, 这个主要是引用的时候自己参考的, 这一行不是必须的}
}

@book{name2,
author =”作者”,
year=”年份2008″,
title=”书名”,
publisher =”出版社名称”
}

说明:

  1. 第一行@article 告诉 BibTeX 这是一个文章类型的参考文献. 还有其它格式, 例如 article, book, booklet, conference, inbook, incollection, inproceedings, manual, misc, mastersthesis, phdthesis, proceedings, techreport, unpublished 等等.
  2. 接下来的”name1″, 就是你在正文中应用这个条目的名称.
  3. 其它就是参考文献里面的具体内容啦.

在LaTeX中使用BibTeX
为了在LaTeX中使用BibTeX 数据库, 你必须先做下面三件事情:

1) 设置参考文献的类型 (bibliography style). 标准的为 plain:

\bibliographystyle{plain}

将上面的命令放在 LaTeX 文档的 \begin{document}后边. 其它的类型包括

  • unsrt – 基本上跟 plain 类型一样, 除了参考文献的条目的编号是按照引用的顺序, 而不是按照作者的字母顺序.
  • alpha – 类似于 plain 类型, 当参考文献的条目的编号基于作者名字和出版年份的顺序.
  • abbrv – 缩写格式 .

2) 标记引用 (Make citations). 当你在文档中想使用引用时, 插入 LaTeX 命令

\cite{引用文章名称}

“引用文章名称” 就是前边定义@article后面的名称.

3) 告诉LaTeX生成参考文献列表 . 在 LaTeX 的结束前输入

\bibliography{bibfile}

这里bibfile 就是你的 BibTeX 数据库文件 bibfile.bib .

运行 BibTeX
分为下面四步

  • 用LaTeX编译你的 .tex 文件 , 这是生成一个 .aux 的文件, 这告诉 BibTeX 将使用那些应用.
  • 用BibTeX 编译 .bib 文件.
  • 再次用LaTeX 编译你的 .tex 文件, 这个时候在文档中已经包含了参考文献, 但此时引用的编号可能不正确.
  • 最后用 LaTeX 编译你的 .tex 文件, 如果一切顺利的话, 这是所有东西都已正常了.

例子: 将上面的 BibTeX 的的例子保存为 bibtex-example.bib .

\documentclass{article}
\usepackage{CJK}

\begin{document} 
\begin{CJK}{UTF8}{gkai} 
%我是在linux下用使用latex的, window用户将上一行改为\begin{CJK}{GBK}{kai} 
text\cite{name1}\cite{name2} 
中文 
把Latex中的 Reference 写成中文的”参考文献” 
%如果文档类是article之类的, 用\renewcommand\refname{参考文献} 
%如果文档类是book之类的, 用\renewcommand\bibname{参考文献} 
\renewcommand\refname{参考文献} 
\bibliographystyle{plain} 
\bibliography{ bibtex-example.bib} 
\end{CJK} 
\end{document}

将上面的内容保存为bibtex-example.tex .

latex编译一次, bibtex 编译一次, 再用 latex编译两次就大功告成了


完整过程
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.
5. Run latex for one last time (not always needed): Sometimes step 4 causes changes in line or page breaks that affect cross refence data for page or section links; this final pass through LaTeX should resolve those changes.


按照cite顺序自动排序文献编号,用\bibliographystyle{unsrt}

Latex鈥斺斝rick(四)让引用文献按引用顺序排号

其他几种如下[转]:

 

通过设置 bibliographystyle 就可以达到上述目的,Bibtex 自身已具备排序的功能,而且可以选择自己想要的排序方式。Bibtex 已自带有 8 种样式,分别如下(下面内容摘自 LaTeX 编辑部):

1. plain,按字母的顺序排列,比较次序为作者、年度和标题

2. unsrt,样式同plain,只是按照引用的先后排序

3. alpha,用作者名首字母+年份后两位作标号,以字母顺序排序

4. abbrv,类似plain,将月份全拼改为缩写,更显紧凑:

5. ieeetr,国际电气电子工程师协会期刊样式:

6. acm,美国计算机学会期刊样式:

7. siam,美国工业和应用数学学会期刊样式:

8. apalike,美国心理学学会期刊样式:

阅读全文
'); })();
0 0
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 汇海画室 艺卓画室 孪生画室 唯美画室 020画室 顶峰画室 画室集训 印象画室 灵感画室 千万不要去画室当老师 北京画室排名 田柾国play画室 杭州画室排名 武汉北艺画室 郑州力度画室 济南美术画室 画室招生简章 画室布置图片 全国画室排名 北京于萍画室学费 北京小泽画室学费 中国画室排名 北京非凡画室 北京水木源画室 北京博艺画室 北京四维画室 哪家画室比较好 高考培训画室 清美屹立画室 央美附近的画室 央美艺考画室 新意新象画室 清美唯艺画室 少儿美术画室 好的美术画室 清华美院画室 文人清美画室 于萍画室怎么样 素描画室一角 美术联考 美术高考培训画室