Bibtex使用方法简要说明(linux)

第一步:创建.bib文件 
格式如下:

以用{}包含具体内容
@article {name1,
author = {作者, 多个作者用 and 连接},
title = {标题},
journal = {期刊名},
volume = {卷20},
number = {页码},
year = {年份},
}
也可以直接用双引号“”包含具体内容
@book {name2,
author ="作者",
year ="年份2008",
title ="书名",
publisher ="出版社名称"
}

红色字体如article, book 表示所引用的参考文献的类型. bibtex共支持如下14种类型的参考文献,每种参考文献包括必须的条目(蓝色字体)也在后文中给出。接下来的"name1", 就是你在正文中引用这个文献的名称. 在文中,应当为/cite{name1}。

Bibliography entries included in a .bib file are split by types. The following types are understood by virtually all BibTeX styles:

参考文献类型说明Required fields 必填内容Optional fields 选填内容
articleAn article from a journal or magazine.author, title, journal, yearvolume, number, pages, month, note, key
bookA book with an explicit publisher.author/editor, title, publisher, yearvolume, series, address, edition, month, note, key, pages
bookletA work that is printed and bound, but without a named publisher or sponsoring institution.titleauthor, howpublished, address, month, year, note, key
conferenceThe same as inproceedings , included for Scribe compatibilityauthor, title, booktitle, yeareditor, pages, organization, publisher, address, month, note, key
inbookA part of a book, usually untitled. May be a chapter (or section or whatever) and/or a range of pages. author/editor, title, chapter/pages, publisher, yearvolume, series, address, edition, month, note, key
i ncollectionA part of a book having its own title.author, title, booktitle, yeareditor, pages, organization, publisher, address, month, note, key
inproceedingsAn article in a conference proceedings.author, title, booktitle, yeareditor, pages, organization, publisher, address, month, note, key
manualTechnical documentation.titleauthor, organization, address, edition, month, year, note, key
mastersthesisMaster's thesis .author, title, school, yearaddress, month, note, key
miscFor use when nothing else fitsnoneauthor, title, howpublished, month, year, note, key
phdthesisPh.D. thesisauthor, title, school, yearaddress, month, note, key
proceedingsThe proceedings of a conference.title, yeareditor, publisher, organization, address, month, note, key
t ec hreportA report published by a school or other institution, usually numbered within a seriesauthor, title, institution, yeartype, number, address, month, note, key
unpublishedA document having an author and title, but not formally published.author, title, note 
month, year, key

bibtex支持的参考文献的条目:

Item说明
addressPublisher's address (usually just the city, but can be the full address for lesser-known publishers)
annoteAn annotation for annotated bibliography styles
authorThe name(s) of the author(s) (in the case of more than one author, separated byand )
booktitleThe title of the book, if only part of it is being cited
chapterThe chapter number
crossrefThe key of the cross-referenced entry
editionThe edition of a book, long form (such as "first" or "second")
editorThe name(s) of the editor(s)
eprintA specification of an electronic publication, often a preprint or a technical report
howpublishedHow it was published, if the publishing method is nonstandard
institutionThe institution that was involved in the publishing, but not necessarily the publisher
journalThe journal or magazine the work was published in
keyA hidden field used for specifying or overriding the alphabetical order of entries (when the "author" and "editor" fields are missing). Note that this is very different from the key (mentioned just after this list) that is used to cite or cross-reference the entry.
monthThe month of publication (or, if unpublished, the month of creation)
noteMiscellaneous extra information
numberThe "number" of a journal, magazine, or tech-report, if applicable. (Most publications have a "volume", but no "number" field.)
organizationThe conference sponsor
pagesPage numbers, separated either by commas or double-hyphens. For books, the total number of pages.
publisher The publisher's name
schoolThe school where the thesis was written
seriesThe series of books the book was published in (e.g. "The Hardy Boys " or "Lecture Notes in Computer Science ")
title The title of the work
typeThe type of tech-report, for example, "Research Note"
urlThe WWW address
volumeThe volume of a journal or multi-volume book
yearThe year of publication (or, if unpublished, the year of creation)

第二步:在.tex文件中引用

1) 设置参考文献的类型 (bibliography style). 标准的为 plain:
     /bibliographystyle{plain}
将上面的命令放在 LaTeX 文档的 /begin{document}后边. 其它的类型包括
     unsrt -- 基本上跟 plain 类型一样, 除了参考文献的条目的编号是按照引用的顺序, 而不是按照作者的字母顺序.
     alpha --类似于 plain 类型, 当参考文献的条目的编号基于作者名字和出版年份的顺序.
     abbrv --缩写格式 .
2) 标记引用 (Make citations). 当你在文档中想使用引用时, 插入 LaTeX 命令
    /cite{引用文章名称}  --"引用文章名称" 就是前边定义@article后面的名称.
