LaTeX/文献管理 出自CTeXWiki

来源:互联网 发布:java中类和对象的定义 编辑:程序博客网 时间:2024/04/27 14:21

BibTeX 是学术研究,论文写作的重要辅助工具。作者维护一个或者几个 bib 文件来储存一些文献条目,然后通过 bst 文件定制文献显示的样式,具有高度的灵活性。

目录

  • 1 格式
    • 1.1 作者名
    • 1.2 模板
  • 2 引用
  • 3 样式
  • 4 编译
  • 5 GUI 软件
  • 6 Tips
    • 6.1 引用网址
    • 6.2 Google Scholar

格式

bib 文件中一个典型的条目如下

@article{greenwade93, author = "George D. Greenwade", title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})", year = "1993", journal = "TUGBoat", volume = "14", number = "3", pages = "342--351" }

每一文献条目均以 @type 开头,此处 @article 声明该文献为期刊的 article 类型。花括号里是文献条目的域,以逗号分隔。有些是必要的,有些是可选的,不同的 @type 所要求的必要文献域会有差异,请看模板。第一个 greenwade93 为 bibkey, 用来识别并引用该文献。其后每一文献域的等号左边叫做关键词。等号意为赋值。等号右边为相应关键词的值,用英文双引号括起来,也可以使用花括号 { }。但是花括号太多可能比较混乱,所以推荐使用双引号。对于由简单数字或者一个单词组成的值,也可以不加双引号而写成

year = 1993, journal = TUGBoat, volume = 14, number = 3

而不会有任何问题。

BibTeX 不一定保证你输入的大写字母一定会出现,所以在上述例子中大写字母被放在花括号分隔的组里。或者你可以把它们放入一个组里,

title = "{The Comprehensive Tex Archive Network (CTAN)}" title = {{The Comprehensive Tex Archive Network (CTAN)}}

作者名

有两种方式表示作者名字。

  • forename surname
  • surname, forename

都可以正确的被 BibTeX 识别。一些日耳曼名字的 surname 是两个单词,比如 John von Neumann。 这时候就需要对其手动分组,写成John {von Neumann}。要正确分辨这些名字很不容易。

多个作者之间需要用 and 连接。这里的 and 是一个被 BibTeX 保留的词,不可缺少。

模板

@article 
期刊杂志的论文
  • 必要域: author, title, journal, year.
  • 可选域: volume, number, pages, month, note.
@book 
公开出版的图书
  • 必要域: author/editor, title, publisher, year.
  • 可选域: volume/number, series, address, edition, month, note.
@booklet 
无出版商或作者的图书
  • 必要域: title.
  • 可选域: author, howpublished, address, month, year, note.
@conference 
等价于 inproceedings
  • 必要域: author, title, booktitle, year.
  • 可选域: editor, volume/number, series, pages, address, month, organization, publisher, note.
@inbook 
书籍的一部分章节
  • 必要域: author/editor, title, chapter and/or pages, publisher, year.
  • 可选域: volume/number, series, type, address, edition, month, note.
@incollection 
书籍中带独立标题的章节
  • 必要域: author, title, booktitle, publisher, year.
  • 可选域: editor, volume/number, series, type, chapter, pages, address, edition, month, note.
@inproceedings 
会议论文集中的一篇
  • 必要域: author, title, booktitle, year.
  • 可选域: editor, volume/number, series, pages, address, month, organization, publisher, note.
@manual 
技术文档
  • 必要域: title.
  • 可选域: author, organization, address, edition, month, year, note.
@mastersthesis 
硕士论文
  • 必要域: author, title, school, year.
  • 可选域: type, address, month, note.
@misc 
其他
  • 必要域: none
  • 可选域: author, title, howpublished, month, year, note.
@phdthesis 
博士论文
  • 必要域: author, title, year, school.
  • 可选域: address, month, keywords, note.
@proceedings 
会议论文集
  • 必要域: title, year.
  • 可选域: editor, volume/number, series, address, month, organization, publisher, note.
@techreport 
教育,商业机构的技术报告
  • 必要域: author, title, institution, year.
  • 可选域: type, number, address, month, note.
@unpublished 
未出版的论文,图书
  • 必要域: author, title, note.
  • 可选域: month, year.

引用

要在正文中引用文献,只需写 \cite{bibkey} 即可。

要引用具体的某页或者图表,可以使用 \cite 命令的可选项

\cite[p. 215]{citation01}

多个连续引用可以合并

\cite{bibkey1,bibkey2,bibkey3}

未引用的文献也可以出现在参考文献里

\nocite{lamport95}

将会把 lamport95 列入参考文献。另一个命令 \nocite{*} 将会把 bib 文件中所有条目列出。

更多关于文献引用的话题,请看natbib。

样式

文献样式由 bst 文件控制。一般有 plain, abbrv, alpha,unsrt 等,BibTeX Style Examples 给出很多常见样式的例子。

要定制自己的样式文件也很容易,需要 makebst 程序。

latex makebst

然后耐心回答一些问题。问题的内容可以参考 merlin manual。问答内容被记录在一个 .dbj 文件。然后

latex foo.dbj

即可。要是不满意,可以直接修改 .dbj 文件的内容,重新生成。.bst 文件需要放在 latex 可以识别的路径中。

编译

正确编译使用 BibTeX 的文档,需要四步:

  1. latex foo
  2. bibtex foo
  3. latex foo
  4. latex foo

GUI 软件

  • JabRef
  • Endnote

Tips

引用网址

如果文献条目为网址,

@misc{website:fermentas-lambda, author = "Fermentas Inc.", title = "Phage Lambda: description \& restriction map", month = "November", year = 2008, howpublished = "\url{http://www.fermentas.com/techinfo/nucleicacids/maplambda.htm}" }

如果要在文献域里使用网址

  • 导入 url 宏包 \usepackage{url}, 把网址放在 @misc 的 howpublished 域,或者 @techreport,@article,@book 的 note 域。
howpublished = "\url{http://www.example.com}"
  • 导入 hyperref 宏包,\usepackage{hyperref},使用 url 域。
url = "http://www.example.com"

注意并不是 hyperref 宏包提供 url 域。Natbib 提供的样式文件 plainnat 等直接支持 url 域。要修改普通的 bst 支持 url 域,可以使用 urlbst 程序。

Google Scholar

推荐使用 Google Scholar 搜寻文献,支持 BibTeX 格式的输出。

注意,默认情况下,Google scholar 关闭了输出选项,可以通过如下步骤开启此操作

  1. 打开Google Scholar
  2. 选择右边的 scholar preference 按钮
  3. 在打开的页面,拉到最下面,在 Bibliography Manager 一栏里面选择 Show links to import citations into BibTeX
  4. 以后就可以直接在 Google Scholar 里面导出搜索文献的结果了
取自"http://wiki.ctex.org/index.php/LaTeX/文献管理"
0 0
原创粉丝点击