3) 告诉 LaTeX 生成参考文献列表 . 在 LaTeX 的结束前输入
     /bibliography{mybibfile}

第三步:编译

如果你的.tex文件名为myarticle.tex; 你的.bib文件名为mybibfile.bib

那么需要执行的命令如下:

latex myarticle.tex

bibtex myarticle

latex myarticle.tex

latex myarticle.tex

实例(源于[2]):

1. 建立.bib文件--mybibfile.bib

@misc{ Nobody06,

 author = "Nobody Jr",

 title = "My Article",

 year = "2006" }

2. 建立.tex文件myarticle.tex并在文中引用.bib文件

/documentclass[11pt]{article}

/usepackage{cite}

 /begin{document}

/title{My Article}

 /author{Nobody Jr.}

/date{Today}

/maketitle Blablabla said Nobody ~/cite{Nobody06}.

/bibliography{mybibfile}{}

/bibliographystyle{plain}

/end{document}

3. 编译:

[ysong@ECEL216D-2076 Desktop]$ latex myarticle.tex

 

  1. This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode   
  2. (./myarticle.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded.   
  3. (/usr/share/texmf/tex/latex/base/article.cls   
  4. Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) (/usr/share/texmf/tex/latex/cite/cite.sty)   
  5. No file myarticle.aux.   
  6. LaTeX Warning: Citation `Nobody06' on page 1 undefined on input line 11. No file myarticle.bbl. [1] (./myarticle.aux)   
  7. LaTeX Warning: There were undefined references.)   
  8. Output written on myarticle.dvi (1 page, 468 bytes).   
  9. Transcript written on myarticle.log.   

 

[ysong@ECEL216D-2076 Desktop]$ bibtex myarticle

  1. This is BibTeX, Version 0.99c (Web2C 7.5.4) The top-level auxiliary file: myarticle.aux The style file: plain.bst Database file #1: mybibfile.bib   

 

[ysong@ECEL216D-2076 Desktop]$ latex myarticle.tex

 

  1. This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./myarticle.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls   
  2. Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) (/usr/share/texmf/tex/latex/cite/cite.sty) (./myarticle.aux) LaTeX Warning: Citation `Nobody06' on page 1 undefined on input line 11. (./myarticle.bbl) [1] (./myarticle.aux)   
  3. LaTeX Warning: There were undefined references.   
  4. LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.)   
  5. Output written on myarticle.dvi (1 page, 592 bytes).   
  6. Transcript written on myarticle.log.   

 

[ysong@ECEL216D-2076 Desktop]$ latex myarticle.tex

  1. This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode   
  2. (./myarticle.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls   
  3. Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) (/usr/share/texmf/tex/latex/cite/cite.sty) (./myarticle.aux) (./myarticle.bbl) [1] (./myarticle.aux) )   
  4. Output written on myarticle.dvi (1 page, 548 bytes).   
  5. Transcript written on myarticle.log.  

生成的PDF文件如下图所示

mybib_pdf 
[1] BibTeX使用介绍

[2] http://www.bibtex.org/Format

[3] http://en.wikipedia.org/wiki/BibTeX

[4] http://bbs.ctex.org/viewthread.php?tid=26056

  • 6
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
BibTeX是一种用于管理引用文献的工具,它可以与LaTeX一起使用TeXstudio是一款常用的LaTeX编辑器,可以方便地使用BibTeX。下面是使用TeXstudio和BibTeX的步骤: 1. 编写LaTeX文档时,在引用文献的地方使用\cite命令,并在文档末尾添加bibliography命令,如下所示: ``` \documentclass{article} \begin{document} 这是一个引用\cite{lamport94}。 \bibliography{mybib} \bibliographystyle{plain} \end{document} ``` 2. 在同一目录下创建一个名为mybib.bib的文件,该文件应包含所有引用的文献信息。例如: ``` @book{lamport94, author = "Leslie Lamport", title = "LaTeX: A Document Preparation System", year = "1994", publisher = "Addison-Wesley", address = "Reading, Massachusetts" } ``` 3. 打开TeXstudio中的Options(选项)菜单,并选择Configure TeXstudio(配置TeXstudio)选项。在左侧菜单中选择Build(构建),然后在右侧菜单中选择Default Bibliography Tool(默认文献工具)。在下拉菜单中选择BibTeX,并单击OK。 4. 编译LaTeX文档。在第一次编译时,BibTeX会生成一个名为mybib.bbl的文件,该文件包含引用文献的格式化信息。然后再次编译LaTeX文档以使用此文件。 5. 如果您更改了mybib.bib文件中的引用文献信息,则必须再次运行BibTeX以更新mybib.bbl文件。可以在TeXstudio中使用Tools(工具)菜单中的BibTeX(或者键盘快捷键F8)运行BibTeX。 这就是使用TeXstudio和BibTeX管理引用文献的基本步骤。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值